SPHERE Scripting Compendium

The SPHERE Scripting Compendium
Uebersetzt von Aglarthiel

Diese Datei einthält alles was ein Spherescripter wissen muss und täglich braucht. Einige sagen diese Datei wäre nicht komplett aber ich versichere dir: sie ist so komplett wie sie nur sein kann.

SPHERE war nie sehr gut in der Dokumentation ihrer Projekte darum bleibt es an leuten wie mir hängen das Web zu durchsuchen, zu testen und zu probieren und meine Erfahrungen zu Dokumentieren. Es wurden in der Vergangenheit eine Menge Versuche unternommen SPHERE eine Dukumentation hinzu zu fügen aber sie waren alle unvollständig.

Dieses Compendium ist mein Versuch das alles zu berichtigen.

Die Uebersicht aller Inhalte
Standard Objekte | Eigenschaften | CanSee CanSeeLOS COLOR DISTANCE ISCHAR ISITEM MAPPLANE NAME P SERIAL TIMER TIMERD UID WEIGHT Z
Funktionen | DAMAGE DCLICK DIALOG EDIT EFFECT EMOTE FIX FIXWEIGHT FLIP FOLLOW FOLLOWED HIT INFO INPDLG MENU MESSAGE MOVE MOVETO MSG NUDGEDOWN NUDGEUP PROPS REMOVE REMOVEFROMVIEW SAY SAYU SAYUA SFX SOUND SPEAK SPEAKU SPEAKUA SPELLEFFECT TARGET TARGETG TRY TRYP TWEAK UID UPDATE UPDATEX USEITEM Z
Items | Referenzen | CONT LINK REGION
Eigenschaften | AMOUNT ATTR CONT DISPID DISPIDDEC DUPEITEM DUPELIST DYE FRUIT HITPOINTS HITS HITSMAX ID LAYER LINK MORE1 MORE1H MORE1L MORE2 MORE2H MORE2L MOREM MOREP MOREX MOREY MOREZ MOVABLE PILE REPLICATE REQSTR RESMAKE RESOURCES SKILL SKILLMAKE SPEED TDATA1 TDATA2 TDATA3 TDATA4 TWOHANDS TYPE VALUE
Funktionen | BOUNCE CONSUME DECAY DROP DUPE EQUIP REPAIR UNEQUIP USE
Multis | Variablen | COMPONENT MULTIREGION REGIONFLAGS TAG TSPEECH
Funktionen | SHIPANCHORDROP SHIPANCHORRAISE SHIPBACK SHIPBACKLEFT SHIPBACKRIGHT SHIPDOWN SHIPDRIFTLEFT SHIPDRIFTRIGHT SHIPFACE SHIPFORE SHIPFORELEFT SHIPFORERIGHT SHIPGATE SHIPLAND SHIPMOVE SHIPSTOP SHIPTURN SHIPTURNLEFT SHIPTURNRIGHT SHIPUP TAGLIST
CommCrystals | Keine Variablen | Keine Variablen
Keine Funktionen | Keine Funktionen
Container | Keine Variablen | Keine Variablen
Funktionen | DELETE EMPTY FINDCONT FINDID FINDLAYER FINDTYPE FIXWEIGHT ITEM MAKEKEY OPEN RESCOUNT RESTEST
Map | Variablen | PIN.<#>
Keine Funktionen | Weiterlesen
ScriptItems | Keine Variablen | Hier gibts nichts zu sehen!
Keine Funktionen | Lies weiter
Guildstones | Variablen | ABBREV ALIGN CHARTER DAILYDUES WEBPAGE
Keine Funktionen | In echt gibts welche aber die sind alle intern
Characters | Referenzen | ACCOUNT ACT FINDLAYER MEMORYFIND MEMORYFINDTYPE REGION SECTOR
Variablen | AC ACCOUNT ACT ACTARG1 ACTARG2 ACTARG3 ACTION AGE BANKBALANCE BODY CANCAST CANMAKE CREATE DIR DISPIDDEC EMOTEACT EVENTS FAME FLAGS FONT GUILDABBREV HITPOINTS HITS HOME ID ISEVENT ISGM ISMYPET ISVENDOR KARMA MANA MEMORY NIGHTSIGHT NPC OBODY OSKIN P SEX SKILLBEST SKILLCHECK SKILLTOTAL SPEECHCOLOR STAM STAMINA STONE TAG TITLE TOWNABBREV WEIGHTMAX XBODY XSKIN
Funktionen | AFK ALLSKILLS ANIM ATTACK BANK BARK BOUNCE BOW CONSUME CONTROL CRIMINAL DISCONNECT DRAWMAP DROP DUPE EQUIP EQUIPARMOR EQUIPHALO EQUIPLIGHT EQUIPWEAPON FACE FORGIVE GO GOCHAR GOCHARID GOCLI GOITEMID GONAME GOPLACE GOSOCK GOTYPE GOUID HEAR HUNGRY INVIS INVISIBLE INVUL INVULNERABLE JAIL KILL MAKEITEM NEWBIESKILL NEWDUPE NEWITEM NEWNPC PACK PARDON POISON POLY PRIVSET REMOVE RESURRECT SALUTE SKILL SLEEP SUICIDE SUMMONCAGE SUMMONTO SYSMESSAGE TAGLIST UNDERWEAR UNEQUIP WHERE
Player Characters | Variablen | DEATHS KILLS LASTUSED PLOT1 PLOT2 PROFILE SKILLCLASS SKILLLOCK.x
Funktionen | EMAIL KICK PASSWORD
Clients | Referenzen | ACCOUNT GMPAGEP T TARG TARGET TARGPROP TARGPRV TPROP TPRV
Variablen | ALLMOVE ALLSHOW CLIENTVER CLIENTVERSION CLIVER DEBUG DETAIL GM HEARALL LISTEN PRIVHIDE PRIVSHOW TARG TARGP TARGPROP TARGTXT
Funktionen | ADD ADDITEM ADDNPC ADMIN ARROWQUEST BANKSELF CAST CHARLIST CLIENTS EVERBTARG EXTRACT GHOST GMPAGE GOTARG HELP INFO INFORMATION ITEMMENU LAST LINK LOGIN LOGOUT MENU MIDI MIDILIST MUSIC NUDGE NUKE NUKECHAR ONECLICK PAGE REPAIR RESEND RESYNC SAVE SCROLL SELF SHOWSKILLS SKILLMENU STATIC SUMMON SYNC SYSMESSAGE TELE TILE UNEXTRACT VERSION WEBLINK
NPCs | Variablen | ACTPRI BRAIN HOMEDIST KNOWLEDGE NEED NEEDNAME NPC SPEECH SPEECHCOLOR VENDCAP VENDGOLD
Funktionen | BUY BYE FLEE HIRE LEAVE MIDILIST PETRETRIEVE PETSTABLE R RESTOCK RUN SCRIPT SELL SHRINK TRAIN WALK
SERV | Referenzen | CHARDEF ITEMDEF LASTNEWCHAR LASTNEWITEM REGIONRESOURCE SKILL SKILLCLASS WEBPAGE
Variablen | RCLOCK RTIME STATGUILDS TIMEUP
Funktionen | ACCOUNT ALLCLIENTS B BLOCKIP EXPORT HEARALL IMPORT INFORMATION LOAD LOG RESPAWN RESTOCK RESTORE SAFE SAVE SAVEINI SECURE SERVLIST SHUTDOWN UNBLOCKIP VERBOSE
REGION | Variablen | ANNOUNCE ARENA BUILDABLE CLASS COLDCHANCE FLAGS GATE GUARDED MAGIC MAGICDAMAGE MAPPLANE MARK NAME NOBUILD NODECAY NOPVP P RAINCHANCE RECALL RECALLIN RECALLOUT SAFE TYPE UID UNDERGROUND
Funktionen | ALLCLIENTS SECTORS
SECTOR | Variablen | COLDCHANCE COMPLEXITY ISDARK ISNIGHTTIME LIGHT LOCALLIGHT LOCALTIME LOCALTOD RAINCHANCE
Funktionen | ALLCLIENTS DRY LIGHT RAIN RESPAWN RESTOCK SEASON SNOW
ACCOUNT | Referenzen | CHAR.x
Variablen | ACCOUNT BLOCK CHARS CHATNAME COMMENT EMAIL EMAILFAIL EMAILLINK EMAILMSG EMAILQ FIRSTCONNECTDATE FIRSTIP GUEST JAIL LANG LASTCHARUID LASTCONNECTDATE LASTCONNECTTIME LASTCONNECTIP LEVEL NEWPASSWORD PASSWORD PLEVEL PRIV STATUS T2A TAG TOTALCONNECTTIME
Funktionen | BLOCK DELETE EMAIL EMAILMSG EMAILPASS EXPORT KICK PASSWORD TAGLIST
SERVACCOUNT | Keine Variablen | Wenn du dies lesen kannst bist du schon recht weit gekommen...
Funktionen | ? ADD ADDEMAIL EMAILPASS LIST UNUSED UPDATE <name>
GMPAGEP | Variablen | ACCOUNT P REASON STATUS TIME
Keine Funktionen | Siehe oben...
Script | Referenzen | I SERV SRC SRV UID.x
Variablen | CATEGORY DESCRIPTION SUBSECTION VAR.x
Funktionen | DUMPKEYS DUMPVERBS EVAL HVAL LISTCOL QVAL STRCHAR STRCHARAT STRFIRSTCAP STRLEFT STRMID STRRIGHT STRTOLOWER STRTOUPPER SHOW TRIGGER VALSTR
Intrinsic Funktionen | Keine Variablen | Der Name sagt schon 'Funktionen' also gibts hier keine Variablen, klar?
Funktionen | ID ISBIT RAND RANDBELL STRASCII STRCMP STRCMPI STRINDEXOF STRLEN STRMATCH
StructuralCommands | Commands | BEGIN DORAND DOSWITCH IF FOR RETURN
Platzhalter | Èinfach Ignorieren
ACTIONS and ACTARGs Types and TDATAs Types and MOREs
Event Information | Character Events
Item Events

Miscellaneous

Effect Types
Damage Types
Account Priv Flags
Flags for IMPORT and EXPORT
Flags for LOGMASK in sphere.ini
SAYUA Speech Modes
MEMORY_SPEAK additional information

Item Default Actions

@Dclick, Take 1
@Dclick, Take 2
@Step
@Timer
@Damage
@Targon*
@SpellEffect

Charts and Tables

Hier findest du Listen und Tabellen über jeden Aspekt des Spiels. Als erstes: Ich zeige hier die erste und einzige Tabelle die JEDE Variable und Function für jedes Objekt enthält. Anstatt alphabetisch ist diese Tabelle nach Objekttyp geordnet, von den einfachsten bis zu den fortgeschrittensten. Wir beginnen mit den Ingameobjekten (Items und Chars)

Standard Objecte Jedes Item und jeder Char hat diese Variablen und Funktionen

Referenzen
SECTOR | Der Sector in dem das Objekt existiert.
TOPOBJ | Der oberste Container eines Objektes. Wird für gewöhnlich benutzt um den Besitzer eines Items zu ermitteln, der das Item tief in seinen Taschen vergraben hat (z.B. Eine Tasche in einer Tasche in einem Rucksack). Gibt fast immer eine Charreferenz, es sei den das Objekt liegt auf dem Boden. TOPOBJ eines Chars ist immer der Char selbst, NICHT der Server!
TYPEDEF | Erlaubt auf ITEMDEF und CHARDEF zu zu greifen und sie zu ändern. Ich werde bei Gelegenheit eine Tabelle machen in der alle Eigenschaften stehen die durch TYPEDEF geändert werden können die normalerweise nicht geändert werden können. Wenn du irendwas eines Objektes änderst werden alle gleichen Objects ebenfalls geändert. Wenn du bsp. die AR eines Orges änderst, wird die AR ALLER Oger geändert. Diese Änderungen werden NICHT gespeichert, wenn die Änderungen dauerhaft sein sollen müssen sie im ITEMDEF oder CHARDEF des Objekts geändert werden.

Eigenschaften
CanSee | Ist 1 wenn der SRC gesehen werden kann vom Objekt (das Objekt ist auf dem Bildschirm) und 0 wenn nicht. Wenn es keinen SRC gibt ist CanSee immer 0.
CanSeeLOS | Ist 1 wenn der SRC gesehen werden kann vom Objek t und in seiner Sichtlinie ist. Die Sichtlinie wird von allen grossen Statics und einigen dynamischen Items.

COLOR
Dies ist die Farbe eines Objekts. Farben sind als Nummern zwischen 0 und 0FFFF defniert. Alle Farben zwischen 04000 und 04FFF sind eine transparente Version der entsprechenden Farben zwischen 0 und 0FFF. Andere Prefixes können verschiedene Auswirkungen haben. Sei vorsichtig mit den transparenten Farben, da bekannt ist das sie den Client crashen können.
DISTANCE
Dies ist die Distanz zwischen dem Objekt und SRC in Tiles. Wenn SRC 4 Tiles in Y-Richtung und 5 Tiles in X-Richtung liegt ist DISTANCE 5.
ISCHAR
1 wenn das Objekt ein Char ist, 0 wenn nicht.
ISITEM
1 wenn das Objekt ein Item ist, 0 wenn nicht.
MAPPLANE
Die Maplane des Objekts (denk an Trammel und Felucca). Es gibt 255 Maplanes in SPHERE. Objekts in eine Maplane können nicht von Chars in einer anderen Maplane gesehen werden. Ausnahme: Maplane 255. Alles in Maplane 255 kann von allen Chars gesehen werden, egal aus welcher Maplane. Bis Version 0.55i werden Sectoren unabhängig von den Maplane gespeichert. Verschiedenen Maplanes können also keine verschiedenen Jahreszeiten oder Lichtverhältnisse zugewiesen werden.
NAME
Dies ist der Name des Objekts. Kann aus Ziffern, Zeichen und Sonderzeichen bestehen.
P
Dies ist die Postion des Objekts in der Welt. Die Koordinaten liegen IMMER zwischen 0,0 und 6143,4094. Wenn ein Objekt innerhalb eines Containers ist dann entspricht P der Postion im Container (0,0 - 127,127). P kann aufgelöst werden in X,Y,Z und M (Maplane) über P.X, P.Y P.Z und P.M.
SERIAL
Siehe UID
TIMER
Dies ist ein Timer mit Sekundenauflösung. Zählt jede ca. Sekunde um 1 runter. Wenn der Timer 0 rerreicht wird der Trigger ON=@TIMER ausgelöst. Bei Chars wird der Timer für verschiedene Skilldelays gebruahct. Es kann also der Timer geprüft werden um zu sehen ob ein Char grade Delay wegen einem Skill hat.
TIMERD
Dies ist ein Timer mit Zehntelsekundenauflösung. Zählt jede ca. Zehntelsekunde um 1 runter. Wenn der Timer 0 rerreicht wird der Trigger ON=@TIMER ausgelöst. Chars haben auch einen TIMERD aber dieser wird nicht in der Internen Uhr benutzt.
UID
Dies ist eine einzigartige Nummer jedes Objekts. Sie kann NIEMALS geändert werden und bleibt immer gleich bis zu zerstöhrung des Objekts. Danach kann die UID wiederverwendet werden (Sphereintern, nicht durch Scripte) also sei Vorsichtig.
WEIGHT
Dies ist das Gewicht eines Objekts. Wenn das Objekt ein Container ist ist es das Gewicht des Container UND aller Objekte im Container. Das Gewicht eines Absolut nackten Chars ist 0.
Z
Dies ist die Z Koordinate des Objekts welches die höhe über dem absoltuten Grund (-127) beschreibt. Kann auch über P.Z ausgelesen und geändert werden.

