# Characters {{Languages|Characters}} __FORCETOC__ A character can be either a player or an NPC. ## References References return pointers to other objects (e.g. the REGION reference allows you to access the REGION that an object is in). These can either be accessed by using *<REFNAME>* to return the [UID](UID.md) (1 for object types that don't have UIDs) of the object or 0 if it doesn't exist, or by using *<REFNAME.KEY>* where KEY is a valid property/function/reference for the *REFNAME* object. Click on the name for more detailed information such as usage and examples. {| border="1" cellspacing="4" cellpadding="4" | **Name** || **Read/Write** || **Description** || **Sphere X only?** |- | [ACCOUNT](Accounts.md) || RW || Gets or sets the [account](Accounts.md) that the character belongs to. |- | [ACT](ACT.md) || RW || Gets or sets the [character](Characters.md) or [item](Items.md) that is related to the action the character is performing. |- | [FINDCONT](FINDCONT.md)*.n* || R || Gets the nth [item](Items.md) equipped to the character. (zero-based) |- | [FINDID](FINDID.md)*.item_id* || R || Gets the first [item](Items.md) found equipped to the character or inside their backpack, with the matching [BASEID](BASEID.md). |- | [FINDLAYER](FINDLAYER.md)*.layer* || R || Gets the [item](Items.md) that the character has equipped in a specified layer. |- | [FINDTYPE](FINDTYPE.md)*.type* || R || Gets the first [item](Items.md) found equipped to the character or inside their backpack, with the matching [TYPE](TYPE.md). |- | [MEMORYFINDTYPE](MEMORYFINDTYPE.md)*.memory_flags* || R || Gets a [memory item](Items.md) with the specified flags. |- | [MEMORYFIND](MEMORYFIND.md).*object_uid* || R || Gets a [memory item](Items.md) that is linked to the given object. |- | [OWNER](OWNER.md) || R || Gets the character that owns this character. (RW in SphereServer-X Build) |- | [SPAWNITEM](SPAWNITEM.md) || R || Gets the [spawn item](Items.md) (t_spawn_char) that this character originated from. |- | [WEAPON](WEAPON.md) || R || Gets the [weapon](Items.md) that the character currently has equipped. |- | [P](P.md) || RW || Gets or sets the [position](Map_Points.md) that the character is at. |- | [REGION](Regions.md) || R || Gets the [region](Regions.md) that the character is currently located in. |- | [ROOM](Rooms.md) || R || Gets the [room](Rooms.md) that the character is in. |- | [SECTOR](Sectors.md) || R || Gets the [sector](Sectors.md) that the character is in. |- | [TOPOBJ](TOPOBJ.md) || R || Gets the top-most [character](Characters.md) or [item](Items.md) in the world that contains the character. |- | [TYPEDEF](TYPEDEF__(Reference).md) || R || Gets the [CHARDEF](CHARDEF.md) that defines the character. |} ## Properties and Functions Here is a list of all character properties and functions. If a function is marked as readable then it can return a value when used as . Click on the name for more detailed information such as usage and examples. If an attempt is made to access a property that does not exist on the character, the property from the [CHARDEF](CHARDEF.md) will be accessed instead. {| border="1" cellspacing="4" cellpadding="4" | **Name** || **Read/Write** || **Description** || **Sphere X only?** |- | [AC](AC.md) || R || Returns the character's total defense. |- | [ACTARG1](ACTARG1.md) || RW || Gets or sets the character's ACTARG1 value. X branch only: for skills Enticement, Peacemaking and Provocation, if ACTARG1 is set to the UID of the instrument to play, it will be played the sound of that instrument. |- | [ACTARG2](ACTARG2.md) || RW || Gets or sets the character's ACTARG2 value. |- | [ACTARG3](ACTARG3.md) || RW || Gets or sets the character's ACTARG3 value. |- | [ACTDIFF](ACTDIFF.md) || RW || Gets or sets the difficulty of the character's current action. |- | [ACTION](ACTION.md) || RW || Gets or sets the skill that the character is currently using. |- | [ACTP](ACTP.md) || RW || Gets or sets the character's ACTP value. Can get x,y,z,position of the point in X branch. |- | [ACTPRV](ACTPRV.md) || RW || Gets or sets the character's ACTPRV value. |- | [ADDHOUSE uid](ADDHOUSE_uid.md) || W || X branch only. Adds the given uid to the player's house. If the player current count of houses is greater than the limit he has, the house will be redeeded. |- | [ADDSHIP uid](ADDSHIP_uid.md) || W || X branch only. Adds the given uid to the player's ship. If the player current count of ships is greater than the limit he has, the ship will be redeeded. |- | [AFK](AFK.md) || W || Gets or sets whether or not the character is in AFK mode. |- | [AGE](AGE.md) || R || Returns the age of the character since its creation, in seconds. |- | [ALLSKILLS](ALLSKILLS.md) *amount* || W || Sets all of the character's skills to the specified amount. |- | [ANIM](ANIM.md) *anim_id* || W || Plays the specified animation on the character. |- | [ATTACKER](ATTACKER.md)*.properties* || R || Gets the number of opponents who have damaged the character. |- | [BANK](BANK.md) *layer* || W || Opens the character's bank (or the container at the specified layer) for SRC to view. |- | [BANKBALANCE](BANKBALANCE.md) || R || Returns the total amount of gold in the character's bankbox. |- | [BARK](BARK.md) *sound_id* || W || Plays the specified sound (or the character's generic sound if not specified) to nearby clients from this character. |- | [BODY](BODY.md) || RW || Gets or sets the character's body. |- | [BOUNCE](BOUNCE.md) *item_uid* || W || Places a specified item in the character's backpack. |- | [BOW](BOW.md) || W || Makes the character bow to SRC. |- | [CAN](CAN_(Characters).md) || RW || Gets or Sets the Can flags for this chardef. Only readable in X branch. |- | [CANCAST](CANCAST.md) *spell_id, check_antimagic* || R || Returns 1 if the character can cast a given spell, bypassing anti-magic field tests if *check_antimagic* set to 0. |- | [CANMAKE](CANMAKE.md) *item_id* || R || Returns 1 if the character has the skills and resources to craft a certain item. |- | [CANMAKESKILL](CANMAKESKILL.md) *item_id* || R || Returns 1 if the character has the skills to craft a certain item. |- | [CANMASK](CANMASK_(Characters).md) || RW || X branch only. Stores the CAN flags to be dynamically switched on or off from the base CAN property. |- | [CANMOVE](CANMOVE.md) *direction* || R || Returns 1 if the character can move in the given direction. |- | [CANSEE](CANSEE.md) || R || Returns 1 if SRC can see the character. |- | [CANSEELOS](CANSEELOS.md) || R || Returns 1 if SRC has line of sight to the character. |- | [CANSEELOSFLAG](CANSEELOSFLAG.md) *flags* || R || Returns 1 if SRC has line of sight to the character, with flags to modify what tests take place. |- | [COLOR](COLOR.md) || RW || Gets or sets the character's hue. |- | [CONSUME](CONSUME.md) *resource_list* || W || Removes specified resources from SRC's backpack. |- | [COUNT](COUNT.md) || R || Returns the number of items equipped to the character. |- | [CREATE](CREATE.md) || RW (R only on X)|| Gets or sets the character's age since creation, in seconds (Tenth of seconds on X). |- | [CRIMINAL](CRIMINAL.md) || W || Sets whether or not the character is a criminal. |- | [CURFOLLOWER](CURFOLLOWER.md) || RW || Gets or sets the number of current followers the character has, |- | [DAMAGE](DAMAGE.md) *amount, type, source* || W || Inflicts damage upon the character. When using COMBAT_ELEMENTAL_ENGINE add the following parameters after *source*: *physical*,*fire*,*cold*,*poison*,*energy*. All the values are in %. |- | [DELHOUSE uid](DELHOUSE_uid.md) || W || X branch only. Deletes the given uid from the player's list (Will not delete the house)(-1 clears the whole list). |- | [DELSHIP uid](DELSHIP_uid.md) || W || X branch only. Deletes the given uid from the player's list (Will not delete the ship)(-1 clears the whole list). |- | [DESTROY](DESTROY.md) || W || Deletes the object, not stopped by a return 1 in [@Destroy](@Destroy.md) |- | [DEX](DEX.md) || RW || Gets or sets the character's total dexterity. |- | [DIALOG](DIALOG_(Function).md) *dialog_id, page, parameters* || W || Displays a dialog to SRC. |- | [DIALOGCLOSE](DIALOGCLOSE.md) *dialog_id button* || W || Closes a dialog that SRC has open, simulating a button press. |- | [DIALOGLIST](DIALOGLIST.md)*.COUNT* || R || Gets the number of number of dialogs currently considered to be visible on SRC's screen. |- | [DIALOGLIST](DIALOGLIST.md)*.n.ID* || R || Gets the ID of the nth dialog that SRC has open (zero-based). |- | [DIALOGLIST](DIALOGLIST.md)*.n.COUNT* || R || Gets the number of instances of nth dialog SRC has open (zero-based). |- | [DIR](DIR.md) || RW || Gets or setes the direction that the character is facing. |- | [DISCONNECT](DISCONNECT.md) || W || Disconnects the character. |- | [DISMOUNT](DISMOUNT.md) || W || Dismounts the character from their ride. |- | [DISPIDDEC](DISPIDDEC.md) || R || Gets the ID of the character as a decimal number. |- | [DISTANCE](DISTANCE.md) *point_or_uid* || R || Gets the distance between this object and either SRC, a map location or another object. |- | [DCLICK](DCLICK.md) || W || Double clicks the character, with SRC as the source of the event. |- | [DCLICK](DCLICK.md) *object_uid* || W || Double clicks an object, with the character as SRC. |- | [DRAWMAP](DRAWMAP.md) *radius* || W || Starts the cartography skill, drawing a map of the local area up to *radius* tiles. |- | [DROP](DROP.md) *item_uid* || W || Drops a specified item at the character's feet. |- | [DUPE](DUPE.md) || W || Creates a clone of the character. |- | [EDIT](EDIT.md) || W || Displays an editing dialog for the character to SRC. |- | [EFFECT](EFFECT.md) *type, item_id, speed, loop, explode, color, rendermode* || W || Displays an effect to nearby clients. |- | [EFFECTLOCATION](EFFECTLOCATION.md) *x,y,z,type,itemid,speed,loop,explode,color,render* || W || Similar to the EFFECT command but instead of an object it takes a terrain location as a target. || X |- | [EMOTE](EMOTE.md) *message* || W || Displays a *You see* message to all nearby clients. |- | [EMOTEACT](EMOTEACT.md) || RW || Gets, sets or toggles whether or not the character will emote all of its actions. |- | [EQUIP](EQUIP.md) *item_uid* || W || Equips an item to the character. |- | [EQUIPARMOR](EQUIPARMOR.md) || W || Equips the character with the best armour in their backpack. |- | [EQUIPHALO](EQUIPHALO.md) *timeout* || W || Equips a halo light to the character, lasting for *timeout* tenths of a second. |- | [EQUIPWEAPON](EQUIPWEAPON.md) || W || Equips the character with the best weapon in their backpack. |- | [EVENTS](EVENTS_(Property).md) *event_defname* || RW || Gets a list of events attached to the object, or adds or removes an event to or from the object. |- | [EXP](EXP.md) || RW || Gets or sets the character's experience points. |- | [FACE](FACE.md) *object_uid* (P coords in X branch) || W || Turns the character to face a specified object or SRC. Admits coordinates instead uid in X branch. |- | [FAME](FAME.md) || RW || Gets or sets the character's fame. |- | [FAME](FAME.md)*.fame_group* || R || Returns 1 if the character's fame falls within the specified fame group. |- | [FCOUNT](FCOUNT.md) || R || Returns the total number of items equipped to the character, including subitems |- | [FLAGS](FLAGS.md) || RW || Gets or sets the character's flags. |- | [FIX](FIX.md) || W || Re-aligns the character's Z level to ground level. |- | [FIXWEIGHT](FIXWEIGHT.md) || W || Recalculates the character's total weight. |- | [FLIP](FLIP.md) || W || Rotates the character. |- | [FONT](FONT.md) || RW || Gets or sets the character's speech font. |- | [FOOD](FOOD.md) || RW || Gets or sets the character's food level. |- | [FORGIVE](FORGIVE.md) || W || Revokes the character's jailed status. |- | [GETHOUSEPOS uid](GETHOUSEPOS_uid.md) || R || Returns the position of the given UID on the houses list (-1 if not found). |- | [GETSHIPPOS uid](GETSHIPPOS_uid.md) || R || Returns the position of the given UID on the ships list (-1 if not found). |- | [GO](GO.md) *location* || W || Teleports the character to the specified location. |- | [GOCHAR](GOCHAR.md) *n* || W || Teleports the character to the nth character in the world. |- | [GOCHARID](GOCHARID.md) *character_defname* || W || Teleports the character to the next characer in the world with the specified [BASEID](BASEID.md) |- | [GOCLI](GOCLI.md) *n* || W || Teleports the character to the nth online player. (zero-based) |- | [GOITEMID](GOITEMID.md) *item_defname* || W || Teleports the character to the next item in the world with the specified [BASEID](BASEID.md). |- | [GOLD](GOLD.md) || RW || Gets or sets the amount of gold the character has. |- | [GONAME](GONAME.md) *name* || W || Teleports the character to the next character or item in the world with the specified name, accepts wildcards (*). |- | [GOSOCK](GOSOCK.md) *socket* || W || Teleports the character to the online player with the specified socket number. |- | [GOTYPE](GOTYPE.md) *item_type* || W || Teleports the character to the next item in the world with the specified [TYPE](TYPE.md). |- | [GOUID](GOUID.md) *object_uid* || W || Teleports the character to the object with the specified [UID](UID.md). |- | [GUILDABBREV](GUILDABBREV.md) || R || Returns the character's guild abbreviation. |- | [HEAR](HEAR.md) *text* || W || For NPCs, acts as if SRC had spoken the specified *text*. For players, displays *text* as a system message. |- | [HEIGHT](HEIGHT.md) || R || Gets the character's height. |- | [HITS](HITS.md) || RW || Gets or sets the character's hitpoints. |- | [HOME](HOME.md) || RW || Gets or sets the character's home location. |- | [HOUSE.n](HOUSE.n.md) || R || X branch only.Access the house in the Nth position, eg: house.3.Redeed |- | [HOUSES](HOUSES.md) ||R || X branch only. Returns the number of houses on the player's list. |- | [HUNGRY](HUNGRY.md) || W || Displays this character's hunger level to SRC. |- | [ID](ID.md) || R || Gets the character's ID. |- | [INFO](INFO.md) || W || Displays an information dialog about the character to SRC. |- | [INT](INT.md) || RW || Gets or sets the character's total intelligence. |- | [INVIS](INVIS.md) || W || Sets whether or not the character is invisible. |- | [INVUL](INVUL.md) || W || Sets whether or not the character is invulnerable. |- | [ISARMOR](ISARMOR.md) *object_uid* || R || Returns 1 if the object is armour. |- | [ISCHAR](ISCHAR.md) || R || Returns 1 if the object is a character. |- | [ISCONT](ISCONT.md) || R || Returns 1 if the object is a container. |- | [ISDIALOGOPEN](ISDIALOGOPEN.md) *dialog_id* || R || Returns 1 if SRC has the specified dialog visible on their screen. |- | [ISEVENT](ISEVENT.md)*.event_defname* || R || Returns 1 if the object has an event attached to it. |- | [ISGM](ISGM.md) || R || Returns 1 if the character is in GM mode. |- | [ISINPARTY](ISINPARTY.md) || R || Returns 1 if the player is in a [party](party.md). |- | [ISITEM](ISITEM.md) || R || Returns 1 if the object is an item. |- | [ISMYPET](ISMYPET.md) || R || Returns 1 if the character belongs to SRC. |- | [ISNEARTYPE](ISNEARTYPE.md) *type, distance, flags* || R || Returns 1 if a nearby item has the given TYPE. |- | [ISNEARTYPETOP](ISNEARTYPETOP.md) *type, distance, flags* || R || Returns a nearby world location of a nearby item which has the given TYPE. |- | [ISONLINE](ISONLINE.md) || R || Returns 1 if the character is considered to be online. |- | [ISPLAYER](ISPLAYER.md) || R || Returns 1 if the object is a player. |- | [ISSTUCK](ISSTUCK.md) || R || Returns 1 if the character cannot walk in any direction. |- | [ISTEVENT](ISTEVENT.md)*.event_defname* || R || Returns 1 if the object has an event attached to its [CHARDEF](CHARDEF.md). |- | [ISTIMERF](ISTIMERF.md)*.function* || R || Returns the number of seconds left on the specified timerf if it exists. |- | [ISVENDOR](ISVENDOR.md) || R || Returns 1 if the character is a vendor. |- | [ISVERTICALSPACE](ISVERTICALSPACE.md) *location* || R || Returns 1 if the ceiling at the given location is high enough for the character to fit under. |- | [ISWEAPON](ISWEAPON.md) *object_uid* || R || Returns 1 if the object is a weapon. |- | [JAIL](JAIL.md) *cell* || W || Sends the character to jail, to a specified jail cell. |- | [KARMA](KARMA.md) || RW || Gets or sets the character's karma. |- | [KARMA](KARMA.md)*.karma_group* || R || Returns 1 if the character's karma falls within the specified karma group. |- | [KILL](KILL.md) || W || Kills the character. |- | [LEVEL](LEVEL.md) || RW || Gets or sets the character's experience level. |- | [LIGHT](LIGHT.md) || RW || Gets or sets the character's personal light level. |- | [LUCK](LUCK.md) || RW || Gets or sets the luck value for the character. |- | [MAKEITEM](MAKEITEM.md) *item_defname, amount* ||| W || Begins an attempt to craft the specified quantity of the given item. |- | [MANA](MANA.md) || RW || Gets or sets the character's mana. |- | [MAP](MAP.md) || RW || Gets or sets the map that this object is located. |- | [MAPWAYPOINT](MAPWAYPOINT.md) "ObjectUID, WaypointType" || W || Add/remove waypoints on client radar map (enhanced clients only). |- | [MAXFOLLOWER](MAXFOLLOWER.md) || RW || Gets or sets the maximum number of followers the character can have. |- | [MAXHITS](MAXHITS.md) || RW || Gets or sets the character's maximum hitpoints. |- | [MAXHOUSES](MAXHOUSES.md) || RW || Added to Accounts and Chars, when created they read this setting from the sphere.ini (if values on sphere.ini change, they will not reflect on already created accounts/chars). || X |- | [MAXMANA](MAXMANA.md) || RW || Gets or sets the character's maximum mana. |- | [MAXSHIPS](MAXSHIPS.md) || RW || Added Accounts and Chars, when created they read this new setting from the sphere.ini (if values on sphere.ini change, they will not reflect on already created accounts/chars). || X |- | [MAXSTAM](MAXSTAM.md) || RW || Gets or sets the character's maximum stamina. |- | [MAXWEIGHT](MAXWEIGHT.md) || R || Returns the maximum weight that the character can carry. |- | [MEMORY](MEMORY.md)*.object_uid* || RW || Gets or sets the memory flags the character has for the given object. |- | [MENU](MENU_(Function).md) *menu_defname* || W || Displays a menu to SRC. |- | [MESSAGE](MESSAGE.md) *message* || W || Displays a message above this character to SRC. |- | [MESSAGEUA](MESSAGEUA.md) *colour, talkmode, font, lang_id, message* || W || Displays a UNICODE message above this character to SRC. |- | [MODAR](MODAR.md) || RW || Gets or sets a modifier for the character's armour rating. |- | [MODDEX](MODDEX.md) || RW || Gets or sets the character's dexterity modifier. |- | [MODINT](MODINT.md) || RW || Gets or sets the character's intelligence modifier. |- | [MODMAXWEIGHT](MODMAXWEIGHT.md) || RW || Gets or sets the character's maximum weight modifier. |- | [MODSTR](MODSTR.md) || RW || Gets or sets the character's strength modifier. |- | [MOUNT](MOUNT.md) || R || Gets the UID of the character's mount. |- | [MOUNT](MOUNT.md) *mount_uid* || W || Attempts to mount the character on to the specified mount. |- | [MOVE](MOVE.md) *direction* || R || Returns the movement flags for the tile in the given direction (see can_flags in sphere_defs.scp). |- | [MOVE](MOVE.md) *direction, amount*
[MOVE](MOVE.md) *x y* || W || Moves the object relative to its current position. |- | [MOVENEAR](MOVENEAR.md) *object_uid, distance* || W || Moves the character to a random location near another object within a certain distance. |- | [MOVETO](MOVETO.md) *location* || W || Moves the character to a specific location. |- | [NAME](NAME.md) || RW || Gets or sets the character's name. |- | [NEWBIESKILL](NEWBIESKILL.md) *skill_id* || W || Distributes items that are associated with the specified skill, to the character. |- | [NEWGOLD](NEWGOLD.md) *amount* || W || Generates *amount* gold in the character's backpack. |- | [NEWLOOT](NEWLOOT.md) *item_or_template_defname* || W || Generates the specified item or template into the character's backpack, providing that they are an NPC that hasn't been summoned. |- | [NIGHTSIGHT](NIGHTSIGHT.md) || RW || Gets or sets whether or not the character has nightsight enabled. |- | [NOTOGETFLAG](NOTOGETFLAG.md) *viewer_uid, allow_incognito* || RW || Gets the character's notoriety flags as seen by the specified viewer. |- | [NPC](NPC.md) || RW || Gets or sets the character's AI type. |- | [NUDGEDOWN](NUDGEDOWN.md) *amount* || W || Decreases the character's Z level. |- | [NUDGEUP](NUDGEUP.md) *amount* || W || Increases the characer's Z level. |- | [OBODY](OBODY.md) || RW || Gets or sets the character's original body. |- | [OPENPAPERDOLL](OPENPAPERDOLL.md) || W || Displays the character's paperdoll to SRC. |- | [OPENPAPERDOLL](OPENPAPERDOLL.md) *character_uid* || W || Displays a specified character's paperdoll to this character. |- | [OSKIN](OSKIN.md) || RW || Gets or sets the character's original colour. |- | [ODEX](ODEX.md) || RW || Gets or sets the character's base dexterity (without modifiers). |- | [OINT](OINT.md) || RW || Gets or sets the character's base intelligence (without modifiers). |- | [OSTR](OSTR.md) || RW || Gets or sets the character's base strength (without modifiers). |- | [PACK](PACK.md) || W || Opens the character's backpack for SRC to view. |- | [POISON](POISON.md) *strength* || W || Poisons the character, with the specified poison strength. |- | [POLY](POLY.md) *character_id* || W || Begins casting the polymorph spell, with *character_id* being the character to turn into. |- | [PROMPTCONSOLE](PROMPTCONSOLE.md) *function, prompt_message* || W || Displays a prompt message to SRC and passes their response into a specified function. |- | [PROMPTCONSOLEU](PROMPTCONSOLEU.md) *function, prompt_message* || W || Displays a prompt message to SRC and passes their response into a specified function, supporting UNICODE response. |- | [PRIVSET](PRIVSET.md) *plevel* || W || Sets the PLEVEL of the character. |- | [RANGE](RANGE.md) || R || Gets the combat range of the character. |- | [RELEASE](RELEASE.md) || W || Clears the character's owners. |- | [REMOVE](REMOVE.md) *allow_player_removal* || W || Deletes the character. |- | [REMOVEFROMVIEW](REMOVEFROMVIEW.md) || W || Removes the object from nearby clients' screens. |- | [RESCOLD](RESCOLD.md) || RW || Gets or sets the character's resistance to cold. |- | [RESCOLDMAX](RESCOLDMAX.md) || RW || Gets or sets the character's maximum resistance to cold. |- | [RESCOUNT](RESCOUNT.md) *item_defname* || R || Returns the total amount of a specific item equipped to the character or inside their baackpack. |- | [RESENDTOOLTIP](RESENDTOOLTIP.md) *sendfull*,*usecache* || W || Forces Sphere to update the tooltips for nearby clients. If sendfull is 1 the entire tooltip is sent and if 0 then just the header is sent. If usecache is 1 then the cached version (if found) will be sent and if 0 then the cached version (if found) will be replaced and sent |- | [RESENERGY](RESENERGY.md) || RW || Gets or sets the character's resistance to energy. |- | [RESENERGYMAX](RESENERGYMAX.md) || RW || Gets or sets the character's maximum resistance to energy. |- | [RESFIRE](RESFIRE.md) || RW || Gets or sets the character's resistance to fire. |- | [RESFIREMAX](RESFIREMAX.md) || RW || Gets or sets the character's maximum resistance to fire. |- | [RESPOISON](RESPOISON.md) || RW || Gets or sets the character's resistance to poison. |- | [RESPOISONMAX](RESPOISONMAX.md) || RW || Gets or sets the character's maximum resistance to poison. |- | [RESTEST](RESTEST.md) *item_list* || R || Returns 1 if all of the items in the list can be found equipped to the character or inside their backpack. |- | [RESURRECT](RESURRECT.md) *force* || W || Resurrects the character. If *force* is 1 then usual anti-magic checks are bypasses. |- | [SALUTE](SALUTE.md) *object_uid* || W || Makes the character salute a specified object or SRC. |- | [SAY](SAY.md) *message* || W || Makes the character speak a message. |- | [SAYU](SAYU.md) *message* || W || Makes the character speak a UTF-8 message |- | [SAYUA](SAYUA.md) *colour, talkmode, font, lang_id, text* || W || MAkes the character speak a UNICODE message. |- | [SDIALOG](SDIALOG.md) *dialog_id, page, parameters* || W || Displays a dialog to SRC, providing that it is not already open. |- | [SERIAL](SERIAL.md) || R || Gets the item's unique ID in the world. |- | [SEX](SEX.md) *value_male:value_female* || R || Returns *value_male* or *value_female* depending on the character's gender. |- | [SEXTANTP](SEXTANTP.md) *location* || R || Converts the character's location or a specified location into sextant coordinates. |- | *skill_name* || RW || Gets or sets the character's skill level in *skill_name*. |- | [SHIP.n](SHIP.n.md) || R || X branch only. Added to access the ship in the Nth position, eg: ship.3.Redeed |- | [SHIPS](SHIPS.md) || R || X branch only. Return the ships on the player's list. |- | [SKILL](SKILL_(Function).md) || W || Begins using a skill. |- | [SKILLADJUSTED](SKILLADJUSTED.md)."number or skill_name" (X branch only) || R || Returns the skill value adjusted by the stat bonus. Example “SkillAdjusted.1” or “SkillAdjusted.Anatomy”. |- | [SKILLCHECK](SKILLCHECK.md) *skill_id, difficulty* || R || Performs a check for skill success, returning 1 if the attempt was successful. |- | [SKILLBEST](SKILLBEST.md)*.n* || R || Returns the ID of the character's nth highest skill (0 = Highest) |- | [SKILLGAIN](SKILLGAIN.md) *skill, difficulty* || W || Invokes Sphere's skill gain for the specified skill, with the given difficulty (0-100) |- | [SKILLTEST](SKILLTEST.md) *skill_list* || R || Returns 1 if the character possess all of the skills in the list. |- | [SKILLTOTAL](SKILLTOTAL.md) || R || Returns the total value of all the character's skills. |- | [SKILLTOTAL](SKILLTOTAL.md) *skill_group* || R || Returns the total value of all the character's skills with the specified group flag(s). |- | [SKILLTOTAL](SKILLTOTAL.md) *-amount* || R || Returns the total value of all the character's skills that are under *amount*. |- | [SKILLTOTAL](SKILLTOTAL.md) *+amount* || R || Returns the total value of all the character's skills that are over *amount*. |- | [SKILLUSEQUICK](SKILLUSEQUICK.md) *skill_id, difficulty* || R || Quickly uses a skill, returning 1 if the attempt was successful. |- | [SLEEP](SLEEP.md) *fall_forwards* || W || Makes the character appear to sleep. |- | [SOUND](SOUND.md) *sound_id, repeat* || W || Plays a sound from this character. |- | [SPELLEFFECT](SPELLEFFECT.md) *spell_id, strength, source_character_uid, source_item_uid* || W || Causes the character to be affected by a spell. |- | [SPEECHCOLOROVERRIDE](SPEECHCOLOROVERRIDE.md) *value* || RW || Override client speech hue. |- | [STAM](STAM.md) || RW || Gets or sets the character's stamina. |- | [STEPSTEALTH](STEPSTEALTH.md) || RW || Gets or sets the amount of steps a character can do while using the Stealth skill. |- | [STONE](STONE.md) || RW || Gets or sets whether or not the character is trapped in stone. |- | [STR](STR.md) || RW || Gets or sets the character's total strength. |- | [SUICIDE](SUICIDE.md) || W || Forces the character to commit suicide. |- | [SUMMONCAGE](SUMMONCAGE.md) || W || Teleports the character to SRC's, surrounded by a cage multi. |- | [SUMMONTO](SUMMONTO.md) || W || Teleports the character to SRC's position. |- | [TAG](TAG.md)*.name* || RW || Gets or sets the value of a TAG. |- | [TAGAT](TAGAT.md)*.index* || R || Gets a TAG at the given zero-based index. |- | [TAGAT](TAGAT.md)*.index*.KEY || R || Gets the name of the TAG at the given zero-based index. |- | [TAGAT](TAGAT.md)*.index*.VAL || R || Gets the value of the TAG at the given zero-based index. |- | [TAGCOUNT](TAGCOUNT.md) || R || Gets the number of TAGs stored on the item. |- | [TAGLIST](TAGLIST.md) || W || Outputs a list of the object's TAGs. |- | [TARGET](TARGET.md)*FGMW* *function* || W || Displays a targeting cursor to SRC. |- | [TIMER](TIMER.md) || RW || Gets or sets the length of time before the item's timer expires, in seconds. |- | [TIMERD](TIMERD.md) || RW || Gets or sets the length of time before the item's timer expires, in tenths of a second. |- | [TIMERF](TIMERF.md) *time, function* || W || Scheduled a function to be executed on this object in *time* seconds. |- | [TIMERF](TIMERF.md) *CLEAR* || W || Clears all scheduled functions from the character. |- | [TIMERF](TIMERF.md) *STOP, function* || W || Stops the specified function from the character. (On X version wild character * is available for defining the function name or the argument) |- | [TIMERMS](TIMERMS.md) || W || Set an object timer to elapse after the given number of milliseconds. |- | [TITHING](TITHING.md) || RW || Gets or sets the number of tithing points the character has. |- | [TITLE](TITLE.md) || RW || Gets or sets the character's title. |- | [TOWNABBREV](TOWNABBREV.md) || R || Returns the character's town abbreviation. |- | [TRIGGER](TRIGGER.md) *trig_name, trig_type* || R || Fires a custom trigger and returns the RETURN value. |- | [UID](UID.md) || R || Gets the item's unique ID in the world. |- | [UNDERWEAR](UNDERWEAR.md) || W || Toggles the display of underwear on the character. |- | [UNEQUIP](UNEQUIP.md) *item_uid* || W || Unequips an item from the character, placing it in their backpack. |- | [UPDATE](UPDATE.md) || W || Updates the state of the character to nearby clients. |- | [UPDATEX](UPDATEX.md) || W || Updates the state of the character to nearby clients, removing it from their view first to ensure a full refresh. |- | [USEITEM](USEITEM.md) || W || Double clicks the character, with SRC as the source of the event, without checking for line of sight. |- | [USEITEM](USEITEM.md) *object_uid* || W || Double clicks an object, with the character as SRC. |- | [VISUALRANGE](VISUALRANGE.md) || RW || Gets or sets the character's sight range. |- | [WEIGHT](WEIGHT.md) || R || Gets the weight of the character. |- | [WHERE](WHERE.md) || W || Describes the character's location to SRC. |- | [Z](Z.md) || R || Gets the Z position of the character. |} ## Triggers Here is a list of all character triggers. Click on the trigger name for more detailed information such as arguments and examples. {| border="1" cellspacing="4" cellpadding="4" | **Name** || **Description** || **Sphere X only?** |- | [@AfterClick](@AfterClick.md) || Fires when the object has been single-clicked, just before the overhead name is shown. |- | [@Attack](@Attack.md) || Fires when the character begins attacking another. |- | [@CallGuards](@CallGuards.md) || Fires when the character calls for guards. |- | [@CharAttack](@CharAttack.md) || Fires when the character is attacked by another character. |- | [@CharClick](@CharClick.md) || Fires when the character is clicked by another character. |- | [@CharClientTooltip](@CharClientTooltip.md) || Fires when the tooltips are about to be sent to the character. |- | [@CharDClick](@CharDClick.md) || Fires when the character double clicks another character. |- | [@CharTradeAccepted](@CharTradeAccepted.md) || Fires when another character accepts trade with the character. |- | [@Click](@Click.md) || Fires when the object has been single-clicked. |- | [@ClientTooltip](@ClientTooltip.md) || Fires when tooltips for this character are about to be sent to a client. |- | [@CombatAdd](@CombatAdd.md) || Fires when someone is being added to my attacker list. |- | [@CombatDelete](@CombatDelete.md) || Fires when someone is deleted from my attacker list. |- | [@CombatEnd](@CombatEnd.md) || Fires when someone is being deleted from my attacker list and I don't have any more viable targets. |- | [@CombatStart](@CombatStart.md) || Fires when adding first attacker to my list. |- | [@ContextMenuRequest](@ContextMenuRequest.md) || Fires when a client requests the context menu options for the object. |- | [@ContextMenuSelect](@ContextMenuSelect.md) || Fires when a client selects a context menu option for the object. |- | [@Create](@Create.md) || Fires when the object is initially created, before it is placed in the world. |- | [@Criminal](@Criminal.md) || Fires when the character becomes a criminal. |- | [@DClick](@DClick.md) || Fires when the object is double-clicked. |- | [@Death](@Death.md) || Fires when the character's hitpoints reaches zero. |- | [@DeathCorpse](@DeathCorpse.md) || Fires when a corpse is created for the character. |- | [@Destroy](@Destroy.md) || Fires when the object is being deleted. |- | [@Dismount](@Dismount.md) || Fires when the character dismounts their ride. |- | [@Dye](@Dye.md) || Fires when the character is about to change their color or the color of an object. |- | [@Eat](@Eat.md) || Fires when the character eats something. |- | [@EnvironChange](@EnvironChange.md) || Fires when the environment changes for the character. |- | [@ExpChange](@ExpChange.md) || Fires when the character's experience points change. |- | [@ExpLevelChange](@ExpLevelChange.md) || Fires when the character's experience level changes. |- | [@FameChange](@FameChange.md) || Fires when the character's fame changes. |- | [@GetHit](@GetHit.md) || Fires when the character receives damage. |- | [@Hit](@Hit.md) || Fires when the character hits another in combat. |- | [@HitMiss](@HitMiss.md) || Fires when the character fails to hit another in combat. |- | [@HitParry](@HitParry.md) || X branch only. Fires when the character is attempting to parry a hit. || X |- | [@HitTry](@HitTry.md) || Fires when the character tries to hit another in combat. |- | [@HouseDesignCommit](@HouseDesignCommit.md) || Fires when the character commits a new house design. |- | [@HouseDesignExit](@HouseDesignExit.md) || Fires when the character exits house design mode. |- | [@Hunger](@Hunger.md) || Fires when the character's food level decreases. |- | [@ItemAfterClick](@ItemAfterClick.md) || Fires when the character single-clicks an item, just before the overhead name is shown. |- | [@ItemBuy](@ItemBuy.md) || Fires when the character buys an item from a vendor. |- | [@ItemClick](@ItemClick.md) || Fires when the character single-clicks an item. |- | [@ItemClientTooltip](@ItemClientTooltip.md) || Fires when the tooltips are about to be sent to the client for an item. |- | [@ItemContextMenuRequest](@ItemContextMenuRequest.md) || Fires when the character requests the context menu options for an item. |- | [@ItemContextMenuSelect](@ItemContextMenuSelect.md) || Fires when the character selects a context menu option for an item. |- | [@ItemCreate](@ItemCreate.md) || Fires when an item is initially created, before it is placed in the world, and the character is in some way responsible for it. |- | [@ItemDamage](@ItemDamage.md) || Fires when the character damages an item. |- | [@ItemDClick](@ItemDClick.md) || Fires when the character double-clicks an item. |- | [@ItemDropOn_Char](@ItemDropOn_Char.md) || Fires when the character drops an item on to a character. |- | [@ItemDropOn_Ground](@ItemDropOn_Ground.md) || Fires when the character drops an item on to the ground. |- | [@ItemDropOn_Item](@ItemDropOn_Item.md) || Fires when the character drops an item on to another item. |- | [@ItemDropOn_Self](@ItemDropOn_Self.md) || Fires when the character drops an item inside another item. |- | [@ItemEquip](@ItemEquip.md) || Fires when the character equips an item. |- | [@ItemEquipTest](@ItemEquipTest.md) || Fires when the characer is about to equip an item. |- | [@ItemPickUp_Ground](@ItemPickUp_Ground.md) || Fires when the character picks an item up from the ground. |- | [@ItemPickUp_Pack](@ItemPickUp_Pack.md) || Fires when the character picks an item up from inside a container. |- | [@ItemPickUp_Self](@ItemPickUp_Self.md) || Fires when the character picks an item up from inside another item. |- | [@ItemPickUp_Stack](@ItemPickUp_Stack.md) || Fires when the character picks up an item from a stack. |- | [@ItemSell](@ItemSell.md) || Fires when the character sells an item to a vendor. |- | [@ItemSmelt](@ItemSmelt.md) || Fires when the character smelt an item. || X |- | [@ItemSpellEffect](@ItemSpellEffect.md) || Fires when the character hits an item with a spell. |- | [@ItemStep](@ItemStep.md) || Fires when the character steps on an item. |- | [@ItemTargOn_Cancel](@ItemTargOn_Cancel.md) || Fires when the character cancels an item's target cursor. |- | [@ItemTargOn_Char](@ItemTargOn_Char.md) || Fires when the character targets a character with an item's target cursor. |- | [@ItemTargOn_Ground](@ItemTargOn_Ground.md) || Fires when the character targets the ground with an item's target cursor. |- | [@ItemTargOn_Item](@ItemTargOn_Item.md) || Fires when the character targets an item with an item's target cursor. |- | [@ItemToolTip](@ItemToolTip.md) || Fires when the character requests old-style tooltips for an item. |- | [@ItemUnEquip](@ItemUnEquip.md) || Fires when the character unequips an item. |- | [@Jailed](@Jailed.md) || Fires when the character is sent to jail. |- | [@KarmaChange](@KarmaChange.md) || Fires when the character's karma changes. |- | [@Kill](@Kill.md) || Fires when the character kills another character. |- | [@Login](@Login.md) || Fires when the character logs in. |- | [@Logout](@Logout.md) || Fires when the character logs out. |- | [@Mount](@Mount.md) || Fires when the character mounts a ride. |- | [@MurderDecay](@MurderDecay.md) || Fires when one of the character's kills is about to decay. |- | [@MurderMark](@MurderMark.md) || Fires when the character is about to gain a kill. |- | [@NotoSend](@NotoSend.md) || Fires the status bar/character notoriety color is sent to another players. |- | [@NPCAcceptItem](@NPCAcceptItem.md) || Fires when the NPC receives an item. |- | [@NpcActCast](@NpcActCast.md) || Fires when the NPC is selecting the spell to cast. || X |- | [@NPCActFight](@NPCActFight.md) || Fires when the NPC makes a combat decision. |- | [@NPCActFollow](@NPCActFollow.md) || Fires when the NPC follows another character. |- | [@NPCAction](@NPCAction.md) || Fires when the NPC is about to perform an AI action. |- | [@NPCActWander](@NPCActWander.md) || X branch only. Fires each step an NPC does while wandering. |- | [@NPCHearGreeting](@NPCHearGreeting.md) || Fires when the NPC hears a character for the first time. |- | [@NPCHearUnknown](@NPCHearUnknown.md) || Fires when the NPC hears something they don't understand. |- | [@NPCLookAtChar](@NPCLookAtChar.md) || Fires then the NPC looks at a character. |- | [@NPCLookAtItem](@NPCLookAtItem.md) || Fires when the NPC looks at an item. |- | [@NPCLostTeleport](@NPCLostTeleport.md) || Fires when the NPC is lost and is about to be teleported back to their [HOME](HOME.md). |- | [@NPCRefuseItem](@NPCRefuseItem.md) || Fires when the NPC refuses an item being given to them. |- | [@NPCRestock](@NPCRestock.md) || Fires when the NPC is having their items restocked. |- | [@NPCSeeNewPlayer](@NPCSeeNewPlayer.md) || Fires when the NPC first sees a player. |- | [@NPCSeeWantItem](@NPCSeeWantItem.md) || Fires when the NPC sees an item they want. |- | [@NPCSpecialAction](@NPCSpecialAction.md) || Fires when the NPC is about to perform a special action (leaving fire trail, dropping web). |- | [@PayGold](@PayGold.md) || Fires when the character receives a payment. (Experimental Build Only) |- | [@PersonalSpace](@PersonalSpace.md) || Fires when the character is stepped on. |- | [@PetDesert](@PetDesert.md) || Fires when the character deserts its owner. |- | [@Profile](@Profile.md) || Fires when a player attempts to read the character's profile from the paperdoll. |- | [@ReceiveItem](@ReceiveItem.md) || Fires when the NPC receives an item from another character, before they decide if they want it or not. |- | [@RegenStat](@RegenStat.md) || Fires when a character is going to regenerate any stat point. |- | [@RegionEnter](@RegionEnter.md) || Fires when the character enters a region. |- | [@RegionLeave](@RegionLeave.md) || Fires when the character leaves a region. |- | [@RegionResourceFound](@RegionResourceFound.md) || Fires after a resource has been selected and the resource bit has been created. |- | [@Rename](@Rename.md) || Fires when the character renames another. |- | [@Resurrect](@Resurrect.md) || Fires when the character is being resurrected. |- | [@SeeCrime](@SeeCrime.md) || Fires when the character sees a crime take place. |- | [@SeeHidden](@SeeHidden.md) || Fires when this character is about to see a hidden character. |- | [@SkillAbort](@SkillAbort.md) || Fires when the character aborts a skill. |- | [@SkillChange](@SkillChange.md) || Fires when the character's skill level changes. |- | [@SkillFail](@SkillFail.md) || Fires when the character fails a skill. |- | [@SkillGain](@SkillGain.md) || Fires when the character has a chance to gain in a skill. |- | [@SkillMakeItem](@SkillMakeItem.md) || Fires when the character crafts an item. |- | [@SkillMenu](@SkillMenu.md) || Fires when a skill menu is shown to the character. |- | [@SkillPreStart](@SkillPreStart.md) || Fires when the character starts a skill, before any hardcoded action takes place. |- | [@SkillSelect](@SkillSelect.md) || Fires when the character selects a skill on their skill menu. |- | [@SkillStart](@SkillStart.md) || Fires when the character starts a skill. |- | [@SkillSuccess](@SkillSuccess.md) || Fires when the character succeeds at a skill. |- | [@SkillUseQuick](@SkillUseQuick.md) || Fires when the character quickly uses a skill. |- | [@SkillWait](@SkillWait.md) || Fires when Sphere wants to check if a character must wait before starting a skill. |- | [@SpellBook](@SpellBook.md) || Fires when the character opens their spellbook. |- | [@SpellCast](@SpellCast.md) || Fires when the character casts a spell. |- | [@SpellEffect](@SpellEffect.md) || Fires when the character is hit by the effects of a spell. |- | [@SpellEffectAdd](@SpellEffectAdd.md) || Fires when a spell memory is added to the character. || X |- | [@SpellEffectRemove](@SpellEffectRemove.md) || Fires the spell memory is removed from the character. || X |- | [@SpellEffectTick](@SpellEffectTick.md) || Fires when the character is hit the effect of a periodic spell (like Poison spell).|| X |- | [@SpellFail](@SpellFail.md) || Fires when the character fails to cast a spell. |- | [@SpellSelect](@SpellSelect.md) || Fires when the character selects a spell to cast. |- | [@SpellSuccess](@SpellSuccess.md) || Fires when the character successfully casts a spell. |- | [@SpellTargetCancel](@SpellTargetCancel.md) || Fires when the character cancels target selection for a spell they have just cast. |- | [@StatChange](@StatChange.md) || Fires when the character's STR, DEX or INT is changed through skill gain. |- | [@StepStealth](@StepStealth.md) || Fires when the character takes a step whilst hidden. |- | [@ToggleFlying](@ToggleFlying.md) || Fires when a Gargoyle Player is going to Fly or to Land. |- | [@ToolTip](@ToolTip.md) || Fires when a player requests old-style tooltips for this character. |- | [@TradeAccepted](@TradeAccepted.md) || Fires when the character accepts a trade with another player. |- | [@TradeClose](@TradeClose.md) || Fires when a trade window is closed. |- | [@TradeCreate](@TradeCreate.md) || Fires when a player begins a trade with another player. |- | [@UserBugReport](@UserBugReport.md) || Fires when the player submits a bug report. |- | [@UserChatButton](@UserChatButton.md) || Fires when the player presses the Chat button on the paperdoll. |- | [@UserExtCmd](@UserExtCmd.md) || Fires when the player sends an extended command packet. (used by some macros) |- | [@UserExWalkLimit](@UserExWalkLimit.md) || Fires when the player's movement is restricted by the movement speed settings in Sphere.ini |- | [@UserGuildButton](@UserGuildButton.md) || Fires when the player presses the Guild button on the paperdoll. |- | [@UserKRToolbar](@UserKRToolbar.md) || Fires when the player presses a button on the toolbar. |- | [@UserMailBag](@UserMailBag.md) || Fires when the player drags the mail bag on to another character. |- | [@UserQuestArrowClick](@UserQuestArrowClick.md) || Fires when the player clicks the quest arrow. |- | [@UserQuestButton](@UserQuestButton.md) || Fires when the player presses the Quest button on the paperdoll. |- | [@UserSkills](@UserSkills.md) || Fires when the player opens their skill menu, or a skill update is sent to the player. |- | [@UserSpecialMove](@UserSpecialMove.md) || Fires when the player uses a special move. |- | [@UserStats](@UserStats.md) || Fires when the player opens the status window. |- | [@UserUltimaStoreButton](@UserUltimaStoreButton.md) || Fires when click on 'Ultima Store' button on new clients 7.0.62+ |- | [@UserVirtue](@UserVirtue.md) || Fires when the player presses on the Virtue button. |- | [@UserVirtueInvoke](@UserVirtueInvoke.md) || Fires when the player invokes a virtue through macros. |- | [@UserWarmode](@UserWarmode.md) || Fires when the player switches between war and peace mode. |} ## Players Characters that are attached to an account become Player Characters. In addition to the basic character references, properties and functions they also receive the following: ### References References return pointers to other objects (e.g. the REGION reference allows you to access the REGION that an object is in). These can either be accessed by using *<REFNAME>* to return the [UID](UID.md) (1 for object types that don't have UIDs) of the object or 0 if it doesn't exist, or by using *<REFNAME.KEY>* where KEY is a valid property/function/reference for the *REFNAME* object. Click on the name for more detailed information such as usage and examples. {| border="1" cellspacing="4" cellpadding="4" | **Name** || **Read/Write** || **Description** |- | [GUILD](GUILD.md) || R || Gets the [guild stone](Special_Items#Guild.2FTown_Stones.md) that the player belongs to. |- | [SKILLCLASS](SKILLCLASS_(Reference).md) || RW || Gets or sets the player's [skillclass](SKILLCLASS.md). |- | [TOWN](TOWN.md) || R || Gets the [town stone](Special_Items#Guild.2FTown_Stones.md) that the player belongs to. |} ### Properties and Functions Here is a list of all player properties and functions. If a function is marked as readable then it can return a value when used as . Click on the name for more detailed information such as usage and examples. {| border="1" cellspacing="4" cellpadding="4" | **Name** || **Read/Write** || **Description** || **Sphere X only?** |- | [DEATHS](DEATHS.md) || RW || Gets or sets the number of times the player has died. |- | [DSPEECH](DSPEECH.md) *+/-speech_id* || RW || Gets a list of attached speech handlers, or adds or removes a speech handler to or from the player. |- | [GMPAGE](GMPAGE.md)*.n.DELETE* || W || Deletes the nth GM page. (zero-based) |- | [GMPAGE](GMPAGE.md)*.n.HANDLE* || W || Sets the player as the handler for the nth GM page. (zero-based) |- | [GMPAGE](GMPAGE.md)*.n.key* || W || Executes the .page command with *key* as the arguments. |- | [ISDSPEECH](ISDSPEECH.md)*.speech_id* || R || Returns 1 if the player has the given speech handler attached. |- | [KICK](KICK.md) || W || Disconnects and blocks the player's account. |- | [KILLS](KILLS.md) || RW || Gets the number of murders the player has committed. |- | [KRTOOLBARSTATUS](KRTOOLBARSTATUS.md) || RW || Gets or sets whether or not the KR toolbar is enabled for this player. |- | [LASTUSED](LASTUSED.md) || RW || Gets the length of time since the player was last attached to a client, in seconds. |- | [PASSWORD](PASSWORD.md) || W || Sets or clears the player's password. |- | [PFLAG](PFLAG.md) || RW || Gets or sets the player's PFLAG value. |- | [PROFILE](PROFILE.md) || RW || Gets or sets the text to display on the player's profile. |- | [SKILLLOCK](SKILLLOCK.md)*.skill_id* || RW || Gets or sets the lock state of the player's skill. 0 is Up. 1 is Down. 2 is Locked. |- | [SPEEDMODE](SPEEDMODE.md) || RW || Gets or sets the speed that the player moves at. (0=Normal, 1=Double Speed on Foot, 2=Always walk, 3=Always Run on Foot/Always Walk on Mount, 4=Can not Walk or Run) |- | [STATLOCK](STATLOCK.md)''.stat_id || RW || Gets or sets the lock state of the player's STR (0), DEX (2) or INT (1). [0 = up, 1 = down, 2 = locked] |} ## NPCs Characters that are not attached to an account are NPCs and are controlled by Sphere's AI. In addition to the basic character references, properties and functions they also receive the following: ### Properties and Functions Here is a list of all NPC properties and functions. If a function is marked as readable then it can return a value when used as . Click on the name for more detailed information such as usage and examples. {| border="1" cellspacing="4" cellpadding="4" | **Name** || **Read/Write** || **Description** || **Sphere X only?** |- | [ACTPRI](ACTPRI.md) || RW || Gets or sets the NPC's motivation towards their current action. |- | [BUY](BUY.md) || W || Displays the shop window to SRC, in buy mode. |- | [BYE](BYE.md) || W || Ends the NPC's current action. |- | [FLEE](FLEE.md) *distance* || W || Begins moving the NPC away from its current location. |- | [GOTO](GOTO.md) *location* || W || Begins moving the NPC towards the specified location. |- | [HIRE](HIRE.md) || W || Begins the hiring process between the NPC and SRC. |- | [LEAVE](LEAVE.md) *distance* || W || Begins moving the NPC away from its current location. |- | [NPC](NPC.md) || RW || Gets or sets the NPC's AI type. |- | [HOMEDIST](HOMEDIST.md) || RW || Gets or sets the distance that the NPC can wander from its [HOME](HOME.md) position. |- | [PETRETRIEVE](PETRETRIEVE.md) || W || Enables SRC to retrieve their stabled pets from the NPC. |- | [PETSTABLE](PETSTABLE.md) || W || Enables SRC to stable their pet with the NPC. |- | [RESTOCK](RESTOCK.md) *force* || W || Clears all of the NPC's stock, repopulating it when it is next accessed (or immediately if *force*=1) |- | [RUN](RUN.md) *direction* || W || Forces the NPC to run one tile in the specified direction. |- | [SELL](SELL.md) || W || Displays the shop window to SRC, in sell mode. |- | [SHRINK](SHRINK.md) || W || Shrinks the NPC into a figurine item. |- | [SPEECH](SPEECH.md) *+/-speech_id* || RW || Gets the list of speech handlers attached to the NPC, or adds or removes a speech handler to or from the NPC. |- | [SPEECHCOLOR](SPEECHCOLOR.md) || RW || Gets or sets the colour of the NPC's speech. |- | [THROWDAM](THROWDAM.md) *min,max* || RW || Gets or sets a range of damage used for thrown objects. (overrides chardef property) |- | [THROWDAM](THROWDAM.md) *dam* || RW || Gets or sets the constant damage used for thrown objects. (overrides chardef property) |- | [THROWDAMTYPE](THROWDAMTYPE.md) *damage flags* || RW || y || Gets or sets the damage flags used for thrown objects. (overrides chardef property) |- | [THROWOBJ](THROWOBJ.md) *id* || RW || Gets or sets the ID of an object to be thrown by NPCs. (overrides chardef property) |- | [THROWRANGE](THROWRANGE.md) *min,max* || RW || Gets or sets the range that an object can be thrown at. (overrides chardef property) |- | [THROWRANGE](THROWRANGE.md) *max* || RW || Gets or sets the range that an object can be thrown at with a default min of 2. (overrides chardef property) |- | [TRAIN](TRAIN.md) *skill* || W || Initiates training between the NPC and SRC. |- | [VENDCAP](VENDCAP.md) || RW || Gets or sets the amount of gold a vendor will restock to. |- | [VENDGOLD](VENDGOLD.md) || RW || Gets or sets the amount of gold a vendor has. |- | [WALK](WALK.md) *direction* || W || Forces the NPC to walk one tile in the specified direction. |} ## Clients When a client is controlling a character, the following references, properties and functions will be available: ### References References return pointers to other objects (e.g. the REGION reference allows you to access the REGION that an object is in). These can either be accessed by using *<REFNAME>* to return the [UID](UID.md) (1 for object types that don't have UIDs) of the object or 0 if it doesn't exist, or by using *<REFNAME.KEY>* where KEY is a valid property/function/reference for the *REFNAME* object. Click on the name for more detailed information such as usage and examples. {| border="1" cellspacing="4" cellpadding="4" | **Name** || **Read/Write** || **Description** || **Sphere X only?** |- | [GMPAGEP](GMPAGEP.md) || R || Gets the [GM page](GM_Pages.md) that the client is currently handling. |- | [HOUSEDESIGN](HOUSEDESIGN.md) || R || Gets the [building](Special_Items#Customizable_Multis.md) that is currently being designed by the client. |- | [PARTY](PARTY.md) || R || Gets the [party](Parties.md) that the client is a member of. |- | [TARG](TARG.md) || RW || Gets or sets the [character](Characters.md) or [item](Items.md) that the client has targeted. |- | [TARGP](TARGP.md) || RW || Gets or sets the [location](Map_Points.md) that the client has targeted. |- | [TARGPROP](TARGPROP.md) || RW || Gets or sets the character whose skills are shown in the client's skill menu. |- | [TARGPRV](TARGPRV.md) || RW || Gets or sets the [character](Characters.md) or [item](Items.md) that the client previously targeted. |} ### Properties and Functions Here is a list of all client properties and functions. If a function is marked as readable then it can return a value when used as . Click on the name for more detailed information such as usage and examples. {| border="1" cellspacing="4" cellpadding="4" | **Name** || **Read/Write** || **Description** || **Sphere X only?** |- | [ADD](ADD.md) *item_defname* || W || Prompts the client to target a location to add the specified item at. |- | [ADDBUFF](ADDBUFF.md) *icon, cliloc1, cliloc2, time, arg1, arg2, arg3* || W || Displays a buff icon in the client's buff icon bar. |- | [ADDCLILOC](ADDCLILOC.md) *cliloc, args* || W || Adds a cliloc to the tooltip being sent to the client. Only valid in @ClientTooltip triggers. |- | [ADDCONTEXTENTRY](ADDCONTEXTENTRY.md) *entry_id, cliloc, flags, colour* || W || Adds an entry to the context menu being sent to the client. Only valid in @ContextMenuRequest triggers. |- | [ALLMOVE](ALLMOVE.md) || RW || Gets or sets whether or not the client has ALLMOVE privileges. |- | [ALLSHOW](ALLSHOW.md) || RW || Gets or sets whether or not the client is able to see disconnected characters. |- | [ARROWQUEST](ARROWQUEST.md) *x, y, id* || W || Displays an arrow on the client's screen that points to the specified world coordinates. If id is supplied multiple arrows can be displayed on the client at once (Newer clients only - 3.x+ clients confirm?). You can cancel the arrow by passing 0 for x and y and your id. Using ARROWQUEST without any arguments will cancel arrow with id 0 if present. |- | [BADSPAWN](BADSPAWN.md) || W || Teleports the client to the first invalid spawn point in the world. |- | [BANKSELF](BANKSELF.md) || W || Opens up the client's bankbox. |- | [CAST](CAST.md) ''spell_id' || W || Begins casting a spell. |- | [CHARLIST](CHARLIST.md) || W || Displays the client's character list screen. |- | [CLEARCTAGS](CLEARCTAGS.md) || W || Removes all of the client's CTAGs. |- | [CLIENTIS3D](CLIENTIS3D.md) || R || Returns 1 if the client is using the 3D client. |- | [CLIENTISKR](CLIENTISKR.md) || R || Returns 1 if the client is using the KR client. |- | [CLIENTVERSION](CLIENTVERSION.md) || R || Gets the client version the client is using, based on the encryption keys being used (unencrypted clients return 0). |- | [CTAG](CTAG.md) || RW || Gets or sets the value of a CTAG. |- | [CTAGCOUNT](CTAGCOUNT.md) || R || Gets the number of CTAGs stored on the client. |- | [CTAGLIST](CTAGLIST.md) || W || Displays a list of the client's CTAGs to SRC. |- | [CTAGLIST](CTAGLIST.md) LOG || W || Displays a list of the client's CTAGs on the server console. |- | [DEBUG](DEBUG.md) || RW || Gets or sets whether or not the client is in debug mode. |- | [DETAIL](DETAIL.md) || RW || Gets or sets whether or not the client receives additional detail, such as combat messages. |- | [EVERBTARG](EVERBTARG.md) *command* || W || Prompts the client to enter a command, or arguments to the command if specified. The complete command with arguments is then executed on TARG. |- | [EXTRACT](EXTRACT.md) *file, template_id* || W || Extracts static items from a targeted area on the map and saves them into the specified file. |- | [FLUSH](FLUSH.md) || W || Forces queued network data to be immediately sent to the client. |- | [GM](GM.md) || RW || Gets or sets whether or not the client is in GM mode. |- | [GMPAGE](GMPAGE.md) *ADD message* || W || Sends a GM page from the client with the specified message, or if no arguments provided will prompt the client for a message. |- | [GOTARG](GOTARG.md) || W || Teleports the client to their targeted item. |- | [HEARALL](HEARALL.md) || RW || Gets or sets whether or not the client can hear all player speech regardless of location. |- | [INFO](INFO.md) || W || Displays an information dialog to the client for an object they target. |- | [INFORMATION](INFORMATION.md) || W || Displays server information to the client. |- | [LAST](LAST.md) || W || Forces the client to target the object referenced by [ACT](ACT.md). |- | [LASTEVENT](LASTEVENT.md) || RW || Returns the time when data was last received from the client. |- | [LINK](LINK.md) || W || Allows the client to target two objects to link them together. |- | [MENU](MENU_(Function).md) *menu_id* || W || Displays a menu to the client. |- | [MIDILIST](MIDILIST.md) *music1, music2, ...* || W || Selects a random music id from the given list and tells the client to play it. |- | [NUDGE](NUDGE.md) *dx, dy, dz* || W || Allows the client to nudge an area of items by the given coordinates, relative to the items' position. |- | [NUKE](NUKE.md) *command* || W || Allows the client to execute *command* on all items in a targeted area. |- | [NUKECHAR](NUKECHAR.md) *command* || W || Allows the client to execute *command* on all NPCs in a targeted area. |- | [PAGE](PAGE.md) || W || Displays the GM page menu to the client. |- | [PRIVSHOW](PRIVSHOW.md) || W || Gets or sets whether or not the client's privilege level should show in their name. |- | [REMOVEBUFF](REMOVEBUFF.md) *icon* || W || Removes a buff icon from the client's buff icon bar. |- | [REPAIR](REPAIR.md) || W || Prompts the client to target an item for them to repair. |- | [REPORTEDCLIVER](REPORTEDCLIVER.md) || R || Gets the client version the client is using, based on what it has identified itself as to the server. |- | [REPORTEDCLIVER](REPORTEDCLIVER.md).FULL || R || Gets the client version the client is using, based on what it has identified itself as to the server, including the 4th digit. |- | [RESEND](RESEND.md) || W || Forces a full refresh of the client's screen. |- | [SAVE](SAVE.md) *immediate* || W || Begins a world save. If background saving is enabled then *[SAVE](SAVE.md) 1* will force a foreground save. |- | [SCREENSIZE](SCREENSIZE.md) || R || Gets the client's screen size. (width,height) |- | [SCREENSIZE](SCREENSIZE.md).X || R || Gets the width of the client's screen size. |- | [SCREENSIZE](SCREENSIZE.md).Y || R || Gets the height of the client's screen size. |- | [SCROLL](SCROLL.md) *scroll_id* || W || Displays a message scroll to the client. |- | [SELF](SELF.md) || W || Forces the client to target itself. |- | [SENDPACKET](SENDPACKET.md) *data* || W || Sends a raw data packet to the client. |- | [SET](SET.md) *command* || W || Prompts the client to target an object to execute *command* on. |- | [SHOWSKILLS](SHOWSKILLS.md) || W || Refreshes the client's skills for the skill menu. |- | [SKILLMENU](SKILLMENU_(Function).md) *skillmenu_id* || W || Displays a skillmenu to the client. |- | [SKILLSELECT](SKILLSELECT.md) *skill_id* || W || Simulates the client selecting a skill from their skill menu. |- | [SUMMON](SUMMON.md) *character_id* || W || Casts the summon spell, with ''character_id'; being the character to summon. |- | [SYSMESSAGE](SYSMESSAGE.md) *text* || W || Displays a system message to the client. |- | [SYSMESSAGELOC](SYSMESSAGELOC.md) *hue, cliloc, args* || W || Displays a localized system message to the client. |- | [SYSMESSAGELOCEX](SYSMESSAGELOCEX.md) *hue, cliloc, flags, affix, args* || W || Displays a localized system message to the client with affixed text. |- | [SYSMESSAGEUA](SYSMESSAGEUA.md) *hue, font, mode, language, text* || W || Displays a UNICODE system message to the client. |- | [TARGETTEXT](TARGETTEXT.md) || RW || Gets or sets the client's target text. |- | [TELE](TELE.md) || W || Casts the teleport spell. |- | [TILE](TILE.md) *z, item1, item2, ...* || W || Tiles the ground within a targeted area with the listed items, at the given Z level. |- | [UNEXTRACT](UNEXTRACT.md) *file* || W || Unextracts previously extracted statics, as dynamic items at a targeted location. |- | [VERSION](VERSION.md) || W || Displays the server description to the client. |- | [WEBLINK](WEBLINK.md) *url* || W || Opens the client's web browser to send them to the specified url. |- | [X](X.md)*command* || W || Prompts the client to target an object to execute *command* on. |} [Category: Reference Compendium](Category:_Reference_Compendium.md) [Category: Objects](Category:_Objects.md)