GetSex

From UODemo Wiki
Revision as of 20:52, 24 November 2012 by Batlin (talk | contribs)

Jump to: navigation, search

integer getSex(object Mobile);

The getSex function will return the sex of a mobile. The returned value can be 0, 1 or 2.

0: the given object is not a valid mobile or is a valid mobile and has a male body type (400)
1: the given object is a valid mobile and has a female body type (401)
2: the given object is a valid mobile but does not have a male nor a female body type

Because the return value 0 indicates both a male or an invalid object/mobile you should use the isMobile function in your scripts to ensure that the object is valid!
Because ghosts have a body type of 402 or 403 you cannot use this function on player ghosts.

Return to the Command List.