Funktionen
DAMAGE | DAMAGE <amount> <damage_type> <src_uid> Verpasst dem Objekt Schaden in höhe des angegebenen amount. Wenn kein src_uid angegeben ist kommt der Schaden immer vom SRC des aktuellen Script. Die gültigen damage_type sind in einer anderen Tabelle weiter unten aufgelistet. Wenn nicht anders angegeben, ist der Schaden immer 'blunt' und 'general'. DAMAGE löst den ON=@DAMAGE Trigger eines Items oder Chars aus.
DCLICK | DCLICK Versucht den SRC das Objekt 'benutzen' zu lassen. Wenn das Objekt ein Chars ist öffnet sich für gewöhnlich das Paperdoll. Wenn das Objekt ein Item ist, ist es als würde der SRC das Item doppelklicken. Wenn es keinen SRC gibt wird diese Function ignoriert
DIALOG | DIALOG <resource_id> Öffnet das bezeichnete Dialog für den SRC. Nur der SRC kann das Dialog sehen. Wenn ein Dialogbutton benutzt wird gilt dieser für das Objekt welches das Dialog aufgerufen hat (das muss nicht der SRC sein).
EDIT | EDIT Öffnet ein Dialog das den Inhalt eines Containers anzeigt (auch Chars sind Container!). Diese Function wird immer für den SRC aufgerufen. Gibt es keinen SRC, dann wird diese Function ignoriert.
EFFECT | EFFECT <type> <id> <speed> <loop> <explode> This is a rather complex, but easy to use command. The effect types are listed in another table below. If the effect involves an animation of some sort, you must specify the item ID to use in the animation. Only base IDs will work (i.e. under 04000). The speed is used for flying animations (a speed of 1 is very interesting because you can run from the animation and it will follow you). Loop determines the duration (in items) of the animation. 16 is usually a good value. Explode determines whether or not the flying animation will make an explosion when it hits the target.
EMOTE | EMOTE <text> Causes the object to "act" some text using stars. The sentence will begin with "You" for the object, and "You see <name>" for anyone within hearing range. For example, "You walk the dog" and "You see Joe walk the dog".
FIX | FIX Places the object on the highest surface below it. It also updates the client, causing all of the items on-screen to be resent. (See UPDATE below.) As a result, clients can sometimes freeze if a FIX command is sent repeatedly.
FIXWEIGHT | FIXWEIGHT This attempts to fix the weight of the object, due to a weight bug in certain versions of SPHERE. Weight will be recalculated, rather than using the stored value.
FLIP | FLIP <id> This flips the object's DISPID to the specified ID, or cycles through IDs if no argument is given. The only valid IDs are those within the Objekte DUPELIST (see any of the base item files). If the object is a light source, this will determine the type of light that the object emits.
FOLLOW | FOLLOW Annoying effect where the SRC will teleport onto the object every second or so. Never use this! Ever! You will die!
FOLLOWED | FOLLOWED Same as FOLLOW.
HIT | HIT <amount> <damage_type> <src_uid> Same as DAMAGE, except it immediately fires an @GetHit event on characters.
INFO | INFO Displays a dialog (editable within spheredialog.scp) which allows you to edit the object selected. A different dialog will be displayed for items and characters.
INPDLG | INPDLG <variable> <maxchars> Displays a dialog to the SRC which allows you to edit the value of any variable. This is used by the INFO dialog, and is also vaguely useful in scripts. Unfortunately, it isn't very pretty, so only use it for GM stuff. The prompt shown is always "<variable> (# = default)".
MENU | MENU <resource_id> Displays the speficied menu to the SRC. If there is no SRC, this function is ignored.
MESSAGE | MESSAGE <text> Displays a message above the specified item to the SRC. Only the SRC can see this message, but it does not necessarily appear above the SRC. If the object is inside of a closed container, the text is displayed like a SYSMESSAGE in the lower left corner of the screen.
MOVE | MOVE <x> <y> <z> M <x> <y> <z> Moves the character relative to his current position by the specified amount. If any parameters are left out, they are assumed to be 0, so MOVE 1, MOVE 1 -1, and MOVE 1 1 1 are all valid function calls.
MOVETO | MOVETO <x> <y> <z> <m> Same as editing the P property. Moves the object to the specified coordinates without sending any client updates. If you want others (or the object being moved) to display actual movement, you must UPDATE it immediately.
MSG | MSG <text> Same as MESSAGE.
NUDGEDOWN | NUDGEDOWN <amount> Subtracts the specified amount from the object's Z coordinate and updates it. Very useful for careful building.
NUDGEUP | NUDGEUP <amount> Adds the specified amount to the object's Z coordinate and updates it.
PROPS | PROPS Same as INFO.
REMOVE | REMOVE <bool> Attempts to remove the object. Later overrides make it impossible to delete player characters without passing a 1 as a parameter to this function (REMOVE 1).
REMOVEFROMVIEW | REMOVEFROMVIEW Very interesting function that causes the object to immediately disappear from the screens of anyone who can see it. Players coming onto the screen will be able to see the object unless it continually removes itself from view. Any spoken text or messages that would normally appear above an object hidden this way (or any other way, for that matter) will appear in the lower left corner of the screen.
SAY | SAY <text> Causes the object to SAY the given text. This text is visible to anyone within hearing range.
SAYU | SAYU <text> Causes the object to SAY the given text in unicode format. This is a new thing with SPHERE, and will appear strange in some clients. This is, however, the only way to get foreign characters into spoken text.
SAYUA | SAYUA <color> <mode> <font> <language> <text> Basically, this displays text in unicode colored to the specified number. Valid values for the other parameters are given in a chart below, but usually passing a 1 for each works fine. This is the function which I abuse to create colored sysmessages (see the tutorial about it).
SFX | SFX <key> Plays the specified sound effect. Use Axis or InsideUO to get valid values.
SOUND | SOUND <key> Same as SFX.
SPEAK | SPEAK <text> Same as SAY.
SPEAKU | SPEAKU <text> Same as SAYU.
SPEAKUA | SPEAKUA <color> <mode> <font> <language> <text> Same as SAYUA.
SPELLEFFECT | SPELLEFFECT <spell> <strength> <resist?> This function forces the effect of a given spell to take place on a character. The strength of the spell is the magery skill with which the spell was suppposedly cast, and can certainly be higher than 100.0. If the last parameter is 0, the spell cannot be resisted. If it is 1, it can.
TARGET | TARGET Brings up a target to the SRC. When the SRC clicks something, it fires @Targon_Item, @Targon_Ground, or @Targon_Char events on the object which called this function, depending on what was clicked.
TARGETG | TARGETG Same as TARGET, except it allows targeting of arbitrary points on the ground, which are not necessarily occupied by an item or character.
TRY | TRY <text> Tries to execute the text as if it was a valid command, after resolving all Variablen. An example on TRY will be given later in the document. TRY will never succeed for an object with a PLEVEL less than 4. Items have a default PLEVEL of 0.
TRYP | TRYP <plevel> <text> Same as TRY, but also fails if the object's plevel is below the given PLEVEL. For this command to ignore PLEVEL considerations, pass 0 for that parameter.
TWEAK | TWEAK Same as INFO.
UID | UID Doesn't work. It just gives you a fun error that says "Setting the UID this way is not allowed". Bwahahahaaaaa...
UPDATE | UPDATE Resends all information about the object to all clients within seeing range (I think this is two screens, but I'm not sure). If the object is actually a player, it resends information about everything on the screen to that player, along with updating the player on everyone else's screen.
UPDATEX | UPDATEX Basically, calls REMOVEFROMVIEW, then calls UPDATE. This is necessary for equipped items, so always use UPDATEX in that situation.
USEITEM | USEITEM Same as DCLICK.
Z | Z Modifies the player's Z level and calls UPDATE.

Not all of the item Eigenschaften are editable in-game or even in scripts. The only item Eigenschaften you should worry about changing are the MOREs, TYPE, AMOUNT, COLOR, the IDs, CONT, ATTR, and LINK. Others are either not changeable after the item is created, or don't really do anything important enough to change them.

Items All items have these Eigenschaften and Funktionen, along with those from "Standard Object".

Referenzen
LINK | A reference to the item whose UID is stored in the LINK property.
CONT | A reference to the container in which this item is stored. See below for information about the CONT property.
REGION | The region in which the item exists. More specifically, the region in which the item's TOPOBJ exists. Items inside of containers reference the region of their TOPOBJ.

Eigenschaften
AMOUNT | The amount of the item in a pile.
ATTR | The attributes of this item. This is a bitmask, and valid flags can be found by looking at the table below, or looking at spheredefs.scp.
CONT | This is the UID of the item's container. Changing this will move the item between containers.
DISPID | The ID that is displayed. Editing this property will make an item look different without actually changing the item's ID. Swindler has used this to make some interesting effects with layers.
DISPIDDEC | The ID that is displayed, in decimal. This is useful for dialogs, because the "tilepic" command only takes a decimal value.
DUPEITEM | So that the SPHERE team that originally wrote all of the item scripts didn't have to duplicate all of the Eigenschaften for all of the items in the item file, they created the DUPEITEM. This tells SPHERE that the item will have all of the Eigenschaften of its parent item. (For example, all stone floors don't need their own individual Eigenschaften.)
DUPELIST | This is the list of all items that share this item's base Eigenschaften.
DYE | Can this item be dyed or not?
FRUIT | What fruit does this item produce, if it is of the appropriate type. (t_fruit, no doubt.)
HITPOINTS | The amount of hitpoints an item has. When an item runs out of hitpoints, it is destroyed.
HITS | Same as HITPOINTS
HITSMAX | The maximum hitpoints this item can have.
ID | The ID of this item. Setting an ID causes the item to inherit all Eigenschaften of that item. If you are using this property in a script, you can later override other Eigenschaften. See the lessons on item scripts in Chapters 1 and 2 for details.
LAYER | When an item is equipped, it goes into a "layer" on the character. Layers 1 through 25 are visible as equipped items on the character. Other layers are used to hold the backpack, the bank box, and various other items. This property tells you which layer the item is in.
LINK | This is a reference to an arbitrary object. The property holds a UID, but it can then be used as a reference to affect that object in a script.
MORE1 | Type-based data storage. If a type doesn't use a particular MORE variable, you may feel free to use them in your scripts, but BE CAREFUL that you don't overwrite something important.
MORE1H | The first two bytes of MORE1. You cannot use both MORE1H and MORE1 on the same item, as they will overwrite one another.
MORE1L | The last two bytes of MORE1. You cannot use both MORE1L and MORE1 on the same item, as they will overwrite one another.
MORE2 | More type-based storage.
MORE2H | Same idea.
MORE2L | Same idea.
MOREM | The only non-typed-based storage space available on an item. It can hold a number between 0 and 255.
MOREP | Holds a value in coordinate format (for example, 1256 1292 42 1). The individual coordinates are available in MOREX, MOREY, MOREZ, and MOREM. Editing MOREP will edit all of those Variablen, so be careful.
MOREX | Type-based storage.
MOREY | Type-based storage.
MOREZ | Type-based storage.
MOVABLE | Can this item be moved?
PILE | Can this item be piled (like reagents or gold)?
REPLICATE | If this property is 1, when crafting, you will use all available resources and make as many of this item as possible. For example, when you make arrows, you use all of your available feathers and wood, until one or the other runs out, because this property is 1 for arrows.
REQSTR | The strength required to equip this item
RESMAKE | A string showing the resources in readable format. "12 feathers, 15 logs, 1 loaf of bread"
RESOURCES | The actual resources required to make the item. See the item scripts for examples of how to implement these into your own scripts.
SKILL | The skill required to use this item.
SKILLMAKE | The skill required to make this item.
SPEED | This is not used anymore. Weapon speed is now dependant on the weight of the item. This property exists for backward compatibility.
TDATA1 | Type-based storage.
TDATA2 | Type-based storage.
TDATA3 | Type-based storage.
TDATA4 | Type-based storage.
TWOHANDS | Does the item occupy both hands when equipped? (Regardless of the actual picture you see in-game.)
TYPE | The item type. This is probably the most important part, as it determines what the item actually DOES. Types are covered in another table below, and on Daleth's Reference Project site.
VALUE | The amount it costs to buy the item. Selling price is always half of the buying value. If you do not specify a value, SPHERE assumes that the value is the sum of the values of all of the item's resources.

Funktionen
BOUNCE | BOUNCE <uid> Places the item into the backpack of the specified player. If no player is specified, SRC is assumed. A message is shown to the player, similar to "You place <name> into your backpack."
CONSUME | CONSUME <amount> (NOTE: THIS IS DIFFERENT THAN USING CONSUME ON A CHARACTER OBJECT, for all of you who would correct me.) This consumes the specified amount of items from the pile.
DECAY | DECAY <time> Sets the decay time for the specified item. When the decay time expires, the item disappears unless it is in a no-decay region. The time is in tenths of a second, like TIMERD. If you don't specify a time, it will cause the item to decay immediately.
DROP | DROP Causes the item to drop to the ground from whatever container it happens to be in. It will appear at the position of the top-level container.
DUPE | DUPE <amount> Creates the specified number of duplicates of this object. It places the items near the location of the top-level container. If the number of Objekte requested exceeds the maximum item complexity specified in sphere.ini, it will not create any more than that amount.
EQUIP | EQUIP Causes the SRC to equip the specified item. See the section on character Funktionen for another version of this function. (NOTE AGAIN: This is not the same as calling EQUIP with a parameter on a character. Do not correct me.)
REPAIR | REPAIR Attempts to repair the item, based on SKILLMAKE and other factors. I don't know what those factors are, so don't ask.
UNEQUIP | UNEQUIP Unequips the item and places it in the backpack of the SRC. If there is no SRC, this function is ignored.
USE | Causes the SRC to use the item. This is identical to the object function DCLICK.

