| Class Hierarchy |
|---|
UObject Account PolCore() DataFileElement
|
| Guild Script Datastore
+---------+--------+
| | Array Dictionary Datafile
Character Item
| | AuxConnection Error String
NPC |
| Struct
+------------------+--------------+-----------+
| | | |
Equipment Lockable Map Multi
| | |
+---+----+ +----+--------+ +----+----+
| | | | | |
Armor Weapon Door Container Boat House
|
+----+----+
| |
Spellbook Corpse
|
Last Modified: 6/12/2003
| Armor | |||
|---|---|---|---|
| Parent | |||
| Equipment | |||
| Explanation | |||
| Equipable items that protect against damage in combat | |||
| Members | |||
| Name | Type | Desc | Access |
| ar_mod | integer | Armor factor modifier | r/w |
| ar | integer | Modified armor factor | r/o |
| ar_base | integer | Base armor factor (as in itemdesc.cfg) | r/o |
| onhitscript | string | Script name that runs when armor is hit | r/w |
| Boat | |||
|---|---|---|---|
| Parent | |||
| Multi | |||
| Explanation | |||
| A Multi object that moves in water. | |||
| Members | |||
| Name | Type | Desc | Access |
| items | array | Array of Item References on the deck of the boat | r/o |
| mobiles | array | Array of Character References on the deck | r/o |
| has_offline_mobiles | boolean | true if players are logged out on the deck | r/o |
| tillerman | Item | ItemRef to the tillerman item | r/o |
| portplank | Item | ItemRef to the left-side plank item | r/o |
| starboardplank | Item | ItemRef to the right-side plank item | r/o |
| hold | Item | ItemRef to the hold container item | r/o |
| Methods | |||
| Prototype | Returns | Desc | |
| move_offline_mobiles(int x, int y, int z) | true/false | moves offline mobiles on boat to x,y,z | |
| Character | |||
|---|---|---|---|
| Parent | |||
| UObject | |||
| Children | |||
| NPC | |||
| Explanation | |||
| A mobile object that exists in the world (NPC or player character) | |||
| Members | |||
| Name | Type | Desc | Access |
| warmode | integer | 1 if in warmode | r/o |
| gender | integer | 0=male 1=female | r/w |
| trueobjtype | integer | original objtype | r/w |
| truecolor | integer | original color | r/w |
| ar_mod | integer | Armor factor modifier | r/w |
| hidden | boolean | 1 = normal players cannot see | r/w |
| concealed | integer | cmdlevel below this value cannot see | r/w |
| frozen | boolean | 1 = player is frozen (by a GM) | r/w |
| paralyzed | boolean | 1 = player is paralyzed | r/w |
| poisoned | boolean | 1 = player is poisoned | r/w |
| stealthsteps | integer | number of walk steps left until player is revealed | r/w |
| squelched | integer | 1 = player cannot speak | r/o |
| dead | integer | 1 = player is dead | r/o |
| ar | integer | total armor factor | r/o |
| backpack | Item | Reference to character's pack (if any) | r/o |
| weapon | Item | Reference to character's weapon (if any) | r/o |
| acctname | Account | Account name string (if not NPC) | r/o |
| acct | integer | Account Reference (if not NPC) | r/o |
| cmdlevel | integer | command level of character | r/w |
| cmdlevelstr | String | string name of command level | r/o |
| criminal | integer | 1 = player is criminal (gray) | r/o |
| ip | String | IP Address string | r/o |
| gold | integer | Amount of gold in character's pack | r/o |
| title_prefix | String | String placed before name i.e. Lord Racalac | r/w |
| title_suffix | String | String placed after name i.e. Racalac the Brave | r/w |
| title_guild | String | String guild title i.e. [ROX, super d00d] Racalac | r/w |
| title_race | String | String race title after suffix in paperdoll | r/w |
| guildid | integer | guild ID number | r/o |
| guild | Guild | guild object reference | r/o |
| murderer | boolean | 1 = player flagged murderer (red) | r/w |
| attached | Script | Script reference for attached script | r/o |
| reportables | Array | (reputation system) Array of Structs: { serial, killer, gameclock }, serial = killer's serial, killer = 'offline mobile reference' to the killer, gameclock = game time when the death occurred | r/o |
| clientversion | string | UO Client version string | r/o |
| Methods | |||
| Prototype | Returns | Desc | |
| setpoisoned(bool) | true/error | sets the character poisoned, controller of calling script is flagged as in repsystem | |
| setparalyzed(bool) | true/error | sets the character paralyzed, controller of calling script is flagged as in repsystem | |
| setcriminal(int level) | true/error | sets the character criminal. level multiplies the CriminalFlagInterval as defined in repsys.cfg. level=0 clears criminal timer. | |
| setlightlevel(int level, int duration) | true | sets the light level of the character to 'level' for 'duration' seconds | |
| squelch(int duration) | true | character cannot talk for 'duration' seconds. -1 means forever. 0 clears the squelch | |
| enable(string setting) | true/error | enables the 'granted' privilage to the character | |
| disable(string setting) | true | disables the 'granted' privilage to the character | |
| enabled(string setting) | true/false | true if the privilage is enabled | |
| setcmdlevel(string cmdlevel) | true/error | grants the command level to the char as defined in cmds.cfg | |
| spendgold(int amount) | true/error | if enough gold, removes it from the player's pack | |
| setmurderer(bool) | true/error | flags the character as a murderer (red) | |
| removereportable(int serial, int gameclock) | true/error | removes the killer with 'serial' from the reportables list that was added at 'gameclock' | |
| getgottenitem() | error/ItemRef | returns an ItemRef to the item held on the player's cursor, if any. | |
| setwarmode(boolean) | integer/error | Sets the internal warmode flag and sends the update to the player. Returns the new warmode value. | |
| Container | |||
|---|---|---|---|
| Parent | |||
| Lockable | |||
| Children | |||
| Corpse | |||
| Explanation | |||
| Items that can be locked, and have other items inside them |
| Corpse | |||
|---|---|---|---|
| Parent | |||
| Lockable | |||
| Explanation | |||
| Objects that are created when character objects are killed | |||
| Members | |||
| Name | Type | Desc | Access |
| corpsetype | integer | objtype of the character killed | r/o |
| Door | |||
|---|---|---|---|
| Parent | |||
| Lockable | |||
| Explanation | |||
| A door item that automatically closes. | |||
| Members | |||
| Name | Type | Desc | Access |
| isopen | boolean | true if the door is open | r/o |
| Methods | |||
| Prototype | Returns | Desc | |
| open() | true | opens the door | |
| close() | true | closes the door | |
| toggle() | true | toggles the door to the other state | |
| Equipment | |||
|---|---|---|---|
| Parent | |||
| Item | |||
| Children | |||
| Weapon | |||
| Armor | |||
| Explanation | |||
| Class containing concrete subclasses which are equipable and have hit points | |||
| Members | |||
| Name | Type | Desc | Access |
| quality | float | 1.0=Average | r/w |
| hp | integer | Hit points of item | r/w |
| maxhp_mod | integer | Maximum Hit Point modification | r/w |
| maxhp | integer | Maximum Hit Points of item | r/o |
| House | |||
|---|---|---|---|
| Parent | |||
| Multi | |||
| Explanation | |||
| A Multi object where players hoard items. | |||
| Members | |||
| Name | Type | Desc | Access |
| components | Array | Array of House components, i.e. sign, doors | r/o |
| items | Array | Array of Item References in the house | r/o |
| mobiles | Array | Array of Character References in the house | r/o |
| Item | |||
|---|---|---|---|
| Parent | |||
| UObject | |||
| Children | |||
| Equipment | |||
| Lockable | |||
| Map | |||
| Multi | |||
| Explanation | |||
| Represents a physical item in the world. | |||
| Members | |||
| Name | Type | Desc | Access |
| amount | integer | stack size | r/o |
| layer | integer | equipment layer | r/o |
| container | Item | item contained in | r/o |
| usescript | string | double-click action script. set to empty string for itemdesc.cfg default script. | r/w |
| equipscript | string | script run when item equipped on a character | r/w |
| unequipscript | string | script run when item unequipped | r/w |
| desc | string | single click description string (formatted name) | r/o |
| movable | boolean | true if player may move the item | r/w |
| invisible | boolean | true if the item is invisible | r/w |
| decayat | integer | game clock value after which this item might decay | r/o |
| sellprice | integer | Amount of gold an NPC sells this item for. 0=not for sale, -1=itemdesc default. | r/w |
| buyprice | integer | Amount of gold an NPC buys this item for. 0=not for sale, -1=itemdesc default. | r/w |
| newbie | boolean | true if the item remains with the ghost when player dies | r/w |
| item_count | integer | number of items in container (or 1 if this item is not a container) | r/o |
| Lockable | |||
|---|---|---|---|
| Parent | |||
| Item | |||
| Children | |||
| Door | |||
| Container | |||
| Explanation | |||
| Class containing concrete subclasses which can 'lock' | |||
| Members | |||
| Name | Type | Desc | Access |
| locked | boolean | true if the item is locked | r/w |
| Map | |||
|---|---|---|---|
| Parent | |||
| Item | |||
| Explanation | |||
| A Map item that shows a a map image in a gump when double clicked. | |||
| Members | |||
| Name | Type | Desc | Access |
| xeast | integer | east gump edge (world coord) | r/w |
| xwest | integer | west gump edge (world coord) | r/w |
| ynorth | integer | north gump edge (world coord) | r/w |
| ysouth | integer | south gump edge (world coord) | r/w |
| gumpwidth | integer | width in pixels of map gump | r/w |
| gumpheight | integer | height in pixels of map gump | r/w |
| Methods | |||
| Prototype | Returns | Desc | |
| getpins() | array | returns array of structs{x,y} of pins for the map | |
| insertpin(int index, int x, int y) | true/error | insert pin{x,y} before index | |
| appendpin(int x, int y) | true/error | append pin{x,y} to end of course | |
| erasepin(int index) | true/error | erase pin at index | |
| Multi | |||
|---|---|---|---|
| Parent | |||
| Item | |||
| Children | |||
| House | |||
| Boat | |||
| Explanation | |||
| Special items that display as many pieces of a large structure, as defined in multi.cfg |
| NPC | |||
|---|---|---|---|
| Parent | |||
| Character | |||
| Explanation | |||
| A Non-Player Character mobile object | |||
| Members | |||
| Name | Type | Desc | Access |
| npctemplate | string | NPC template name in npcdesc.cfg | r/o |
| master | Character | controlling player character, false if none | r/o |
| process | Script | Control script reference, error on none | r/o |
| eventmask | integer | bitwise-ORd list of sysevents that have been enabled, error if no control script running | r/o |
| speech_color | integer | NPC speech text color | r/w |
| speech_font | integer | NPC speech text font | r/w |
| script | string | control script name | r/w |
| use_adjustments | boolean | Use movement adjustments to avoid single-tile obsticals | r/w |
| run_speed | integer | NPC walk delay (maximum 250) | r/w |
| Methods | |||
| Prototype | Returns | Desc | |
| setmaster(CharacterRef master) | true/false | Sets the master character for the NPC, if not passed, clears master. | |
| UObject | |||
|---|---|---|---|
| Children | |||
| Character | |||
| Item | |||
| Explanation | |||
| The base UO Object class | |||
| Members | |||
| Name | Type | Desc | Access |
| x | integer | x coordinate | r/o |
| y | integer | y coordinate | r/o |
| z | integer | z coordinate | r/o |
| name | String | name string (for items use .desc for single-click text) | r/w |
| objtype | integer | object type as defined in itemdesc.cfg | r/o |
| graphic | integer | art id number | r/w |
| serial | integer | unique object identifier | r/o |
| color | integer | color value (0 to 0xFFF) | r/w |
| facing | integer | facing or the object (meaningful for mobiles and light-emitting items) range 0-127 | r/w |
| height | integer | height of the graphic as defined in tiledata.mul | r/o |
| weight | integer | weight of the graphic as defined in tiledata.mul | r/o |
| multi | Multi | MultiRef for the Multi the object is on | r/o |
| Methods | |||
| Prototype | Returns | Desc | |
| isa(POLCLASS_*) | boolean | True if the derived class is the same as the passed class type (see uo.em for all constants) | |
| set_member(string membername, obj value) | object, new value of member or error | Sets the built-in member 'membername' to 'value'. obj.set_member("name","u suck") is the same as obj.name := "u suck" | |
| get_member(string membername | object, value of member or error | Gets the value of the built-in member 'membername'. var objname := obj.get_member("name") is the same as var objname := obj.name | |
| Weapon | |||
|---|---|---|---|
| Parent | |||
| Equipment | |||
| Explanation | |||
| Equipable items that deal damage in combat | |||
| Members | |||
| Name | Type | Desc | Access |
| dmg_mod | integer | Damage Modifier | r/w |
| attribute | string | Attribute name this weapon uses as a skill | r/o |
| hitscript | string | Script name that runs when weapon makes a hit | r/w |
If you know if any information is incorrect on these pages, mail your corrections to racalac@polserver.com
Copyright ©2003-2011 David Carpman, all rights reserved. DO NOT REPRODUCE, MIRROR, ALTER, SPINDLE, MUTILATE, OR SIT ON.