GetItemAtSlot

From UODemo Wiki
Revision as of 18:58, 21 July 2016 by Derrick (talk | contribs) (Update URL's to point to UO98.org)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

object getItemAtSlot(object Mobile, integer SlotNumber);

If the given Mobile is not a valid mobile then NULL is returned.
If the slot number is not between 1 or 30 then NULL is returned.
Otherwise the equipeded item at the specified index (SlotNumber) is returned.

You can use getItemAtSlot(29) to get the bank object.

There is a bug in this function. 30 is not a valid slot, 29 is the last valid one.
Due to the memory lay-out, the function will interprete the mobile's direction as if it were an object.
Thus: calling getItemAtSlot(30) will crash the server if the mobile is not facing North.
Also view the forums : Discussion of this bug


Return to the Command List.