The following are special types of items. They all contain all of the Eigenschaften and Funktionen listed above, along with the extra ones listed in these tables:

Multis (TYPE = t_multi, t_ship)

Referenzen
COMP(x) | Supposedly accesses the components of the house (doors, signs, etc) in some enumerated order. However, I can't get this to do anything but return 1, so if anyone can get this reference to work, let me know.
REGION | Accesses the region created by the multi

Variablen
COMPONENT | In a script, this specifies a new component that will be placed with the multi. They will not appear in the ghosted image that shows you where you will be placing your item, nor must they be contained within the multi region. They are automatically locked down. See sphereitem_multis.scp for examples.
MULTIREGION | Multis contain their own regions. This sets the dimensions of that region, from the center point of the actual multi. Usually, if you are making your own multis, the region size is calculated for you by whatever program you're using.
REGIONFLAGS | The automatic flags of the region created for this multi.
TAG | Multis can have tags.
TSPEECH | Multis can respond to speech.

Funktionen These Funktionen only work on items of type t_ship unless specified otherwise.
SHIPANCHORDROP | Makes the ship drop its anchor so it cannot move
SHIPANCHORRAISE | Makes the ship raise its anchor so it can move
SHIPBACK | Moves the ship in the backward direction
SHIPBACKLEFT | Moves the ship in the backward-left direction
SHIPBACKRIGHT | Moves the ship in the backward-right direction
SHIPDOWN | If the ship object has attr_magic set, this will make the ship move down by 5 Z levels.
SHIPDRIFTLEFT | Moves the ship directly left
SHIPDRIFTRIGHT | Moves the ship directly right
SHIPFACE | Makes the ship face in the direction specified. The direction of movement does not change.
SHIPFORE | Moves the ship foreward
SHIPFORELEFT | Moves the ship forward and left
SHIPFORERIGHT | Moves the ship forward and right
SHIPGATE | Moves the entire ship and its contents to another location. (This also works for t_multi items, which could be very interesting.) Characters inside are not moved along.
SHIPLAND | If the ship is magic, it executes FIX on the ship and all of its contents.
SHIPMOVE | Moves the ship in the specified direction
SHIPSTOP | Causes the ship to stop moving
SHIPTURN | Executes a "come about" and reverses everything. Also screws up tillermen and other such fun stuff. Use Swindler's boat fix to take care of this.
SHIPTURNLEFT | Turns the ship left
SHIPTURNRIGHT | Turns the ship right
SHIPUP | If the ship is magic, moves it up by 5 tiles
TAGLIST | Dumps a list of tags to the screen for the SRC. (This works for t_multi items as well.)

Comm Crystals (t_comm_crystal)
There is no reason to make a table, because these items only have one difference from normal items. They have a SPEECH property, which can be changed in-game, and allows the items to listen to speech in the same way as any character. Also, if the crystal is linked to another crystal, the second crystal will speak anything it hears.

Containers (t_container, t_container_locked)

Containers are unique in that the items contained within them each have an index, like an array. You can refer to these items by their index in several Funktionen. Unfortunately, there is no function that determines which item is which index without manually searching the entire container. Indices are assigned in the order the items enter the container (index 0 is the first, index 1 is the second, and so forth.)

Referenzen
FINDCONT | FINDCONT.<number> Gives a reference to the specified index number. If you use this in combination with TRY or TRYP, you can use a variable in place of an actual number.
FINDID | FINDID.<id> Finds the first item (by index) with the specified ID, and returns a reference to it.
FINDLAYER | FINDLAYER.<layer> Finds the first item (by index) in that particular layer, and returns a reference to it. Some layers (30, for example) can hold more than one item.
FINDTYPE | FINDTYPE.<type> Finds the first item (by index) with the specified type, and returns a reference to it.

Funktionen
DELETE | DELETE <number> Deletes the item with the specified index
EMPTY | EMPTY Empties all items from the container
FIXWEIGHT
FIXWEIGHT Same as the Standard Object FIXWEIGHT, but takes into account all items within the container.

ITEM | ITEM, or something DOES ABSOLUTELY NOTHING. YAY SPHERE!
MAKEKEY | MAKEKEY Makes a key for the container and places it inside. Obviously, you won't be wanting to do this on a locked container.
OPEN | OPEN Opens the container and displays its content to SRC.
RESCOUNT | RESCOUNT <id> Returns the number of items of the particular ID that are in this container. If no ID is specified, returns the number of items in the container.
RESTEST | RESTEST <amount> <id> Returns 1 if there are <amount> items with ID <id> in the container. Otherwise returns 0. Useful in IF statements.

Map (t_map)

Maps have pins. That's about the only thing unique about them.

Variablen
PIN.<#> | This can basically be used as some sort of array. Each value contains two numbers, since it is a coordinate. If the coordinates are not on the map, the pin will actually be displayed off to the side. Unfortunately, you can only read values from current pins, and add new pins. By trying to set a PIN value, it will simply be added to the end of the list as a new pin. You cannot access the coordinates individually. There is a maximum of 128 pins on a map.

Script Items (t_script, t_eq_script)
These items can have TAGs. That's the only unique thing here. And because they can have TAGs, there's a TAGLIST function. The end.

Guildstones (t_guildstone)

Lots of new Variablen and Funktionen here, so we can provide almost full functionality for the guildstone! Remember, any player's guildstone may be accessed by using MEMORYFINDTYPE.memory_guild.

Variablen
ABBREV | The guild's abbreviation (displayed above the members' heads).
ALIGN | The guild's alignment. 0 is chaos, 1 is neutral, 2 is order.
CHARTER | The guild's charter. This can be extensive.
DAILYDUES | The amount of money due daily to the guild
WEBPAGE | The guild's website

Most guildstone Funktionen require that they actually be used from the guildstone menu. As a result, I won't list them here. The exceptions are APPLYTOJOIN, which puts you down as a candidate for membership, and JOINASMEMBER, which automatically puts you as a guild member. Previous guild fealty is lost.

Well, that does it for items and special types of items. Next, we're going to move on to the most generic of all character Objekte. Unfortunately, characters are also split into several varieties depending on their state. First, there are NPCs and PCs. PCs are further divided into players and clients (clients being those who are online). Characters also have a HUGE number of things you can do to them. This is going to be painful to write.

Characters Characters have all of the Standard Object Funktionen and Variablen as well as the ones listed below.

Referenzen
ACCOUNT | A reference to an account object which contains information about this character's account. (duh)
ACT | A reference to some object. What it is depends on the situation.
FINDLAYER | A reference to the item in layer <x>
MEMORYFIND | MEMORYFIND.<uid> Finds a memory of the specified UID.
MEMORYFINDTYPE | MEMORYFINDTYPE.<type> Finds a memory of the specified type. Types are in a table below, and in spheredefs.scp.
REGION | A reference to the region the character is in
SECTOR | A reference to the sector the character is in

Variablen
AC | Armor class. In-game, this is abbreviated AR on the status screen.
ACCOUNT | The name of the player's account, if not used as a reference.
ACT | The UID of the player's ACT, if not used as a reference. This can be SET.
ACTARG1 | Skill-specific stuff
ACTARG2 | Skill-specific stuff
ACTARG3 | Skill-specific stuff
ACTION | Which skill we're currently using
AGE | How old (in seconds) is this character
BANKBALANCE | The amount of gold in the player's bank
BODY | The body type (like DISPID) of the player
CANCAST | CANCAST <spell> 1 if the player can cast the spell, 0 if the player can't
CANMAKE | CANMAKE <id> 1 if the player can make the item, 0 if they can't
CREATE | The timestamp of when this character was created
DIR | The direction the character is facing. 0 is north, and the directions increase clockwise.
DISPIDDEC | The decimal version of the character's BODY
EMOTEACT | If this is 1, the NPC will emote all of his actions so you can see them. It's basically for debugging. For example, you'll see "*You see Joe coming*".
EVENTS | A list of events this character has. You can use + and - to add and subtract from this variable, rather than overwriting the entire thing. See chapter 7 for details.
FAME | Character's fame. You can also check whether or not a character has a certain "rank" of fame, by saying FAME.FAMOUS, FAME.KNOWN, etc. There are examples of this in the speech files.
FLAGS | Flags of the character. This is a bitmask. Valid values are in spheredefs.scp or the table below.
FONT | The font in which the character speaks. The font does not appear unless you use the SAY command, because characters automatically speak in unicode, which does not manage fonts. Font 3 is the normal font, and Font 8 is runic. You can see all of the fonts using InsideUO.
GUILDABBREV | The guild abbreviation. You can also access the guildstone for this information.
HITPOINTS | Current hitpoints. Characters die when their hitpoints reach zero.
HITS | Same as HITPOINTS.
HOME | Coordinates where the character was created. This is used with spawning, mostly.
ID | The ID of the character (defname)
ISEVENT | ISEVENT.<event> 1 if the character has that event, and 0 if it doesn't
ISGM | 1 if the character is a GM, 0 if not
ISMYPET | 1 if the character is tamed or controlled by SRC, 0 if not
ISVENDOR | 1 if the character is a vendor, 0 if not
KARMA | The character's karma. This works in the same way as FAME.
MANA | The character's mana
MEMORY | The memory flags regarding the SRC (see spheredefs.scp or the table below)
NIGHTSIGHT | Does the character have nightsight on? 1 if yes, 0 if no.
NPC | The character's brain type. Players have a brain type of zero.
OBODY | The body the character will assume upon resurrection
OSKIN | The color the character will assume upon resurrection
P | The character's position in world coordinates. Obviously characters dont' fit in containers, so there are no container coordinates.
SEX | <SEX milord/milady> Simple choice of one or the other, based on the character's sex. Male is first.
SKILLBEST | SKILLBEST.<n> If there is no argument, this function returns the NUMBER of the best skill (i.e. 1 for Alchemy, etc). If there is an argument, the function returns the Nth best skill. For example, SKILLBEST.3 will return the 3rd best skill.
SKILLCHECK | SKILLCHECK <skill> <amount> Does a bell-curve success rate check with the particular skill, and the amount. Skills must be given either by number or as a defname like skill_swordsmanship.
SKILLTOTAL | The total of all skills this character has
SPEECHCOLOR | Not implemented yet in 55i. NPCs will speak in this color.
STAM | Character's stamina
STAMINA | Same as STAM
STONE | Is the character stone or not? This is also a function that toggles the character's stone-ness
TAG | All characters can have TAGs
TITLE | The title that appears in the paperdoll. Guild titles override this title.
TOWNABBREV | The abbreviation given by a townstone. I hate townstones.
WEIGHTMAX | The maximum weight this character can carry
XBODY | Backwards compatibility. DO NOT USE THIS! There's a reason it was changed!
XSKIN | Backwards compatibility. DO NOT USE THIS! There's a reason it was changed!

