Difference between revisions of "Characters"

From SphereWiki
Jump to: navigation, search
Line 642: Line 642:
 
| [[VENDGOLD]] || RW || Gets or sets the amount of gold a vendor has.
 
| [[VENDGOLD]] || RW || Gets or sets the amount of gold a vendor has.
 
|}
 
|}
 +
 +
 +
==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]] (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'''
 +
|-
 +
| [[GMPAGEP]] || R || Gets the GM page that the client is currently handling.
 +
|-
 +
| [[HOUSEDESIGN]] || R || Gets the building that is currently being designed by the client.
 +
|-
 +
| [[PARTY]] || R || Gets the party that the client is a member of.
 +
|-
 +
| [[TARG]] || RW || Gets or sets the object that the client has targeted.
 +
|-
 +
| [[TARGP]] || RW || Gets or sets the location that the client has targeted.
 +
|-
 +
| [[TARGPROP]] || RW || Gets or sets the character whose skills are shown in the client's skill menu.
 +
|-
 +
| [[TARGPRV]] || RW || Gets or sets the object 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 <KEY>. Click on the name for more detailed information such as usage and examples.
 +
 +
{| border="1" cellspacing="4" cellpadding="4"
 +
| '''Name''' || '''Read/Write''' || '''Description'''
 +
|-
 +
| [[ADD]] ''item_defname'' || W || Prompts the client to target a location to add the specified item at.
 +
|-
 +
| [[ADDBUFF]] ''icon, cliloc1, cliloc2, time, arg1, arg2, arg3'' || W || Displays a buff icon in the client's buff icon bar.
 +
|-
 +
| [[ADDCLILOC]] ''cliloc, args'' || W || Adds a cliloc to the tooltip being sent to the client. Only valid in @ClientTooltip triggers.
 +
|-
 +
| [[ADDCONTEXTENTRY]] ''entry_id, cliloc, flags, colour'' || W || Adds an entry to the context menu being sent to the client. Only valid in @ContextMenuRequest triggers.
 +
|-
 +
| [[ALLMOVE]] || RW || Gets or sets whether or not the client has ALLMOVE privileges.
 +
|-
 +
| [[ALLSHOW]] || RW || Gets or sets whether or not the client is able to see disconnected characters.
 +
|-
 +
| [[ARROWQUEST]] ''x, y'' || W || Displays an arrow on the client's screen that points to the specified world coordinates.
 +
|-
 +
| [[BADSPAWN]] || W || Teleports the client to the first invalid spawn point in the world.
 +
|-
 +
| [[BANKSELF]] || W || Opens up the client's bankbox.
 +
|-
 +
| [[CAST]] ''spell_id' || W || Begins casting a spell.
 +
|-
 +
| [[CHARLIST]] || W || Displays the client's character list screen.
 +
|-
 +
| [[CLEARCTAGS]] || W || Removes all of the client's CTAGs.
 +
|-
 +
| [[CLIENTIS3D]] || R || Returns 1 if the client is using the 3D client.
 +
|-
 +
| [[CLIENTISKR]] || R || Returns 1 if the client is using the KR client.
 +
|-
 +
| [[CLIENTVERSION]] || R || Gets the client version the client is using, based on the encryption keys being used (unencrypted clients return 0).
 +
|-
 +
| [[CTAG]] || RW || Gets or sets the value of a CTAG.
 +
|-
 +
| [[CTAGLIST]] || W || Displays a list of the client's CTAGs to SRC.
 +
|-
 +
| [[CTAGLIST]] LOG || W || Displays a list of the client's CTAGs on the server console.
 +
|-
 +
| [[DEBUG]] || RW || Gets or sets whether or not the client is in debug mode.
 +
|-
 +
| [[DETAIL]] || RW || Gets or sets whether or not the client receives additional detail, such as combat messages.
 +
|-
 +
| [[EVERBTARG]] ''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]] ''file, template_id'' || W || Extracts static items from a targeted area on the map and saves them into the specified file.
 +
|-
 +
| [[FLUSH]] || W || Forces queued network data to be immediately sent to the client.
 +
|-
 +
| [[GM]] || RW || Gets or sets whether or not the client is in GM mode.
 +
|-
 +
| [[GMPAGE]] ''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]] || W || Teleports the client to their targeted item.
 +
|-
 +
| [[HEARALL]] || RW || Gets or sets whether or not the client can hear all player speech regardless of location.
 +
|-
 +
| [[INFO]] || W || Displays an information dialog to the client for an object they target.
 +
|-
 +
| [[INFORMATION]] || W || Displays server information to the client.
 +
|-
 +
| [[LAST]] || W || Forces the client to target the object referenced by [[ACT]].
 +
|-
 +
| [[LASTEVENT]] || RW || Returns the time when data was last received from the client.
 +
|-
 +
| [[LINK]] || W || Allows the client to target two objects to link them together.
 +
|-
 +
| [[MENU]] ''menu_id'' || W || Displays a menu to the client.
 +
|-
 +
| [[MIDILIST]] ''music1, music2, ...'' || W || Selects a random music id from the given list and tells the client to play it.
 +
|-
 +
| [[NUDGE]] ''dx, dy, dz'' || W || Allows the client to nudge an area of items by the given coordinates, relative to the items' position.
 +
|-
 +
| [[NUKE]] ''command'' || W || Allows the client to execute ''command'' on all items in a targeted area.
 +
|-
 +
| [[NUKECHAR]] ''command'' || W || Allows the client to execute ''command'' on all NPCs in a targeted area.
 +
|-
 +
| [[PAGE]] || W || Displays the GM page menu to the client.
 +
|-
 +
| [[PRIVSHOW]] || W || Gets or sets whether or not the client's privilege level should show in their name.
 +
|-
 +
| [[REMOVEBUFF]] ''icon'' || W || Removes a buff icon from the client's buff icon bar.
 +
|-
 +
| [[REPAIR]] || W || Prompts the client to target an item for them to repair.
 +
|-
 +
| [[REPORTEDCLIVER]] || R || Gets the client version the client is using, based on what it has identified itself as to the server.
 +
|-
 +
| [[REPORTEDCLIVER]].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]] || W || Forces a full refresh of the client's screen.
 +
|-
 +
| [[SAVE]] ''immediate'' || W || Begins a world save. If background saving is enabled then ''[[SAVE]] 1'' will force a foreground save.
 +
|-
 +
| [[SCREENSIZE]] || R || Gets the client's screen size. (width,height)
 +
|-
 +
| [[SCREENSIZE]].X || R || Gets the width of the client's screen size.
 +
|-
 +
| [[SCREENSIZE]].Y || R || Gets the height of the client's screen size.
 +
|-
 +
| [[SCROLL]] ''scroll_id'' || W || Displays a message scroll to the client.
 +
|-
 +
| [[SELF]] || W || Forces the client to target itself.
 +
|-
 +
| [[SENDPACKET]] ''data'' || W || Sends a raw data packet to the client.
 +
|-
 +
| [[SET]] ''command'' || W || Prompts the client to target an object to execute ''command'' on.
 +
|-
 +
| [[SHOWSKILLS]] || W || Refreshes the client's skills for the skill menu.
 +
|-
 +
| [[SKILLMENU]] ''skillmenu_id'' || W || Displays a skillmenu to the client.
 +
|-
 +
| [[SKILLSELECT]] ''skill_id'' || W || Simulates the client selecting a skill from their skill menu.
 +
|-
 +
| [[SUMMON]] ''character_id'' || W || Casts the summon spell, with ''character_id'; being the character to summon.
 +
|-
 +
| [[SYSMESSAGE]] ''text'' || W || Displays a system message to the client.
 +
|-
 +
| [[SYSMESSAGELOC]] ''hue, cliloc, args'' || W || Displays a localized system message to the client.
 +
|-
 +
| [[SYSMESSAGELOCEX]] ''hue, cliloc, flags, affix, args'' || W || Displays a localized system message to the client with affixed text.
 +
|-
 +
| [[SYSMESSAGEUA]] ''hue, font, mode, language, text'' || W || Displays a UNICODE system message to the client.
 +
|-
 +
| [[TARGTXT]] || RW || Gets or sets the client's target text.
 +
|-
 +
| [[TELE]] || W || Casts the teleport spell.
 +
|-
 +
| [[TILE]] ''z, item1, item2, ...'' || W || Tiles the ground within a targeted area with the listed items, at the given Z level.
 +
|-
 +
| [[UNEXTRACT]] ''file'' || W || Unextracts previously extracted statics, as dynamic items at a targeted location.
 +
|-
 +
| [[VERSION]] || W || Displays the server description to the client.
 +
|-
 +
| [[WEBLINK]] ''url'' || W || Opens the client's web browser to send them to the specified url.
 +
|-
 +
| [[X]]''command'' || W || Prompts the client to target an object to execute ''command'' on.
 +
|}
 +
 +
 +
  
 
[[Category: Reference Compendium]]
 
[[Category: Reference Compendium]]

Revision as of 01:49, 7 June 2009

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 (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.

Name Read/Write Description
ACCOUNT RW Gets or sets the account that the character belongs to.
ACT RW Gets or sets the object that is related to the action the character is performing.
FINDLAYER.layer R Gets the object that the character has equipped in a specified layer.
MEMORYFINDTYPE..memory_flags R Gets a memory item with the specified flags.
MEMORYFIND.object_uid R Gets a memory item that is linked to the given object.
OWNER R Gets the character that owns this character.
SPAWNITEM R Gets the spawn item (t_spawn_char) that this character originated from.
WEAPON R Gets the weapon that the character currently has equipped.
P RW Gets or sets the position that the character is at.
REGION R Gets the region that the character is currently located in.
ROOM R Gets the room that the character is in.
SECTOR R Gets the sector that the character is in.
TOPOBJ R Gets the top-most object in the world that contains the character.
TYPEDEF R Gets the ITEMDEF 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 <KEY>. 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 will be accessed instead.

Name Read/Write Description
AC R Returns the character's total defense.
ACTARG1 RW Gets or sets the character's ACTARG1 value.
ACTARG2 RW Gets or sets the character's ACTARG2 value.
ACTARG3 RW Gets or sets the character's ACTARG3 value.
ACTDIFF RW Gets or sets the difficulty of the character's current action.
ACTION RW Gets or sets the skill that the character is currently using.
ACTP RW Gets or sets the character's ACTP value.
ACTPRV RW Gets or sets the character's ACTPRV value.
AGE R Returns the age of the character since its creation, in seconds.
ATTACKER R Gets the number of opponents who have damaged the character.
ATTACKER.LAST R Gets the UID of the opponent who most recently damaged the character.
ATTACKER.MAX R Gets the UID of the opponent who has dealt the most damage to the character.
ATTACKERn.DAM R Gets the amount of damage that the nth opponent has dealt to the character. (zero-based)
ATTACKERn.ELAPSED R Gets the length of time since the nth opponent has damaged the characer, in seconds. (zero-based)
ATTACKERn.UID R Gets the UID of the nth opponent who has damaged the characer. (zero-based)
BANKBALANCE R Returns the total amount of gold in the character's bankbox.
BODY RW Gets or sets the character's body.
CANCAST 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 item_id R Returns 1 if the character has the skills and resources to craft a certain item.
CANMAKESKILL item_id R Returns 1 if the character has the skills to craft a certain item.
CANMOVE direction R Returns 1 if the character can move in the given direction.
CANSEE R Returns 1 if SRC can see the character.
CANSEELOS R Returns 1 if SRC has line of sight to the character.
CANSEELOSFLAG flags R Returns 1 if SRC has line of sight to the character, with flags to modify what tests take place.
COLOR RW Gets or sets the character's hue.
CREATE RW Gets or sets the character's age since creation, in seconds.
DEX RW Gets or sets the character's total dexterity.
DIR RW Gets or setes the direction that the character is facing.
DISMOUNT W Dismounts the character from their ride.
DISPIDDEC R Gets the ID of the character as a decimal number.
DISTANCE point_or_uid R Gets the distance between this object and either SRC, a map location or another object.
EMOTEACT RW Gets, sets or toggles whether or not the character will emote all of its actions.
EVENTS event_defname RW Gets a list of events attached to the object, or adds or removes an event to or from the object.
EXP RW Gets or sets the character's experience points.
FAME RW Gets or sets the character's fame.
FAME.fame_group R Returns 1 if the character's fame falls within the specified fame group.
FLAGS RW Gets or sets the character's flags.
FONT RW Gets or sets the character's speech font.
FOOD RW Gets or sets the character's food level.
HEIGHT R Gets the character's height.
HITS RW Gets or sets the character's hitpoints.
ISARMOR object_uid R Returns 1 if the object is armour.
ISCHAR R Returns 1 if the object is a character.
ISCONT R Returns 1 if the object is a container.
ISEVENT.event_defname R Returns 1 if the object has an event attached to it.
ISITEM R Returns 1 if the object is an item.
ISNEARTYPE type, distance, flags R Returns 1 if a nearby item has the given TYPE.
ISNEARTYPETOP type, distance, flags R Returns a nearby world location of a nearby item which has the given TYPE.
ISPLAYER R Returns 1 if the object is a player.
ISTEVENT.event_defname R Returns 1 if the object has an event attached to its CHARDEF.
ISWEAPON object_uid R Returns 1 if the object is a weapon.
GOLD RW Gets or sets the amount of gold the character has.
GUILDABBREV R Returns the character's guild abbreviation.
HOME RW Gets or sets the character's home location.
ID R Gets the character's ID.
INT RW Gets or sets the character's total intelligence.
ISGM R Returns 1 if the character is in GM mode.
ISINPARTY R Returns 1 if the character is in a party.
ISMYPET R Returns 1 if the character belongs to SRC.
ISONLINE R Returns 1 if the character is considered to be online.
ISSTUCK R Returns 1 if the character cannot walk in any direction.
ISVENDOR R Returns 1 if the character is a vendor.
ISVERTICALSPACE location R Returns 1 if the ceiling at the given location is high enough for the character to fit under.
KARMA RW Gets or sets the character's karma.
KARMA.karma_group R Returns 1 if the character's karma falls within the specified karma group.
LEVEL RW Gets or sets the character's experience level.
LIGHT RW Gets or sets the character's personal light level.
MANA RW Gets or sets the character's mana.
MAP RW Gets or sets the map that this object is located.
MAXHITS RW Gets or sets the character's maximum hitpoints.
MAXMANA RW Gets or sets the character's maximum mana.
MAXSTAM RW Gets or sets the character's maximum stamina.
MAXWEIGHT R Returns the maximum weight that the character can carry.
MEMORY.object_uid RW Gets or sets the memory flags the character has for the given object.
MODAR RW Gets or sets a modifier for the character's armour rating.
MODDEX RW Gets or sets the character's dexterity modifier.
MODINT RW Gets or sets the character's intelligence modifier.
MODMAXWEIGHT RW Gets or sets the character's maximum weight modifier.
MODSTR RW Gets or sets the character's strength modifier.
MOUNT R Gets the UID of the character's mount.
MOVE direction R Returns the movement flags for the tile in the given direction (see can_flags in sphere_defs.scp).
NAME RW Gets or sets the character's name.
NIGHTSIGHT RW Gets or sets whether or not the character has nightsight enabled.
NOTOGETFLAG viewer_uid, allow_incognito RW Gets the character's notoriety flags as seen by the specified viewer.
NPC RW Gets or sets the character's AI type.
OBODY RW Gets or sets the character's original body.
OSKIN RW Gets or sets the character's original colour.
ODEX RW Gets or sets the character's base dexterity (without modifiers).
OINT RW Gets or sets the character's base intelligence (without modifiers).
OSTR RW Gets or sets the character's base strength (without modifiers).
RANGE R Gets the combat range of the character.
RESCOLD RW Gets or sets the character's resistance to cold.
RESENERGY RW Gets or sets the character's resistance to energy.
RESFIRE RW Gets or sets the character's resistance to fire.
RESPOISON RW Gets or sets the character's resistance to poison.
SERIAL R Gets the item's unique ID in the world.
SEX value_male:value_female R Returns value_male or value_female depending on the character's gender.
SEXTANTP 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.
SKILLCHECK skill_id, skill_amount R Returns 1 if the character has the specified amount of skill.
SKILLBEST.n R Returns the ID of the character's nth highest skill (0 = Highest)
SKILLTEST skill_list R Returns 1 if t he character possess all of the skills in the list.
SKILLTOTAL R Returns the total value of all the character's skills.
SKILLTOTAL skill_group R Returns the total value of all the character's skills within the specified group.
SKILLTOTAL -amount R Returns the total value of all the character's skills that are under amount.
SKILLTOTAL +amount R Returns the total value of all the character's skills that are over amount.
SKILLUSEQUICK skill_id, difficulty R Quickly uses a skill, returning 1 if the attempt was successful.
STAM RW Gets or sets the character's stamina.
STONE RW Gets or sets whether or not the character is trapped in stone.
STR RW Gets or sets the character's total strength.
TAG.name RW Gets or sets the value of a TAG.
TAGAT.index R Gets a TAG at the given zero-based index.
TAGAT.index.KEY R Gets the name of the TAG at the given zero-based index.
TAGAT.index.VAL R Gets the value of the TAG at the given zero-based index.
TAGCOUNT R Gets the number of TAGs stored on the item.
TAGLIST W Outputs a list of the object's TAGs.
TIMER RW Gets or sets the length of time before the item's timer expires, in seconds.
TIMERD RW Gets or sets the length of time before the item's timer expires, in tenths of a second.
TIMERF time, function W Scheduled a function to be executed on this object in time seconds.
TIMERF CLEAR W Clears all scheduled functions from the object.
TITLE RW Gets or sets the character's title.
TOWNABBREV R Returns the character's town abbreviation.
TRIGGER trig_name, trig_type R Fires a custom trigger and returns the RETURN value.
UID R Gets the item's unique ID in the world.
VISUALRANGE RW Gets or sets the character's sight range.
WEIGHT R Gets the weight of the character.
Z R Gets the Z position of the character.


Triggers

Here is a list of all item triggers. Click on the trigger name for more detailed information such as arguments and examples.

Name Description
@AfterClick Fires when the object has been single-clicked, just before the overhead name is shown.
@Attack Fires when the character begins attacking another.
@CallGuards Fires when the character calls for guards.
@CharAttack Fires when the character is attacked by another character.
@CharClick Fires when the character is clicked by another character.
@CharClientTooltip Fires when the tooltips are about to be sent to the character.
@CharDClick Fires when the character double clicks another character.
@CharTradeAccepted Fires when another character accepts trade with the character.
@Click Fires when the object has been single-clicked.
@ClientTooltip Fires when tooltips for this character are about to be sent to a client.
@ContextMenuRequest Fires when a client requests the context menu options for the object.
@ContextMenuSelect Fires when a client selects a context menu option for the object.
@Create Fires when the object is initially created, before it is placed in the world.
@Criminal Fires when the character becomes a criminal.
@DClick Fires when the object is double-clicked.
@Death Fires when the character's hitpoints reaches zero.
@DeathCorpse Fires when a corpse is created for the character.
@Destroy Fires when the object is being deleted.
@Dismount Fires when the character dismounts their ride.
@EnvironChange Fires when the environment changes for the character.
@ExpChange Fires when the character's experience points change.
@ExpLevelChange Fires when the character's experience level changes.
@FameChange Fires when the character's fame changes.
@GetHit Fires when the character receives damage.
@Hit Fires when the character hits another in combat.
@HitMiss Fires when the character fails to hit another in combat.
@HouseDesignCommit Fires when the character commits a new house design.
@HouseDesignExit Fires when the character exits house design mode.
@Hunger Fires when the character's food level decreases.
@ItemAfterClick Fires when the character single-clicks an item, just before the overhead name is shown.
@ItemBuy Fires when the character buys an item from a vendor.
@ItemClick Fires when the character single-clicks an item.
@ItemClientTooltip Fires when the tooltips are about to be sent to the client for an item.
@ItemContextMenuRequest Fires when the character requests the context menu options for an item.
@ItemContextMenuSelect Fires when the character selects a context menu option for an item.
@ItemCreate 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 Fires when the character damages an item.
@ItemDClick Fires when the character double-clicks an item.
@ItemDestroy Fires when the character destroys an item.
@ItemDropOn_Char Fires when the character drops an item on to a character.
@ItemDropOn_Ground Fires when the character drops an item on to the ground.
@ItemDropOn_Item Fires when the character drops an item on to another item.
@ItemDropOn_Self Fires when the character drops an item inside another item.
@ItemEquip Fires when the character equips an item.
@ItemEquipTest Fires when the characer is about to equip an item.
@ItemPickUp_Ground Fires when the character picks an item up from the ground.
@ItemPickUp_Pack Fires when the character picks an item up from inside a container.
@ItemPickUp_Self Fires when the character picks an item up from inside another item.
@ItemPickUp_Stack Fires when the character picks up an item from a stack.
@ItemSell Fires when the character sells an item to a vendor.
@ItemSpellEffect Fires when the character hits an item with a spell.
@ItemStep Fires when the character steps on an item.
@ItemTargOn_Cancel Fires when the character cancels an item's target cursor.
@ItemTargOn_Char Fires when the character targets a character with an item's target cursor.
@ItemTargOn_Ground Fires when the character targets the ground with an item's target cursor.
@ItemTargOn_Item Fires when the character targets an item with an item's target cursor.
@ItemToolTip Fires when the character requests old-style tooltips for an item.
@ItemUnEquip Fires when the character unequips an item.
@Jailed Fires when the character is sent to jail.
@KarmaChange Fires when the character's karma changes.
@Kill Fires when the character kills another character.
@Login Fires when the character logs in.
@Logout Fires when the character logs out.
@Mount Fires when the character mounts a ride.
@MurderDecay Fires when one of the character's kills is about to decay.
@MurderMark Fires when the character is about to gain a kill.
@NPCAcceptItem Fires when the NPC receives an item.
@NPCActFight Fires when the NPC makes a combat decision.
@NPCActFollow Fires when the NPC follows another character.
@NPCAction Fires when the NPC is about to perform an AI action.
@NPCHearGreeting Fires when the NPC hears a character for the first time.
@NPCHearUnknown Fires when the NPC hears something they don't understand.
@NPCLookAtChar Fires then the NPC looks at a character.
@NPCLookAtItem Fires when the NPC looks at an item.
@NPCLostTeleport Fires when the NPC is lost and is about to be teleported back to their HOME.
@NPCRefuseItem Fires when the NPC refuses an item being given to them.
@NPCRestock Fires when the NPC is having their items restocked.
@NPCSeeNewPlayer Fires when the NPC first sees a player.
@NPCSeeWantItem Fires when the NPC sees an item they want.
@NPCSpecialAction Fires when the NPC is about to perform a special action (throwing rock, breathing fire, etc).
@PersonalSpace Fires when the character is stepped on.
@PetDesert Fires when the character deserts its owner.
@Profile Fires when a player attempts to read the character's profile from the paperdoll.
@ReceiveItem Fires when the character receives an item from another character.
@RegionEnter Fires when the character enters a region.
@RegionLeave Fires when the character leaves a region.
@Rename Fires when the character renames another.
@SeeCrime Fires when the character sees a crime take place.
@SkillAbort Fires when the character aborts a skill.
@SkillChange Fires when the character's skill level changes.
@SkillFail Fires when the character fails a skill.
@SkillGain Fires when the character has a chance to gain in a skill.
@SkillMakeItem Fires when the character crafts an item.
@SkillPreStart Fires when the character starts a skill, before any hardcoded action takes place.
@SkillSelect Fires when the character selects a skill on their skill menu.
@SkillStart Fires when the character starts a skill.
@SkillSuccess Fires when the character succeeds at a skill.
@SkillUseQuick Fires when the character quickly uses a skill.
@SpellBook Fires when the character opens their spellbook.
@SpellCast Fires when the character casts a spell.
@SpellEffect Fires when the character is hit by the effects of a spell.
@SpellFail Fires when the character fails to cast a spell.
@SpellSelect Fires when the character selects a spell to cast.
@SpellSuccess Fires when the character successfully casts a spell.
@StatChange Fires when the character's STR, DEX or INT is changed through skill gain.
@StepStealth Fires when the character takes a step whilst hidden.
@ToolTip Fires when a player requests old-style tooltips for this character.
@TradeAccepted Fires when the character accepts a trade with another player.
@UserBugReport Fires when the player submits a bug report.
@UserChatButton Fires when the player presses the Chat button on the paperdoll.
@UserExtCmd Fires when the player sends an extended command packet. (used by some macros)
@UserExWalkLimit Fires when the player's movement is restricted by the movement speed settings in Sphere.ini
@UserGuildButton Fires when the player presses the Guild button on the paperdoll.
@UserKRToolbar Unknown.
@UserMailBag Fires when the player drags the mail bag on to another character.
@UserQuestArrowClick Fires when the player clicks the quest arrow.
@UserQuestButton Fires when the player presses the Quest button on the paperdoll.
@UserSkills Fires when the player opens their skill menu, or a skill update is sent to the player.
@UserSpecialMove Fires when the player uses a special move.
@UserStats Fires when the player opens the status window.
@UserVirtue Fires when the player presses on the Virtue button.
@UserVirtueInvoke Fires when the player invokes a virtue through macros.
@UserWarmode 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 (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.

Name Read/Write Description
GUILD R Gets the guild stone that the player belongs to.
SKILLCLASS RW Gets or sets the player's skillclass.
TOWN R Gets the town stone 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 <KEY>. Click on the name for more detailed information such as usage and examples.

Name Read/Write Description
CURFOLLOWER RW Gets or sets the number of current followers the player has,
DEATHS RW Gets or sets the number of times the player has died.
DSPEECH +/-speech_id RW Gets a list of attached speech handlers, or adds or removes a speech handler to or from the player.
GMPAGE.n.DELETE W Deletes the nth GM page. (zero-based)
GMPAGE.n.HANDLE W Sets the player as the handler for the nth GM page. (zero-based)
GMPAGE.n.key W Executes the .page command with key as the arguments.
ISDSPEECH.speech_id R Returns 1 if the player has the given speech handler attached.
KICK W Disconnects and blocks the player's account.
KILLS RW Gets the number of murders the player has committed.
KRTOOLBARSTATUS RW Gets or sets whether or not the KR toolbar is enabled for this player.
LASTUSED RW Gets the length of time since the player was last attached to a client, in seconds.
LUCK RW Gets or sets the luck value for the player.
MAXFOLLOWER RW Gets or sets the maximum number of followers the player can have.
PASSWORD W Sets or clears the player's password.
PFLAG RW Gets or sets the player's PFLAG value.
PROFILE RW Gets or sets the text to display on the player's profile.
SKILLLOCK.skill_id RW Gets or sets the lock state of the player's skill.
SPEEDMODE 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)
STATLOCK.stat_id RW Gets or sets the lock state of the player's STR, DEX or INT.
TITHING RW Gets or sets the number of tithing points the player has.


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 <KEY>. Click on the name for more detailed information such as usage and examples.

Name Read/Write Description
ACTPRI RW Gets or sets the NPC's motivation towards their current action.
NPC RW Gets or sets the NPC's AI type.
HOMEDIST RW Gets or sets the distance that the NPC can wander from its HOME position.
SPEECH +/-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 RW Gets or sets the colour of the NPC's speech.
VENDCAP RW Gets or sets the amount of gold a vendor will restock to.
VENDGOLD RW Gets or sets the amount of gold a vendor has.


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 (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.

Name Read/Write Description
GMPAGEP R Gets the GM page that the client is currently handling.
HOUSEDESIGN R Gets the building that is currently being designed by the client.
PARTY R Gets the party that the client is a member of.
TARG RW Gets or sets the object that the client has targeted.
TARGP RW Gets or sets the location that the client has targeted.
TARGPROP RW Gets or sets the character whose skills are shown in the client's skill menu.
TARGPRV RW Gets or sets the object 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 <KEY>. Click on the name for more detailed information such as usage and examples.

Name Read/Write Description
ADD item_defname W Prompts the client to target a location to add the specified item at.
ADDBUFF icon, cliloc1, cliloc2, time, arg1, arg2, arg3 W Displays a buff icon in the client's buff icon bar.
ADDCLILOC cliloc, args W Adds a cliloc to the tooltip being sent to the client. Only valid in @ClientTooltip triggers.
ADDCONTEXTENTRY entry_id, cliloc, flags, colour W Adds an entry to the context menu being sent to the client. Only valid in @ContextMenuRequest triggers.
ALLMOVE RW Gets or sets whether or not the client has ALLMOVE privileges.
ALLSHOW RW Gets or sets whether or not the client is able to see disconnected characters.
ARROWQUEST x, y W Displays an arrow on the client's screen that points to the specified world coordinates.
BADSPAWN W Teleports the client to the first invalid spawn point in the world.
BANKSELF W Opens up the client's bankbox.
CAST spell_id' W Begins casting a spell.
CHARLIST W Displays the client's character list screen.
CLEARCTAGS W Removes all of the client's CTAGs.
CLIENTIS3D R Returns 1 if the client is using the 3D client.
CLIENTISKR R Returns 1 if the client is using the KR client.
CLIENTVERSION R Gets the client version the client is using, based on the encryption keys being used (unencrypted clients return 0).
CTAG RW Gets or sets the value of a CTAG.
CTAGLIST W Displays a list of the client's CTAGs to SRC.
CTAGLIST LOG W Displays a list of the client's CTAGs on the server console.
DEBUG RW Gets or sets whether or not the client is in debug mode.
DETAIL RW Gets or sets whether or not the client receives additional detail, such as combat messages.
EVERBTARG 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 file, template_id W Extracts static items from a targeted area on the map and saves them into the specified file.
FLUSH W Forces queued network data to be immediately sent to the client.
GM RW Gets or sets whether or not the client is in GM mode.
GMPAGE 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 W Teleports the client to their targeted item.
HEARALL RW Gets or sets whether or not the client can hear all player speech regardless of location.
INFO W Displays an information dialog to the client for an object they target.
INFORMATION W Displays server information to the client.
LAST W Forces the client to target the object referenced by ACT.
LASTEVENT RW Returns the time when data was last received from the client.
LINK W Allows the client to target two objects to link them together.
MENU menu_id W Displays a menu to the client.
MIDILIST music1, music2, ... W Selects a random music id from the given list and tells the client to play it.
NUDGE dx, dy, dz W Allows the client to nudge an area of items by the given coordinates, relative to the items' position.
NUKE command W Allows the client to execute command on all items in a targeted area.
NUKECHAR command W Allows the client to execute command on all NPCs in a targeted area.
PAGE W Displays the GM page menu to the client.
PRIVSHOW W Gets or sets whether or not the client's privilege level should show in their name.
REMOVEBUFF icon W Removes a buff icon from the client's buff icon bar.
REPAIR W Prompts the client to target an item for them to repair.
REPORTEDCLIVER R Gets the client version the client is using, based on what it has identified itself as to the server.
REPORTEDCLIVER.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 W Forces a full refresh of the client's screen.
SAVE immediate W Begins a world save. If background saving is enabled then SAVE 1 will force a foreground save.
SCREENSIZE R Gets the client's screen size. (width,height)
SCREENSIZE.X R Gets the width of the client's screen size.
SCREENSIZE.Y R Gets the height of the client's screen size.
SCROLL scroll_id W Displays a message scroll to the client.
SELF W Forces the client to target itself.
SENDPACKET data W Sends a raw data packet to the client.
SET command W Prompts the client to target an object to execute command on.
SHOWSKILLS W Refreshes the client's skills for the skill menu.
SKILLMENU skillmenu_id W Displays a skillmenu to the client.
SKILLSELECT skill_id W Simulates the client selecting a skill from their skill menu.
SUMMON character_id W Casts the summon spell, with character_id'; being the character to summon.
SYSMESSAGE text W Displays a system message to the client.
SYSMESSAGELOC hue, cliloc, args W Displays a localized system message to the client.
SYSMESSAGELOCEX hue, cliloc, flags, affix, args W Displays a localized system message to the client with affixed text.
SYSMESSAGEUA hue, font, mode, language, text W Displays a UNICODE system message to the client.
TARGTXT RW Gets or sets the client's target text.
TELE W Casts the teleport spell.
TILE z, item1, item2, ... W Tiles the ground within a targeted area with the listed items, at the given Z level.
UNEXTRACT file W Unextracts previously extracted statics, as dynamic items at a targeted location.
VERSION W Displays the server description to the client.
WEBLINK url W Opens the client's web browser to send them to the specified url.
Xcommand W Prompts the client to target an object to execute command on.