Class Hierarchy
11/18/2025
Character Item The base UO Object class x coordinate y coordinate z coordinate case-sensitive name of the realm name string (for items use .desc for single-click text, this does not include suffix or formatting) object type as defined in itemdesc.cfg art id number unique object identifier color value (0 to 0xFFF) facing or the object (meaningful for mobiles and light-emitting items) range 0-127 height of the graphic as defined in tiledata.mul This is set when anything on the object changes, and cleared on world save weight of the graphic as defined in tiledata.mul MultiRef for the Multi the object is on Set if a specific name is set, otherwise like itemdesc name false. Returns an array of property name strings. True if the derived class is the same as the passed class type (see uo.em for all constants) Returns an unpacked script object (i.e. int,string,array,etc) Sets a packable object to a property. Erases the property named 'propname'. Sets the built-in member 'membername' to 'value'. obj.set_member("name","Eric") is the same as obj.name := "Eric" Gets the value of the built-in member 'membername'. var objname := obj.get_member("name") is the same as var objname := obj.name UObject Equipment Lockable Map Multi Represents a physical item in the world. stack size equipment layer item contained in double-click action script. set to empty string for itemdesc.cfg default script. script run when item equipped on a character script run when item unequipped single click description string (formatted name and suffix added to it without formatting if it exists) true if player may move the item true if the item is invisible game clock value after which this item might decay. 0=do not decay Amount of gold an NPC sells this item for. 0=not for sale, -1=itemdesc default. Amount of gold an NPC buys this item for. 0=not for sale, -1=itemdesc default. true if the item remains with the ghost when player dies like newbie, but it gets reset to 0 whenever it saves an item from dropping true if item is cursed; does not have any special core handling other than preventing cursed and non-cursed items from stacking together. number of items in container including the container itself (1 if this item is not a container or an empty container) return is based on POL Decided stackability of item. returns the Layer setting in the Tiles.cfg/Tiledata Total AOS+ armor factor. Total AOS+ armor factor. Total AOS+ armor factor. Total AOS+ armor factor. Total AOS+ armor factor. AOS+ Armor factor modifier AOS+ Armor factor modifier AOS+ Armor factor modifier AOS+ Armor factor modifier AOS+ Armor factor modifier default 1, if you set this to 0 the item and (if container, it's contents) will NOT be saved to datafile Total AOS+ damage factor. Total AOS+ damage factor. Total AOS+ damage factor. Total AOS+ damage factor. Total AOS+ damage factor. AOS+ damage modifier AOS+ damage modifier AOS+ damage modifier AOS+ damage modifier AOS+ damage modifier Returns CharRef of Player holding item, Error if not being held Control script reference, error on none Max distance for using this item 1.0=Average and default Hit points of item Maximum Hit Point modification Maximum Hit Points of item For adding crafter marks or such, will be appended to desc Returns a reference to the House this item is component of, if any If set no drop of this item is allowed, except no_drop_exception is set for target Total of base property plus mod, applied to characters when equipt. Total of base property plus mod, applied to characters when equipt. Total of base property plus mod, applied to characters when equipt. Total of base property plus mod, applied to characters when equipt. Total of base property plus mod, applied to characters when equipt. Total of base property plus mod, applied to characters when equipt. Total of base property plus mod, applied to characters when equipt. Total of base property plus mod, applied to characters when equipt. Total of base property plus mod, applied to characters when equipt. Total of base property plus mod, applied to characters when equipt. Total of base property plus mod, applied to characters when equipt. Total of base property plus mod, applied to characters when equipt. Total of base property plus mod, applied to characters when equipt. Total of base property plus mod, applied to characters when equipt. Total of base property plus mod, applied to characters when equipt. Swing Speed Increase is used as a % modifier to the calculated speed of a weapon, e.g. Weapon speed of 30 * swing speed increase of 100% would make the swing speed 60. Total of base property plus mod, applied to characters when equipt. Adjusts the minimum attack range of a player by the total number of all modifiers e.g. weapons base minimum attack range of 1 + min attack range increase of 1 means a final minimum attack range of 2. Total of base property plus mod, applied to characters when equipt. Adjusts the maximum attack range of a player by the total number of all modifiers e.g. weapons base maximum attack range of 3 + max attack range increase of 2 means a final attack range of 5. Modifier for property, added to base of the object. Modifier for property, added to base of the object. Modifier for property, added to base of the object. Modifier for property, added to base of the object. Modifier for property, added to base of the object. Modifier for property, added to base of the object. Modifier for property, added to base of the object. Modifier for property, added to base of the object. Modifier for property, added to base of the object. Modifier for property, added to base of the object. Modifier for property, added to base of the object. Modifier for property, added to base of the object. Modifier for property, added to base of the object. Modifier for property, added to base of the object. Modifier for property, added to base of the object. Modifier of property, added to the base of the object. Modifier of property, added to the base of the object. Multiplicative modifier when calculating an item's weight. For example, on an item that weighs 100 stone, setting this property to 0.5 would have the item weigh 50 stone. Returns Character that owns the item, ie. the character whose backpack or equipped items contains the item. double-click action script when owned by another character. set to empty string for itemdesc.cfg default script. Will split the item into 2 stacks. Returns a reference to the new stack made from item. Places new stack at the coordinates Will split the item into 2 stacks. Returns a reference to the new stack made from item. Places new stack into the container Checks if there is an existing stack in a container or not, returns the ItemRef of the stack if it exists Item A Map item that shows a a map image in a gump when double clicked. east gump edge (world coord) west gump edge (world coord) north gump edge (world coord) south gump edge (world coord) width in pixels of map gump height in pixels of map gump This has actually nothing to do with realms, the value is the same as in FacetXX.mul file If true, pins on the map can be moved returns array of structs{x,y} of pins for the map insert pin{x,y} before index append pin{x,y} to end of course erase pin at index UObject NPC A mobile object that exists in the world (NPC or player character) 1 if in warmode movemode string {default 'L'} like from NPCDesc.cfg 0=male 1=female original objtype original color Armor factor modifier Total AOS+ armor factor. If it's an NPC without armor equipped, it will return its intrinsic armor value taken from NpcDesc AR entry. Total AOS+ armor factor. If it's an NPC without armor equipped, it will return its intrinsic armor value taken from NpcDesc AR entry. Total AOS+ armor factor. If it's an NPC without armor equipped, it will return its intrinsic armor value taken from NpcDesc AR entry. Total AOS+ armor factor. If it's an NPC without armor equipped, it will return its intrinsic armor value taken from NpcDesc AR entry. Total AOS+ armor factor. If it's an NPC without armor equipped, it will return its intrinsic armor value taken from NpcDesc AR entry. AOS+ Armor factor modifier (Player) AOS+ Armor factor modifier (Player) AOS+ Armor factor modifier (Player) AOS+ Armor factor modifier (Player) AOS+ Armor factor modifier (Player) 1 = normal players cannot see concealed below this value cannot see 1 = player is frozen (by a GM) 1 = player is paralyzed 1 = player is poisoned, just makes the health bar green or not number of walk steps left until player is revealed number of steps taken while character was mounted 1 = player cannot speak 1 = player is dead Total armor factor. If it's an NPC without armor equipped, it will return its intrinsic armor value taken from NpcDesc AR entry. Returns the ItemRef of the sheild, if any, is worn. Reference to character's pack (if any) Reference to character they are trading with (if any) Reference to the trade container if the char has an active trade, error if no active trade Reference to character's weapon (if any) Account Reference (if not NPC) (deprecated, will be removed in next release, use Client instead) Account name string (if not NPC) command level of character string name of command level 1 = player is temporally criminal (gray) or murderer (red) (see also temporally_criminal) 1 = player is temporally criminal (gray) (see also criminal) IP Address string (deprecated, will be removed in next release, use Client instead) True if the client has an active target cursor True if the client has any active gumps from SendGump True if the client has any active String or Unicode prompt windows Amount of gold in character's pack String placed before name i.e. Lord Racalac String placed after name i.e. Racalac the Brave String guild title i.e. [ROX, super d00d] Racalac String race title after suffix in paperdoll guild ID number guild object reference 1 = player flagged murderer (red) Script reference for attached script (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 UO Client version string UO Client information struct (check out core-changes.txt for an example) (deprecated, will be removed in next release, use Client instead) UO Client version string as Struct of Ints {major;minor;rev;patch} (deprecated, will be removed in next release, use Client instead) Weapon Delay modifier, milliseconds PolClock when character was created Mobile reference if a combat opponent is selected. To determine if the character is actively connected to the game. Is set to 1 before logon/reconnect scripts are run and 0 right before logofftest is run. Will return 1 on NPC. To determine if the character is logged in, ie. the character is present in the game world. Will return 1 on NPC, and 1 for player characters that are either connected or disconnected but waiting for the logoff timeout. Reports the Unicode Language string client sends during logon. Set/get the ML/SA race (new constants in UO.EM: RACE_HUMAN, RACE_ELF,RACE_GARGOYLE). You have to set visual graphic by yourself if you change value (Human male/female = 0x190/0x191 / Elf male/female = 0x25d/0x25e / Gargoyle male/female = 0x029a/0x029b). You can choose Race at Char creation if your UOExpansion and UOFeature settings fit. Additive modificator of the hitchance from the attacker (+- int in thousandth) Subtractive modificator of the hitchance from the defender (+- int in thousandth) Additive modificator of the parry_chance from the defender (+- int in thousandth) Current carrying capacity. Defined as (40 + 3.5*chr.strength + chr.carrying_capacity_mod)*ssopt.carrying_capacity_mod. Note that characters can go above their carrying capacity, but will run out of stamina much faster. Carrying capacity modifier. Is taken into account prior to global ssopt modifier. AOS+ Statcap entry in statusbar, default 255 This is for storage of overall skillcap, default 700 Max followers for statmsg packet, default 0 This is for storage for the Followers byte in statmsg packet, default 0 Tithing for statmsg packet, default 0 party object reference party object reference True if client has set the loot rights Total AOS+ damage factor. Total AOS+ damage factor. Total AOS+ damage factor. Total AOS+ damage factor. Total AOS+ damage factor. AOS+ damage modifier AOS+ damage modifier AOS+ damage modifier AOS+ damage modifier AOS+ damage modifier multiplier for stamina consum on movement multiplier for stamina consum on movement multiplier for stamina consum on movement multiplier for stamina consum on movement list of mobiles this character is flagged as aggressor on repsys list of mobiles this character is flagged as lawfully damaged on repsys client send expansion info flag (deprecated, will be removed in next release, use Client instead) clientversion type bitfield (deprecated, will be removed in next release, use Client instead) 1 = player cannot hear returns ClientRef object or error 1 if character is currently editing an house position before the last walk packet as struct{lastx,lasty,lastz} 1 if character has an active attached skill script 1 if character has an active attached spell script last text color used by the character. Values are between 2 and 1001. Returns 0 if not yet spoken. (will not be saved inside of the datafile) Total calculation of all modifiers from items equipt plus personal modifier and personal base. Total calculation of all modifiers from items equipt plus personal modifier and personal base. Total calculation of all modifiers from items equipt plus personal modifier and personal base. Total calculation of all modifiers from items equipt plus personal modifier and personal base. Total calculation of all modifiers from items equipt plus personal modifier and personal base. Total calculation of all modifiers from items equipt plus personal modifier and personal base. Total calculation of all modifiers from items equipt plus personal modifier and personal base. Total calculation of all modifiers from items equipt plus personal modifier and personal base. Total calculation of all modifiers from items equipt plus personal modifier and personal base. Total calculation of all modifiers from items equipt plus personal modifier and personal base. Total calculation of all modifiers from items equipt plus personal modifier and personal base. Total calculation of all modifiers from items equipt plus personal modifier and personal base. Total calculation of all modifiers from items equipt plus personal modifier and personal base. Total calculation of all modifiers from items equipt plus personal modifier and personal base. Total calculation of all modifiers from items equipt plus personal modifier and personal base. Swing Speed Increase is used as a % modifier to the calculated speed of a weapon, e.g. Weapon speed of 30 * swing speed increase of 100% would make the swing speed 60. Total calculation of all modifiers from items equipt plus personal modifier and personal base. Min attack Range Increase is used as a numeric modifier to the minimum range of a weapon, e.g. Weapon minimum range of 1 + min attack range increase of 1 would make the minimum attack range 2. Total calculation of all modifiers from items equipt plus personal modifier and personal base. Max attack Range Increase is used as a numeric modifier to the maximum range of a weapon, e.g. Weapon maximum range of 3 + max attack range increase of 2 would make the maximum attack range 5. Modifier for property, added to base property. Modifier for property, added to base property. Modifier for property, added to base property. Modifier for property, added to base property. Modifier for property, added to base property. Modifier for property, added to base property. Modifier for property, added to base property. Modifier for property, added to base property. Modifier for property, added to base property. Modifier for property, added to base property. Modifier for property, added to base property. Modifier for property, added to base property. Modifier for property, added to base property. Modifier for property, added to base property. Modifier for property, added to base property. Modifier for property, added to base property. Modifier for property, added to base property. Returns the current active buffs added via addBuff as dictionary. Key is the iconid and value a struct struct{name_cliloc, desc_cliloc, end_time, name_args, desc_args}. MilliSecondClock when character last changed position for any reason MilliSecondClock when character last moved due to walking/running sets the character poisoned, controller of calling script is flagged as in repsystem sets the character paralyzed, controller of calling script is flagged as in repsystem sets the character criminal. level multiplies the CriminalFlagInterval as defined in repsys.cfg. level=0 clears criminal timer. sets the light level of the character to 'level' for 'duration' seconds character cannot talk for 'duration' seconds. -1 means forever. 0 clears the squelch enables the 'granted' privilege to the character disables the 'granted' privilege to the character true if the privilege is enabled Dictionary where keys are privilege name, value is 0/1 boolean. grants the command level to the char as defined in cmds.cfg if enough gold, removes it from the player's pack flags the character as a murderer (red) removes the killer with 'serial' from the reportables list that was added at 'gameclock' returns an ItemRef to the item held on the player's cursor, if any. Returns 'dragged' item to original location. Sets the internal warmode flag and sends the update to the player. Returns the new warmode value. Returns an item reference to the most recent corpse made. Attacks once without modifing the swingtimer. If no opp is given attacks current attackable opponent, else attacks given opponent (but checks if still attackable) If opponent is set sets swingtimer to given ms time. Kills character ignoring invul, if killer is set repsys:OnDamage is called Sets Facing to given direction. If FACE_FORCE is set frozen/paralysed is not checked true if Client Version >= given Versionstring sets aggressor for repsys.cfg:AggressorFlagTimeout seconds for given chr sets lawfullydamaged for repsys.cfg:AggressorFlagTimeout seconds for given chr clears aggressor entry for given chr clears lawfullydamaged entry for given chr character cannot hear for 'duration' seconds. -1 means forever. 0 clears the deaf Used to send the Season packet 0xBC to a single character, doesnt resend the lightlevel or weather. Adds a buff to Character's buff bar. Duration is in seconds: countdown is done by the client, but the icon is never automatically removed. Arguments is an Unicode string; separated by a single tab character. Example: who.addBuff(1029, 30, 1075814, 1075815, "1234 5678"); Optional arguments_name parameters needs a client higher then 5.x and modifies the cliloc_name. Removes all buffs from Character's buff bar. Removes a buff from Character's buff bar. Disables skill scripts for given seconds Character A Non-Player Character mobile object NPC template alignment. NPC template name in npcdesc.cfg controlling player character, false if none Control script reference, error on none bitwise-ORd list of sysevents that have been enabled, error if no control script running NPC speech text color NPC speech text font control script name Use movement adjustments to avoid single-tile obsticals NPC walk delay (maximum 250) default 1, if you set this to 0 the npc and all items contained within it's wornitems container will NOT be saved to datafile defines if npc is a valid target even if no_drop is set for the item Sets the master character for the NPC, if not passed, clears master. Multi A Multi object that moves in water. Array of Item References on the deck of the boat Array of Character References on the deck true if players are logged out on the deck ItemRef to the tillerman item ItemRef to the left-side plank item ItemRef to the right-side plank item ItemRef to the hold container item array of ItemRefs of all the rope components on the boat, or empty array if none array of ItemRefs of all the wheel components on the boat, or empty array if none array of ItemRefs of all the hull components on the boat, or empty array if none array of ItemRefs of all the tiller components on the boat, or empty array if none array of ItemRefs of all the rudder components on the boat, or empty array if none array of ItemRefs of all the sails components on the boat, or empty array if none array of ItemRefs of all the storage components on the boat, or empty array if none array of ItemRefs of all the weaponslot components on the boat, or empty array if none array of ItemRefs of all the components on the boat id for this kind of multi pilot of boat (if any) moves offline mobiles on boat to x,y,z. If realm is not set, Boat-realm is used. Sets the boat pilot to the provided character; removes pilot if 0 is passed. Mouse movements from the boat's pilot will be sent to the boat's control script. See event SYSEVENT_BOAT_MOVEMENT for more details. Possible errors: The boat is already being piloted; The boat does not have a running process; That character is not connected; The boat does not have that character on it; The boat mount piece is not equippable by that character; The client for that character does not support High Seas Adventure Used to change a boat's multi to an alternative multi defined in its itemdesc file. Alternate ids are referenced with an integer based on the order they are defined in the itemdesc file starting from 1, with the base multi id being 0. Multi A Multi object where players hoard items. Array of House components, i.e. sign, doors Array of Item References in the house Array of Character References in the house 1 = custom house 1 if the house is currently being edited id for this kind of multi returns array of structs{graphic,xoffset,yoffset,z} or error if not a custom house. When in edit mode returns the current working design. To get the real coords from an elem add house.x/y Sets the house as custom. Setting to 1 is needed before SendHousingTool() works. Add item to House components Erase item from House components Adds a part to the custom house design. Removes a part from the custom house design. If commit is 0 then drops the not committed custom house changes or accept them instead Stops editing mode. If drop_changes is true, drops all non committed changes Set the multi's multiid, changing its shape. If name is passed, will use the MultiID as defined by that item descriptor. Uses the same flags as CreateMultiAtLocation() and can return the same errors. To either keep or recreate the components (eg. doors, house signs, ...), pass either CRMULTI_KEEP_COMPONENTS or CRMULTI_RECREATE_COMPONENTS respectively. See module function CreateMultiAtLocation in uo.em for more information. Lockable A door item that automatically closes. true if the door is open opens the door closes the door toggles the door to the other state Object describing a player's game account the name of the account true if enabled true if banned MD5 username+password hash string used uo-expansion the number for the accounts default command level If Index is 0 (.AddCharacter(0)), it will find the next available slot on the account. (Otherwise pass 1-5) Will create a naked, uncolored, male character named 'new character' at 1, 1, 1 on Britannia. No scripts are ran for this method of character creation. Edit this new character via the script creating it. bans the account unbans the account enables the account disables the account sets the account password to newpass returns true if 'pass' is the account's password sets the account name to newname, password to newpass. The parameter newpass is only optional if you have clear text passwords (RetainCleartextPasswords) - which you shouldn't. gets an OfflineCharacterRef for the character in slot 'slot'. returns error if not character in that slot (1..5) Deletes character in slot 'slot'. returns error if not character in that slot (1..5) Delete this empty account. Create a new account and move character to it. On success returns a reference to the new account. Move character from this account to destination account. You can use it to flip chars on same account too. GetObjProperty for account objects. SetObjProperty for account objects. EraseObjProperty for account objects. returns an array of cprop names on this account This determines what flag is sent with packet 0xB9 during login (T2A -> 0x0001 / LBR -> 0x0002 / AOS -> 0x801b / SE -> 0x805b / ML -> 0x80db / KR -> 0x86DB / SA -> 0x187DF / HSA -> 0xF87DF / TOL -> 0x7F87DF). It's possible to hook 0xB9 but don't forget to set_uo_expansion anyway because core uses this for internal flags (e.g. AoS Tooltips). The servspecopt.cfg DefaultExpansion is used to initialize this member, UOFeatureEnable is used with packet 0xA9 and is currently global to all clients. Recognized values: TOL, HSA, SA, KR, ML, SE, AOS, LBR, T2A (default). Set the account's default command level. Gets the value of the built-in member 'membername'. var objname := obj.get_member("name") is the same as var objname := obj.name" proto="get_member(string membername)" returns="object, value of member or error Item Door Container Class containing concrete subclasses which can 'lock' true if the item is locked Container Objects that are created when character objects are killed ObjType of the Character killed Serial of the Mobile that died Item Weapon Armor Class containing concrete subclasses which are equipable and have hit points Intrinsic Equipment? Equipment Equipable items that deal damage in combat Damage Modifier from -32768 to 32767, an optional way to delay if you want to use the default speed math and just add to that Attribute name this weapon uses as a skill Script name that runs when weapon makes a hit Lockable Corpse Spellbook Items that can be locked, and have other items inside them from -32768 to 32767, modifier for max items allowed in the container from -32768 to 32767, modifier for max weight allowed in the container from -32768 to 32767, modifier for max slots allowed in the container Multiplicative modifier when calculating the container's held weight. For example, on an backpack (having weight 3 stones) that contains items totalling a weight of 100 stone, setting this property to 0.5 would have the backpack weigh 53 (3 + 100 * 0.5) stone. defines if npc is a valid target even if no_drop is set for the item Item House Boat Special items that display as many pieces of a large structure, as defined in multi.cfg returns a struct with 'xmin', 'xmax', 'ymin', 'ymax' of the world coordinates the multi occupies. activates decay for items inside of the multi Equipment Equipable items that protect against damage in combat Armor factor modifier Modified armor factor Base armor factor (as in itemdesc.cfg) Script name that runs when armor is hit Object containing server data Total Item Count Total Mobile Count Uptime in seconds System Load System Load Severity Number of bytes sent to clients Number of bytes received from clients Version, i.e. 95 UNIX time() Events per minute Skill checks per minute Combat operations per minute Script errors per minute Tasks ontime per minute Tasks late per minute Tasks late ticks per minute Scripts late per minute Scripts on time per minute Script instructions per minute Priority Divide Version String Compile Date and Time Array of enabled package names Array of running script objects Array of all cached script objects Array of structs: struct have members name, instr, invocations, instr_per_invoc, instr_percent struct of arrays of structs - iostats["sent"array->256 elements of struct["count","bytes"],"received"array->256 elements of struct["count","bytes"]] structure same as iostats, but for queued I/O stats returns and array of info structures about packets currently in the queue current process usage in KB Last character serial number assigned by core Last item serial number assigned by core Directory of the POL executable Gameclock time of last successful worldsave Writes the script profile to the log, optionally clearing it after. Sets the priority divide to 'divide' Clears the script profile counters developer methods, not officially published Object representing a data file in a data store key is int or string, depending on datafile flags see key notes above see key notes above array of ints or strings, depending on datafile flags Object representing an element in a configuration file gets config value of member (first occurrence; use cfgfile::GetConfigStringArray / cfgfile::GetConfigIntArray to get a list of values for keys with multiple occurrences) gets config value of member (first occurrence; use cfgfile::GetConfigStringArray / cfgfile::GetConfigIntArray to get a list of values for keys with multiple occurrences) Object representing a configuration file gets element of configuration file A data element inside a datastore file Returns an unpacked script object (i.e. int,string,array,etc) Sets a packable object to a property Erases the property named 'propname' Returns an array of property name strings A regular expression used to specify a matching pattern when used against a string. A regular expression is created via basic::RegExp( pattern, flags ) module function or /pattern/flags language syntax. For additional examples and discussions, see Racalac's Escript Guide or the basic::RegExp() module function documentation. Object representing a script in the system Process ID Script name Script state Instruction Cycles Sleep Cycles Consecutive Cycles Program Counter Call depth Number of global variables Estimated size of global variables and current local variables Dictionary of global variable name=>value pairs Mobile or Item where Script is attached to. If it's attached to a Character, it will return the Character. If it's an AI-Script it will return the NPC. If it's a ControlScript it will return the Item. Checks are made in the order above. Mobile which is responsible for damage etc. Reference to the package where this script exists, returns error "Script has no package" if script is from a system folder sends a event to this script (usually a struct) Kills this script Loads the .dbg file clears the event queue of the script Get information regarding the current execution stack of this script. The value is either a string containing a line for each stack frame, or an array of objects representing each stack frame. options is a struct specifying the format to return via setting a member format to the value "string" (default) or "array". If "array", then the result will be an array containing structs with members pc (program counter), file (script name), name (function name), and line (script line).

The script must been compiled with debugging information (using ecompile.cfg setting GenerateDebugInfo or ecompile -x flag) in order to get function name and line information. If debug information is not available, then only the script's program counter will be reported.
Gets the value of the built-in member 'membername'. var objname := obj.get_member("name") is the same as var objname := obj.name
Object representing a player guild association Array of Character Refs who are guild members Array of GuildRefs who are allied guilds Array of GuildRefs who are enemy guilds Guild ID number true if the character is a member of the guild true if the guild is an ally true if the guild is an enemy adds a character to the guild adds an ally guild adds an enemy guild removes a character member removes an ally guild removes an enemy guild Returns an unpacked script object (i.e. int,string,array,etc) Sets a packable object to a property. Erases the property named 'propname'. Returns an array of property name strings. Data structure for key->value pairs (i.e."associative array"). Keys may be intgers, strings, reals, mobrefs, or itemrefs. Declare with var d := dictionary. Pre-intialize with var d := dictionary { "abx" -> 72, "xyz" -> 32 }; number of pairs in dictionary erases a pair from the dict inserts a pair into the dict, returns new size if exists, returns count of matching key returns an array of the keys gets value at key, or uninit if key doesn't exist Data structure for linear storage, dynamically resizes to fit more elements. Declare with var a := array; Pre-intialize with var a := array { 53, 76, 32 }; Note that functional methods (find, findIndex, filter, map, reduce) will return uninit on arrays that have named members, eg. an array where arr.+name has been used. Returns 1 if index is in array. number of elements in the array erases the element at index inserts a new object into the array at index erases index to end of array inserts object in the end of the array reverses the elements of the array sorts the elements of the array, or if sub_index is given sorts array of arrays using the given index for sorting concatinates 2 arrays returns random array entry will move array [count] steps backwards or forwards in-place as it were a conveyor belt. {1, 2, 3}.cycle() Will make it: {3, 1, 2}. Accepts a negative value as a shift to move different direction Inserts obj into already sorted array. sub_index and reverse parameter have to match the sorting criteria of the array. Returns a new array containing just the elements that pass the test function. If no elements pass the test, an empty array is returned.

testFn is a function that can accept up to three parameters:
  • element: The current element being processed
  • index: The index of the current element being processed
  • array: The array filter() was called upon
Returns the first element in the provided array that satisfies the provided testing function. If no elements satisfy the testing function, <uninitialized object> is returned.

testFn is a function that can accept up to three parameters:
  • element: The current element being processed
  • index: The index of the current element being processed
  • array: The array find() was called upon
Returns the index of the first element in an array that satisfies the provided testing function. If no elements satisfy the testing function, 0 is returned.

testFn is a function that can accept up to three parameters:
  • element: The current element being processed
  • index: The index of the current element being processed
  • array: The array findIndex() was called upon
Returns a new array populated with the results of calling a provided mapping function on every element in the calling array.

mapFn is a function that can accept up to three parameters:
  • element: The current element being processed
  • index: The index of the current element being processed
  • array: The array map() was called upon
Executes a user-supplied reducer callback function on each element of the array, in order, passing in the return value from the calculation on the preceding element. The final result of running the reducer across all elements of the array is a single value. The first time that the callback is run there is no 'return value of the previous calculation'. If supplied, an initial value may be used in its place. Otherwise the array element at index 1 is used as the initial value and iteration starts from the next element (index 2 instead of index 1).

reducerFn is a function that can accept up to four parameters:
  • accumulator: The value resulting from the previous call to reducerFn. On the first call, its value is initialValue if the latter is specified; otherwise its value is array[1]
  • currentValue: The value of the current element. On the first call, its value is array[1] if initialValue is specified; otherwise its value is array[2].
  • currentIndex: The index position of currentValue in the array. On the first call, its value is 1 if initialValue is specified, otherwise 2.
  • array: The array reduce() was called upon

For additional examples and discussions, see Racalac's Escript Guide.
An object passed to an Aux Service Script that allows the script to transmit and recieve packed data over a TCP/IP port. use wait_for_event() in the service script to recieve data. Originating IP on the AuxConnection Pipe Transmits the packable object 'o' over the Aux connection. If the connection script has the AUXSVC_ASSUME_STRING script option, then the parameter object o is sent as a string and not unpacked. If the Aux Connection was created with the ignore_line_breaks option, then a CRLF will not be appended to the message. An object representing a script error. Comparing this object against the keyword 'error' allows the scripter to know if the result of a core function was an error. It always evaluates as false in boolean contexts. Declare with var e := error; Pre-intialize with var e := error { errortext := "error message" }; Informational Error string An ordered collection of ascii (1-byte) characters. Declare and pre-initialize with var s := "my string" 'Substring': returns a new string from the character range between start and length, inclusive. Returns error if index out of range. Ex: var str := "yomama"; str[2,3] would return "oma". seaches the string for 'substr'. If found, returns the first character of the substring, else uninitialized object. finds the first occurance of 'substr' and replaces substr with 'replace_str'. returns the new string. concatenates the strings, returns the new string. returns number of characters in the string returns like Find(string, search, start) the index of the first occurance of 'search' after 'start' within str, but unlike the basic.em function the Start parameter is optional if not given it searches the whole string. The search parameter can be either a String or a RegExp. Executes a regular expression against a string. A match result is a struct of the form struct{ matched: string, offset: int, groups: array{ struct{ matched: string, offset: int } | uninit } }. If the regular expression is global (ie. created with the g flag), returns an array of match results; otherwise, returns a single match result if the regular expression match is successful, or else uninit. An element in the groups array will have be uninit if the group was unmatched. Returns a new string with matches of search replaced using replacement. If the regular expression is global (ie. created with the g flag), then all matches are replaced; otherwise, just the first match. The replacement parameter can be a string or a function object. If a function object, the function will be called with four arguments: String matched, Array{ Struct{ String matched, Int offset } | uninit } groups, Int offset, and String input_string: the return value of the function call will be used for the replacement. Takes the separator pattern and divides this string (up to max_splits divisions, if provided) into an ordered list of substrings by searching for the pattern, returning the array of substrings. Capture groups are included in the returned array. returns like upper(str) the uppercase version and also modifies the str returns like lower(str) the lowercase version and also modifies the str formats a string using the data from args.
Accepts the following format:
{:x} for hex representation
{:o} for octal
{:b} for binary

Add a # to get notation prefix, e.g.:
"{:x}".format(10) -> "a"
"{:#x}".format(10) -> "0xa"

Parameters can be simple:
"You have {} gold coins".format(120) -> "You have 120 gold coins"

and are unpacked implicitly by their order:
"{} hits {} for {} of damage".format("John", "Bob", 120) -> "John hits Bob for 120 of damage"

However you can specify parameters explicitly (first argument is at 1):
"You hit {2} for {1} damage".format(120, "John Doe") -> "You hit John Doe for 120 damage"

Format allows accessing object members:
"Spell {1.spell_name} requires reagents: {1.reagents}".format(struct{spell_name:="Fire Wrath", "Ba, Bm, Ga"}) -> "Spell Fire Wrath requires reagents: Ba, Bm, Ga"

Implicit members also work:
"{name} you hit level {level}".format(struct{name:="Jane Doe", level:=4}) -> "Jane Doe you hit level 4"

Character or item members are accessed the same way:
"{1.name}, your shield {2.desc} has {2.hp} hp".format(who, who.shield) -> "Admin, your shield Buckler of Death has 150 hp"
returns a string which is the concatenation of the array elements, seperated by str
Data structure with explicitly named members (keys). Keys may be only be strings. Declare with var s := struct; Pre-intialize with: var s := struct { a := 1, b := 2 }; if exists, returns count of matching key number of keys in the struct inserts a new object into the struct for key. Returns size. returns an array of the keys struct.+member adds a member gets value of member gets value of member ONLY when member is a string! no using integers here like an array. removes given key struct.-member removes a member struct.?member returns count of matching member Object representing a package in the system Package name Package version Does the Package supports www? Does the Package hold an own npcdesc.cfg? Package directory path name + directory Object representing a binary packet. Print(Packet) returns string of Packet contents. Packets that are pre-character selection will now report a struct to a packethook with the member "ip" Sends this packet to character. Sends this packet to all the players in range of x,y. Returns integer number of clients this packet was successfully sent to. Returns size of packet data in bytes. Gets 8-bit (1 byte) value at offset (0-based). Gets 16-bit (2 byte) value at offset (0-based). Automatically converts to Big-Endian. Gets 32-bit (4 byte) value at offset (0-based). Automatically converts to Big-Endian. Gets 16-bit (2 byte) value at offset (0-based). Automatically converts to Low-Endian. Gets 32-bit (4 byte) value at offset (0-based). Automatically converts to Low-Endian. Gets a string (1-byte characters) at offset (0-based) for length characters. Gets a 'unicode string' (2-byte characters) at offset (0-based) for length characters (NOT BYTES). Gets a 'unicode string' (2-byte characters) at offset (0-based) for length characters (NOT BYTES). With Flipped Byte Order (for specific packet support) Sets the new size of the packet, possibly destroying data if packet size was decreased. Updates the encoded size for variable length packets, not allowed for fixed-length packets. Returns the old size of the packet. Sets an 8-bit (1-byte) value at offset (0-based). If offset is greater than current size, the packet is resized to fit the new data and the encoded size is updated for variable length packets. Resizing is not allowed for fixed-length packets. Sets an 16-bit (2-byte) value at offset (0-based). If offset is greater than current size, the packet is resized to fit the new data and the encoded size is updated for variable length packets. Resizing is not allowed for fixed-length packets. Automatically converts to Big-Endian. Sets an 32-bit (4-byte) value at offset (0-based). If offset is greater than current size, the packet is resized to fit the new data and the encoded size is updated for variable length packets. Resizing is not allowed for fixed-length packets. Automatically converts to Big-Endian. NOTE: currently there's a compiler problem setting 0xFFFFFFFF, it gets converted to 0x7FFFFFFF. Use multiple SetInt16 or SetInt8 calls for now. Sets an 16-bit (2-byte) value at offset (0-based). If offset is greater than current size, the packet is resized to fit the new data and the encoded size is updated for variable length packets. Resizing is not allowed for fixed-length packets. Automatically converts to Low-Endian. Sets an 32-bit (4-byte) value at offset (0-based). If offset is greater than current size, the packet is resized to fit the new data and the encoded size is updated for variable length packets. Resizing is not allowed for fixed-length packets. Automatically converts to Low-Endian. NOTE: currently there's a compiler problem setting 0xFFFFFFFF, it gets converted to 0x7FFFFFFF. Use multiple SetInt16 or SetInt8 calls for now. Sets a string value at offset (0-based). If offset plus length of string is greater than current size, the packet is resized to fit the new data and the encoded size is updated for variable length packets. Resizing is not allowed for fixed-length packets. Set nullterminate to 1 if you want to automatically append a 0 terminator. Sets a unicode string at offset (0-based). If offset plus length of string (2*number of members in the array) is greater than current size, the packet is resized to fit the new data and the encoded size is updated for variable length packets. Resizing is not allowed for fixed-length packets. Set nullterminate to 1 if you want to automatically append a double 0 terminator. Unicode strings in eScript are arrays of 2-byte values. See unicode.em for useful functions. CAscZ in basic.em is useful for character sets that use the ascii/ansi standard. Sets a unicode string at offset (0-based). If offset plus length of string (2*number of members in the array) is greater than current size, the packet is resized to fit the new data and the encoded size is updated for variable length packets. Resizing is not allowed for fixed-length packets. Set nullterminate to 1 if you want to automatically append a double 0 terminator. Unicode strings in eScript are arrays of 2-byte values. See unicode.em for useful functions. CAscZ in basic.em is useful for character sets that use the ascii/ansi standard. With Flipped Byte Order (for specific packet support) Sets a UTF-8 encoded string value at offset (0-based). If offset plus length of string is greater than current size, the packet is resized to fit the new data and the encoded size is updated for variable length packets. Resizing is not allowed for fixed-length packets. Set nullterminate to 1 if you want to automatically append a 0 terminator. Assigns other packet's contents and size (or variable-length property) to this packet. Object representing a player party association Array of Offline Character Refs who are party members Array of Offline Character Refs who are party candidates Offline Character Ref of leader Sets new leader. Adds a character to the party. If the player is already candidate of another party, this function will fail. Adds a character to the party as candidate. Removes a character member. Removes a character candidate. Returns an unpacked script object (i.e. int,string,array,etc). Sets a packable object to a property. Erases the property named 'propname'. Returns an array of property name strings. Object representing a binaryfile. Closes the underlying stream. Returns filesize in bytes. Seeks to position. See file.em constants for seekdir Returns current position. Reads and returns the next byte without extracting it (-1 if eof is reached). Writes all unwritten chars from buffer to file. Gets unsigned 8-bit (1 byte) value. Gets unsigned 16-bit (2 byte) value. Gets unsigned 32-bit (4 byte) value. Gets signed 8-bit (1 byte) value. Gets signed 16-bit (2 byte) value. Gets signed 32-bit (4 byte) value. Gets a string (1-byte characters) for length characters. Sets unsigned 8-bit (1 byte) value. Sets unsigned 16-bit (2 byte) value. Sets unsigned 32-bit (4 byte) value. Sets signed 8-bit (1 byte) value. Sets signed 16-bit (2 byte) value. Sets signed 32-bit (4 byte) value. Sets a string. Set nullterminate to 1 if you want to automatically append a 0 terminator. Container Object representing a Spellbook. Removes given spellid. Adds given spellid. Returns array of SpellIDs Checks if given spellid is inside the spellbook. A reference to an Escript class instance, created via calling a class constructor via ClassName() or @ClassName.new(). A class instance behaves similarly like a Struct, and can have string members attached to it. add member gets value of member gets value of member ONLY when member is a string removes a member returns count of matching member A class instance has methods for each instance method defined for the class. See the Escript guide for more information. Object representing a connected client. The ClientRef is important when having packethooks which are active before characters are selected, when you only have access to the Client and not the Character. Because the ClientRef contains most information that was in the Character before, it becomes redundant to have those methods and properties in the Character and they will be removed in a future release. Account name string Account reference IP Address string connected listen port UO Client version string UO Client information struct (check out core-changes.txt for an example) UO Client version string as Struct of Ints {major;minor;rev;patch} client send expansion info flag clientversion type bitfield POL clock when last activity has been made POL clock when last packet has been received If true, client will not be disconnected due to inactivity. returns the client setting of visual range, or overwrites the current range. If set to 0 the client given range will be used.
As long as the visual range is set via script the client can no longer modify the range. VisualRangeMin/Max limit is not taken into account.
true if Client Version >= given Versionstring
Object representing a list of all storage areas. It is iterable: iterates over StorageArea objects. It supports the [] operator: its behavior is similar to FindStorageArea() Number of storage areas Object representing a storage area. It is iterable: iterates over Item objects (root items in storage area). Number of root items in this storage area Number of items in this storage area Object representing a function. Created via "var f:=@myfunc;" Object can be copied inside the same script, but cannot be stored in cprops or transfered to a different script. Calls the underlying function, arguments and return value are the same as the original function. Returns a new instance of a class whose constructor is this FunctionObject, calling the class constructor function with a new this instance. Object representing a boolean value, only comparison operators ==, !=, ! are implemented. Can be stored in cprops/datafiles. Object representing a XML file. ForEach support: iterates over all child nodes, iterator is XMLNode object _iterator_iter is integer index. removes node by index, first node with given name or passed one. Sets the xml declaration. Appends node with name value and given attributes (key=name, value=value). Adds comment. Saves to file. Returns XML as string, identation is by default \t. If key is integer returns node of given index, if key is a string returns first node with key as name. Object representing a XML node. ForEach support: iterates over all child nodes, iterator is XMLNode object _iterator_iter is integer index. Returns attribute object of node. Returns type string (XMLComment, XMLDeclaration, XMLDocument, XMLElement, XMLText, XMLTypeCount, XMLUnknown). removes node by index, first node with given name or passed one. Create a copy of node which is then valid longer then the file object. Returns first children or first with given name. Returns next sibling or first with given name. Appends node with name value and given attributes (key=name, value=value). Adds comment. Sets node attributes (key=name, value=value). Removes attribute with given name. Adds node text. Object representing XML attributes of a node. ForEach support: iterates over all attributes, iterator is a struct with key=attributename and value=attributevalue, _iterator_iter is integer index. Returns array of all attribute names. Returns attribute value. Object representing a script loaded via OS::LoadExportedScript(). The script will be alive as long as the object exists. Returns names of all exported functions. Calls the given function with the optional arguments and returns the function return value. Calling script will be blocked until the function returns and will be executed non-critical or critical depending on the calling script.