Funktionen
AFK | AFK <bool> Puts the character in AFK mode. The character says "z" every few seconds, to show that he's sleeping, or something. If there is a parameter given, 1 means you are entering AFK mode, and 0 means you are leaving it. At this point, the character's ACTION changes to 076.
ALLSKILLS | ALLSKILLS <amount> Sets every skill to the amount given
ANIM | ANIM <number> <backward?> Executes the animation specified by the number given. If <backward?> is 1, the animation is performed in reverse.
ATTACK | ATTACK Causes the character to attack the SRC.
BANK | BANK <layer> Opens this character's bank in the specified layer for the SRC. If the argument is omitted, just opens the normal bank.
BARK | BARK <sound> Plays the particular sound as though it's coming from the character. If the argument is omitted, it plays one of the random sounds for this creature.
BOUNCE | BOUNCE <uid> Bounces the specified item into the character's backpack.
BOW | BOW Directs the character toward the SRC, and makes it to the bowing animation.
CONSUME | CONSUME <amount> <id> Consumes <amount> of <id> from the character's backpack.
CONTROL | CONTROL Causes the SRC to possess this character. Basically, you switch bodies. The game also thinks you've logged on again, and I believe that @Login is called.
CRIMINAL | CRIMINAL <bool> Turns criminal on or off, depending on the argument. If there is no argument, it acts as a toggle.
DISCONNECT | DISCONNECT If the character is a client (i.e. online), it disconnects the client. If the character is not a client (i.e. client linger), it will finish the disconnection process and remove the lingering character from view.
DRAWMAP | DRAWMAP <dist> Draws a map using the cartography skill, with the specified distance from the SRC.
DROP | DROP <uid> Drops the particular item at the character's feet.
DUPE | DUPE Duplicates the character, but none of its possessions. Actually, it doesn't dupe skills or stats either. It just makes another one of what you are. What a waste of a function. Look at Swindler's iamyou function.
EQUIP | EQUIP <uid> Equips the UID, firing the @Equip trigger on the item.
EQUIPARMOR | EQUIPARMOR Equips the best armor you have in your backpack, all at once.
EQUIPHALO | EQUIPHALO Equips an invisible lightsource that makes your character "glow". Unfortunately, there's no "removehalo" command, so you have to EDIT yourself, and remove it manually.
EQUIPLIGHT | Doesn't do anything.
EQUIPWEAPON | EQUIPWEAPON First, this function figures out what your best fighting skill is. Then, it finds the best weapon in your pack that corresponds to your skill and equips it.
FACE | FACE Turns the character to face the SRC.
FORGIVE | FORGIVE Unjails a character, and marks the account as normal again.
GO | GO <x> <y> <z> <m> GO <region name> Sends the character to the given coordinates. You may also go to any region flagged "global" by name. For example: GO Britain
GOCHAR | GOCHAR <uid> Sends the character to the location of the UID. This only works for character UIDs.
GOCHARID | GOCHARID <id> Finds a character with the specified ID, and sends you to that character. Interestingly enough, that character is now ACT.
GOCLI | GOCLI <#> Enumerates the clients in order of login, and then sends you to the client corresponding to the number you gave.
GOITEMID | GOITEMID <id> Finds an item with the specified ID, sets that item to ACT, and sends the character there.
GONAME | GONAME <name> Sends the character to a character with the given name.
GOPLACE | Same as GO
GOSOCK | GOSOCK <num> Sends the character to the location of the player using the given socket. This is useful for finding out who is spamming those annoying "Bad Msg Eat 14 Bytes" on your console.
GOTYPE | GOTYPE <type> Finds an item of the given type, sets that item to ACT, and sends the character there.
GOUID | GOUID <uid> Sends the character to the object with the given UID.
HEAR | HEAR Same as SYSMESSAGE
HUNGRY | HUNGRY Puts up a message based on how hungry the character is. If the character is SRC, it says "you are hungry", otherwise it says "<name> is hungry". Of course, the message varies depending on how hungry the character actually IS.
INVIS | INVIS <bool> Makes the character invisible, or visible, depending on the argument. If there is no argument, it acts as a toggle.
INVISIBLE | INVISIBLE <bool> Same as INVIS.
INVUL | INVUL <bool> Makes the character invulnerable, or vulnerable, based on the argument. If there is no argument, it acts as a toggle.
INVULNERABLE | INVULNERABLE <bool> Same as INVUL.
JAIL | JAIL Supposedly there is an argument, but it doesn't work. This sends the character to jail, and flags the account as being jailed.
KILL | KILL Does 200000 damage to the character. If that doesn't kill him, nothing will!
MAKEITEM | MAKEITEM <item> Attempts to make the item, based on skill.
NEWBIESKILL | NEWBIESKILL <skill> I have no idea what this does, but it seems to take an argument. :)
NEWDUPE | NEWDUPE <uid> Duplicates the UID and sets the item to ACT. The item does not have a location when it is created. If you do not put the item somewhere before the end of the script, it will be destroyed.
NEWITEM | NEWITEM <id> Creates an new item with the given ID, and sets the item to ACT. The same location rules as NEWDUPE apply.
NEWNPC | NEWNPC <id> Creates an NPC with the given ID beside the character, and sets it to ACT. This is rather irritating.
PACK | PACK Opens the character's backpack for the SRC.
PARDON | PARDON Same as forgive
POISON | POISON <skill> Poisons the character as if someone with the given skill had cast the poison spell on it. The poison does not succeed if there is already a higher-powered poison on the character.
POLY | POLY <charid> Polymorphs the character into the given creature, depending on his magery skill.
PRIVSET | PRIVSET <plevel> Sets the character to the given PLEVEL and gives him appropriate dress.
REMOVE | REMOVE 1 Removes the character permanently. Do not use this on a player unless you absolutely have to!
RESURRECT | RESURRECT Resurrections the character if it is a ghost
SALUTE | SALUTE Turns the character toward the SRC and salutes it
SKILL | SKILL <skill> Starts the character doing the specified skill. This actually uses the skill key, like "Magery" or "Hiding" rather than a defname. This is the only way to make an NPC character use a skill.
SLEEP | SLEEP Makes the character sleep. Basically the character's corpse falls onto the ground, and the character goes invisible. It looks very odd to both the character in question, and any GMs around who can see invisible people. The corpse IS lootable.
SUICIDE | SUICIDE The character kills himself. No one gets credit for your death, even if they are fighting you.
SUMMONCAGE | SUMMONCAGE Summons the character in front of SRC in an iron cage. NPCs can just walk THROUGH the cage, thanks to a wonderful design flaw. However, players are trapped for the ten minutes it takes the cage to decay.
SUMMONTO | SUMMONTO Brings the character to the position of the SRC.
SYSMESSAGE | SYSMESSAGE We're not doing clients yet, so ignore it. :)
TAGLIST | TAGLIST Dumps the tags onto the screen of SRC.
UNDERWEAR | UNDERWEAR Toggles the display of underwear on and off for humans.
UNEQUIP | UNEQUIP <uid> Unequips the item and fires @Unequip on it.
WHERE | WHERE Tells the character where it is

Player Characters These characters have all of the Character Eigenschaften and Funktionen, plus all of the Standard Object Eigenschaften and Funktionen, plus all of the stuff below.

Variablen
DEATHS | The number of times this character has been killed
KILLS | The number of players this character has killed. This is used to determine if a character is a murderer or not.
LASTUSED | Interestingly enough, this is a session timer. It is supposed to tell how long the character was used last time it was used, but it actually increments while the character is playing. You can use this to figure out how long the character has been online. It's in seconds.
PLOT1 | Depreciated. Never edit this, unless you want 8000 errors on your console.
PLOT2 | You can use this one all you want. It's just some random variable you can put stuff in. I used it all the time before we had tags.
PROFILE | The profile a player will see when he dclicks the scroll in the paperdoll.
SKILLCLASS | Which skillclass the player is in. This determines, among other things, skillcaps.
SKILLLOCK.x | Checks the particular skill, to see what the locked settings are. 0 is up, 1 is down, 2 is locked.

Funktionen All player Funktionen are actually forwarded to the account anyway
EMAIL | EMAIL <address> Sets the player's email. Unfortunately, they all seem to be invalid. Yay SPHERE! :)
KICK | KICK Kicks the player and bans the account
PASSWORD | PASSWORD <password> Sets the password if one is given. If one is not given, it clears the password, and the new password will be the first password used to log in.

Clients This is an extension of Players, so they have everything Players have and all the rest too. A "Player" object is transformed into a "Client" object when the player logs in.

Referenzen
ACCOUNT | The character's account
GMPAGEP | The last GM page answered by this GM. Contains information on the location, the reason, etc, for quick review using the PAGE command.
T | Same as TARGET
TARG | Same as TARGET
TARGET | The last object targeted by the player
TARGPROP | The last object targeted for the INFO menu
TARGPRV | The object targeted by the player BEFORE the current item
TPROP | Same as TARGPROP
TPRV | Same as TARGPRV

Variablen
ALLMOVE | 1 if the player has allmove on, 0 if they do not
ALLSHOW | 1 if the player has allshow on, 0 if they do not
CLIENTVER | The client version this player is using. For example, "2.0.0"
CLIENTVERSION | Same as CLIENTVER
CLIVER | Same as CLIENTVER
DEBUG | 1 if DEBUG mode is on, 0 if it isn't
DETAIL | No idea?
GM | 1 if the player has GM mode on, and 0 if they do not.
HEARALL | 1 if the player has HEARALL on, and 0 if they do not.
LISTEN | Same as HEARALL
PRIVHIDE | 1 if the player has chosen to hide his privilege title (like "GM"), and 0 if they have not.
PRIVSHOW | Opposite of above.
TARG | The UID of the last item targeted, in decimal, oddly enough.
TARGP | The location of the last target. This is used with @Targon_Ground to receive the coordinates targeted.
TARGPROP | The UID of the last object targeted for the INFO menu
TARGTXT | The prompt for the most recent target

Funktionen
ADD | ADD <item> Brings up a target to place the specified item. If no item is given, opens the ADD menu so you can select an item.
ADDITEM | ADDITEM <item> Same as ADD
ADDNPC | ADDNPC <id> Actually SUMMONs the given NPC, so be sure you have magery. Brings up a target.
ADMIN | ADMIN <page> Most people know about this command, but not about the parameter. The parameter tells which page we want. Normally it starts on page 1.
ARROWQUEST | ARROWQUEST <x> <y> Makes an arrow appear on the player's screen which constantly points toward the specified coordinates. If you use this command without coordinates, (just ARROWQUEST), it removes the arrow. You don't have to remove the arrow to update the coordinates.
BANKSELF | BANKSELF <layer> Open your own bank in the given layer.
CAST | CAST <spell> Casts the given spell, checking skill and everything. Of course, skill checks and delays are ignored for GMs.
CHARLIST | CHARLIST Lets the client select a new character from his character list. The old character is instantly logged off.
CLIENTS | CLIENTS Same as ADMIN, except that if the number of clients is less than 8, it just dumps them onto the screen as SYSMESSAGEs.
EVERBTARG | EVERBTARG A really stupid function which lets you perform an action on your previous target (whatever UID is stored in TARG or T or TARGET or whichever you prefer). It was used on the admin menu for a while, but they even gave that up. Never use this.
EXTRACT | EXTRACT <file> <code> You can use this command to export a bunch of statics to a file. I don't think that the code actually DOES anything except make it say "id=<code>" in the corner of the screen when you get done extracting.
GHOST | GHOST Apparently it's "not a valid command or format" so we don't need to worry about it. :)
GMPAGE | GMPAGE <prompt> The prompt isn't actually displayed, but rather stored in TARGTXT. What the purpose of this is, I am not really sure. This function lets you type in something which is then submitted as a problem to the GM page queue.
GOTARG | GOTARG Sends the player to his previous target.
HELP | HELP Brings up the scary SPHERE help menu. :)
INFO | INFO Same as it's always been.
INFORMATION | Displays a bit of information about the server. In fact, it's the same information you see when you log on as a GM.
ITEMMENU | ITEMMENU Same as MENU
LAST | LAST Targets the previous thing you targeted. It does not tell the client to dispose of the target, so he will still get the "Unexpected target info" message.
LINK | LINK This command will bring up two targets so that you may link one item to another. It simply sets some LINK Eigenschaften which you can probably do manually.
LOGIN | LOGIN <name> <password> This is an internal command. If the client is in-game, it is simply ignored.
LOGOUT | LOGOUT Another internal command. It doesn't seem to do anything in-game, except it might mess with the account file a bit.
MENU | MENU <resource> Brings up the specified menu for the SRC.
MIDI | MIDI <nums> Same as MIDILIST
MIDILIST | MIDILIST <nums> Adds some songs to the list of songs that the player's client is going to play for him. Wheee.
MUSIC | MUSIC <nums> Same as MIDILIST
NUDGE | NUDGE <amount> Allows you to target an area which is then nudged up or down (depending on if you gave it a positive or negative number) by a certain amount.
NUKE | NUKE <params> Allows you to target a certain area, and then applies <params> to each of the items in the area. If you do not give it a parameter, it assumes that you want to remove all of those items. There is a section at the end of Chapter 2 about this.
NUKECHAR | NUKECHAR <params> Same as NUKE, except it targets characters instead of items.
ONECLICK | ONECLICK <function> Until the player uses another skill, the specified function will be executed on anything he single-clicks. This is a very odd command, and I'm not really sure why it's here.
PAGE | PAGE <cmd> Opens up the page menu, or executes the given command. If you don't know the PAGE commands, you should not be reading this scripting tutorial.
REPAIR | REPAIR Brings up a target for repairing an item.
RESEND | RESEND Sends information about everything on the screen to the client. Do not allow players to use this command, as there is apparently some sort of security hazard in 55i.
RESYNC | RESYNC Same as RESEND. Do not allow players to have this command either.
SAVE | SAVE <bool> Initiates a world save. If <bool> is 1, the save takes place in the foreground and pauses the server until it is completed. If not, the save takes place in the background but is much slower.
SCROLL | SCROLL <resource> Puts the given scroll up on the screen. This is an excellent way to get a great deal of information to your players without having to script an entire dialog. The scroll will appear with the heading "UPDATES" at the top.
SELF | SELF Makes you target yourself. The client does not remove the target, and so an "Unexpected target info" is inevitable.
SHOWSKILLS | SHOWSKILLS Shows the skill menu to the player. Same as pressing the Skills button on the paperdoll or Alt+K in-game.
SKILLMENU | SKILLMENU <resource> Opens up the specified skillmenu. See Chapter 8 for more about skillmenus.
STATIC | STATIC <item> Same as add, except that the item is added with the "static" attr set.
SUMMON | SUMMON <char> Same as ADDNPC, basically.
SYNC | Same as resync
SYSMESSAGE | SYSMESSAGE <text> Puts some text in the lower-left corner of the screen, as a system message. (Imagine that.)
TELE | TELE Teleport to the target location as a GM. Basically just casts teleport.
TILE | TILE <z> <item1> <item2> <item3> .... <itemX> Tiles the items specified across the targeted area. Items are placed in sequence, so a tile-floor type effect is achieved, sorta. Most of the time, you'll just use one item here.
UNEXTRACT | UNEXTRACT <file> Does the opposite of EXTRACT and brings all those statics back into the game. You get to target where you want them to end up, and it claims to be a multi, but it really isn't, because you can delete the items one at a time.
VERSION | VERSION Another SPHERE advertisement function
WEBLINK | WEBLINK <web address> A very fun function. This will open the user's web browser and send them to the specified web address. If they use a fast browser (i.e. not Microsoft) and a real ISP (i.e. not AOL), they won't have time to close it before it displays. Bwahaha.

NPC Characters These characters have all of the stuff that comes with Characters and Standard Objekte, along with what is below.

Variablen
ACTPRI | The priority this action is given on a scale of 0 to 100.
BRAIN | The assigned AI for this NPC. The Brain types are listed in spheredefs.scp.
HOMEDIST | The distance an NPC can wander aimlessly from its home position. Once it reaches its limit, it will immediately start back toward the home point.
KNOWLEDGE | Same as SPEECH
NEED | The defnames of the things this NPC wants.
NEEDNAME | One of the things that the NPC wants.
NPC | Same as BRAIN
SPEECH | The speech blocks the NPC will respond to are stored in this variable as a list.
SPEECHCOLOR | The color in which this NPC will speak
VENDCAP | The total amount of gold a vendor can have (actually MORE of his bankbox)
VENDGOLD | The amount of gold the vendor actually HAS (actually MORE2 of his bankbox)

Funktionen
BUY | BUY Pops up the vendor buy dialog for the vendor. If there is a problem, the vendor will tell you so.
BYE | BYE The NPC stops doing whatever he's doing and goes back to wandering.
FLEE | FLEE <amount> The NPC runs away from the SRC for <amount> steps, then goes back to wandering aimlessly or attacking, or whatever else NPCs do.
HIRE | HIRE Attempts to HIRE the NPC to the SRC.
LEAVE | LEAVE <amount> Same as FLEE
MIDILIST | MIDILIST <blah> Absolutely nothing to see here. Move along.
PETRETRIEVE | Retrieve's the SRC's pets from this NPC.
PETSTABLE | Allows the SRC to target a pet to stable with this NPC.
R | Same as RUN.
RESTOCK | RESTOCK Restocks the vendor NPC if it is a vendor
RUN | RUN <direction> Directions are N, E, S, W, NE, SE, NW, SW. Causes the NPC to run one tile in that direction.
SCRIPT | SCRIPT <script> Gives the NPC a script book to execute. Script books are an interesting idea that don't always work. They're pretty cool when they do though.
SELL | SELL Attempts to sell to the vendor and opens the sell dialog if successful.
SHRINK | SHRINK Shrinks the NPC. The player must be the owner of the NPC or else the shrinking will not take place. GMs are owners of everything.
TRAIN | TRAIN <skill> Attempts to begin training of SRC by the NPC in <skill>. Skill is a name like "Magery", not a defname like skill_magery.
WALK | WALK <direction> Same as RUN, only the NPC walks.

This is the end of the game-object section. Objekte from here are abstract and can be accessed with a script, but aren't things you can directly see in-game.

SERV

Referenzen
CHARDEF | CHARDEF.defname A reference to the CHARDEF with the given defname. This means that if you modify anything here, it is GLOBAL to anything with that defname. For example, modifying something in c_horse_gray will change ALL gray horses in the world until your server restarts.
ITEMDEF | ITEMDEF.defname A reference to the ITEMDEF with the given defname. The same applies as CHARDEF.
LASTNEWCHAR | The last character created by the server
LASTNEWITEM | The last item created by the server
REGIONRESOURCE | REGIONRESOURCE.defname A reference to a particular region resource script section. You can access such things as SKILL_LO and SKILL_HI via this
SKILL | SKILL.defname A reference to the skill definition with the particular defname (or skill number). This way you can access (and modify) basics of the skill, and get the "KEY" based on the skill number.
SKILLCLASS | SKILLCLASS.defname A reference to the skillclass with the particular defname (or number). You can access any variable valid to a skillclass in this way. Look at [SKILLCLASS 0] at the bottom of spheretables.scp for an example of valid Variablen.
WEBPAGE | WEBPAGE.defname A reference to the webpage section with the given defname. You can access any variable valid to a skillclass in this way.

Variablen First, the SERV object contains information about every entry in the sphere.ini file. You can simply refer to the Variablen as they appear there. In addition, it contains:
ACCAPP | A number cooresponding to the type of account submission your server uses
ACCAPPS | A string cooresponding to the type of account submission your server uses
ADMIN | Same as ADMINEMAIL
ADMINEMAIL | The email address of the server admin as entered in sphere.ini
AGE | Shows the age of the server in days (since the last time it was renamed)
ALLOCS | The number of times the program has allocated memory for a new object
CLIENTSAVG | The average number of clients on this shard
CLIENTVERSION | The client version allowed by this server
CLIVER | Same as CLIENTVERSION
CREATE | The number of seconds that have passed since the server was created. For stupid coding reasons, this number is negative, so you'll have to use <EVAL -<SERV.CREATE>> if you ever need this value
EMAILLINK | Creates the code for an HTML link that will open a new email to the server's admin.
LANG | A string defining the language used by the server
LASTVALIDDATE | The last date the server was submitted to the central registry. This will be 0 if it was never submitted.
LASTVALIDTIME | How long ago, in seconds, the server was submitted to the central registry. Also 0 if it was never submitted.
NOTES | Whatever you want. This is definable in SPHERE.ini.
REGPASS | The registration password used on the central registry server to make sure that no one else submits changes by using your server name.
RCLOCK | The current value of the system clock, a space, and then the number 03e0 (1000 in hex).
RTIME
The current real-world time, such as "11:53 PM 7/8/02"

SERVIP | The IP address of your server
SERVNAME | The name of your server, as displayed on the central registry
SERVPORT | The port used to log into your server
STATACCOUNTS | The number of accounts in the world
STATCLIENTS | The number of clients currently connected
STATGUILDS | The number of guilds in the world
STATITEMS | The number of items in the world
STATMEMORY | The amount of RAM (in kilobytes) SPHERE is using to store its data
STATNPCS | The number of NPCs in the world
STATUS | Last status string received
TIMEUP | How long in seconds the world has been running.
TIMEZONE | The timezone in which your server resides (offset from GMT)
URL | The URL of your server's webpage
VALID | 1 if the server is currently online
VERSION | The version of SPHERE your server is running

Funktionen
ACCOUNT | ACCOUNT <params> Global account modifier. This function is described in detail on both the SPHERE console and Daleth's Reference Page. I am not typing it again. (For those of you who realize the irony, don't mention it to me.)
ALLCLIENTS | ALLCLIENTS <function> Executes <function> on all of the clients in the game. In the function, SRC remains the same, and the default object becomes the current client.
B | B <text> Broadcasts text in huge letters in the corner of the screen, like an almighty SYSMESSAGE.
BLOCKIP | BLOCKIP <ip> NEVER USE THIS. Unless you are running in Linux, it will mess up your INI file beyond repair.
EXPORT | EXPORT <file> <range> <nochars> Exports all dynamic items within <range> distance of SRC. If <nochars> is 0, it also exports characters. This function has the ability to export items into UOX format, by simply ending the filename with .wsc instead of .scp. This gives you the ability to then use these items with Worldforge to create your own world.
HEARALL | HEARALL <bool> Toggles console hearall
IMPORT | IMPORT <file> Opposite of EXPORT. Imports an exported worldfile.
INFORMATION | INFORMATION Displays lots of useful info, such as the number of items and characters in the game, and so forth.
LOAD | LOAD <script> Loads a script which was not previously loaded. This is how you can add new script files at runtime WITHOUT RESTARTING. YAY! :)
LOG | LOG Toggles the log file recording.
RESPAWN | RESPAWN Respawns all NPCs.
RESTOCK | RESTOCK Restocks all vendors in the world with gold. I've known this command to freeze servers. Be careful.
RESTORE | RESTORE <backup> <account> <character name> *gasp!* This is the command we've all been looking for. Haven't you ever had a player who mysteriously lost a character to the mists of time? Well, this command can restore that character in a heartbeat! This command will search the old save file, access all information regarding that character and his equipment, and restore it if possible. It will tell you "restore success" or "restore failed" as a sysmessage.
SAFE | SAFE Toggles safe mode on the console. You cannot shutdown a server that is in safe mode via the console.
SAVE | SAVE <bool> Saves the world, same as the client version
SAVEINI | SAVEINI NEVER EVER EVER EVER USE THIS COMMAND! :)
SECURE | SECURE Same as SAFE
SERVLIST | SERVLIST Doesn't seem to do a whole lot...
SHUTDOWN | SHUTDOWN <time> Shuts down the server after <time> minutes has passed. Doesn't bother saving or stopping a save or anything first, so only do it if you're sure a save won't be interrupted (corrupt savefiles are bad). To stop the shutdown, simply command SERV.SHUTDOWN 0.
UNBLOCKIP | UNBLOCKIP <ip> Opposite of BLOCKIP. Duh.
VERBOSE | VERBOSE I'm not real sure what the verbose console does, but it's been around since like version .33, so I guess it's something important that they really need to keep!

REGION

Variablen
ANNOUNCE | If this is 1, the region announces itself to those who enter it.
ARENA | 1/0. Kill counts are not assigned when a player kills another player in this region. Karma and fame are not affected by death, either. Corpses ARE lootable.
BUILDABLE | If 1, a player can construct a multi (ship or house) inside of this region. If 0, it is impossible.
CLASS | I have no idea what this is. I think it has something to do with Axis...
COLDCHANCE | This is the chance that there will be snow in this region.
FLAGS | These are the region flags, which basically are a combination of almost every other region property into one variable. It is easiest to set the flags in the spheremap.scp script, but in-game, modifying one of these other Variablen is infinitely easier.
GATE | If 1, players can gate into and out of this region.
GUARDED | If 1, the region is guarded
MAGIC | If 1, magic is allowed in the region
MAGICDAMAGE | If 1, magic does damage in this region
MAPPLANE | The mapplane in which the region exists. Regions cannot overlap, even if they are in different mapplanes, thanks to a wonderful design flaw.
MARK | If 1, players can mark in this region
NAME | The name of the region
NOBUILD | If 1, players cannot build in this region.
NODECAY | If 1, items do not decay in this region
NOPVP | If 1, players cannot harm other players directly in this region
P | This is the coordinates you will arrive at if you use the GO function with the name of this region.
RAINCHANCE | This is the chance that there will be rain in this region.
RECALL | If 1, players can recall into and out of this region
RECALLIN | If 1, players can recall into this region
RECALLOUT | If 1, players can recall out of this region
SAFE | If 1, this region is a safe zone
TYPE | This is the type of region. I don't know what it means exactly.
UID | If this region is a multi, this is the UID of the multi. Otherwise, it's a UID of the region which doesn't mean a whole lot.
UNDERGROUND | If 1, no weather takes place in this region

Funktionen
ALLCLIENTS | ALLCLIENTS <function> Executes the specified function on all clients within the region.
SECTORS | SECTORS <function> Executes the specified function on all sectors which overlap the region. A sector does not have to be entirely within a region to be affected by this command.

SECTOR

Variablen
COLDCHANCE | The chance that it will be snowing in this sector. Weather is controlled by sectors.
COMPLEXITY | The number of character Objekte inside of this sector. This number may not exceed an amount specified in SPHERE.ini except for by players and their pets.
ISDARK | 1 if the sector's light level is considered "dark"
ISNIGHTTIME | 1 if the sector's time of day is during the night
LIGHT | The current light value. Light values range from 1 to 32 for T2A clients, and 1 to 19 for regular clients. Most clients will be T2A.
LOCALLIGHT | Same as LIGHT
LOCALTIME | A string representing the current time, such as "seven o' clock in the morning"
LOCALTOD | The number of minutes that have passed since local midnight in this sector. The speed at which these minutes pass is determined by "GAMEMINUTELENGTH" in your sphere.ini file.
RAINCHANCE | The chance that it will be raining in this sector.

Funktionen
ALLCLIENTS | ALLCLIENTS <function> Executes the specified function on all clients in the sector.
DRY | DRY Makes weather in the sector stop immediately
LIGHT | LIGHT <amount> Sets the amount of light in the sector to the given value. If no value is given, it resets the light to the default for that time of day or location (dungeon).
RAIN | RAIN Makes it rain in the sector
RESPAWN | RESPAWN Respawns all dead NPCs in the sector
RESTOCK | RESTOCK Resets all spawnpoints in the sector. To reset all spawnpoints in the world, go to coordinates 11 11, and type ".region.sectors restock".
SEASON | SEASON <number> Sets the season, which determines how the client displays parts of the map. Supposedly seasons other than the default are laggy, but that doesn't make sense as it's all local anyway. 0 is spring, 1 is summer, 2 is autumn, 3 is winter, 4 is "dead".
SNOW | SNOW Starts snowing.

ACCOUNT (This version of ACCOUNT is that pointed to by a character's ACCOUNT reference, not SERV.ACCOUNT.)

Referenzen
CHAR.x | Reference to the Xth character on this account. This is a player character reference, which can be used just like any normal player character.

Variablen
ACCOUNT | The account name
BLOCK | 1 if the account is banned, 0 if not
CHARS.x | The number of characters in the account
CHATNAME | The name used in the global chat system
COMMENT | Anything you want. Store stuff here about the player.
EMAIL | The player's email address
EMAILFAIL | The number of times emailing the player has failed
EMAILLINK | Forms the player's email address into a link which can then be placed on, say, the status webpage of your shard.
EMAILMSG | The next message that will be sent to the player.
EMAILQ | How many emails are waiting to be sent?
FIRSTCONNECTDATE | The date and time of the first connect
FIRSTIP | The IP the player connected with the first time
GUEST | 1 if the player is a guest, 0 if not
JAIL | 1 if the player is jailed, 0 if not
LANG | The language the player speaks in. This doesn't do a whole lot in 55i.
LASTCHARUID | The UID of the last character used by the player
LASTCONNECTDATE | The time and date the player last connected using this account
LASTCONNECTTIME | The amount of time, in minutes, that the player was connected last time
LASTCONNECTIP | The IP the player connected with last time
LEVEL | Same as PLEVEL
NEWPASSWORD | Password which will be changed with the next save
PASSWORD | The current password
PLEVEL | The player's privilege level, which determines, among other things, which in-game Funktionen the player can use. See spheretables.scp for the [PLEVEL] blocks.
PRIV | Determines various privileges that the account is granted, such as the ability to move all items, etc. These are listed in a chart below.
STATUS | A string that determines the status of the account. This is either "Banned", "Jailed", "Guest" or "Normal".
T2A | If the player exhibits any indication that they have T2A (for example, going to the T2A lands), this variable will be set to 1.
TAG | Yes, accounts have TAGs. No, they aren't saved. Grumble.
TOTALCONNECTTIME | The total amount of time, in minutes, that the player has been connected to the shard since the account was created.

Funktionen
BLOCK | BLOCK <bool> Either blocks or unblocks an account. If there is no parameter, it automatically blocks it. If a character is online when the account is blocked, that character is instantly disconnected.
DELETE | DELETE Deletes the account and all associated characters
EMAIL | EMAIL Sets the email address, assuming it's valid. For some reason, 55i has a large problem with accepting valid email addresses, so I wouldn't try to use this.
EMAILMSG | EMAILMSG <msg> These are stored in spherebook.scp. You can only send a predefined email message to an account, and that assumes that the account has a valid email.
EMAILPASS | EMAILPASS Sends the account's password to the account's email address.
EXPORT | EXPORT <filename> Writes the account and character info to the specified file.
KICK | KICK Disconnects the player without blocking the account.
PASSWORD | PASSWORD <newpass> Sets the password for this account. If there is no password, it clears the current password and allows the player to set it next time they use their account. It will be whatever password they log in with.
TAGLIST | TAGLIST Duh.

SERV.ACCOUNT These commands can also be used from the console.

Funktionen
? | ? Prints some examples of valid commands in old command format. Ignore them. Mine is better.
ADD | ADD <name> <password> Adds an account called <name> with password set to <password>. If you don't provide a password, it will be set the first time the account is used.
ADDEMAIL | ADDEMAIL <name> <email> Adds an account with the given email address. If you don't provide an email address, you might as well use ADD instead of ADDEMAIL.
EMAILPASS | EMAILPASS <name> Emails the password to the specified account name
LIST | LIST Not implemented.
UNUSED | UNUSED <time> <function> Executes <function> on all accounts which are unused for <time> days. This is useful to delete old accounts after a certain number of days. If you don't provide a function, it simply prints the names of all appropriate accounts.
UPDATE | UPDATE Forces the account file to be updated from sphereacct.scp to sphereaccu.scp. Also saves any in-game changes to sphereaccu.scp. This is automatically done before every worldsave.
<name> | <name> <function> Allows you to execute an ACCOUNT function on any named account. You can jail/ban someone by account name this way.

GMPAGEP This is the object referred to by a player's GMPAGEP reference.

Variablen
ACCOUNT | The account name of the person who sent the page
P | The position of the person when the page was sent
REASON | The "description" of the problem
STATUS | This is either "OFFLINE" if the player is offline, "LOGIN" if the account is currently logging in, or "<name>" if the player is online.
TIME | How long it's been since the player paged. I don't know the unit of time for this and I'm too lazy to go find out. Someone tell me.

Script These Variablen and Funktionen are available to all scripts. They remain the same once a script has started, until it finishes.

Referenzen
I | A reference to the default object. If the concept of a default object confuses you, you may use I instead. For example: I.ATTACK
SERV | A reference to the global Server object. This object is defined in a chart above this one.
SRC | The source of the script. In most cases, this is the player object that caused the script to occur. Remember, @Timer scripts DO NOT HAVE A SRC.
SRV | Same as SERV
UID.x | A reference to an arbitrary object with a UID of x.

Variablen
CATEGORY | The category in Axis that this item occupies
DESCRIPTION | A description of the item, which is what you actually select in Axis
SUBSECTION | The subsection of CATEGORY that the item occupies
VAR.x | Allows you to edit global Variablen. See Chapter 5 for information about TAGs and VARs. You should assume that a VAR will be destroyed at the end of an event.

Funktionen
DUMPKEYS | DUMPKEYS Outputs every available variable for the referenced object
DUMPVERBS | DUMPVERBS Outputs every available function for the reference object
EVAL | <EVAL <string>> Tries to change the string into a number. If that is not possible, it returns zero. This is the only way to do math with strings, such as TAGs, and VARs, and is wise in almost any situation where you are using one of those. It also outputs the number in DECIMAL, meaning that you can use this function to change a hex value into a decimal value.
HVAL | <HVAL <string>> Same as EVAL, except it outputs the number in decimal.
LISTCOL | LISTCOL Switches the color for webpage output. Check spherestatusbase.htm for an example.
QVAL | <QVAL <conditional> ? <true> : <false>> This allows you to squeeze an IF statement and the results into one line. First, SPHERE will evaluate the conditional, which is exactly the same as an IF statement. If the conditional is true, the value is the value of <true>. If the conditional is false, the value of the expression is the value of <false>. Of course, those can be Funktionen, Variablen, tags, numbers, strings, or anything. This is very handy in dialogs.
STRCHAR | Not functional
STRCHARAT | Not functional
STRFIRSTCAP | Not functional
STRLEFT | Not functional
STRMID | Not functional
STRRIGHT | Not functional
STRTOLOWER | STRTOLOWER <string> Returns the string in all lowercase letters
STRTOUPPER | STRTOUPPER <string> Returns the string in all capital letters
SHOW | SHOW <expression> Lets you view the value of any expression (function, variable, etc) on the object in question. Outputs the value and variable name to the SRC as a sysmessage. This is very useful in-game, more than in a script.
TRIGGER | TRIGGER <trig> Causes the script to execute the given event on the referenced object. For example, TRIGGER @Dclick will force the @Dclick event to execute, even if the item wasn't actually double-clicked.
VALSTR | Same as EVAL

Intrinsic Funktionen You must use EVAL or HVAL with these Funktionen, because they do not return a value naturally. Like the Script Objekte, these are available in every script. Unlike other Funktionen, the parentheses are required for intrinsic Funktionen.

Funktionen
ID | ID(x) Returns the actual numeric ID of the given resource DEFNAME. Probably useful only for debugging.
ISBIT | ISBIT(<num>, <bit>) Returns the value of bit number <bit> in the number <value>. Basically, if this returns 0, the bit is not set. If it does not return 0, the bit IS set. This can be useful inside of dialogs with QVAL.
RAND | RAND(x) Returns a random number between 0 and (x - 1). For example, RAND(10) returns a value between 0 and 9, but never 10.
RANDBELL | RANDBELL(point, variance) Gets the value of a point on a bell-shaped curve. There is an article about this function linked from the main page of my tutorials, entitled, appropriately, "RANDBELL and bell-shaped curves".
STRASCII | STRASCII(<string>) Right now, just spits the argument back out.
STRCMP | STRCMP(string1, string2) Compares string1 and string2 for equality. If the strings are equal, this function returns 0. If the strings are NOT equal, the function returns either -1 or 1. See the article on string commands for more information.
STRCMPI | STRCMPI(string1, string2) Compares two strings for equality, ignoring case. The return values are the same as STRCMP. See the string commands article for more information.
STRINDEXOF | STRINDEXOF(<string> <search>) Tries to find the character <search> inside of <string>, and returns -1 if it can't. THIS FUNCTION IS NOT IMPLEMENTED AS OF 99F. It will always return -1.
STRLEN | STRLEN(<string>) Returns the length of the string, in characters
STRMATCH | STRMATCH(pattern, string) Tries to match the pattern to the string. If it does, it returns 1. If not, it returns 0. See the string commands article for a lot more information about STRMATCH.

Structural Commands These control the flow and structure of your program, and include a lot of conditionals.

Commands
BEGIN | BEGIN .. statements .. statements END Starts a script block. Anything between BEGIN and END is considered one statement by the DOSWITCH and DORAND commands.

DORAND

DORAND <n>
.. statement 1
.. statement 2
.. statement 3
.. .. .. ..
.. statement <n>
ENDDO

Starts a RANDOM block. The server picks one statement out of the <n> available, and executes it and only it. The RANDOM block is then finished. If there are any BEGIN blocks, it will consider them one statement each, even if they are multiple lines.

DOSWITCH

DOSWITCH <variable>
.. statement 0
.. statement 1
.. statement 2
.. etc
ENDDO

Starts a SWITCH block. The server will figure out the value of the variable, and execute that statement. If the value of the variable is 0, it will execute statement 0. If the value of the variable is 1, it will execute statement 1, etc. This is a very simple way to write many IF statements, basically. If there are any BEGIN blocks, the server will count them as a single statement.

IF

IF <conditional>
.. statement
.. statement
.. statement
ELIF <conditional>
.. statement
.. statement
ELSE
.. statements
ENDIF

This is a basic IF block. There is more information about these in chapter 3. Basically, SPHERE checks each <conditional> for a true (non-zero) or false (zero) value and executes the following statements if it is true. If none of the <conditional>s are true, SPHERE will execute any statements following ELSE.

FOR | These loops are not finished as of version 99f. The code is implemented, but not activated. The eventual idea was to allow for range-based function execution, such as executing a function on all items within 5 tiles of the SRC, or something.
RETURN | RETURN <value> Ends the function or event immediately. If it is an event, a value of 1 will stop all processing and end the event entirely. A value of 0 will allow further processing, such as default type action. See the chapter on RETURNs for more information. If the script is a function, it will return that value from the function. Returning values from Funktionen is sketchy at best, and you should use a VAR instead whenever possible.

ACTIONS and ACTARGs

Ever wonder what those ACTARG Variablen were for? Well, when a skill begins, they contain some information about the specific action. They make it so things can be more specific than "Joe is blacksmithing". Instead, you can see that "Joe is blacksmithing 300 war maces and it will take 8 hits to do so."

ACTION | ACTARG
--- | ---
SKILL_MAGERY | ACTARG1 = The spell being cast ACTARG2 = The type of creature being summoned, if one is ACTARG3 = Is the summoned creature going to be our pet?
SKILL_MUSICIANSHIP | ACTARG1 = The base musicianship skill required
SKILL_PEACEMAKING | ACTARG1 = The base musicianship skill required
SKILL_PROVOCATION | ACTARG1 = The base musicianship skill required
SKILL_ENTICEMENT | ACTARG1 = The base musicianship skill required
SKILL_BLACKSMITHING | ACTARG1 = The item being crafted ACTARG2 = How many strokes (hits, etc) it will take ACTARG3 = How many are we making? (Amount)
SKILL_ALCHEMY | ACTARG1 = The item being crafted ACTARG2 = How many strokes (hits, etc) it will take ACTARG3 = How many are we making? (Amount)
SKILL_CARPENTRY | ACTARG1 = The item being crafted ACTARG2 = How many strokes (hits, etc) it will take ACTARG3 = How many are we making? (Amount)
SKILL_CARTOGRAPHY | ACTARG1 = The item being crafted ACTARG2 = How many strokes (hits, etc) it will take ACTARG3 = How many are we making? (Amount)
SKILL_INSCRIPTION | ACTARG1 = The item being crafted ACTARG2 = How many strokes (hits, etc) it will take ACTARG3 = How many are we making? (Amount)
SKILL_TAILORING | ACTARG1 = The item being crafted ACTARG2 = How many strokes (hits, etc) it will take ACTARG3 = How many are we making? (Amount)
SKILL_TINKERING | ACTARG1 = The item being crafted ACTARG2 = How many strokes (hits, etc) it will take ACTARG3 = How many are we making? (Amount)

Event Information

Most of this is on Daleth's page or Amlaruil's Script Sharing page. However, there are tidbits that they choose not to share with us, so I'll do that here!

Character Events
Event | Information
@GetHit | I have been hit! SRC = The person doing the hitting ARGN1 = The amount of raw damage done ARGN2 = The type of damage done
@Hit | I am hitting someone SRC = The person doing the hitting ARGN1 = The amount of raw damage done ARGN2 = The type of damage done
@SpellCast | I have cast a spell on someone TARG = the target of my spell ARGN1 = the spell being cast ARGN2 = the strength with which it is being cast (magery skill) ARGO = the source of the spell (wand or character)
@SpellEffect | A spell has been cast on me! SRC = the person who did the casting ARGN1 = the spell being cast ARGN2 = the strength with which it is being cast (magery skill) ARGO = the source of the spell (wand or character)
@ReceiveItem | I have received an item SRC = The person giving the item ARGO = The item
@DeathCorpse | I have died and left a corpse behind ARGO = The corpse I left behind

Item Events
@Step | Someone has stepped on me SRC = The person who did the stepping ARGN1 = Were we on this item last time the event fired?
@Pickup_Ground | Someone has picked up an item from the ground SRC = The person picking up the item ARGN1 = The amount picked up

Types and TDATAs

Yes, that's right. There's some TDATAs that we don't know about. Daleth's site covers some, but there are definitely more. Here's the full list!

Types | Variablen
--- | ---

t_wand
t_armor
t_armor_leather
t_shield
t_clothing
t_light_out
t_light_lit
t_spellbook
t_jewelry
t_eq_script

TDATA3 = The ID the object will change into when used as a light source
TDATA4 = What happens when the light source burns out (1 = destroy, 0 = nothing).

t_container
t_sign_gump
t_ship_hold
t_bboard
t_corpse
t_trash_can
t_game_board
t_eq_bank_box
t_eq_vendor_box
t_keyring

TDATA2 = The gump ID that appears when the container is opened
TDATA3 = The size of the gump

t_eq_horse t_figurine | REQSTR = Strength required to mount the animal TDATA3 = The ID of the creature mounted
t_meat_raw t_food_raw | TDATA1 = ID of the item to make when cooked TDATA2 = Animal type this meat is from TDATA3 = Cooking skill required to make it
t_musical | TDATA1 = Sound to play if successful TDATA2 = Sound to play if failed
t_ore | TDATA1 = Item ID to make when the ore is smelted (usually ingots)
t_ingot | TDATA1 = Minimum skill required to make this ingot TDATA2 = Maximum skill for maximum yield
t_door t_door_locked | TDATA1 = Sound to make when the door is opened or closed
t_game_piece | TDATA1 = Starting X location TDATA2 = Starting Y location
t_bed | TDATA1 = Direction of the bed
t_foliage t_crops | TDATA1 = The ID of the baby plant TDATA2 = The ID of the mature plant TDATA3 = The ID of the fruit that can be harvested
t_drink t_booze t_potion t_pitcher t_water_wash | TDATA1 = The ID of the container to be left behind
t_ship_plank t_ship_side t_ship_side_locked | TDATA1 = The next ID to be used

Types and MORE values

Type | Variablen
--- | ---
t_normal | All are unused

t_container
t_container_locked
t_door
t_door_open
t_door_locked
t_ship_side
t_ship_side_locked
t_ship_plank
t_ship_hold
t_ship_hold_locked

MORE1 = The lock code, which is normally the UID of the key, or sometimes the UID of a parent item (like a house). Usually is the same as LINK.
MORE2 = How hard this lock is to pick (on a scale of 0 to 1000)
LINK = If there is no MORE1, the MORE1 of the linked item will be checked

t_ship_tiller t_key t_sign_gump | MORE1 = The lock code. A key will only unlock a lock which has an identical lock code. LINK = If there is no MORE1, this is checked too
t_eq_bank_box | MORE1 = Amount of gold in bank account (NPCs) MORE2 = Amount to restock to (NPCs) MOREP = Coordinates where bank was opened
t_eq_vendor_box | MOREP = Coordinates where box was opened
t_game_board | MORE1 = The type of game (0 = chess, 1 = checkers, 2 = none)

t_wand
All weapons

MORE1L = The current hitpoints of the weapon (quality)
MORE1H = The maximum number of hitpoints
MORE2 = Number of charges
MOREX = The spell this item casts
MOREY = The power of the spell, in magery skill (0 to 100.0)
MOREZ = Poison level, 0 to 100

t_armor t_armor_leather t_shield t_clothing t_jewelry | MORE1L = The current hitpoints of the weapon MORE1H = The maximum number of hitpoints MORE2 = Spell charges MOREX = Spell to cast when equipped MOREY = Power of the spell to cast
t_spell t_fire t_scroll t_campfire t_comm_crystal | MORE1L = The effect this has on Dex (+ or -) MORE1H = The effect this has on Strength (+ or -) MOREX = The spell to cast when used/stepped on, etc (for t_spell, it's the type of spell we're recording) MOREY = The level of the spell MOREZ = The light pattern the item makes
t_spellbook | MORE1 = First 32 spells in a bitmask MORE2 = Second 32 spells in a bitmask MOREX = Additional spells MOREY = Additional spells (not used) MOREZ = Additional spells (not used)
t_potion | MORE1 = Potion effect type (spell number, basically) MORE2 = Strength of the spell (0 to 1000) MOREX = Countdown time for explosions
t_map | MORE1L = Top left Y coordinate MORE1H = Top left X coordinate MORE2L = Bottom right Y coordinate MORE2H = Bottom right X coordinate MOREZ = Are the pins movable?
t_food t_fruit t_meat_raw t_food_faw | MORE1 = Item to create when cooked MORE2 = What type of creature the meat came from? MOREX = Spell to cast when eaten MOREY = Power of the spell MOREZ = Poison level (0 to 100)

t_corpse

MORE1 = The time at which the death took place (0 if sleeping)
MORE2 = Who killed, carved, or looted the corpse last
MOREX and MOREY = The creature type
MOREZ = The direction it's facing (0 through 7, flag 080 = on face)
AMOUNT = The body type
LINK = The ghost that came from this corpse

t_light_lit t_light_out t_window | MOREY = How long the light will last MOREZ = The light pattern
t_eq_trade_window | MOREZ = The status of the check boxes
t_spawn_item | MORE1 = The item ID to spawn when the timer reaches zero MORE2 = The maximum number of items to spawn per time MOREX = The minimum time in minutes to wait between spawns MOREY = The maximum time in minutes to wait between spawns MOREZ = The distance from the spawnpoint to spawn

t_spawn_char

MORE1 = The creature ID to spawn from here
MORE2 = The number of creatures who have spawned from here
MOREX = The minimum time between spawns, in minutes
MOREY = The maximum time, in minutes
MOREZ = HOMEDIST for all creatures spawned here
AMOUNT = The number of creatures to spawn

t_explosion | MOREX = Amount of damage MOREY = Damage type (see chart below) MOREZ = Distance range of damage from the explosion
t_book t_message t_eq_message | MORE1 = The BOOK resource used for this book, or else a timestamp MORE2 = The timestamp of creation/writing/etc
t_eq_npc_script | MORE1 = Preconfigured NPC script from spherebook.scp (or other scripts) MORE2 = The timestamp of creation MOREX = The page we're currently executing MOREY = The line on the page we're executing MOREZ = How badly does the NPC want to do this script? (0 to 100)
t_deed | MORE1 = The item ID to create when the deed is double-clicked MORE2 = The previous key code (used by drydocked ships)
t_crops | MORE1 = Plant respawn time, in seconds MORE2 = The fruit generated by this plant MOREX = How many stages until the fruit is ripe
t_tree t_rock t_water t_grass | MORE1 = Resource type
t_figurine t_eq_horse | MORE1 = The type of creature this will turn into MORE2 = The UID of the creature to respawn when this is dclicked (stables)
t_rune | MORE1 = The number of charges before it wears out MOREP = The coordinates the rune was marked at
t_telepad t_moongate | MORE1 = Set to 1 if you want the gate to be players only (and pets) MORE2 = Set to 1 if you don't want the gate to make a noise when used MOREP = Location to which the gate leads

t_eq_memory_obj

AMOUNT = Memory type
MORE1L = The type of action this memory regards (see below)
MORE1H = The skill this NPC is training, if that's what it is doing
MORE2 = The time the action took place
MOREP = The location the memory took place
LINK = The object the memory regards

t_ship
t_multi

MORE1 = The creator of the multi
MORE2 = Each byte means something different, but we cannot access bytes
Byte 1 = Speed of the ship
Byte 2 = 1 if the ship is anchored, 0 if not
Byte 3 = The direction the ship is moving
Byte 4 = The direction the ship is facing

t_portculis t_port_locked | MORE1 = The Z height when "down" MORE2 = The Z height when "up"
t_advance_gate | MORE1 = The type of creature to use
t_bee_hive | MORE1 = The amount of honey that has accumulated
t_loom | MORE1 = The type of item loaded on the loom (thread) MORE2 = The amount of thread loaded here
t_archery_butte | MORE1 = The type of arrow currently stuck here MORE2 = The amount of that type of arrow
t_cannon_muzzle | MORE2 = Loaded? (Flags 01 = sulfurous ash, 02 = cannonball)
t_eq_murder_count | MORE1 = How much time is left for this murder count
t_item_stone | MORE1 = Generate this item when dclicked MORE2 = The amount of gold required to purchase the item MOREX = Time required to regenerate (0 = do not regenerate) MOREY = Total amount to make (0 = infinite, 0FFFF = none left)
t_eq_stuck | LINK = The object we're stuck to
t_web | MORE1 = The amount of damage the web can take
t_dream_gate | HA, yeah like these are ever going to work! :P
t_trap t_trap_active t_trap_inactive | MORE1 = The animation ID to use when the trap is triggered MORE2 = The base damage for the trap MOREX = How long to animate as dangerous MOREY = How long to sit there until it resets MOREZ = 1 if the trap should just cycle from being active to inactive
t_anim_active | MORE1 = What to become after the animation is done
t_switch | MORE1 = The next item the switch will become when dclicked (state) MOREX = Can we step on the switch to activate it? MOREY = Delay in seconds before the switch does its thing LINK = The item to use when the switch is thrown
t_sound | MORE1 = The sound MORE2 = Should it repeat?
t_stone_guild t_stone_town | MORE1 = Alignment (0 = neutral, 1 = good, 2 = bad) MORE2 = How much gold has been dropped on the stone? ATTR = If attr_owned is set, people who dclick it will automatically be made members

t_leather
t_feather
t_fur
t_wool
t_blood
t_bone

MORE2 = The ID of the creature this came from

Miscellaneous Charts and Information

Effect Types
0 | Standard flying object. The object will follow its target until it hits, and then explode if that flag is set.
1 | Lightning effect. This is the only way to achieve the lightning effect in-game.
2 | Ground-based effect. This effect will stay at a particular point on the map until it expires. As a result, it will appear lower than a type 3 effect. This is the only way to get an effect onto an item.
3 | Character-based effect. This effect will follow the character as he moves, the way a flamestrike does when the spell is cast. The bottom of the effect is somewhere around the character's knees.

Damage Types (This is a bitmask, and so these are flags)
0001 | Unblockable "god" damage
0002 | Some sort of physical damage (as opposed to magical)
0004 | Some sort of magical damage
0008 | Poisonous or biological (harm spell) damage
0010 | Fire-based damage
0020 | Electrical damage (lightning)
0040 | Draining damage
0080 | Damage that hits the entire body, rather than just one part of it
0100 | Acidic damage (will destroy armor)
0200 | Cold-based damage
0400 | Damage done by slashing (swords, etc)
0800 | Damage done by piercing (spears, archery, etc)

Account Priv Flags
0001 | This is a server account. I don't really know what this means.
0002 | Acts as a GM (different than having GM level)
0008 | Can we listen to GM pages or not?
0010 | Hearall
0020 | Allmove
0040 | Show combat detail messages
0080 | Debug mode
0100 | The email address has been proven valid
0200 | Show GM privileges
0800 | Jailed
01000 | T2A
02000 | Blocked/banned
04000 | Allshow (show offline characters and characters in other mapplanes)
08000 | Temporary account, delete upon logout

Flags for IMPORT and EXPORT
01 | Items
02 | Characters
04 | Players
010 | Import distance relative to you
020 | Only recover the account in question (used internally for SERV.RESTORE)

Flags for LOGMASK in sphere.ini
080 | Account creation/deletion
0200 | Worldsave messages
0400 | Login and logout info for all clients
0800 | All GM pages
01000 | Everything that is said (basically logging HEARALL)
02000 | GM commands (good for catching your cheating GMs)
04000 | Log things that are probably cheats
08000 | Log kills
010000 | Log HTTP requests

SAYUA Speech Modes
000 | Normal sysmessage
001 | Display as a system prompt
002 | Emote it
003 | Say it
004 | Say toward object (no idea?)
005 | Does not display
006 | Text labelling an item preceded by "you see"
007 | Status message, does not scroll
008 | Whisper
009 | Yell!
0C0 | Tokenized?
0FF | Server-wide broadcast, like GM yelling

MEMORY_SPEAK MORE1L values
000 | I have no speech memory of this person
001 | I am talking to this person about training and waiting for my money
002 | I am talking to this person about being hired and waiting for my money
003 | I attempted to speak to this player, but there is no response yet
004 | I was tamed by this person previously
005 | I saw this item but decided to ignore it

Default Actions for Item Types Have you ever wondered exactly what all of those different types actually DO? There are about 183, but you only ever use 10 or 12 of them (t_script and t_eq_script the most). Well, the real answer is that each item does something different for every event. The following will be a chart for each event, and the default action of different types.

@DClick, Take 1 These things will happen if a player (and ONLY a player) double-clicks an item.
T_TRACKER | If the item is NOT linked to another object, it will bring up a target which will let you select a link with the prompt "Who do you want to attune to?" If the item does have a valid link, double-clicking will act like tracking has just been used. If you don't have sufficient tracking skill to find the item, it will simply tell you that you can't find the target.
T_TRACK_ITEM T_TRACK_CHAR | Not functional.
T_SHAFT T_FEATHER | Brings up the [SKILLMENU] section sm_bolts
T_FISH_POLE | Brings up a target so you can choose where you'd like to fish
T_DEED | Creates a deed target for the particular item
T_METRONOME | Acts as though the timer has just gone off and says "Tick!". After this, the timer will go off every 5 seconds and say "Tick!". Very exciting type. Very worth wasting their time making.
T_EQ_BANK_BOX T_EQ_VENDOR_BOX | Logs that error message saying "Cheater <name> is using 3rd party tools to open bank box". That's all it does. Nothing else.
T_CORPSE T_SHIP_HOLD T_CONTAINER T_TRASH_CAN | Opens the container after checking for appropriate snooping skill. Obviously if the item is on the ground, it does not require ANY snooping skill.
T_GAME_BOARD | Opens up the game board, unless it's in a container
T_BBOARD | Opens up the bulletin board
T_SIGN_GUMP | Opens a gump displaying the name of the object on the gump ID specified in TDATA2. This would be cool for gravestones and other customized signs.
T_BOOK T_MESSAGE T_EQ_NPC_SCRIPT T_EQ_MESsAGE | Opens up the book unless it's ruined. A ruined book is simply one that isn't defined in the server, and should never happen.
T_STONE_GUILD T_STONE_TOWN T_STONE_ROOM |
T_ADVANCE_GATE | Advances the player to be identical to the CHARDEF stored in MORE
T_POTION | If it's a poison potion, this brings up a target to choose the poisoned item. If it's an explosion potion, it brings up a target for to throw at. Otherwise, it simply drinks it.
T_ANIM_ACTIVE | Says "The item is in use"
T_CLOCK | Tells the local time for the character
T_SPAWN_CHAR | Negates the spawn, removing all NPCs that were spawned from this spawnpoint
T_SPAWN_ITEM | Activates the spawn, as if the TIMER has just gone to zero
T_SHRINE | If the resurrection spell is successful on the player, it simply does that. Otherwise, it says "You have a feeling of holiness" as a sysmessage.
T_SHIP_TILLER | The tillerman says "Arrg stop that."
T_WAND T_SCROLL | Activates the spell on this item, using the magery skill
T_RUNE | Lets you rename the rune
T_CARPENTRY | Brings up the skill menu entited "sm_carpentry"
T_FORGE | Opens a target for you to select some ore to smelt.
T_ORE | Smelts the ore using the nearest forge
T_INGOT | Uses the blacksmithing skill
T_KEY T_KEYRING | Brings a target so you can select an item to lock or unlock.
T_BANDAGE | Brings up a target so you can select an item to use this on

T_BANDAGE_BLOOD
T_COTTON
T_WOOL
T_YARN
T_THREAD
T_COMM_CRYSTAL
T_SCISSORS
T_LOCKPICK
T_CARPENTRY_CHOP
T_WEAPON_MACE_STAFF
T_WEAPON_MACE_SMITH
T_WEAPON_MACE_SHARP
T_WEAPON_SWORD
T_WEAPON_FENCE
T_WEAPON_AXE

All of these types bring up a target that says "What would you like to use this on?"

T_MEAT_RAW T_FOOD_RAW | Brings up a target to select what you'd like to cook the food on.
T_FISH | Says "Use a knife to cut this up!"
T_TELESCOPE | "Wow, you can see the sky!"
T_MAP T_MAP_BLANK | If the map is blank, it brings up the skill menu sm_cartography. Otherwise it brings up the actual map to the client.
T_CANNON_BALL | Brings up a "What do you want to use this on?" target
T_CANNON_MUZZLE | Brings up three targets, one for powder (sulfurous ash), one for shot (cannon balls), and one for the target of the cannon.
T_CRYSTAL_BALL | Nothing in 99f
T_WEAPON_MACE_CROOK | Lets you select a creature to herd
T_SEED T_PITCHER_EMPTY | Creates a target so you can select a point on the ground
T_WEAPON_MACE_PICK | Select a target to mine
T_SPELLBOOK | Opens the spellbook if possible
T_HAIR_DYE | Opens the dialog entitled d_hair_dye
T_DYE | Target
T_DYE_VAT | Target
T_MORTAR | Target a reagent
T_POTION_EMPTY | Target a reagent, if you have a mortar and pestle
T_REAGENT | Try to make a potion with it, if you have a mortar and pestle
T_TINKER_TOOLS | Brings up [SKILLMENU sm_tinker]
T_SEWING_KIT | Target cloth

@DClick, Take 2 If a player double-clicks an item, it will first try the actions in the previous list. If a type is NOT in the previous list, it will fall through to this list. If an NPC or non-client player (i.e. logged off) tries to USE or DCLICK an item, it will automatically perform the actions in this list.
T_ITEM_STONE | The player will be given the item signified by MORE1, MOREY will be decremented, and then the item will be set into "regenerating" mode. It will regenerate for a number of seconds equal to MOREX, and then it will be available to use again. If the MOREY is equal to -1, or 65535, it will tell the player that the stone is out of items.
T_SEED | Lets you target some soil in which to plant the seed. The seed will grow into a plant as time progresses.
T_BEDROLL | Unrolls the bedroll if it's on the ground
T_KINDLING | Makes a fire if the kindling is on the ground and your camping is high enough.
T_BEDROLL | Unrolls and rerolls the bedroll if it's on the ground
T_BELLOWS | Just makes an animation and a sound
T_SPINWHEEL | Makes an animation and a sound, unless someone is already using cloth on it. If they are, it tells you that you can't use this item right now.
T_TRAIN_DUMMY | Trains your weapon skill up to 25% at which point it says "You can learn a lot from a dummy, but you've learned it all."
T_ARCHERY_BUTTE | If you are more than 2 tiles away, it'll shoot an arrow and train your archery skill. If you are less, you will retrieve a number of arrows or bolts which are embedded in the target.
T_TRAIN_PICKPOCKET | Trains you in snooping
T_LOOM | "Use thread or yarn on looms"
T_BEE_HIVE | If the hive contains honey (MORE1), there is a one in three chance that you will get a har of joney, a one in three chance that you will get a piece of bees wax, and a one in three chance that you will be stung for up to 5 damage.
T_MUSICAL | Starts the musicianship skill
T_FOLIAGE T_CROPS | Picks the crops or fruit from the ground, if it's ripe.
T_FIGURINE | If there is a LINK, and the item is used by someone else, it will say "This is not your figurine". Otherwise, it will create or resummon the animal referred to by this character. When you shrink a character into a figurine, it goes into "idle space", and essentially logs off. The figurine will either create a new character if it can't find the old one, or it will log the old one back on.
T_TRAP T_TRAP_ACTIVE | Explode the trap and be damaged if it's on the ground. Otherwise, arm it.
T_SWITCH | Flips the switch graphic and uses the item linked to the switch
T_PORT_LOCKED | "You can't move the gate", unless you are a GM, or the opening is the result of a LINK action. Otherwise, it falls through to the T_PORTCULIS type.
T_PORTCULIS | The portcullis raises.
T_DOOR_LOCKED | Interesting things happen here if the item has attr ATTR_MAGIC. A "magic face" will appear in front of the door for four seconds when you use it. If you are not a GM, the door will say "This door is locked", and you cannot open it.
T_DOOR T_DOOR_OPEN | Opens or closes the door. If the door has a link, that link will also be USED, unless you are closing the door.
T_SHIP_PLANK | If you're on the ship, close the plank. If you aren't on the ship, teleport to the plank.
T_SHIP_SIDE_LOCKED | If you don't have a key, "That is locked". Otherwise, fall through to T_SHIP_SIDE.
T_SHIP_SIDE | Opens up the ship plank

T_GRAIN
T_GRASS
T_GARBAGE
T_FRUIT
T_FOOD
T_FOOD_RAW
T_MEAT_RAW

Eat the food, unless it's the result of a linked action (i.e. this item was another used item's LINK).

T_POTION T_DRINK T_PITCHER T_WATER_WASH T_BOOZE | Drinks the item
T_LIGHT_LIT T_LIGHT_OUT | Tries to switch the state of this light source

T_CLOTHING
T_ARMOR
T_ARMOR_LEATHER
T_SHIELD
T_WEAPON_MACE_CROOK
T_WEAPON_MACE_PICK
T_WEAPON_MACE_SMITH
T_WEAPON_MACE_SHARP
T_WEAPON_SWORD
T_WEAPON_FENCE
T_WEAPON_BOW
T_WEAPON_AXE
T_WEAPON_XBOW
T_WEAPON_MACE_STAFF
T_JEWELRY

Equips the item

T_WEB | Try to break out of a web, or at least damage it by an amount equal to the user's strength. The web initially has a damage reserve between 60 and 310.
T_SPY_GLASS | Tells you the phases of the two moons.
T_SEXTANT | Tells you your region name, and your coordinates in North by West map coordinates (56o15'N, 78o17'W).

@Step This is triggered on ALL items which happen to be at a player's coordinates. Most of the time, the trigger will be only run once, and then ignored for the duration of the time you remain standing there.
T_SHRINE | Resurrect the player if possible.
T_WEB | Be stuck in the web if you haven't already been standing here.
T_FIRE | Takes damage as if you are standing on a fire field cast by a player with <MOREY> magery skill. MOREY represents how "hot" the fire is, and consequently, you will take more damage! Also makes a pretty fire noise.
T_SPELL | Acts as if spell number <MOREX> was cast on the stepper, with <MOREY> skill level.
T_SWITCH | If MOREX is not zero, this will activate the switch as if we'd just double-clicked it.
T_MOONGATE T_TELEPAD | If this is a moongate, the coordinates to which it leads are randomly determined by the [MOONGATES] section of spheremap.scp. If this is a telepad, the coordinates are in <MOREP>. Either way, it teleports you to the appropriate location.
T_SHIP_PLANK | Move you to a valid land spot on your screen somewhere in front of the plank. Then, set the timer to auto-close it behind you.
T_ADVANCE_GATE | Same as using it. See above.

@Timer This is triggered when the timer's TIMERD reaches zero. TIMERD is reduced once every "tick", which is about a tenth of a second. It checks to see if it has been reduced to zero every TWO ticks. The TIMER property of an item is the TIMERD property divided by ten, so it is effectively seconds.
T_LIGHT_LIT | Causes the one charge (MOREY) to be dropped from the item. If there are charges left, it sets the timer to 10 minutes, and does nothing else. If there are no charges, the item is extinguished.
T_SHIP_PLANK | Close the ship plank
T_EXPLOSION | Damage all items and characters <MOREZ> tiles in all directions, by <MOREX> damage of <MOREY> type. Then remove the explosion item. See the "Little Known Facts, Part 1" article for more information on how this is useful.
T_METRONOME | Says "Tick!" and then sets the TIMER to 5.
T_TRAP_ACTIVE | Causes the trap to settle down and become inactive. While it's inactive, it will be type T_TRAP_INACTIVE, and the timer will be set to <MOREX>.
T_TRAP_INACTIVE | If the trap's MOREZ is non-zero, the trap will randomly become active, and then calm down again after a certain period of time. If the MOREZ is zero, the trap will become a standard T_TRAP, which can be stepped on.
T_ANIM_ACTIVE | Changes the item back into the ID stored in <MORE> and the type stored in <MORE2>. Sets the timer to -1.
T_DOOR T_DOOR_LOCKED T_DOOR_OPEN | Open or shut the door depending on state.
T_POTION | Decrements the timer and says the current timer value. If the timer is zero, and the potion is an explosion potion, it actually causes the LINK (the person who threw it) to cause it damage. This will cause the potion to explode.
T_SPAWN_CHAR T_SPAWN_ITEM | Spawns a new character or item. Use Axis to make these spawnpoints.
T_CROPS T_FOLIAGE | Lets the plant or crop "grow" to its next stage of development. These are defined in the TDATA2 of the current item. If it's reached maximum growth (TDATA2 is -1), check to see if there is a MORE2. If so, put that item on the ground (some items leave fruit on the ground when fully grown, like pumpkins). Otherwise, set the timer to some complicated value based on the next new moon.
T_BEE_HIVE | Generate honey if MORE is less than 5. Otherwise, just reset the timer again to 15 minutes.
T_SIGN_GUMP | Automatically return 1, because signs never decay.

@Damage
T_CLOTHING | If the damage type contains fire, the item will suffer the same quality loss as armor. Otherwise, it will suffer no damage.
T_WEAPON_BOLT T_WEAPON_ARROW | These are generally damaged when they hit something. If it misses, there is a 1 in 5 chance it will not survive. If it hits, there is a 1 in 3 chance that it WILL survive.
T_POTION | If this is an explosion potion, and the damage type is one of a few types, it will explode and cause everything in the area (items and chars) to be damaged.
T_WEB | If the damage you do exceeds the web's current HP, it is destroyed. Otherwise, it just takes some damage and says "You weaken the web". Only damage of types FIRE, HIT_BLUNT, HIT_SLASH, and GOD can weaken or destroy a web.
T_ARMOR | Forces the armor to take damage according to some very long and scary-looking formula.

@Targon Targets on items, characters, and the ground are passed through the same filters, so I will try to specify in each description the one or more than one type of target it describes. When I refer to "the targeting item", this is the "default object" on which the @Targon trigger is running. "The target" refers to TARG, and "the player" refers to SRC unless otherwise specified. The type in the left column is the type which is doing the target, not the type being targetted.
T_COMM_CRYSTAL | ITEM: If the target's type is T_COMM_CRYSTAL, this will set the targeting item's link to the target's UID. Otherwise, it does nothing.
T_POTION | ITEM: If the potion is poison, there is a section which describes what should happen, but no code is there to make it happen. If the potion is an explosion potion, it will launch the potion toward the targeted point (TARGP). Since TARGP exists for items, characters, and ground, it will always land on the ground.
T_MEAT_RAW T_FOOD_RAW | ITEM: If the targeted item is type T_FIRE, T_FORGE, or T_CAMPFIRE start the cooking skill. Also sets your target back to the previous target. CHAR: If the character can eat this food, do so.
T_KEY | ITEM: Attempts to copy the key. This will fail if you don't have enough tinker skill, neither key is blank, both keys are blank, or you cannot reach/use either key. If you use the key on itself, you can rename it. If you use the key on a container or door, it will attempt to unlock the door.
T_FORGE | ITEM: If the targeted item is ORE, start the mining skill to smelt the ore.
T_CANNON_MUZZLE | ITEM: Depending on the state of the cannon, you can load either powder or cannonballs. Targeting these items will add them. CHAR: If the cannon is fully loaded, it will fire at the person, provided that person is in range. It will do anywhere from 80 to 230 damage to that person.
T_WEAPON_MACE_PICK | GROUND: Start mining at the location on the ground.
T_WEAPON_MACE_CROOK | ITEM: "Just try picking up inanimate Objekte" CHAR: Brings up another target so you can select where you'd like the creature to go.
T_WEAPON_MACE_SMITH | ITEM: If the targeted item is an ingot, start the blacksmithing skill by bringing up the skill menu sm_blacksmithing. If it is not an ingot and can be repaired, attempt to do so.

T_CARPENTRY_CHOP
T_WEAPON_MACE_SHARP
T_WEAPON_FENCE
T_WEAPON_AXE
T_WEAPON_SWORD

CHAR: If this is a sheep, attempt to shear it. If it has already been sheared, say "You must wait for the wool to grow back".

ITEM: This depends on the type targeted. Statics also attempt to be rendered into types by the server. Basically, if you target a static tree, it looks at the item scripts to see that it is a t_tree item:

- T_TREE: Attempt to chop wood from the tree. If there is no wood left, say so. If you fail, say so. This raises lumberjacking skill. If the item used to target is type T_WEAPON_FENCE, it simply takes kindling from the tree, rather than chopping logs. This is so you can use daggers.
- T_FOLIAGE: "Chopping the tree's foliage yields nothing"
- T_LOG: If the item used to target is a dagger (I_DAGGER) id, it will bring up the sm_bowcraft menu. If it is type t_carpentry_chop, it will bring up the sm_carpentry menu.
- T_FISH: Cut up the fish parts, if you can reach the item. Each fish becomes 4 fish steaks.
- T_CORPSE: Cuts up the corpse into all of its loot, and its RESOURCES
- T_FRUIT, T_REAGENT_RAW: Changes the fruit into a "seed" for that type of fruit. The seed is actually a barely disguised copper coin.
- T_CROPS: Trim back the crops without picking anything
- Anything else: If you can access it, you do ONE blunt-type damage to it.

T_BANDAGE | CHAR: Starts the healing skill to heal the creature in question.
T_SEED | GROUND: Tries to plant the seed at the targeted point.
T_DEED | GROUND: Attempts to use the deed at the targeted point.
T_WOOL T_COTTON | ITEM: Use this on a T_SPINWHEEL item to make 3 yarn with 1 wool or 6 thread with 1 cotton.
T_KEYRING | ITEM: Tries to use all the keys on the ring to lock or unlock the target.
T_SCISSOR | CHAR: Tries to cut the character's hair if it has any ITEM: If you target a bolt, it will be cut up into more cloth. If you target clothing or some cloth, it will be cut up into bandages. If you target hides, they will be cut into strips of leather.
T_YARN T_THREAD | ITEM: You must target a loom. If the loom already has some other type of string on it, it will be discarded before you continue. If you have five of a certain type of string on the loom, it will converted into a cloth bolt.
T_FISH_POLE | GROUND: Starts the fishing skill on the targeted ground location.
T_LOCKPICK | ITEM: If you can reach the target, the lock picking skill will be started.
T_CANNON_BALL | ITEM: If you target a cannon, it will load the cannon with the cannonballs
T_DYE | CHAR: If you use dyes on yourself, it will change your skin color. They cannot be used on another person. This will bring up a color selection menu. ITEM: If used on a t_dye_vat type item, it will change the color of the dye vat.
T_DYE_VAT | CHAR: Attempts to dye the items in the character's beard and hair layers. ITEM: If the item can be dyed, its color will be changed. A GM can dye anything.
T_PITCHER_EMPTY | ITEM: If it is of type t_water or t_water_wash, the pitcher will be filled with water.
T_POTION_EMPTY T_MORTAR | ITEM: Alchemy menu
T_SEWING_KIT | ITEM: If you target t_leather or t_hide items, it will bring up sm_tailor_leather. If you target t_cloth or t_cloth_bolt items, it will bring up sm_tailor_cloth.

@SpellEffect (items)

This trigger is different. It depends more on the spell being cast than the item it affects, so I will sort the list by spell. If a harmful spell is cast on an item, it WILL damage the item by 1 hitpoint. The type of damage depends on the spell, but it is at least "blunt" and "magic" types.

If you cast ANY spell on a t_wand item, it will attempt to recharge the wand. Overcharging a wand will make it explode like an explosion potion and damage everyone in the area.

Curse | Unblesses a cursed item and sets its curse level to the skill level of the spell being cast. Higher magery means more powerful curses.
Bless | Uncurses a cursed item and blesses it instead. The power of the bless is equal to the skill level of the spell. More magery means a more powerful bless.
Incognito | Unidentifies an item. If an item has the ATTR_identified attr set, it will clear it.
Lightning | Causes a special-effects lightning bolt to be cast on the target
Explosion Fireball FireBolt Fire Field Meteor Swarm | Adds fire to the type of damage this item should receive at the end of the spell effect.
Magic Lock | Attempts to magically lock the item
Unlock | This will calculate the level of LOCKPICKING skill that you need to open the particular door. It then calculates the difficulty ratio of opening the door based on that level and your magery skill.
Mark | Marks the item if it is type t_rune or t_telepad. If you are GM, it will change the MOREP of any item you target, and won't check type, so BE CAREFUL.
Resurrection | Attempts to resurrect the corpse. If the corpse is just laying there, it will resurrect the associated character. If the corpse is an NPC corpse, it will make a new NPC with the basic CHARDEF of that which left the corpse.