<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.spherecommunity.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wuffel</id>
		<title>SphereWiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.spherecommunity.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wuffel"/>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Special:Contributions/Wuffel"/>
		<updated>2026-04-16T18:17:28Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.28.0</generator>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=@Hit&amp;diff=7612</id>
		<title>@Hit</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=@Hit&amp;diff=7612"/>
				<updated>2014-09-13T17:48:36Z</updated>
		
		<summary type="html">&lt;p&gt;Wuffel: /* Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|@Hit}}&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
This trigger fires when a character hits someone using a combat skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Fires on:&lt;br /&gt;
* [[Characters]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
The following object references are explicitly available for this trigger:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Name''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| [[ARGO]] || The [[Items|weapon]] being used (can be nothing, if fists are used).&lt;br /&gt;
|-&lt;br /&gt;
| [[I]] || The [[Characters|character]] doing the hitting.&lt;br /&gt;
|-&lt;br /&gt;
| [[SRC]] || The [[Characters|character]] being hit.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Arguments==&lt;br /&gt;
The following arguments are set for this trigger. If an argument is marked as &amp;quot;In&amp;quot; then a value will be passed in to the trigger, if an argument is marked as &amp;quot;Out&amp;quot; then it can be set to a value to affect Sphere's behaviour:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Argument''' || '''In/Out''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| ARGN1 || IO || The amount of damage being dealt.&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.ARROW || I || UID of the arrow used (Archery only)&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.ARROWHANDLED || IO || if set to !=0, you can do whatever you want with local.arrow&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Return Values==&lt;br /&gt;
The following return values are explicitly defined for this trigger:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Return Value''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Cancels the combat swing.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Reference Compendium]]&lt;br /&gt;
[[Category: Triggers]]&lt;/div&gt;</summary>
		<author><name>Wuffel</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=@HitMiss&amp;diff=7611</id>
		<title>@HitMiss</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=@HitMiss&amp;diff=7611"/>
				<updated>2014-09-13T17:48:16Z</updated>
		
		<summary type="html">&lt;p&gt;Wuffel: /* Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Description==&lt;br /&gt;
This trigger fires when a character is about to miss a combat swing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Fires on:&lt;br /&gt;
* [[Characters]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
The following object references are explicitly available for this trigger:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Name''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| [[ARGO]] || The [[Items|weapon]] being used (can be nothing, if fists are used).&lt;br /&gt;
|-&lt;br /&gt;
| [[I]] || The [[Characters|character]] doing the hitting.&lt;br /&gt;
|-&lt;br /&gt;
| [[SRC]] || The [[Characters|character]] who was missed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Arguments==&lt;br /&gt;
The following arguments are set for this trigger. If an argument is marked as &amp;quot;In&amp;quot; then a value will be passed in to the trigger, if an argument is marked as &amp;quot;Out&amp;quot; then it can be set to a value to affect Sphere's behaviour:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Argument''' || '''In/Out''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.ARROWHANDLED || IO || if set to !=0, you can do whatever you want with local.arrow&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Return Values==&lt;br /&gt;
The following return values are explicitly defined for this trigger:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Return Value''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Cancels the attack swing.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Reference Compendium]]&lt;br /&gt;
[[Category: Triggers]]&lt;/div&gt;</summary>
		<author><name>Wuffel</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=@Hit&amp;diff=7610</id>
		<title>@Hit</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=@Hit&amp;diff=7610"/>
				<updated>2014-09-13T17:33:52Z</updated>
		
		<summary type="html">&lt;p&gt;Wuffel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|@Hit}}&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
This trigger fires when a character hits someone using a combat skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Fires on:&lt;br /&gt;
* [[Characters]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
The following object references are explicitly available for this trigger:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Name''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| [[ARGO]] || The [[Items|weapon]] being used (can be nothing, if fists are used).&lt;br /&gt;
|-&lt;br /&gt;
| [[I]] || The [[Characters|character]] doing the hitting.&lt;br /&gt;
|-&lt;br /&gt;
| [[SRC]] || The [[Characters|character]] being hit.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Arguments==&lt;br /&gt;
The following arguments are set for this trigger. If an argument is marked as &amp;quot;In&amp;quot; then a value will be passed in to the trigger, if an argument is marked as &amp;quot;Out&amp;quot; then it can be set to a value to affect Sphere's behaviour:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Argument''' || '''In/Out''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| ARGN1 || IO || The amount of damage being dealt.&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.ARROW || I || UID of the arrow used (Archery only)&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.ARROWHANDLED || IO || if set to !=0, no hardcoded action will be done to the local.arrow&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Return Values==&lt;br /&gt;
The following return values are explicitly defined for this trigger:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Return Value''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Cancels the combat swing.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Reference Compendium]]&lt;br /&gt;
[[Category: Triggers]]&lt;/div&gt;</summary>
		<author><name>Wuffel</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Chapter_7&amp;diff=7581</id>
		<title>Chapter 7</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Chapter_7&amp;diff=7581"/>
				<updated>2014-04-08T19:54:06Z</updated>
		
		<summary type="html">&lt;p&gt;Wuffel: /* NEWDUPE */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Chapter_7}}&lt;br /&gt;
&lt;br /&gt;
==Recursive Functions==&lt;br /&gt;
I discovered this very seldom explored extension of SPHERE scripting while reading messages on the boards. Someone was trying to create a function that counted the number of items in a container using this sort of thing, and it worked for the most part. I was very amazed, because before that, no one had even thought of using functions that looped back upon themselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Which is what a recursive function is. I'll say it one more time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A recursive function is one that calls itself, or recurs. Surprise!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So how do we do this? It's as simple as calling a function:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[FUNCTION recursive_test]&lt;br /&gt;
recursive_test&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This very small piece of code in fact IS a recursive function. As you can see, the function will call itself and start over from the beginning, which will proceed to call the function again, and again, and again, and on and on. In this case, we don't have any way to stop it. This is called an infinite loop, one that will continue forever without stopping. Your server will die a flaming death.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''Lesson 1: How to NOT create an infinite loop'''&lt;br /&gt;
&lt;br /&gt;
Let me tell you right now. You will write a script that implements an infinite loop. You will test it. Your server will die. It's guaranteed. No programmer can say that they have never accidentally written an infinite loop. (RANDOM NOTE: All windows programs are in fact infinite loops. Your SPHERE server is an infinite loop.) In a SPHERE script, however, here's what happens:&lt;br /&gt;
&lt;br /&gt;
# The function is called.&lt;br /&gt;
# Some stuff takes place&lt;br /&gt;
# The function is called from within itself. Being a good scripting language, it records where it left off so it can go back later. This is called the stack.&lt;br /&gt;
# Go back to number 1.&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;stack&amp;quot; builds up very very quickly, and soon the server cannot allocate any more memory for it, and will crash when it tries. Fun stuff, I tell you.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Anyways, here is one way to avoid creating an infinite loop. Let's say we want to make a function that executes SRC.SYSMESSAGE Hello World 35 times. Here would be an example of how one could do this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[FUNCTION recurse_hello]&lt;br /&gt;
IF (&amp;lt;ARGN1&amp;gt; &amp;lt; 1)&lt;br /&gt;
	RETURN 1&lt;br /&gt;
ENDIF&lt;br /&gt;
SYSMESSAGE Hello World&lt;br /&gt;
RECURSE_HELLO &amp;lt;EVAL &amp;lt;ARGN1&amp;gt; - 1&amp;gt;&lt;br /&gt;
RETURN 1&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then, in another script, we would execute this command: &amp;lt;font color=&amp;quot;darkred&amp;quot;&amp;gt;SRC.RECURSE_HELLO 35&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remember what ARGN is from the previous chapter? It's the argument to the function stored as a number. Initially, as you can see, it's 25 because we made it be that way. However, every time the function calls itself, or &amp;quot;recurses&amp;quot;, it sets ARGN1 to be one less than itself. Here's the step-by-step analysis of this:&lt;br /&gt;
&lt;br /&gt;
# The function is called. ARGN1 is 35 because we said so.&lt;br /&gt;
# It checks to see if ARGN1 is less than one. If it is, we immediately RETURN 1 and set off the chain reaction that stops the recursive function.&lt;br /&gt;
# The next part should be fairly obvious. We're sending a SYSMESSAGE to the default object. Because we used SRC when we initially called the function, the default object is SRC.&lt;br /&gt;
# This is where the recursion takes place. The function calls itself with an argument ONE LESS than the current one. This starts the whole thing over at step 1. This is a NEW FUNCTION CALL, remember. The original function call STILL EXISTS and the program will &amp;quot;rewind&amp;quot; back down the stack to that location later. That is why I have a RETURN 1 after the function call.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That's your example of a recursive function. It isn't very practical. Let's look at a more practical example. See if you can figure it out for yourself. This is courtesy of Belgar, for the most part:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[FUNCTION pack_to_bank]&lt;br /&gt;
IF (&amp;lt;FINDLAYER.21.FINDCONT.0.UID&amp;gt; == 0)&lt;br /&gt;
	RETURN 1&lt;br /&gt;
ENDIF&lt;br /&gt;
FINDLAYER.21.FINDCONT.0.CONT = &amp;lt;FINDLAYER.layer_bankbox.UID&amp;gt;&lt;br /&gt;
PACK_TO_BANK&lt;br /&gt;
RETURN 1&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(As you can see, we don't always need an ARGS to make a function loop. In this case, we use a backpack with an unknown number of items inside and only stop when the pack no longer contains items.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Recursive functions are very useful. Be sure you don't overuse them, though! Remember, while a script is running, YOUR SERVER IS FROZEN. If a recursive function takes too long to complete, your server will lag. A good method is to make sure that no function should be looping more than about 500 times. (Actually other server emulators such as POL have a mechanism to catch &amp;quot;runaway scripts&amp;quot; like this and halt them in their tracks.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==FOR==&lt;br /&gt;
&lt;br /&gt;
===FOR===&lt;br /&gt;
FOR is a powerful way to create a recursive function, and it allows a simpler level of control over your recursions. &lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[FUNCTION for_display]&lt;br /&gt;
FOR X 1 20&lt;br /&gt;
	SYSMESSAGE &amp;lt;LOCAL.X&amp;gt; //Will sysmessage the current for count.&lt;br /&gt;
ENDFOR&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The loop will loop through 20 times, starting at 1 and ending at 20. X is the variable containing the current FOR count. If no variable is declared, the count can be accessed using &amp;lt;LOCAL._FOR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Changing LOCAL._FOR or whatever you declared as count, will not change the loop's behaviour. But be aware that if you &amp;quot;stack&amp;quot; FOR loops without giving them different loop variables, the innermost loop will overwrite the loop variables of its successors, usually leading towards a completely messup of the whole loop stuff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===FORCHARLAYER===&lt;br /&gt;
FORCHARLAYER is another type of FOR loop. Basically it allows you to loop through each item that is stored on the specified layer of a character. This can be useful for when you want to manipulate all of the spell runes or memory items on a character as an alternative to using FINDLAYER.x in a loop.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Something to be aware of here is that whilst inside the loop, the default object will be temporarily changed to the item in the loop. As you can see in the following example, we must store a reference to the original default object (the character) so that we can still reference it from within the loop:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[FUNCTION get_mitems_names]&lt;br /&gt;
REF1 = &amp;lt;UID&amp;gt; // store the default object in REF1&lt;br /&gt;
FORCHARLAYER 30&lt;br /&gt;
	REF1.SYSMESSAGE &amp;lt;NAME&amp;gt; is a memory item in layer &amp;lt;LAYER&amp;gt;&lt;br /&gt;
ENDFOR&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===FORCHARMEMORYTYPE===&lt;br /&gt;
FORCHARMEMORYTYPE is a very useful type of FOR loop. You may want to use it for experience systems, and some player and NPC killing systems. It loops through every memory item on a character that has a specified flag.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, a character has 4 memory items with the following names and flags:&lt;br /&gt;
{|&lt;br /&gt;
| Ellessar || 02000&lt;br /&gt;
|-&lt;br /&gt;
| Sorea || 022bc&lt;br /&gt;
|-&lt;br /&gt;
| Introvert || 0740d&lt;br /&gt;
|-&lt;br /&gt;
| Enrath || 0c40d&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Script:'''&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[FUNCTION get_war_targ_mems]&lt;br /&gt;
REF1 = &amp;lt;UID&amp;gt; // As with FORCHARLAYER, the default object changes within the loop&lt;br /&gt;
FORCHARMEMORYTYPE memory_war_targ // Loop through memory items with flag 02000=memory_war_targ&lt;br /&gt;
	REF1.SYSMESSAGE There is a memory item with name &amp;lt;NAME&amp;gt;, uid &amp;lt;UID&amp;gt;, flags &amp;lt;COLOR&amp;gt; and one of its flag is also 02000.&lt;br /&gt;
ENDFOR&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Result:'''&amp;lt;br /&amp;gt;&lt;br /&gt;
On your screen you would see:&lt;br /&gt;
&lt;br /&gt;
''There is a memory item with name Ellessar, uid 04f000001, flags 02000 and one of its flag is also 02000.''&amp;lt;br /&amp;gt;&lt;br /&gt;
''There is a memory item with name Sorea, uid 04f000002, flags 022bc and one of its flag is also 02000.''&amp;lt;br /&amp;gt;&lt;br /&gt;
''There is a memory item with name Introvert, uid 04f000003, flags 0740d and one of its flag is also 02000.''&amp;lt;br /&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note that there are only three messages, because the memory item &amp;quot;Enrath&amp;quot; does not have the flag 02000.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===FORCHARS===&lt;br /&gt;
FORCHARS is a FOR loop that you can use to check all mobiles (player and NPC) within a set radius of an object.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The correct syntax being ''FORCHARS x'' where ''x'' is the radius in tiles the loop will cover.&lt;br /&gt;
&lt;br /&gt;
* '''FORCHARS 2''' would check any mobile within a 2 tile radius&lt;br /&gt;
* '''FORCHARS 18''' would check the area inside your screen&lt;br /&gt;
* '''FORCHARS 6144''' would check the entire world map&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One example of a function using FORCHARS&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[FUNCTION kill_vendors]&lt;br /&gt;
FORCHARS 6144 // checks entire map&lt;br /&gt;
	IF (&amp;lt;BRAIN&amp;gt; == brain_vendor) //argument for what will be acted upon within this function&lt;br /&gt;
		KILL // action&lt;br /&gt;
	ENDIF &lt;br /&gt;
ENDFOR&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As with all FOR loops you have to stipulate inside the loop what it is to act upon, if you are restricting it to certian players/npcs (or in the case of FORITEMS, items) otherwise it will perform the action upon all players/npcs within the radius of the loop.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this case the loop checks for any Vendor npc's and kills them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===FORCLIENTS, FORPLAYERS===&lt;br /&gt;
FORCLIENTS and FORPLAYERS are FOR loops, both are used to affect a clients/players in certain radius. If you do not set the radius, radius 18 is used as default. While FORCLIENTS only acts on player characters who are logged in, FORPLAYERS acts on each and every player character, even if logged off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Usage:'''&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[FUNCTION radius_players]&lt;br /&gt;
FORCLIENTS 25&lt;br /&gt;
	IF (&amp;lt;ACCOUNT.PLEVEL&amp;gt; &amp;lt;= 1) // Affects only logged in players, not staff&lt;br /&gt;
		SAY I am here!&lt;br /&gt;
	ENDIF&lt;br /&gt;
ENDFOR&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===FORCONT===&lt;br /&gt;
FORCONT is a type of FOR loop. It loops through every item in a container. The default object inside the loop will be the item currently being looped over.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Usage:'''&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[FUNCTION rem_spellbooks]&lt;br /&gt;
FORCONT &amp;lt;FINDLAYER.21.UID&amp;gt; 10 // &amp;lt;FINDLAYER.21.UID&amp;gt; - UID of a container, 10 - how many subcontainers the function goes through, if set 0, it affects only items in container with UID&lt;br /&gt;
	IF (&amp;lt;BASEID&amp;gt; == i_spellbook)&lt;br /&gt;
		REMOVE&lt;br /&gt;
	ENDIF&lt;br /&gt;
ENDFOR&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===FORCONTID===&lt;br /&gt;
FORCONTID is a FOR loop that works in a similar way to FORCONT, except that it will only cycle through items that have a specific BASEID. You can set the amount of subcontainers to loop through, like the FORCONT example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Usage:'''&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[FUNCTION rem_spellbooks2]&lt;br /&gt;
FORCONTID i_spellbook 10&lt;br /&gt;
	REMOVE&lt;br /&gt;
ENDFOR&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===FORCONTTYPE===&lt;br /&gt;
This is another FOR loop that is almost identical to FORCONTYPE. The only difference is that instead of looping through items with a specific BASEID, it will loop through items with a specific TYPE. Following the spellbooks remover example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Usage:'''&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[FUNCTION rem_spellbook3]&lt;br /&gt;
FORCONTTYPE t_spellbook&lt;br /&gt;
	REMOVE&lt;br /&gt;
ENDFOR&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===FORINSTANCES===&lt;br /&gt;
You may have seen scripts that do something like the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[FUNCTION removespawns]&lt;br /&gt;
FORITEMS 9999&lt;br /&gt;
	IF (&amp;lt;BASEID&amp;gt; == i_worldgem_bit)&lt;br /&gt;
		REMOVE&lt;br /&gt;
	ENDIF&lt;br /&gt;
ENDFOR&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At a glance this script looks like a fairly useful script that can be used to remove all of your i_worldgem_bit (spawn) items from the server. If you attempt to run it you will most certainly notice that your server pauses for a signicantly long time (on a well-populated server you may even end up waiting a whole minute for the script to run), even if you only have several instances of the item on the server! The reason that this happens is because ''FORITEMS 9999'' will loop through ''every'' item within the 9999 tile radius, so the code will be looping hundreds or thousands of times when you only wanted to affect a handful of items!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To resolve this issue we have FORINSTANCES. This is a special loop which will loop through all instances of a given character or item BASEID that exist on the server. This offers the following advantages over using ''FORITEMS/FORCHARS 9999'':&lt;br /&gt;
* Sphere will only run your script for objects with the BASEID you are interested in.&lt;br /&gt;
* Sphere knows how many instances of the object exist, so can abort the loop at an appropriate time.&lt;br /&gt;
* Items inside containers (e.g. character backpacks or player banks) will not be missed out.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So with this in mind, the above script can be rewritten to the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[FUNCTION removespawns]&lt;br /&gt;
FORINSTANCES i_worldgem_bit&lt;br /&gt;
	REMOVe&lt;br /&gt;
ENDFOR&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now when you run this script you should notice a significant drop in the execution time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Since Sphere still has to internally search for references to the objects you're after you may find that on well-populate servers there is still a noticable pause. If you need to use this kind of loop then you should do so sparingly, and if you need to regularly use this then you may wish to consider finding a more optimal way of implementing your script(s).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===FORITEMS===&lt;br /&gt;
FORITEMS works in much the same way that FORCHARS does, except it checks for ITEMS within the set radius as opposed to characters. Default obejct is set to the item which can be affected.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A basic example of a function using FORITEMS:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[FUNCTION Spawn_remover]&lt;br /&gt;
FORITEMS 6144 //once again it checks the entire map&lt;br /&gt;
	IF (&amp;lt;TYPE&amp;gt; == t_spawn_char) //if this arguement is met&lt;br /&gt;
		REMOVE //remove it&lt;br /&gt;
	ENDIF //end the IF arguement&lt;br /&gt;
ENDFOR //end the FOR loop &amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===FOROBJS===&lt;br /&gt;
FOROBJS works in the same way that FORITEMS and FORCHARS does with the exception that this loop will find both characters '''AND''' items within the specified radius.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==WHILE==&lt;br /&gt;
WHILE is a ''conditional loop'', a block of code that will repeat itself whilst a given condition is true. Basically you can think of this as being an IF..ENDIF block that will run indefinately until the IF statement returns false.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''ALWAYS AND ALWAYS:'''&lt;br /&gt;
# End WHILE blocks with ENDWHILE.&lt;br /&gt;
# Perform some action within the WHILE block that will change the outcome of the conditional statement.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[FUNCTION remove_all_mems]&lt;br /&gt;
WHILE (&amp;lt;FINDID.i_memory.UID&amp;gt;)   // continue to loop whilst an i_memory item is found inside the object&lt;br /&gt;
	FINDID.i_memory.REMOVE  // remove a memory item&lt;br /&gt;
ENDWHILE&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Whilst inside the loop, LOCAL._WHILE can be used to access the number of times that the script has looped so far. In some situations you may want to use this to impose a 'limit' on how many times your WHILE block can loop before it is forced to exit. An example of this could be:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[FUNCTION random_health]&lt;br /&gt;
WHILE (&amp;lt;HITS&amp;gt; &amp;gt; 10) &amp;amp;&amp;amp; (&amp;lt;LOCAL._WHILE&amp;gt; &amp;lt; 20)  // loop whilst the character has more than 10 health, but no more than 20 times&lt;br /&gt;
	HITS = &amp;lt;R1,100&amp;gt;    // set the character's health to a random value between 1 and 100&lt;br /&gt;
ENDWHILE&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since random numbers are.. random.. it is in theory possible that the health will never be set to a value less than or equal to 10. By checking LOCAL._WHILE inside the WHILE condition we add protection against the script looping indefinately and freezing the server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==TRY==&lt;br /&gt;
&lt;br /&gt;
===TRY===&lt;br /&gt;
TRY can be used to execute a line of script where the left hand side (i.e. a property being set or a function being called) is based on the value of an expression.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, we may have the following script:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;LOCAL.TEST = 05&lt;br /&gt;
SRC.TAG0.MYTAG_&amp;lt;LOCAL.SOME&amp;gt; = 1234&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sphere will add a TAG named &amp;quot;MYTAG_&amp;lt;LOCAL.SOME&amp;gt;&amp;quot; with a value of &amp;quot;1234&amp;quot;, when really we were hoping for &amp;quot;MYTAG_05&amp;quot;. We can use TRY to accomplish this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;LOCAL.TEST = 05&lt;br /&gt;
TRY SRC.TAG0.MYTAG_&amp;lt;LOCAL.SOME&amp;gt; = 1234&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This causes Sphere to evaluate the entire line first, as &amp;quot;&amp;lt;tt&amp;gt;SRC.TAG0.MYTAG_05 = 1234&amp;lt;/tt&amp;gt;&amp;quot; and then run it, giving us the &amp;quot;MYTAG_05&amp;quot; TAG as we were after.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Since 27-11-2006 the TRY function has become obsolete. Sphere will now always evaluate the entire line before executing it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===TRYP===&lt;br /&gt;
This is the same as the TRY function, except that a PLEVEL parameter is also supplied. If SRC's PLEVEL is less than this value then the line will not be executed, for example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;TRYP 4 UID.&amp;lt;TAG.CHARUID&amp;gt;.NAME Yerk&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above line will not be executed if SRC's PLEVEL is less than 4, so it will not run for players but it will to GM and above. This is almost the same as writing:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;IF (&amp;lt;SRC.ACCOUNT.PLEVEL&amp;gt; &amp;gt;= 4)&lt;br /&gt;
	UID.&amp;lt;TAG.CHARUID&amp;gt;.NAME Yerk&lt;br /&gt;
ENDIF&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, with TRYP the line will also run if there is no SRC (in an @Timer trigger, for example). So a more accurate scripted equivalent would be:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;IF !(&amp;lt;SRC&amp;gt;)&lt;br /&gt;
	TRY UID.&amp;lt;TAG.CHARUID&amp;gt;.NAME Yerk&lt;br /&gt;
ELSEIF (&amp;lt;SRC.ACCOUNT.PLEVEL&amp;gt; &amp;gt;= 4)&lt;br /&gt;
	TRY UID.&amp;lt;TAG.CHARUID&amp;gt;.NAME Yerk&lt;br /&gt;
ENDIF&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===TRYSRC===&lt;br /&gt;
As already mentioned in a previous chapter, the TRYSRC function can be used to override the SRC object for a given line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The syntax for this function is &amp;lt;tt&amp;gt;TRYSRC uid command&amp;lt;/tt&amp;gt;, where &amp;lt;tt&amp;gt;uid&amp;lt;/tt&amp;gt; is the UID of the character who you want to become SRC, and &amp;lt;tt&amp;gt;command&amp;lt;/tt&amp;gt; is the command you want to execute.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;ON=@Timer&lt;br /&gt;
	// place 5000 gold coins in LINK's backpack&lt;br /&gt;
	SERV.NEWITEM i_gold&lt;br /&gt;
	NEW.AMOUNT = 5000&lt;br /&gt;
	TRYSRC &amp;lt;LINK.UID&amp;gt; NEW.BOUNCE // the BOUNCE function places an item into SRC's backpack&lt;br /&gt;
	RETURN 1&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===TRYSRV===&lt;br /&gt;
TRYSRV is similar to the TRYSRC command except that rather than running a command with a specific character as SRC, the command is instead executed with SRC set to the SERV object.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This can be desirable in the following situations:&lt;br /&gt;
* Certain properties of accounts, such as passwords, are protected against being accessed unless SRC has a PLEVEL of 7 (owner). It would be incredibly dangerous and unwise to set a player's PLEVEL to 7, even temporarily, but the SERV object is always considered to have a PLEVEL of 7.&lt;br /&gt;
* Certain functions/commands behave differently with a character as SRC, for example:&lt;br /&gt;
** SERV.NEWNPC will automatically set the new NPC's position to beside the SRC character. By using &amp;lt;tt&amp;gt;TRYSRV SERV.NEWNPC&amp;lt;/tt&amp;gt; you can avoid players seeing an NPC 'flicker' on and off their screen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SERV==&lt;br /&gt;
&lt;br /&gt;
===CHARDEF===&lt;br /&gt;
Let's say you wanted to retrieve the DAM property from, say, a Liche. Because DAM isn't a character property, we can only get the property from the CHARDEF. (Technically, there is a DAM property for characters, but it is not what we're looking for.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[FUNCTION f_return_char_prop]&lt;br /&gt;
LOCAL.DAM = &amp;lt;SERV.CHARDEF.&amp;lt;ARGS&amp;gt;.DAM&amp;gt;&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With the above example, Sphere will take the argument passed (ARGS), then try to store the DAM property from the corresponding CHARDEF into LOCAL.DAM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Pretty simple, right? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===ITEMDEF===&lt;br /&gt;
This works similar to SERV.CHARDEF, only it works on ITEMDEFs. Let's say you wanted to get the SKILL property from a character's equipped weapon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here's an example: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[FUNCTION f_return_wep_skill]&lt;br /&gt;
LOCAL.WEP_SKILL = &amp;lt;SERV.ITEMDEF.&amp;lt;ARGS&amp;gt;.SKILL&amp;gt;&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That would store the SKILL property of whatever ITEMDEF passed (ARGS) into LOCAL.WEP_SKILL. And this can get much more complex. As an example, I recently wrote a script that does the following:&lt;br /&gt;
* Use QVAL to find the equipped weapon. &lt;br /&gt;
* Store the weapon found in REF1. &lt;br /&gt;
* Check to see if REF1 returned a weapon UID. &lt;br /&gt;
* Store the DAM property for the weapon in LOCAL.WEP_DAM. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[FUNCTION f_weapon_dam]&lt;br /&gt;
REF1 = &amp;lt;QVAL &amp;lt;FINDLAYER.1.UID&amp;gt; ? &amp;lt;FINDLAYER.1.UID&amp;gt; : &amp;lt;FINDLAYER.2.UID&amp;gt;&amp;gt;&lt;br /&gt;
IF (&amp;lt;REF1&amp;gt;) // REF1 is true; weapon found.&lt;br /&gt;
    LOCAL.WEP_DAM = &amp;lt;SERV.ITEMDEF.&amp;lt;REF1.BASEID&amp;gt;.DAM&amp;gt;&lt;br /&gt;
ENDIF&lt;br /&gt;
RETURN &amp;lt;LOCAL.WEP_DAM&amp;gt;&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That's not too complex, is it? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===LOG===&lt;br /&gt;
This functions is very good if you want to see when a player makes something or say something or when want to know the result of formulas in your scripts. This, is for writing messages onto the console (and logs). It is really simple to use:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;SERV.LOG Hi world&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And when you look at console it shows something like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript color=&amp;quot;darkgreen&amp;quot;&amp;gt;21:56:(YourScript.scp,2)Hi world&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Easy and useful.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If for some reason you don't want the script name to appear in the log, prefix your log message with the '@' character (prefix the message with two '@' characters (@@) if you actually want to start the message with the @ symbol.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===MAP===&lt;br /&gt;
The SERV.MAP function allows you to read the properties of a specific point on a map. There are two syntaxes that can be used:&lt;br /&gt;
# &amp;lt;tt&amp;gt;&amp;amp;lt;SERV.MAP(x,y,map)&amp;amp;gt;.KEY&amp;lt;/tt&amp;gt;&lt;br /&gt;
# &amp;lt;tt&amp;gt;&amp;amp;lt;SERV.MAP(x,y,z,map)&amp;amp;gt;.KEY&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may notice a slight 'peculiarity' in these syntaxes and you should be aware of them so that they don't catch you out: When there are 3 parameters given, the third parameter is used as the map number to access. When 4 parameters are given, the third parameter is the height (Z) and the fourth becomes the map number.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The KEY can be a number of things:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| ISNEARTYPE type distance checkmulti || Returns 1 if an item exists near the point within &amp;amp;lt;distance&amp;amp;gt; tiles. If &amp;amp;lt;checkmulti&amp;amp;gt; is 1 then multi components will also be checked.&lt;br /&gt;
|-&lt;br /&gt;
| REGION || Access the REGION at the map point.&lt;br /&gt;
|-&lt;br /&gt;
| ROOM || Access the ROOM at the map point.&lt;br /&gt;
|-&lt;br /&gt;
| SECTOR || Access the SECTOR at the map point.&lt;br /&gt;
|-&lt;br /&gt;
| STATICS || The number of static items at the map point.&lt;br /&gt;
|-&lt;br /&gt;
| STATICS.n.ID || The ID of the nth static item at the map point (n starts at 0)&lt;br /&gt;
|-&lt;br /&gt;
| STATICS.n.COLOR || The COLOR of the nth static item at the map point (n starts at 0)&lt;br /&gt;
|-&lt;br /&gt;
| STATICS.n.Z || The Z level of the nth static item at the map point (n starts at 0)&lt;br /&gt;
|-&lt;br /&gt;
| STATICS.n.* || If the STATICS.n.KEY does not match any of the above properties, the value will be taken from the static's ITEMDEF in the scripts&lt;br /&gt;
|-&lt;br /&gt;
| TERRAIN || The ID of the terrain at the map point.&lt;br /&gt;
|-&lt;br /&gt;
| TYPE || The type of terrain at the map point.&lt;br /&gt;
|-&lt;br /&gt;
| X, Y, Z, M, MAP || Access the X/Y/Z/MAP values at the map point.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===NEWDUPE===&lt;br /&gt;
When you use the &amp;lt;font color=&amp;quot;darkred&amp;quot;&amp;gt;.DUPE&amp;lt;/font&amp;gt; command you can create a 'clone' of a targeted item. The NEWDUPE function allows this functionality to be reproduced within scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The syntax of the function is &amp;lt;tt&amp;gt;NEWDUPE uid&amp;lt;/tt&amp;gt;, where uid is the UID of the object you want to clone. After running this function, the SERV.NEW reference will be set to the newly cloned item. You should know that it creates the 'duped' item exactly on the same spot where the targeted item exists. So you may have to move it anywhere else or it will maybe crush your stack.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is an example, the script below will clone the character's weapon and place it in their backpack:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[FUNCTION f_dupeweapon]&lt;br /&gt;
IF (&amp;lt;WEAPON.UID&amp;gt;)&lt;br /&gt;
	SERV.NEWDUPE &amp;lt;WEAPON&amp;gt;&lt;br /&gt;
	BOUNCE &amp;lt;NEW.UID&amp;gt;&lt;br /&gt;
ENDIF&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===NEWITEM===&lt;br /&gt;
This is an easy function, used to create items. Many of you learned in 55i tutorials the format of NEWITEM, well, this changed on 56b and this is mainly to explain that change.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you can't use this function on some player, you have to create it on SERV. Also, the reference to the new item isn't SRC.ACT anymore. It changed to NEW, so, if i want to create an item with the color 9, it will look like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;SERV.NEWITEM i_example&lt;br /&gt;
NEW.COLOR 9&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see, it is really easy to use. There are also additional parameters that can be optionally passed into NEWITEM:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;NEWITEM id, amount, cont&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So if I want to create 3 i_test in SRC's backpack I should do:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;SERV.NEWITEM i_test, 3, &amp;lt;SRC.FINDLAYER.21.UID&amp;gt;&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Easy, uh? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===NEWNPC===&lt;br /&gt;
This function can be used to create NPCs in the world. The syntax is &amp;lt;tt&amp;gt;NEWNPC id&amp;lt;/tt&amp;gt;, where &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; is the BASEID of the character you wish to create. The newly created character can be accessed via the NEW reference.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following function creates a headless and moves it to within 10 tiles of the default object.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[FUNCTION f_createnpc]&lt;br /&gt;
SERV.NEWNPC c_headless&lt;br /&gt;
NEW.MOVENEAR &amp;lt;UID&amp;gt; 10&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note''' It is also possible to create player characters this way, by setting the ACCOUNT property after creating the new character.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===SKILL===&lt;br /&gt;
Well, this is an easy function, like the others. This one refers to the SKILL section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can see the skill properties in sphere_skills.scp. I'll explain how it works:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;LOCAL.SKILL = &amp;lt;SERV.SKILL.&amp;lt;ACTION&amp;gt;.KEY&amp;gt;&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With that line you get the Skill Key (Alchemy, ex.).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are 3 ways to use SERV.SKILL: Key, Defname, Number.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Any of them are accepted, and if you see, in most of the cases people use Action to get the Key and get the player skill amount.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can find many uses for it, all you need is some imagination.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Wuffel</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=TARGETF&amp;diff=7574</id>
		<title>TARGETF</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=TARGETF&amp;diff=7574"/>
				<updated>2014-04-05T14:33:04Z</updated>
		
		<summary type="html">&lt;p&gt;Wuffel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Targetf is a command you can use to directly target a character or item and using a function on it without manually creating an memory item or such. Using the targetf itself works like calling an ordinary function and you can put arguments after the function normally. &lt;br /&gt;
&lt;br /&gt;
ex. targetf f_hello or targetf f_hello 1,2 &lt;br /&gt;
&lt;br /&gt;
In targetf: &lt;br /&gt;
&lt;br /&gt;
SRC= player using the function &lt;br /&gt;
&lt;br /&gt;
ARGO= target's UID &lt;br /&gt;
&lt;br /&gt;
Remember that using ARGO doesn't work directly like SRC. I.e. src.name but you have to use it via UID as uid.&amp;lt;argo&amp;gt;.name.&lt;br /&gt;
&lt;br /&gt;
local.id stores the ID of the targeted object&lt;br /&gt;
[[Category:Reference Compendium]]&lt;br /&gt;
[[Category: Properties and Functions]]&lt;/div&gt;</summary>
		<author><name>Wuffel</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=CHARDEF&amp;diff=7573</id>
		<title>CHARDEF</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=CHARDEF&amp;diff=7573"/>
				<updated>2014-04-05T14:32:12Z</updated>
		
		<summary type="html">&lt;p&gt;Wuffel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|CHARDEF}}&lt;br /&gt;
&lt;br /&gt;
__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
A CHARDEF block defines the basic properties of a [[Characters|character]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Properties==&lt;br /&gt;
Here is a list of all character definition properties.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Name''' || '''Read/Write''' || '''Override&amp;amp;dagger;''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| [[ANIM]] || RW || ?? || Gets or sets a mask of animations that the character supports.  The default value is 0ffffff.&lt;br /&gt;
|-&lt;br /&gt;
| [[ARMOR]] || RW || ?? || Gets or sets the character's base defense without armour.&lt;br /&gt;
|-&lt;br /&gt;
| [[AVERSIONS]] || RW || ?? || Gets or sets a list of things that the character does not like.&lt;br /&gt;
|-&lt;br /&gt;
| [[BASEID]] || R || ?? || Gets the defname of the character if set, otherwise the ID.&lt;br /&gt;
|-&lt;br /&gt;
| [[BLOODCOLOR]] || RW || ?? || Gets or sets the character's blood colour (a value of -1 prevents the creature from bleeding at all.)&lt;br /&gt;
|-&lt;br /&gt;
| [[CAN]] || RW || ?? || Gets or sets attributes for the character. See can_flags in sphere_defs.scp.&lt;br /&gt;
|-&lt;br /&gt;
| [[COLOR]] || RW || ?? || Gets or sets the character colour.&lt;br /&gt;
|-&lt;br /&gt;
| [[DAM]] ''min,max'' || RW || ?? || Gets or sets the base damage that the character will deal without a weapon.&lt;br /&gt;
|-&lt;br /&gt;
| [[DAM]].LO || R || ?? || Gets the minimum base damage the character will deal without a weapon.&lt;br /&gt;
|-&lt;br /&gt;
| [[DAM]].HI || R || ?? || Gets the maximum base damage the character will deal without a weapon.&lt;br /&gt;
|-&lt;br /&gt;
| [[DEFNAME]] || RW || ?? || Gets or sets defname of the character.&lt;br /&gt;
|-&lt;br /&gt;
| [[DESIRES]] || RW || ?? || Gets or sets a list of things that the character likes.&lt;br /&gt;
|-&lt;br /&gt;
| [[DEX]] || RW || ?? || Gets or sets the dexterity that is set when a character polymorphs into this character.&lt;br /&gt;
|-&lt;br /&gt;
| [[DISPID]] || R || ?? || Gets the ID that the character displays as.&lt;br /&gt;
|-&lt;br /&gt;
| [[FOODTYPE]] || RW || ?? || Gets or sets a list of things that the character can eat.&lt;br /&gt;
|-&lt;br /&gt;
| [[HEIGHT]] || RW || ?? || Gets or sets the height of the character.&lt;br /&gt;
|-&lt;br /&gt;
| [[HIREDAYWAGE]] || RW || ?? || Gets or sets how much gold is needed to hire the character for one day.&lt;br /&gt;
|-&lt;br /&gt;
| [[ICON]] || RW || ?? || Gets or sets the item that can be used to represent the character in figurine form.&lt;br /&gt;
|-&lt;br /&gt;
| [[ID]] || RW || ?? || Gets or sets the ID of the character to inherit property values from.&lt;br /&gt;
|-&lt;br /&gt;
| [[INSTANCES]] || R || ?? || Returns the number of this character that exist in the world.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT]] || RW || ?? || Gets or sets the intelligence that is set when a character polymorphs into this character.&lt;br /&gt;
|-&lt;br /&gt;
| [[JOB]] || R || ?? || Gets the character's job title.&lt;br /&gt;
|-&lt;br /&gt;
| [[MAXFOOD]] || R || ?? || Gets the maximum food level that the character can have.&lt;br /&gt;
|-&lt;br /&gt;
| [[MOVERATE]] || RW || Y || Gets or sets the percent movement rate of the character.  The higher it is, the slower the NPC will be.  If undefined, the default is 100.&lt;br /&gt;
|-&lt;br /&gt;
| [[NAME]] || RW || ?? || Gets or sets the name of the character.&lt;br /&gt;
|-&lt;br /&gt;
| [[RANGE]] ''min, max'' || RW || Y || Gets or sets the attack range of the character.&lt;br /&gt;
|-&lt;br /&gt;
| [[RANGEH]] || R || ?? || Gets the maximum attack range of the character.&lt;br /&gt;
|-&lt;br /&gt;
| [[RANGEL]] || R || ?? || Gets the minimum attack range of the character.&lt;br /&gt;
|-&lt;br /&gt;
| [[RESDISPDNHUE]] || RW || ?? || Gets or sets the colour to display as to clients who don't have a high enough [[RESDISP]] to see the character.&lt;br /&gt;
|-&lt;br /&gt;
| [[RESDISPNID]] || RW || ?? || Gets or sets the character ID to display as to clients who don't have a high enough [[RESDISP]] to see the character.&lt;br /&gt;
|-&lt;br /&gt;
| [[RESLEVEL]] || RW || ?? || Gets or sets the minimum [[RESDISP]] required for a client to see the character.&lt;br /&gt;
|-&lt;br /&gt;
| [[RESOURCES]] || RW || ?? || Gets or sets the resources that the character is made of.&lt;br /&gt;
|-&lt;br /&gt;
| [[RESOURCES]]''.COUNT'' || R || ?? || Gets the number of different resources that the character is made of.&lt;br /&gt;
|-&lt;br /&gt;
| [[RESOURCES]]''.n.KEY'' || R || ?? || Gets the [[BASEID]] of the nth resource that the character is made of. (zero-based)&lt;br /&gt;
|-&lt;br /&gt;
| [[RESOURCES]]''.n.VAL'' || R || ?? || Gets the amount of the nth resource that the character is made of. (zero-based)&lt;br /&gt;
|-&lt;br /&gt;
| [[SOUND]] || RW || ?? || Gets or sets the generic sound that the character makes.&lt;br /&gt;
|-&lt;br /&gt;
| [[STR]] || RW || ?? || Gets or sets the strength that is set when a character polymorphs into this character.&lt;br /&gt;
|-&lt;br /&gt;
| [[TAG]]''.name'' || RW || ?? || Gets or sets the value of a TAG.&lt;br /&gt;
|-&lt;br /&gt;
| [[THROWDAM]] ''min,max'' || RW || y || Gets or sets a range of damage used for thrown objects.&lt;br /&gt;
|-&lt;br /&gt;
| [[THROWDAM]] ''dam'' || RW || y || Gets or sets the constant damage used for thrown objects.&lt;br /&gt;
|-&lt;br /&gt;
| [[THROWOBJ]] ''id'' || RW || y || Gets or sets the ID of an object to be thrown by NPCs.&lt;br /&gt;
|-&lt;br /&gt;
| [[THROWRANGE]] ''min,max'' || RW || y || Gets or sets the range that an object can be thrown at.&lt;br /&gt;
|-&lt;br /&gt;
| [[THROWRANGE]] ''max'' || RW || y || Gets or sets the range that an object can be thrown at with a default min of 2.&lt;br /&gt;
|-&lt;br /&gt;
| [[TSPEECH]] ''speech_defname'' || RW || ?? || Gets a list of speech handlers for the character, or adds a speech handler to the character.&lt;br /&gt;
|-&lt;br /&gt;
| [[TEVENTS]] ''event_defname'' || RW || ?? || Gets a list of event handlers for the character, or adds an event handler to the character.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''&amp;amp;dagger;'''  Some properties can be overridden on a individual character basis.  For example, you can set TAG.OVERRIDE.MOVERATE on a specific NPC to speed up or slow down the speed at which that one NPC will move.&lt;br /&gt;
&lt;br /&gt;
==INI Overrides==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
! '''Name''' !! '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| TAG.OVERRIDE.RUNNINGPENALTY || This special tag overrides the INI setting of the same name on a per character basis.&lt;br /&gt;
|-&lt;br /&gt;
| TAG.OVERRIDE.STAMINALOSSATWEIGHT || This special tag overrides the INI setting of the same name on a per character basis.&lt;br /&gt;
|}&lt;br /&gt;
==Others==&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
! '''Name''' !! '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| TAG.NoMoveTill|| doesn't allow char to move if TAG.NoMoveTill &amp;gt; SERV.Time&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
This first example shows a &amp;quot;base&amp;quot; CHARDEF... these are identified by the fact that the CHARDEF keyword is followed by a number:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[CHARDEF 01]        // This is a &amp;quot;base&amp;quot; chardef for character animation 01 (from the mul/uop files)&lt;br /&gt;
// This is the start of the &amp;quot;base&amp;quot; properties.&lt;br /&gt;
// Values set in the base properties cannot have a range (you cannot use {1 10})&lt;br /&gt;
DEFNAME=c_ogre                    // The DEFNAME is a friendly name to reference this CHARDEF&lt;br /&gt;
NAME=ogre                         // This is the creature's name as seen in-game&lt;br /&gt;
ICON=i_pet_ogre                   // If the creature is shrunk, this is the item that will result&lt;br /&gt;
SOUND=snd_monster_ogre1           // This is the start of the sound entries for this creature&lt;br /&gt;
CAN=MT_WALK|MT_USEHANDS|MT_EQUIP  // These flags are defined in the can_flags area of sphere_defs.scp&lt;br /&gt;
DAM=18,22                         // This is the range of damage they creature will cause when not using a weapon&lt;br /&gt;
ARMOR=30                          // ARMOR is the physical damage resistance *before* additional armor is equipped&lt;br /&gt;
DESIRES=r_forests,t_gold,t_coin,t_gem,t_arock&lt;br /&gt;
AVERSIONS=t_trap,r_civilization&lt;br /&gt;
FOODTYPE=35 t_meat_raw            // This is the maximum amount (and types) of food the creature eats&lt;br /&gt;
RESOURCES=2 i_ribs_raw            // If this creature's corpse is carved, these resources will be created&lt;br /&gt;
BLOODCOLOR=colors_blood           // This is the color of this creatures blood&lt;br /&gt;
MOVERATE=100&lt;br /&gt;
TAG.Barding.Diff=48.8             // When a TAG is added to the &amp;quot;base properties&amp;quot;, all existing creatures are affected&lt;br /&gt;
TAG.SlayerGroup=OGRE,REPOND&lt;br /&gt;
TEVENTS=e_carnivores2             // EVENTS are collections of triggers used by CHARDEFs. Each TEVENT must be on its own line.&lt;br /&gt;
CATEGORY=Monsters                 // CATEGORY, SUBSECTION, and DESCRIPTION are used by the GM tool &amp;quot;Axis&amp;quot;&lt;br /&gt;
SUBSECTION=Giants&lt;br /&gt;
DESCRIPTION=Ogre&lt;br /&gt;
&lt;br /&gt;
// This is the end of the &amp;quot;base&amp;quot; properties, and the start of the &amp;quot;triggers&amp;quot;.&lt;br /&gt;
// You can override *most* base properties in a trigger if necessary.&lt;br /&gt;
&lt;br /&gt;
ON=@Create                        // This is the @Create trigger&lt;br /&gt;
   NAME=#NAMES_OGRE               // #NAMES_OGRE is an array of names defined in sphere_names.scp&lt;br /&gt;
   TITLE=the ogre&lt;br /&gt;
   NPC=brain_monster              // The available &amp;quot;brains&amp;quot; are defined in sphere_defs.scp&lt;br /&gt;
   FAME={1500 1999}               // The { } marks are used to set a range of possible values&lt;br /&gt;
   KARMA={-1500 -1999}&lt;br /&gt;
   STR={165 195}&lt;br /&gt;
   MAXHITS={100 120}              // If MAXHITS is not set, the default value is the same as STR&lt;br /&gt;
   DEX={45 65}&lt;br /&gt;
   MAXSTAM={45 65}                // If MAXSTAM is not set, the default value is the same as DEX&lt;br /&gt;
   INT={45 70}&lt;br /&gt;
   MAXMANA={45 70}                // If MAXMANA is not set, the default value is the same as INT&lt;br /&gt;
   MAGICRESISTANCE={55.0 70.0}&lt;br /&gt;
   PARRYING={60.0 70.0}&lt;br /&gt;
   TACTICS={60.0 70.0}&lt;br /&gt;
   WRESTLING={70.0 80.0}&lt;br /&gt;
   MODAR={0 5}                    // Setting MODAR in @Create lets us add o-5 more ARMOR to this creature&lt;br /&gt;
   RESCOLD={15 25}&lt;br /&gt;
   RESENERGY={15 25}&lt;br /&gt;
   RESFIRE={15 25}&lt;br /&gt;
   RESPOISON={15 25}&lt;br /&gt;
ON=@NPCRestock&lt;br /&gt;
   ITEM=loot_ogre                 // This references a TEMPLATE in the sphere_templates_loot.scp file&lt;br /&gt;
&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Reference Compendium]]&lt;br /&gt;
[[Category: Definitions]]&lt;/div&gt;</summary>
		<author><name>Wuffel</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=@StatChange&amp;diff=7572</id>
		<title>@StatChange</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=@StatChange&amp;diff=7572"/>
				<updated>2014-04-03T12:07:24Z</updated>
		
		<summary type="html">&lt;p&gt;Wuffel: /* Return Values */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Description==&lt;br /&gt;
This trigger fires when a character's strength, dexterity, intelligence, food, maxhits, maxmana or maxstam is changed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Fires on:&lt;br /&gt;
* [[Characters]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
The following object references are explicitly available for this trigger:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Name''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| [[I]] || The [[Characters|character]] whose strength, dexterity or intelligence is being changed.&lt;br /&gt;
|-&lt;br /&gt;
| [[SRC]] || The [[Characters|character]] whose strength, dexterity or intelligence is being changed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Arguments==&lt;br /&gt;
The following arguments are set for this trigger. If an argument is marked as &amp;quot;In&amp;quot; then a value will be passed in to the trigger, if an argument is marked as &amp;quot;Out&amp;quot; then it can be set to a value to affect Sphere's behaviour:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Argument''' || '''In/Out''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| ARGN1 || In || The stat being changed.&lt;br /&gt;
{| cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Value''' || '''Stat'''&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Strength&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Intelligence&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Dexterity&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Food&lt;br /&gt;
|-&lt;br /&gt;
| 4 || MaxHits&lt;br /&gt;
|-&lt;br /&gt;
| 5 || MaxMana&lt;br /&gt;
|-&lt;br /&gt;
| 6 || MaxStam&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Maxfood&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Modstr&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Modint&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Moddex&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| ARGN2 || In || The current stat value.&lt;br /&gt;
|-&lt;br /&gt;
| ARGN3 || I/O || The new stat value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Return Values==&lt;br /&gt;
The following return values are explicitly defined for this trigger:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Return Value''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Prevents the character's stat from being changed, even if argn3 has been changed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Reference Compendium]]&lt;br /&gt;
[[Category: Triggers]]&lt;/div&gt;</summary>
		<author><name>Wuffel</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=@Success&amp;diff=7571</id>
		<title>@Success</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=@Success&amp;diff=7571"/>
				<updated>2014-03-30T15:45:04Z</updated>
		
		<summary type="html">&lt;p&gt;Wuffel: /* Return Values */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Description==&lt;br /&gt;
This trigger fires when an attempt to use skill has succeeded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Fires on:&lt;br /&gt;
* [[SKILL|Skills]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
The following object references are explicitly available for this trigger:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Name''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| [[I]] || The [[Characters|character]] succeeding the skill attempt.&lt;br /&gt;
|-&lt;br /&gt;
| [[SRC]] || The [[Characters|character]] succeeding the skill attempt.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Arguments==&lt;br /&gt;
The following arguments are set for this trigger. If an argument is marked as &amp;quot;In&amp;quot; then a value will be passed in to the trigger, if an argument is marked as &amp;quot;Out&amp;quot; then it can be set to a value to affect Sphere's behaviour:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Argument''' || '''In/Out''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| ARGN1 || I || The skill number that has succeeded.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Return Values==&lt;br /&gt;
The following return values are explicitly defined for this trigger:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Return Value''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Aborts the skill attempt.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Aborts the skill, but grants Skillgain. &lt;br /&gt;
|-&lt;br /&gt;
| 2 || Aborts the skill, but grants Skillgain. &lt;br /&gt;
|- &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Reference Compendium]]&lt;br /&gt;
[[Category: Triggers]]&lt;/div&gt;</summary>
		<author><name>Wuffel</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=TYPEDEF&amp;diff=7570</id>
		<title>TYPEDEF</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=TYPEDEF&amp;diff=7570"/>
				<updated>2014-03-26T22:08:23Z</updated>
		
		<summary type="html">&lt;p&gt;Wuffel: /* Built-in Types */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|TYPEDEF}}&lt;br /&gt;
&lt;br /&gt;
__FORCETOC__&lt;br /&gt;
Type definitions are the equivalent of [[EVENTS]] that can be attached to [[Items|items]]. There are different properties that can be used to attach a type block to an item or set of items:&lt;br /&gt;
* [[ITEMDEF|item definitions]] via their [[TYPE]] and/or [[TEVENTS]] property.&lt;br /&gt;
* [[Items|items]] via their [[TYPE]] and/or [[EVENTS (Property)|EVENTS]] property.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In addition to handling triggers, type definitions can also be used to define different types of terrain. This can be used to affect the return value of the [[TYPE]] property on [[Map points|map points]], or for some hardcoded types such as t_rock it can be used to define which terrain IDs Sphere should consider to be rock when the mining skill is used.&lt;br /&gt;
&lt;br /&gt;
==Built-in Types==&lt;br /&gt;
&lt;br /&gt;
The built-in types are all listed in the sphere_defs.scp file.  The table below only lists some of the built-in types and it is VERY weak on actual details...so use with care.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
! DEFNAME !! Number !! Description&lt;br /&gt;
|- &lt;br /&gt;
| t_normal || 0 || No built-in behavior.&lt;br /&gt;
|- &lt;br /&gt;
| t_container and t_container_locked || 1 and 2 || These types are used for containers.  They leverage the following properties:&lt;br /&gt;
* MORE1 = &amp;quot;ID&amp;quot; from the key that can unlock this item (If the MORE1 of the key matches the MORE1 of the container then they are linked)&lt;br /&gt;
* MORE2 = The lock complexity (how hard it is to pick the lock)&lt;br /&gt;
* MOREX = The trap type (not used yet?)&lt;br /&gt;
* TDATA2 = The gumpID of the container (this is not an ITEMDEF)&lt;br /&gt;
* TDATA3 = The minimum gump size&lt;br /&gt;
* TDATA4 = The maximum gump size&lt;br /&gt;
* LINK = UID of a secondary key?&lt;br /&gt;
|- &lt;br /&gt;
| t_door or t_door_locked || 3 or 4 || This type is used for both unlocked and locked doors.  They leverage the following properties:&lt;br /&gt;
* MORE1 = UID of this door's key (if it has one)&lt;br /&gt;
* TDATA1 = ID for the sound it makes when double clicked&lt;br /&gt;
|- &lt;br /&gt;
| t_key || 5 || This type is used for keys.  It leverages the following properties:&lt;br /&gt;
* MORE1 = &amp;quot;ID&amp;quot; of the item(s) this key can unlock (if the MORE1 of the key matches the MORE1 of the container/door then they are linked)&lt;br /&gt;
* LINK = If this is set to the UID of a &amp;quot;multi&amp;quot; object (like a house) the key can open all doors/containers in that multi?&lt;br /&gt;
'''Note:''' Keys, containers, and doors are interesting. If both a key and a door/container contain the same arbitrary MORE1 value, the key can be used to lock or unlock the door/container.  That action changes the TYPE of the door/container to indicate whether it is locked or not. It also seems like LINK on the key can be set to the UID of a multi so that it can be used to open all doors/containers inside that multi.&lt;br /&gt;
|-&lt;br /&gt;
| t_light_lit || 6 || This type is used for light sources that can be turned on or off.  It leverages the following properties:&lt;br /&gt;
* MOREY = Number of charges before the item is consumed&lt;br /&gt;
* MOREZ = Type of light pattern it will cast&lt;br /&gt;
|- &lt;br /&gt;
| t_light_out || 7 || This type is used for light sources that can be turned on or off.  It leverages the following properties:&lt;br /&gt;
* MOREY = Number of charges before the item is consumed&lt;br /&gt;
* MOREZ = Type of light pattern it will cast&lt;br /&gt;
|- &lt;br /&gt;
| t_food || 8 || This type is used for edible food.  It leverages the following properties:&lt;br /&gt;
* MORE2 = The ID of the creature that this came from&lt;br /&gt;
* MOREM = Is the amount (0 to 127) of &amp;quot;food units&amp;quot; that will be gained when the item is used (eaten)&lt;br /&gt;
* MOREZ = Is the poison level of the food&lt;br /&gt;
'''Note:''' The following properties may also exist depending on your server version:&lt;br /&gt;
* MOREX = The ID of a spell effect that will be gained when eaten&lt;br /&gt;
* MOREY = The strength of the spell effect&lt;br /&gt;
|- &lt;br /&gt;
| t_food_raw || 9 || This type is used for ''raw'' food.  It leverages the following properties:&lt;br /&gt;
* MORE1 = ID of the item it makes when cooked (the default is i_unused and if defined, it will override TDATA1)&lt;br /&gt;
* MORE2 = The ID of the creature that this came from&lt;br /&gt;
* MOREM = Is the amount (0 to 127) of &amp;quot;food units&amp;quot; that will be gained when the item is used (eaten)&lt;br /&gt;
* MOREZ = Is the poison level of the food&lt;br /&gt;
* TDATA1 = The item ID this cooks into&lt;br /&gt;
'''Note:''' The following properties may also exist depending on your server version:&lt;br /&gt;
* MOREX = The ID of a spell effect that will be gained when eaten&lt;br /&gt;
* MOREY = The strength of the spell effect&lt;br /&gt;
* TDATA2 = The creature ID type that the food came from&lt;br /&gt;
* TDATA3 = The amount of skill required to cook it (did this ever work?)&lt;br /&gt;
|- &lt;br /&gt;
| t_armor || 10 || This type is used for armor.  It leverages the following properties:&lt;br /&gt;
* MORE1L = Max hitpoints&lt;br /&gt;
* MORE1H = Current hitpoints&lt;br /&gt;
* MOREX = Spell effect when worn (for example, setting MOREX=1 causes a permanent Clumsy effect)&lt;br /&gt;
* MOREY = There are two possible effects of setting MOREY:&lt;br /&gt;
*# If MOREX is set, then MOREY is the power/effect of that spell&lt;br /&gt;
*# If the ATTR includes attr_magic, then there is an AR bonus (how is this calculated?)&lt;br /&gt;
'''Note:''' Old versions of sphere stored remaining charges in MORE2, this is no longer true.&lt;br /&gt;
|- &lt;br /&gt;
| t_weapon_mace_smith || 11 || This type is used for macefighting weapons that can also be used by blacksmiths to forge items.  It leverages the following properties:&lt;br /&gt;
* MORE1L = Max hitpoints&lt;br /&gt;
* MORE1H = Current hitpoints&lt;br /&gt;
* MOREY = Attack bonus (percentage), but only if ATTR &amp;amp; attr_magic&lt;br /&gt;
The following overrides can be set on a per item basis:&lt;br /&gt;
* TAG.OVERRIDE.DAMAGETYPE = can be used on a per item basis to override the types of damage this weapon does&lt;br /&gt;
* TAG.OVERRIDE.SOUND_HIT = can be used on a per item basis to override the sound this weapon makes when it hits&lt;br /&gt;
* TAG.OVERRIDE.SOUND_MISS = can be used on a per item basis to override the sound this weapon makes when it misses&lt;br /&gt;
|- &lt;br /&gt;
| t_weapon_mace_sharp || 12 || This type is used for macefighting weapons that have sharp cutting edges.  It leverages the following properties:&lt;br /&gt;
* MORE1L = Max hitpoints&lt;br /&gt;
* MORE1H = Current hitpoints&lt;br /&gt;
* MOREY = Attack bonus (percentage), but only if ATTR &amp;amp; attr_magic&lt;br /&gt;
The following overrides can be set on a per item basis:&lt;br /&gt;
* TAG.OVERRIDE.DAMAGETYPE = can be used on a per item basis to override the types of damage this weapon does&lt;br /&gt;
* TAG.OVERRIDE.SOUND_HIT = can be used on a per item basis to override the sound this weapon makes when it hits&lt;br /&gt;
* TAG.OVERRIDE.SOUND_MISS = can be used on a per item basis to override the sound this weapon makes when it misses&lt;br /&gt;
|- &lt;br /&gt;
| t_weapon_sword || 13 || This type is used for swordsmanship weapons.  It leverages the following properties:&lt;br /&gt;
* MORE1L = Max hitpoints&lt;br /&gt;
* MORE1H = Current hitpoints&lt;br /&gt;
* MOREY = Attack bonus (percentage), but only if ATTR &amp;amp; attr_magic&lt;br /&gt;
The following overrides can be set on a per item basis:&lt;br /&gt;
* TAG.OVERRIDE.DAMAGETYPE = can be used on a per item basis to override the types of damage this weapon does&lt;br /&gt;
* TAG.OVERRIDE.SOUND_HIT = can be used on a per item basis to override the sound this weapon makes when it hits&lt;br /&gt;
* TAG.OVERRIDE.SOUND_MISS = can be used on a per item basis to override the sound this weapon makes when it misses&lt;br /&gt;
|- &lt;br /&gt;
| t_weapon_fence || 14 || This type is used for fencing weapons.  It leverages the following properties:&lt;br /&gt;
* MORE1L = Max hitpoints&lt;br /&gt;
* MORE1H = Current hitpoints&lt;br /&gt;
* MOREY = Attack bonus (percentage), but only if ATTR &amp;amp; attr_magic&lt;br /&gt;
The following overrides can be set on a per item basis:&lt;br /&gt;
* TAG.OVERRIDE.DAMAGETYPE = can be used on a per item basis to override the types of damage this weapon does&lt;br /&gt;
* TAG.OVERRIDE.SOUND_HIT = can be used on a per item basis to override the sound this weapon makes when it hits&lt;br /&gt;
* TAG.OVERRIDE.SOUND_MISS = can be used on a per item basis to override the sound this weapon makes when it misses&lt;br /&gt;
|- &lt;br /&gt;
| t_weapon_bow || 15 || This type is used for archery weapons (bow or crossbow).  It leverages the following properties:&lt;br /&gt;
* MORE1L = Max hitpoints&lt;br /&gt;
* MORE1H = Current hitpoints&lt;br /&gt;
* MOREY = Attack bonus (percentage), but only if ATTR &amp;amp; attr_magic&lt;br /&gt;
* TDATA1 = The sound effect the weapon makes when it shoots&lt;br /&gt;
* TDATA2 = The required strength to wield the weapon&lt;br /&gt;
* TDATA3 = ID of arrow item that will be fired (and must therefore be on the player's person)&lt;br /&gt;
* TDATA4 = ID of the arrow animation (for bows it is usually i_arrow_x, for crossbows, i_xbow_x)&lt;br /&gt;
The following overrides can be set on a per item basis:&lt;br /&gt;
* TAG.OVERRIDE.DAMAGETYPE = to override the types of damage this weapon does&lt;br /&gt;
* TAG.OVERRIDE.SOUND_HIT = to override the sound this weapon makes when it hits&lt;br /&gt;
* TAG.OVERRIDE.SOUND_MISS = to override the sound this weapon makes when it misses&lt;br /&gt;
* AMMOANIMRENDER = to override the rendermode of the ANIM this item uses (yes, no TAGs)&lt;br /&gt;
* AMMOTYPE = to override the type of ammo (TDATA3) this item uses (yes, no TAGs)&lt;br /&gt;
* AMMOANIM = to override the ammo animation (TDATA4) this item uses (yes, no TAGs)&lt;br /&gt;
* AMMOANIMHUE = to override the color of the ammo animation this item uses (yes, no TAGs)&lt;br /&gt;
|- &lt;br /&gt;
| t_wand || 16 || This type is used for magic wands.  It leverages the following properties:&lt;br /&gt;
* MORE1L = the current amount of hitpoints the item has&lt;br /&gt;
* MORE1H = the maximum hitpoints for the item&lt;br /&gt;
* MORE2 = the number of remaining charges (if magical)&lt;br /&gt;
* MOREX = the spell type (if magical)&lt;br /&gt;
* MOREY = the spell strength (0-1000)&lt;br /&gt;
* MOREZ = the poison skill applied (0-100)&lt;br /&gt;
* TDATA2 = Required Strength to equip the wand&lt;br /&gt;
* TDATA3 = ID of the light pattern&lt;br /&gt;
* TDATA4 = A flag to indicate what happens when the light burns out (0=nothing, 1=delete the object). &lt;br /&gt;
|- &lt;br /&gt;
| t_telepad || 17 || This type is used for teleport pads.  It leverages the following properties:&lt;br /&gt;
* MOREP = Coordinates of the point to which you will teleport when you step on the item&lt;br /&gt;
* MORE1 = If set to 1, the teleport pad will only work for players (and their pets)&lt;br /&gt;
* MORE2 = If set to 1, the teleport animation and sound will not be shown to anyone witnessing the teleport&lt;br /&gt;
|- &lt;br /&gt;
| t_switch || 18 || This type is used for switches.  The way these things work is, when used, they trigger @DCLICK on the LINK object.  It leverages the following properties:&lt;br /&gt;
* LINK = UID of item to trigger&lt;br /&gt;
* MORE1 = The item ID of the next state of the switch&lt;br /&gt;
* MOREX = A flag to indicate if this is activated by stepping on it&lt;br /&gt;
|-&lt;br /&gt;
| t_book || 19 || This type is used for books of static or dynamic text.  It leverages the following properties:&lt;br /&gt;
* MORE1L = This can be set to an ID of a book (some default book text is included in the sphere_books.scp file)&lt;br /&gt;
* MORE1H = Some flags that determine book behavior:&lt;br /&gt;
** 0c00: Scripted book&lt;br /&gt;
** 0800: Editable book&lt;br /&gt;
** 08000: ? time stamp ?&lt;br /&gt;
* AUTHOR = The ID of the character that wrote the book&lt;br /&gt;
* BODY.# = The text for each page of the book (starting with page 0)&lt;br /&gt;
'''Note:''' we need more information on those flags...&lt;br /&gt;
|-&lt;br /&gt;
| t_rune || 20 || This type is used for recall runes.  It leverages the following properties:&lt;br /&gt;
* MORE1 = The number of uses left before it wears out&lt;br /&gt;
* MOREP = The coordinates of the marked location&lt;br /&gt;
|-&lt;br /&gt;
| t_booze || 21 || This type is used for alcohol (it causes a drunk effect when double clicked.)  It leverages the following properties:&lt;br /&gt;
* TDATA1 = A flag that indicates whether the container is empty or not.&lt;br /&gt;
|-&lt;br /&gt;
| t_potion || 22 || This type is used for potions.  It leverages the following properties:&lt;br /&gt;
* MORE1 = The potion spell effect that will result when the potion is double clicked&lt;br /&gt;
* MORE2 = The strength of the potion (This has a different effect defending on the spell, usually between 0 and 1000)&lt;br /&gt;
* MOREX = The countdown to explosion (for purple potions)&lt;br /&gt;
* TDATA1 = A flag that indicates whether the container is empty or not&lt;br /&gt;
|-&lt;br /&gt;
| t_fire || 23 || This type is used for fires (and ovens?).  These items can be used to cook food, and they can burn you if stepped on.  It leverages the following properties:&lt;br /&gt;
* TIMER = time until it decays?&lt;br /&gt;
* MORE1 (or MORE2?) = Amount of damage it will cause when stepped on or dclicked&lt;br /&gt;
* MOREZ =  Type of light pattern it will cast&lt;br /&gt;
|-&lt;br /&gt;
| t_clock || 24 || This type is used to tell time (game time, not real time) when double clicked.  The result comes out something like &amp;quot;half past eleven o'clock at night&amp;quot;.  From what I can tell there are no MORE or TDATA modifiers that affect the result.&lt;br /&gt;
|-&lt;br /&gt;
| t_trap and t_trap_active || 25 and 26 || These types are used for traps that are triggered when walked on.  They leverage the following properties:&lt;br /&gt;
* MORE1 = ID of the animation&lt;br /&gt;
* MORE2 = The damage the trap will cause&lt;br /&gt;
* MOREX = The length of time the animation will run&lt;br /&gt;
* MOREY = The length of time the activated trap will idle until reset&lt;br /&gt;
* MOREZ = A flag that indicates if the trap must idle before changing from active to inactive. &lt;br /&gt;
|-&lt;br /&gt;
| t_musical || 27 || This type is used for musical instruments.  It leverages the following properties:&lt;br /&gt;
* TDATA1 = The sound ID to be played if successful&lt;br /&gt;
* TDATA2 = The sound ID to be played if not successful&lt;br /&gt;
|-&lt;br /&gt;
| t_spell || 28 || This type is used for magic spell effects.  It leverages the following properties:&lt;br /&gt;
* MORE1L = The polymorph effect on STR&lt;br /&gt;
* MORE1H = The polymorph effect on DEX&lt;br /&gt;
* MORE2 = The number of charges left&lt;br /&gt;
* MOREX = The spell effect that will result when the item is stepped on&lt;br /&gt;
* MOREY = The strength of the spell (This has a different effect defending on the spell, usually between 0 and 1000)&lt;br /&gt;
* MOREZ = Type of light pattern it will cast&lt;br /&gt;
|-&lt;br /&gt;
| t_gem || 29 || This type is used for gems, and from what I can tell there is no built-in behavior for it.&lt;br /&gt;
|-&lt;br /&gt;
| t_water || 30 || This type is used for water, which means it can be fished in or used to clean used bandages.&lt;br /&gt;
* MORE1 = The regiontype ID that determines what sorts of resources (fish etc) that it can produce (is this true?)&lt;br /&gt;
|-&lt;br /&gt;
| t_clothing || 31 || This type is used for all cloth based equip-able items.  It is essentially identical to t_armor and t_armor_leather.    It leverages the following properties:&lt;br /&gt;
* MORE1L = Max hitpoints&lt;br /&gt;
* MORE1H = Current hitpoints&lt;br /&gt;
* MOREX = Spell effect when worn (for example, setting MOREX=1 causes a permanent Clumsy effect)&lt;br /&gt;
* MOREY = There are two possible effects of setting MOREY:&lt;br /&gt;
*# If MOREX is set, then MOREY is the power/effect of that spell&lt;br /&gt;
*# If the ATTR includes attr_magic, then there is an AR bonus (how is this calculated?)&lt;br /&gt;
'''Note:''' Old versions of sphere stored remaining charges in MORE2, this is no longer true.&lt;br /&gt;
|-&lt;br /&gt;
| t_scroll || 32 || This type is used for scrolls.  It leverages the following properties:&lt;br /&gt;
* MOREX = ID of the spell to cast when double-clicked&lt;br /&gt;
* MOREY = Power of the spell (equivalent to the EFFECT setting of the spell itself?)&lt;br /&gt;
|- &lt;br /&gt;
| t_carpentry || 33 || This type is used by carpenters to craft items, and from what I can tell there is no built-in behavior for it.&lt;br /&gt;
|- &lt;br /&gt;
| t_spawn_char || 34 || This type is used to spawn NPCs.  Once it spawns its first creature, it will turn red and change its appearance to the ICON of the creature (or appear as a wisp if the spawn is set to use a template.)  It leverages the following properties:&lt;br /&gt;
* AMOUNT = The maximum amount of NPCs the spawner should create&lt;br /&gt;
* MORE1 = The creature ID or spawn template ID for what you want to spawn&lt;br /&gt;
* MORE2 = The current number of creatures spawned from this point&lt;br /&gt;
* MOREX = The minimum time between spawns (in minutes)&lt;br /&gt;
* MOREY = The maximum time between spawns (in minutes)&lt;br /&gt;
* MOREZ = The maximum distance away from the spawn to create the spawned NPC (this is also the maximum wander distance for the NPC)&lt;br /&gt;
'''Note:''' The spawn is considered active if the TIMER has a positive value, and when the timer reaches zero, it is automatically restarted using a random number between MOREX and MOREY.&lt;br /&gt;
|- &lt;br /&gt;
| t_game_piece || 35 || This type is used for game board pieces (checkers, chess, etc).  They cannot be removed from the game, and they have no tile image outside of the game board gump.  It leverages the following properties:&lt;br /&gt;
* TDATA1 = The starting x position for this piece&lt;br /&gt;
* TDATA2 = The starting y position for this piece&lt;br /&gt;
|- &lt;br /&gt;
| t_portculis || 36 || This type is used for portcullis doors that raise and lower when double clicked.  It leverages the following properties:&lt;br /&gt;
* MORE1 = The z height at the lowest setting&lt;br /&gt;
* MORE2 = The z height at the highest setting&lt;br /&gt;
|- &lt;br /&gt;
| t_figurine || 37 || This type is used for shrunk NPCs (essentially magic figurines), that turn into a &amp;quot;pet&amp;quot; creature when double clicked.  It leverages the following properties:&lt;br /&gt;
* MORE1 = The creature ID that will spawn when the item is double clicked.&lt;br /&gt;
* MORE2 = The UID of the off-line creature (in &amp;quot;stable master&amp;quot; inventory)&lt;br /&gt;
* TDATA2 = The required strength to mount the creature (presumably only if it is possible to mount it)&lt;br /&gt;
* TDATA3 = The base creature ID. &lt;br /&gt;
|-&lt;br /&gt;
| t_shrine || 38 || This type is used for shrines.  They will resurrect a ghost when double-clicked by a ghost.&lt;br /&gt;
|- &lt;br /&gt;
| t_moongate || 39 || This type is used for moongates.  When stepped on they teleport the player to another location.  It leverages the following properties:&lt;br /&gt;
* MOREP = The coordinates that the moongate leads to&lt;br /&gt;
* MORE1 = If set to 1, the smoke and sound is supressed&lt;br /&gt;
* MORE2 = If set to 1, NPCs (and pets?) cannot use it&lt;br /&gt;
|- &lt;br /&gt;
| t_chair || 40 || This type is used for any sort of a chair item and it's only purpose is to trigger a sitting animation.&lt;br /&gt;
|-&lt;br /&gt;
| t_forge || 41 || This type is used by blacksmiths to smelt ore....&lt;br /&gt;
|-&lt;br /&gt;
| t_ore || 42 || This type is harvested by miners, and converted by blacksmiths (using a forge) into something else.  It leverages the following properties:&lt;br /&gt;
* TDATA1 = ID of item created when the ore is smelted (usually ingots)&lt;br /&gt;
|- &lt;br /&gt;
| t_log || 43 || This type is a raw material resource usually harvested from trees.&lt;br /&gt;
|-&lt;br /&gt;
| t_tree || 44 || This type is chopped by lumberjacks to get logs.  It leverages the following properties:&lt;br /&gt;
* FRUIT = ID of item gathered if double-clicked (usually logs)&lt;br /&gt;
|- &lt;br /&gt;
| t_rock || 45 || This type can be mined for ore.&lt;br /&gt;
* MORE1 = The regiontype ID that determines what sorts of resources (fish etc) that it can produce (is this true?)&lt;br /&gt;
|-&lt;br /&gt;
| t_carpentry_chop || 46 || A carpentry tool that can be used to craft carpentry objects as well as used to &amp;quot;chop&amp;quot; trees (like a saw?)&lt;br /&gt;
|-&lt;br /&gt;
| || ||&lt;br /&gt;
 t_multi                  47   // = multi part object like house or ship.  MORE1 is the UID of the player that created/owns the multi &lt;br /&gt;
 t_reagent                48   // = alchemy when clicked ?&lt;br /&gt;
 t_ship                   49   // = this is a ship multi. MORE2 contains the speed, anchor flag, direction of movement, and facing direction in each byte respectively&lt;br /&gt;
 t_ship_plank             50   // TDATA1 is the itemID of the next open/closed state. &lt;br /&gt;
 t_ship_side              51   // = should extend to make a plank TDATA1 is the itemID of the next open/closed state. &lt;br /&gt;
 t_ship_side_locked       52   // TDATA1 is the itemID of the next open/closed state. &lt;br /&gt;
 t_ship_tiller            53   // = tiller man on the ship.&lt;br /&gt;
 t_eq_trade_window        54   // = container for the trade window.&lt;br /&gt;
 t_fish                   55   // = fish can be cut up.&lt;br /&gt;
|-&lt;br /&gt;
| t_sign_gump || 56 || This type is used for simple signs (and things like grave stones).  It leverages the following properties:&lt;br /&gt;
* TDATA2 = The gumpID&lt;br /&gt;
* TDATA3 = The minimum gump size&lt;br /&gt;
* TDATA4 = The maximum gump size&lt;br /&gt;
|-&lt;br /&gt;
| t_stone_guild || 57 || This type is used for guild stones.  It leverages the following properties:&lt;br /&gt;
* MORE1 = The alignment of the guild (chaos, neutral, order)&lt;br /&gt;
* MORE2 = The amount of gold in the guild account&lt;br /&gt;
|-&lt;br /&gt;
| || ||&lt;br /&gt;
 t_anim_active            58   // = active anium that will recycle when done.&lt;br /&gt;
 t_sand                   59   // = sand on the beach&lt;br /&gt;
 t_cloth                  60   // = bolt or folded cloth&lt;br /&gt;
 t_hair                   61   //&lt;br /&gt;
 t_beard                  62   // = just for grouping purposes.&lt;br /&gt;
|-&lt;br /&gt;
| t_ingot || 63 || This type is used for ingots (when a blacksmith smelts ore, it turns into ingots.  It leverages the following properties:&lt;br /&gt;
* TDATA1 = The skill required to smelt this&lt;br /&gt;
* TDATA2 = The skill required to get the maximum yield when smelting&lt;br /&gt;
|-&lt;br /&gt;
| t_coin || 64 || This types is used for coins, gold or otherwise.&lt;br /&gt;
|-&lt;br /&gt;
| t_crops || 65 || This type is used to grow plants that likely bear fruit.  Double clicking a t_crop item will harvest the fruit if it is ripe.  It leverages the following properties:&lt;br /&gt;
* MORE1 = Time in seconds before this item will grow to the next stage (this overrides the default server defined number)&lt;br /&gt;
* TDATA1 = Is the ID of the first stage of the crop (the sprout), it is the ID that the crop will be reset to regrow from (0=nothing, which means this plant will not regrow once harvested)&lt;br /&gt;
* TDATA2 = Is the ID of the next stage of the crop (or zero if this is the final mature crop which will bear the fruit)&lt;br /&gt;
* TDATA3 = Is the ID of the fruit that this plant will grow and should only be set on the ''ripe'' plant (0 means the plant is not mature)&lt;br /&gt;
'''Note''' This type has unusual TIMER behavior in that regardless of the ATTR flags, the timer will restart when it reaches zero.&lt;br /&gt;
|-&lt;br /&gt;
| t_drink || 66 || This type is used for non-alcoholic drinks.  It leverages the following properties:&lt;br /&gt;
* TATA1 = A flag that indicates whether the container is empty or not. &lt;br /&gt;
'''Note:''' There is an INI flag OF_DrinkIsFood (0x10000) that, if set, will increase FOOD level when the drink is consumed (like T_FOOD does)&lt;br /&gt;
|-&lt;br /&gt;
| || ||&lt;br /&gt;
 t_anvil                  67   // = for repair.&lt;br /&gt;
 t_port_locked            68   // = this portcullis must be triggered.&lt;br /&gt;
 t_spawn_item             69   // = spawn other items.&lt;br /&gt;
 t_telescope              70   // = big telescope pic.&lt;br /&gt;
|-&lt;br /&gt;
| t_bed || 71 || This type is used to indicate the item is a bed.  I am not sure how it is used exactly, but it leverages the following properties:&lt;br /&gt;
* TDATA1 = The direction it occupies&lt;br /&gt;
|-&lt;br /&gt;
| t_gold || 72 || This type is used to indicate the object is a gold coin and can be used to purchase stuff.&lt;br /&gt;
|-&lt;br /&gt;
| t_map || 73 || This type is used for cartography maps.  It has the following properties:&lt;br /&gt;
* MORE1L = The top coordinate&lt;br /&gt;
* MORE1H = The left coordinate&lt;br /&gt;
* MORE2L = The bottom coordinate&lt;br /&gt;
* MORE2H = The right coordinate&lt;br /&gt;
* MOREZ = A flag that indicates whether the map has pins or not&lt;br /&gt;
* MOREX and MOREY = The coordinates of the pin (I think)&lt;br /&gt;
|-&lt;br /&gt;
| t_eq_memory_obj || 74 || This type is used for character memories, and it really depends on the type of memory to know what each property really means, but here is a relatively good guide:&lt;br /&gt;
* MORE1L = The action type this is a memory for&lt;br /&gt;
* MORE1H = The skill involved&lt;br /&gt;
* MORE2 = The start time of the memory&lt;br /&gt;
* MOREP = The map coordinates at which the memory occurred. &lt;br /&gt;
|-&lt;br /&gt;
| || ||&lt;br /&gt;
 t_weapon_mace_staff      75   // = staff type of mace. or just other type of mace.&lt;br /&gt;
|-&lt;br /&gt;
| t_eq_horse || 76 || This type is used for equipped horse object.  Essentially it represents a riding horse to the client.  It leverages the following properties:&lt;br /&gt;
* MORE1 = The creature ID&lt;br /&gt;
* MORE2 = The UID of the offline creature (in &amp;quot;stable master&amp;quot; inventory)&lt;br /&gt;
* TDATA2 = The required strength to mount it&lt;br /&gt;
* TDATA3 = The base creature ID&lt;br /&gt;
|-&lt;br /&gt;
| t_comm_crystal || 77 || This type is used for communication crystals.&lt;br /&gt;
|-&lt;br /&gt;
| t_game_board || 78  || This type is used as a container for game pieces (t_game_piece).  It leverages the following properties:&lt;br /&gt;
* MORE1 = The type of pieces to use (0=chess, 1=checkers, 2=none... presumably this is hard-coded)&lt;br /&gt;
* TDATA2 = The gumpID of the container (this is not an ITEMDEF)&lt;br /&gt;
* TDATA3 = The minimum gump size&lt;br /&gt;
* TDATA4 = The maximum gump size&lt;br /&gt;
|-&lt;br /&gt;
| t_trash_can || 79 || This type is used as a trash can container, and it deletes any object placed into it.  It leverages the following properties:&lt;br /&gt;
* TDATA2 = The gumpID of the container (this is not an ITEMDEF)&lt;br /&gt;
* TDATA3 = The minimum gump size&lt;br /&gt;
* TDATA4 = The maximum gump size&lt;br /&gt;
|-&lt;br /&gt;
| t_cannon_muzzle || 80 || This type is used for the business end of the cannon.&lt;br /&gt;
|-&lt;br /&gt;
| t_cannon || 81 || This type is used for the cannon control.  It leverages the following properties:&lt;br /&gt;
* MORE2 = A mask of what is currently loaded in it. (0 = none, 1=powder, 2=shot)&lt;br /&gt;
|-&lt;br /&gt;
| t_cannon_ball || 82 || This is ammo for a t_cannon.&lt;br /&gt;
|-&lt;br /&gt;
| || ||&lt;br /&gt;
 t_armor_leather          83   // = non metallic armor (t_clothing)&lt;br /&gt;
|-&lt;br /&gt;
| t_seed || 84 || This type is used for seeds.  A seed can be created by using a dagger on a fruit (assuming the fruit is setup to have a seed.)  A seed can be planted by double clicking it and targeting the ground (specifically t_dirt items).  It leverages the following properties:&lt;br /&gt;
* TDATA1 = The ID of a t_crop item that will grow the fruit that this seed comes from&lt;br /&gt;
|-&lt;br /&gt;
| || ||&lt;br /&gt;
 t_junk                   85   // = never used&lt;br /&gt;
 t_crystal_ball           86   //&lt;br /&gt;
 t_swamp                  87   // = swamp (smelly)&lt;br /&gt;
|-&lt;br /&gt;
| t_message || 88 || This type is used for bulletin board messages.  It leverages the following properties:&lt;br /&gt;
* TDATA2 = The gumpID&lt;br /&gt;
* TDATA3 = The minimum gump size&lt;br /&gt;
* TDATA4 = The maximum gump size&lt;br /&gt;
|-&lt;br /&gt;
| || ||&lt;br /&gt;
 t_reagent_raw            89   // = freshly grown reagents...not processed yet.&lt;br /&gt;
 t_eq_client_linger       90   // = change player to npc for a while.&lt;br /&gt;
 t_snow                   91   // = snow&lt;br /&gt;
|-&lt;br /&gt;
| t_it_stone || 92 || This type is an &amp;quot;item stone&amp;quot; that is used to generate items when the object is double clicked.  It has the following properties:&lt;br /&gt;
* MORE1 = The item or template ID to generate&lt;br /&gt;
* MORE2 = The price (or Plotflags to set?)&lt;br /&gt;
* MOREX = The regen time (0 = instant)&lt;br /&gt;
* MOREY = The total amount to deliver (0 = infinite, 0xFFFF = none left)&lt;br /&gt;
|-&lt;br /&gt;
| || ||&lt;br /&gt;
 t_unused_93              93&lt;br /&gt;
|-&lt;br /&gt;
| t_explosion || 94 ||  This type is used for explosion animations.  It leverages the following properties:&lt;br /&gt;
* MOREX = The damage that the explosion will cause&lt;br /&gt;
* MOREY = The type of damage (fire, magic, etc)&lt;br /&gt;
* MOREZ = The distance range for the damage&lt;br /&gt;
|-&lt;br /&gt;
| t_eq_npc_script || 95 || This type is used to script NPC actions (in the form of a book).  The sphere_defs.scp file says &amp;quot;get rid of this in favor of waiting on m_events&amp;quot; but it may still exist... if so, it leverages the following properties:&lt;br /&gt;
* MORE1 = The same as for other books&lt;br /&gt;
* MORE2L = The current script page&lt;br /&gt;
* MORE2H = The current offset&lt;br /&gt;
* MOREZ = The priority for this script (as a percent, this is the chance they want to &amp;quot;do&amp;quot; this task)&lt;br /&gt;
|-&lt;br /&gt;
| || ||&lt;br /&gt;
 t_web                    96   // = walk on this and transform into some other object.  MORE1 is the amount of hits the web can take.&lt;br /&gt;
 t_grass                  97   // = can be eaten by grazing animals&lt;br /&gt;
 t_arock                  98   // = a rock or boulder. can be thrown by giants.&lt;br /&gt;
 t_tracker                99   // = points to a linked object.&lt;br /&gt;
|-&lt;br /&gt;
| t_sound || 100 || This type is used to play sounds.  It uses the following properties:&lt;br /&gt;
* MORE1 = The sound ID&lt;br /&gt;
* MORE2 = A flag to indicate repetition&lt;br /&gt;
|-&lt;br /&gt;
| t_stone_town || 101 || This type is used for town stones.  It leverages the following properties:&lt;br /&gt;
* MORE1 = The alignment of the town (chaos, neutral, order)&lt;br /&gt;
* MORE2 = The amount of gold in the town bank account&lt;br /&gt;
|-&lt;br /&gt;
| || ||&lt;br /&gt;
 t_weapon_mace_crook     102   //&lt;br /&gt;
 t_weapon_mace_pick      103   //&lt;br /&gt;
 t_leather               104   // = leather or skins of some sort.(not wearable)&lt;br /&gt;
 t_ship_other            105   // = some other part of a ship.&lt;br /&gt;
|-&lt;br /&gt;
| t_bboard || 106 || This type is a bulleting board container that holds t_message items.  It leverages the following properties:&lt;br /&gt;
* TDATA2 = The gumpID of the container&lt;br /&gt;
* TDATA3 = The minimum gump size&lt;br /&gt;
* TDATA4 = The maximum gump size&lt;br /&gt;
|-&lt;br /&gt;
| t_spellbook || 107 || This type is used for the Magery spellbook.  It leverages the following properties:&lt;br /&gt;
* MORE1 = A bit mask of available spells in circles 0-4, so to add all those spells: set MORE1=0fffffff&lt;br /&gt;
* MORE2 = A bit mask of available spells in circles 5-8, so to add all those spells: set MORE2=0fffffff&lt;br /&gt;
'''Note:''' In older sphere versions, MOREX, MOREY, and MOREZ could be set to add additional spells (necro, etc), but recently these concepts may have been removed... same with these TDATA settings:&lt;br /&gt;
* TDATA2 = Required Strength to equip the book&lt;br /&gt;
* TDATA3 = Type of light pattern it will cast&lt;br /&gt;
* TDATA4 = A flag to indicate what happens when the light burns out (0=nothing, 1=delete the object)&lt;br /&gt;
|-&lt;br /&gt;
| t_corpse || 108 || This type is a container used for all dead corpses.  It leverages the following properties:&lt;br /&gt;
* MORE1 = The time of death&lt;br /&gt;
* MORE2 = The UID of the individual character that landed the killing blow&lt;br /&gt;
* MOREX &amp;amp; MOREY = Combined, these make up a single DWORD which specifies what type of creature this was&lt;br /&gt;
* MOREZ = The direction it is facing&lt;br /&gt;
* TDATA2 = The gumpID of the container&lt;br /&gt;
* TDATA3 = The minimum gump size&lt;br /&gt;
* TDATA4 = The maximum gump size&lt;br /&gt;
There are two special TAGs for corpses:&lt;br /&gt;
* TAG.BLOOD = This is the number of times you can carve the corpse and cause blood to come out (default 5)&lt;br /&gt;
* TAG.MAXBLOOD = Not certain about this one, but it is likely related... perhaps it is set on the CHARDEF?&lt;br /&gt;
|-&lt;br /&gt;
| || ||&lt;br /&gt;
 t_track_item            109   // - track a id or type of item.&lt;br /&gt;
 t_track_char            110   // = track a char or range of char id's&lt;br /&gt;
 t_weapon_arrow          111   //&lt;br /&gt;
 t_weapon_bolt           112   //&lt;br /&gt;
 t_eq_vendor_box         113   // = an equipped vendor box&lt;br /&gt;
|-&lt;br /&gt;
| t_eq_bank_box || 114 || This type is a container that is used for the character bank.  It leverages the following properties:&lt;br /&gt;
* MORE1 = The amount of gold in the account (is this still true?)&lt;br /&gt;
* MORE2 = The amount to restock to (for NPCs vendors who can buy stuff from players?)&lt;br /&gt;
* MOREP = The location in the world (x, y, and z) where the bank box was opened&lt;br /&gt;
* TDATA2 = The gumpID for the bank box container&lt;br /&gt;
* TDATA3 = The minimum gump size&lt;br /&gt;
* TDATA4 = the maximum gump size&lt;br /&gt;
|-&lt;br /&gt;
| t_deed || 115 || This type is used to create something else when double clicked.  It is perhaps the best solution for a player to place a ''multi'' part item like a house.  When double clicked, it will prompt for a target location.  It leverages the following properties:&lt;br /&gt;
* MORE1 = The ID of the item that will be created at the target location&lt;br /&gt;
* MORE2 = The previous key ID (ideally this is set when a house or ship are re-deeded so that all the existing keys will still work)&lt;br /&gt;
|-&lt;br /&gt;
| t_loom || 116 || This type of device is used by weavers who turn wool or thread into bolts of cloth.  It leverages the following properties:&lt;br /&gt;
* MORE1 = The ID of the currently loaded resource (wool or cotton/flax) that is being woven&lt;br /&gt;
* MORE2 = The amount of resources currently in the loom&lt;br /&gt;
|-&lt;br /&gt;
| t_bee_hive || 117 || This type is used for beehives.  It leverages the following properties:&lt;br /&gt;
* MORE1 = The amount of honey which has accumulated in the hive&lt;br /&gt;
|-&lt;br /&gt;
| t_archery_butte || 118 || This type is used for practice archery targets.  When double clicked, the target will first check if you have an archery weapon equipped and if so, it will return some ammo.  It leverages the following properties:&lt;br /&gt;
* MORE1 = The ID for the type of ammo currently stuck in the target&lt;br /&gt;
* MORE2 = The amount of items stuck in the target&lt;br /&gt;
|-&lt;br /&gt;
| || ||&lt;br /&gt;
 t_eq_murder_count       119   // = my murder count flag.  MORE1 contains the amount of time before it expires. &lt;br /&gt;
 t_eq_stuck              120   // we are stuck in a web&lt;br /&gt;
 t_trap_inactive         121   //  = a safe trap.&lt;br /&gt;
 //t_unused_122          122&lt;br /&gt;
 t_bandage               123   //  = can be used for healing.&lt;br /&gt;
 t_campfire              124   //  = this is a fire but a small one.&lt;br /&gt;
 t_map_blank             125&lt;br /&gt;
 t_spy_glass             126&lt;br /&gt;
 t_sextant               127&lt;br /&gt;
 t_scroll_blank          128&lt;br /&gt;
|-&lt;br /&gt;
| t_fruit || 129 || This type is used for fruit.  When double clicked, fruit will be eaten.  Fruit can be grown from crops (t_crop).  It leverages the following properties:&lt;br /&gt;
* TDATA1 = The ID of a t_crop item that this fruit comes from (If not set, this fruit may not have a seed, use zero to be certain)&lt;br /&gt;
* MOREM = Is the amount (0 to 127) of &amp;quot;food units&amp;quot; that will be gained when the item is used (eaten)&lt;br /&gt;
* MOREZ = Is the poison level of the fruit&lt;br /&gt;
|-&lt;br /&gt;
| || ||&lt;br /&gt;
 t_water_wash            130   // water that will not contain fish. (for washing or drinking)  TDATA1 is a flag that indicates whether the container is empty or not &lt;br /&gt;
 t_weapon_axe            131   // not the same as a sword. but uses swordsmanship skill&lt;br /&gt;
|-&lt;br /&gt;
| t_weapon_xbow || 132 || This type is used for crossbow weapons.  It is essentially identical to t_weapon_bow.&lt;br /&gt;
|-&lt;br /&gt;
| || ||&lt;br /&gt;
 t_spellicon             133&lt;br /&gt;
 t_door_open             134&lt;br /&gt;
 t_meat_raw              135   // just a meaty part of a corpse. (uncooked meat)&lt;br /&gt;
 t_garbage               136&lt;br /&gt;
|-&lt;br /&gt;
| t_keyring || 137 || This type is a container used to store keys.  It leverages the following properties:&lt;br /&gt;
* TDATA2 = The gumpID&lt;br /&gt;
* TDATA3 = The minimum gump size&lt;br /&gt;
* TDATA4 = The maximum gump size&lt;br /&gt;
|-&lt;br /&gt;
| || ||&lt;br /&gt;
 t_table                 138   // doesn't really do anything.&lt;br /&gt;
 t_floor                 139&lt;br /&gt;
 t_roof                  140&lt;br /&gt;
 t_feather               141   // a birds feather&lt;br /&gt;
 t_wool                  142   // wool cut from a sheep.&lt;br /&gt;
 t_fur                   143&lt;br /&gt;
 t_blood                 144   // blood of some creature&lt;br /&gt;
|-&lt;br /&gt;
| t_foliage || 145 || This type is very similar to t_crops, the difference being the foliage does not disappear when the fruit is harvested.  It leverages the following properties:&lt;br /&gt;
* MORE1 = Time in seconds before this item will grow to the next stage (this overrides the default server defined number)&lt;br /&gt;
* TDATA1 = Is the ID of the first stage of the crop (the sprout)&lt;br /&gt;
* TDATA2 = Is the ID of the next stage of the crop (or zero if this is the final mature crop which will bear the fruit)&lt;br /&gt;
* TDATA3 = Is the ID of the fruit that this plant will grow and should only be set on the ''ripe'' plant&lt;br /&gt;
'''Note''' This type has unusual TIMER behavior in that regardless of the ATTR flags, the timer will restart when it reaches zero.&lt;br /&gt;
|-&lt;br /&gt;
| || ||&lt;br /&gt;
 t_grain                 146&lt;br /&gt;
 t_scissors              147&lt;br /&gt;
 t_thread                148&lt;br /&gt;
 t_yarn                  149&lt;br /&gt;
 t_spinwheel             150&lt;br /&gt;
 t_bandage_blood         151   //  = can't be used for healing.&lt;br /&gt;
 t_fish_pole             152&lt;br /&gt;
 t_shaft                 153   // bolt or arrow.&lt;br /&gt;
 t_lockpick              154&lt;br /&gt;
 t_kindling              155&lt;br /&gt;
 t_train_dummy           156&lt;br /&gt;
 t_train_pickpocket      157&lt;br /&gt;
 t_bedroll               158&lt;br /&gt;
 t_bellows               159&lt;br /&gt;
|-&lt;br /&gt;
| t_hide || 160 ||Made into leather.&lt;br /&gt;
* TDATA1 = Hold ID or DEFNAME of custom cut leather (or any item).&lt;br /&gt;
|-&lt;br /&gt;
| || ||&lt;br /&gt;
 t_cloth_bolt            161&lt;br /&gt;
 t_board                 162   // = logs are plained into decent lumber&lt;br /&gt;
 t_pitcher               163   // TDATA1 is a flag that indicates whether the container is empty or not. &lt;br /&gt;
 t_pitcher_empty         164   // TDATA1 is a flag that indicates whether the container is empty or not. &lt;br /&gt;
 t_dye_vat               165&lt;br /&gt;
 t_dye                   166&lt;br /&gt;
 t_potion_empty          167   // empty bottle.&lt;br /&gt;
 t_mortar                168&lt;br /&gt;
 t_hair_dye              169&lt;br /&gt;
 t_sewing_kit            170&lt;br /&gt;
 t_tinker_tools          171&lt;br /&gt;
 t_wall                  172   // wall of a structure.&lt;br /&gt;
 t_window                173   // window for a structure.  MOREZ is the light pattern&lt;br /&gt;
 t_cotton                174   // cotton from the plant&lt;br /&gt;
 t_bone                  175&lt;br /&gt;
|-&lt;br /&gt;
| t_eq_script || 176 || This type can have tags and can be equipped.  Possibly used for memory objects that leverage @Equip and @UnEquip triggers.&lt;br /&gt;
|-&lt;br /&gt;
| || ||&lt;br /&gt;
 t_ship_hold             177   // ships hold.  TDATA2 is the gumpID, TDATA3 is the minimum gump size, TDATA4 is the maximum gump size&lt;br /&gt;
 t_ship_hold_lock        178&lt;br /&gt;
 t_lava                  179&lt;br /&gt;
|-&lt;br /&gt;
| t_shield || 180 || This type is used to indicate the object is an equipable shield.  It has the following properties:&lt;br /&gt;
* MORE1L = The current amount of hitpoints the item has&lt;br /&gt;
* MORE1H = The maximum hitpoints for the item&lt;br /&gt;
* MORE2 = The number of remaining charges (if magical)&lt;br /&gt;
* MOREX = The spell type (if magical)&lt;br /&gt;
* MOREY = The spell strength (0-1000)&lt;br /&gt;
|-&lt;br /&gt;
| t_jewelry || 181 || This type is used for equpable jewelry.  It leverages the following properties:&lt;br /&gt;
* MORE1L = The current amount of hitpoints the item has&lt;br /&gt;
* MORE1H = The maximum hitpoints for the item&lt;br /&gt;
* MORE2 = The number of remaining charges (if magical)&lt;br /&gt;
* MOREX = The spell type (if magical)&lt;br /&gt;
* MOREY = The spell strength (0-1000)&lt;br /&gt;
* TDATA2 = Required Strength to equip the item&lt;br /&gt;
* TDATA3 = Light pattern&lt;br /&gt;
* TDATA4 = A flag to indicate what happens when the light burns out (0=nothing, 1=delete the object)&lt;br /&gt;
|-&lt;br /&gt;
| t_dirt || 182 || This type is used to represent a patch of dirt where something can be planted.&lt;br /&gt;
|- &lt;br /&gt;
| t_script || 183 || This type can have tags, but can NOT be equipped.&lt;br /&gt;
|-&lt;br /&gt;
| || ||&lt;br /&gt;
 t_spellbook_necro       184   // AOS Necromancy spellbook (should have MOREZ=100 by default)&lt;br /&gt;
 t_spellbook_pala        185   // AOS Paladin spellbook (should have MOREZ=200 by default)&lt;br /&gt;
 t_spellbook_extra       186   // some spellbook for script purposes (MOREZ=basic offset)&lt;br /&gt;
 t_spellbook_bushido     187   // SE Bushido spellbook (should have MOREZ=400 by default)&lt;br /&gt;
 t_spellbook_ninjitsu    188   // SE Ninjitsu spellbook (should have MOREZ=500 by default)&lt;br /&gt;
 t_spellbook_arcanist    189   // ML Spellweaver spellbook (should have MOREZ=600 by default)&lt;br /&gt;
 t_multi_custom          190   // Customisable multi&lt;br /&gt;
 t_spellbook_mystic      191   // SA Mysticism spellbook (should have MOREZ=677 by default)&lt;br /&gt;
 t_hoverover             192   // Hover-over item (CAN_C_HOVER can hover over blocking items)&lt;br /&gt;
 t_spellbook_bard        193   // SA Bard spellbook (should have MOREZ=700 by default)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Scripted TYPEDEFs==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
! DEFNAME !! File !! Description&lt;br /&gt;
|-&lt;br /&gt;
| t_advance_gate || ??.scp || MORE = ID of character to change into&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
The syntax for defining a type is:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&lt;br /&gt;
[TYPEDEF ''defname'']&amp;lt;br /&amp;gt;&lt;br /&gt;
TERRAIN=''id''&amp;lt;br /&amp;gt;&lt;br /&gt;
TERRAIN=''start_id'', ''end_id''&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
ON=''trigger_name''&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;''script''&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
ON=''trigger_name''&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;''script''&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Any number of triggers can be handled by one [[TYPEDEF]] definition, however it is not possible to handle the same trigger twice without using multiple definitions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The trigger name can be the name of any [[Items#Triggers|item trigger]]. The return value from the script can affect Sphere's hardcoded behaviour in different ways. See the documentation for the trigger to discover what parameters are passed in to each trigger and what the return values do.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If the ''defname'' matches any of Sphere's hardcoded types (see 'typedefs' block in sphere_defs.scp), then the [[TYPEDEF]] can be used to override the behaviours of items of that type.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&amp;lt;spherescript&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
// Water definition from default script pack.&lt;br /&gt;
//&lt;br /&gt;
[TYPEDEF t_water]&lt;br /&gt;
TERRAIN = 0a8	0ab&lt;br /&gt;
TERRAIN = 0136	0137&lt;br /&gt;
&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
// Makes an item speak when double clicked.&lt;br /&gt;
//&lt;br /&gt;
[TYPEDEF t_exampletype]&lt;br /&gt;
ON=@DClick&lt;br /&gt;
  SAY I have been double clicked!&lt;br /&gt;
  RETURN 2&lt;br /&gt;
&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Reference Compendium]]&lt;br /&gt;
[[Category: Definitions]]&lt;/div&gt;</summary>
		<author><name>Wuffel</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=SKILL&amp;diff=7560</id>
		<title>SKILL</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=SKILL&amp;diff=7560"/>
				<updated>2014-03-26T01:18:35Z</updated>
		
		<summary type="html">&lt;p&gt;Wuffel: /* Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|SKILL}}&lt;br /&gt;
&lt;br /&gt;
__FORCETOC__&lt;br /&gt;
A skill block defines the basic properties and behaviours of a skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Properties==&lt;br /&gt;
The following properties are available when defining a skill:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Name''' || '''Read/Write''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| [[ADV_RATE]] || RW || Gets or sets the skill's advance rate. Accepts multiple values to adjust based on skill level.&lt;br /&gt;
|-&lt;br /&gt;
| [[BONUS_DEX]] || RW || Gets or sets a multiplier for how much dexterity affects a character's non-real skill amount, and affects stat gain.&lt;br /&gt;
|-&lt;br /&gt;
| [[BONUS_INT]] || RW || Gets or sets a multiplier for how much intelligence affects a character's non-real skill amount, and affects stat gain.&lt;br /&gt;
|-&lt;br /&gt;
| [[BONUS_STATS]] || RW || Gets or sets a modifier for gaining stats when using the skill.&lt;br /&gt;
|-&lt;br /&gt;
| [[BONUS_STR]] || RW || Gets or sets a multiplier for how much strength affects a character's non-real skill amount, and affects stat gain.&lt;br /&gt;
|-&lt;br /&gt;
| [[DELAY]] || RW || Gets or sets how long it takes to attempt to complete the skill, in tenths of a second. Accepts multiple values to adjust based on skill level.&lt;br /&gt;
|-&lt;br /&gt;
| [[EFFECT]] || RW || Gets or sets a value which effects skills in different ways. (Crafting = Resource Loss % on Fail, Healing = Amount Healed). Accepts multiple values to adjust based on skill level.&lt;br /&gt;
|-&lt;br /&gt;
| [[FLAGS]] || RW || Gets or sets skill attributes.  The available flags are defined in the sphere_defs.scp file:&lt;br /&gt;
{|&lt;br /&gt;
| SKF_SCRIPTED   || 0001 || fully scripted, no hardcoded behaviour&lt;br /&gt;
|-&lt;br /&gt;
| SKF_FIGHT      || 0002 || considered a fight skill, maintains fight active&lt;br /&gt;
|-&lt;br /&gt;
| SKF_MAGIC      || 0004 || considered a magic skill&lt;br /&gt;
|-&lt;br /&gt;
| SKF_CRAFT      || 0008 || considered a crafting skill, compatible with MAKEITEM function&lt;br /&gt;
|-&lt;br /&gt;
| SKF_IMMOBILE   || 0010 || skilluser can not move while skilluse&lt;br /&gt;
|-&lt;br /&gt;
| SKF_SELECTABLE || 0020 || from skill list. ATTENTION: This does ''not'' place the button next to the skill in the client's skill list! For this you have to edit skills.mul or script the trigger.&lt;br /&gt;
|-&lt;br /&gt;
| SKF_NOMINDIST  || 0040 || you can mine, fish, chop, hack on the same point you are standing on&lt;br /&gt;
|-&lt;br /&gt;
| SKF_NOANIM     || 0080 || don't show hard-coded animation for this skill&lt;br /&gt;
|-&lt;br /&gt;
| SKF_NOSFX      || 0100 || don't play hard-coded sound for this skill&lt;br /&gt;
|-&lt;br /&gt;
| SKF_RANGED     || 0200 || considered a ranged skill (combine with SKF_FIGHT)&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| [[GAINRADIUS]] || RW || Gets or sets a difficulty &amp;quot;radius&amp;quot; that prevents characters from gaining skill when performing &amp;quot;easy&amp;quot; actions.  Skillgain will only be calculated if the current skill is less than the actual difficulty + GAINRADIUS.  If skillgain is aborted due to GAINRADIUS not met, a message will only be displayed if TAG.NOSKILLMSG=1 on character.&lt;br /&gt;
|-&lt;br /&gt;
| [[GROUP]] || RW || Get or sets the skill's group flags.&lt;br /&gt;
|-&lt;br /&gt;
| [[KEY]] || RW || Gets or sets the skill's defname.&lt;br /&gt;
|-&lt;br /&gt;
| [[NAME]] || RW || Gets or sets the name of the skill.&lt;br /&gt;
|-&lt;br /&gt;
| [[STAT_DEX]] || RW || Gets or sets the maximum dexterity a character can gain up to when using this skill.&lt;br /&gt;
|-&lt;br /&gt;
| [[STAT_INT]] || RW || Gets or sets the maximum intelligence a character can gain up to when using this skill.&lt;br /&gt;
|-&lt;br /&gt;
| [[STAT_STR]] || RW || Gets or sets the maximum strength a character can gain up to when using this skill.&lt;br /&gt;
|-&lt;br /&gt;
| [[PROMPT_MSG]] || RW || Gets or sets the message shown when the character selects the skill, and also forces characters to select a target when non-empty.&lt;br /&gt;
|-&lt;br /&gt;
| [[TITLE]] || RW || Gets or sets the professional title for the skill.&lt;br /&gt;
|-&lt;br /&gt;
| [[VALUES]] || RW || Gets or sets a modifier for the value of items that are created using the skill. Accepts multiple values to adjust based on skill level.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Triggers==&lt;br /&gt;
The following table lists all of the triggers that can be placed under a skill definition. All of the triggers here have an equivalent @Skill trigger on the [[Characters|character]] object.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Name''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| [[@Abort]] || Fires when a character aborts an attempt at using the skill.&lt;br /&gt;
|-&lt;br /&gt;
| [[@Fail]] || Fires when a character fails an attempt at using the skill.&lt;br /&gt;
|-&lt;br /&gt;
| [[@Gain]] || Fires when a character is given the chance to gain in the skill.&lt;br /&gt;
|-&lt;br /&gt;
| [[@PreStart]] || Fires when a character starts to use the skill, before any hardcoded behaviour takes place.&lt;br /&gt;
|-&lt;br /&gt;
| [[@Select]] || Fires when a character selects the skill from their skill menu.&lt;br /&gt;
|-&lt;br /&gt;
| [[@Start]] || Fires when a character starts to use the skill.&lt;br /&gt;
|-&lt;br /&gt;
| [[@Success]] || Fires when a character succeeds an attempt at using the skill.&lt;br /&gt;
|-&lt;br /&gt;
| [[@UseQuick]] || Fires when a character quickly uses the skill, without changing their [[ACTION]].&lt;br /&gt;
|-&lt;br /&gt;
| [[@Wait]] || This is called whenever Sphere wants to check if a character must wait before starting a skill. Normally this will be when a skill is selected from the skill menu (before [[@Select]]), but also when snooping a container or using a musical instrument.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
// Alchemy skill from the default script pack.&lt;br /&gt;
//&lt;br /&gt;
[SKILL 0]&lt;br /&gt;
DEFNAME=SKILL_ALCHEMY&lt;br /&gt;
KEY=Alchemy&lt;br /&gt;
TITLE=Alchemist&lt;br /&gt;
DELAY=3.0,1.0&lt;br /&gt;
ADV_RATE=10.0,200.0,800.0&lt;br /&gt;
VALUES=1,20,100&lt;br /&gt;
&lt;br /&gt;
BONUS_STATS=10&lt;br /&gt;
BONUS_STR=0&lt;br /&gt;
BONUS_DEX=20&lt;br /&gt;
BONUS_INT=80&lt;br /&gt;
&lt;br /&gt;
STAT_STR=5&lt;br /&gt;
STAT_INT=75&lt;br /&gt;
STAT_DEX=40&lt;br /&gt;
&lt;br /&gt;
ON=@Fail&lt;br /&gt;
	SRC.SYSMESSAGE You toss the failed mixture from the mortar, unable to create a potion from it.&lt;br /&gt;
&lt;br /&gt;
ON=@Abort&lt;br /&gt;
	SRC.SYSMESSAGE You fail to complete the potion.&lt;br /&gt;
&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Reference Compendium]]&lt;br /&gt;
[[Category: Definitions]]&lt;/div&gt;</summary>
		<author><name>Wuffel</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=@StatChange&amp;diff=7559</id>
		<title>@StatChange</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=@StatChange&amp;diff=7559"/>
				<updated>2014-03-25T19:25:27Z</updated>
		
		<summary type="html">&lt;p&gt;Wuffel: /* Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Description==&lt;br /&gt;
This trigger fires when a character's strength, dexterity, intelligence, food, maxhits, maxmana or maxstam is changed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Fires on:&lt;br /&gt;
* [[Characters]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
The following object references are explicitly available for this trigger:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Name''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| [[I]] || The [[Characters|character]] whose strength, dexterity or intelligence is being changed.&lt;br /&gt;
|-&lt;br /&gt;
| [[SRC]] || The [[Characters|character]] whose strength, dexterity or intelligence is being changed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Arguments==&lt;br /&gt;
The following arguments are set for this trigger. If an argument is marked as &amp;quot;In&amp;quot; then a value will be passed in to the trigger, if an argument is marked as &amp;quot;Out&amp;quot; then it can be set to a value to affect Sphere's behaviour:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Argument''' || '''In/Out''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| ARGN1 || In || The stat being changed.&lt;br /&gt;
{| cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Value''' || '''Stat'''&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Strength&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Intelligence&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Dexterity&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Food&lt;br /&gt;
|-&lt;br /&gt;
| 4 || MaxHits&lt;br /&gt;
|-&lt;br /&gt;
| 5 || MaxMana&lt;br /&gt;
|-&lt;br /&gt;
| 6 || MaxStam&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Maxfood&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Modstr&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Modint&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Moddex&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| ARGN2 || In || The current stat value.&lt;br /&gt;
|-&lt;br /&gt;
| ARGN3 || I/O || The new stat value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Return Values==&lt;br /&gt;
The following return values are explicitly defined for this trigger:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Return Value''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Prevents the character's stat from being changed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Reference Compendium]]&lt;br /&gt;
[[Category: Triggers]]&lt;/div&gt;</summary>
		<author><name>Wuffel</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=@StatChange&amp;diff=7558</id>
		<title>@StatChange</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=@StatChange&amp;diff=7558"/>
				<updated>2014-03-25T18:59:34Z</updated>
		
		<summary type="html">&lt;p&gt;Wuffel: /* Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Description==&lt;br /&gt;
This trigger fires when a character's strength, dexterity, intelligence, food, maxhits, maxmana or maxstam is changed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Fires on:&lt;br /&gt;
* [[Characters]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
The following object references are explicitly available for this trigger:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Name''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| [[I]] || The [[Characters|character]] whose strength, dexterity or intelligence is being changed.&lt;br /&gt;
|-&lt;br /&gt;
| [[SRC]] || The [[Characters|character]] whose strength, dexterity or intelligence is being changed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Arguments==&lt;br /&gt;
The following arguments are set for this trigger. If an argument is marked as &amp;quot;In&amp;quot; then a value will be passed in to the trigger, if an argument is marked as &amp;quot;Out&amp;quot; then it can be set to a value to affect Sphere's behaviour:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Argument''' || '''In/Out''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| ARGN1 || In || The stat being changed.&lt;br /&gt;
{| cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Value''' || '''Stat'''&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Strength&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Intelligence&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Dexterity&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Food&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Hits&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Mana&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Stam&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Maxfood&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Modstr&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Modint&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Moddex&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| ARGN2 || In || The current stat value.&lt;br /&gt;
|-&lt;br /&gt;
| ARGN3 || I/O || The new stat value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Return Values==&lt;br /&gt;
The following return values are explicitly defined for this trigger:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Return Value''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Prevents the character's stat from being changed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Reference Compendium]]&lt;br /&gt;
[[Category: Triggers]]&lt;/div&gt;</summary>
		<author><name>Wuffel</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=@StatChange&amp;diff=7557</id>
		<title>@StatChange</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=@StatChange&amp;diff=7557"/>
				<updated>2014-03-25T18:38:03Z</updated>
		
		<summary type="html">&lt;p&gt;Wuffel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Description==&lt;br /&gt;
This trigger fires when a character's strength, dexterity, intelligence, food, maxhits, maxmana or maxstam is changed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Fires on:&lt;br /&gt;
* [[Characters]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
The following object references are explicitly available for this trigger:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Name''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| [[I]] || The [[Characters|character]] whose strength, dexterity or intelligence is being changed.&lt;br /&gt;
|-&lt;br /&gt;
| [[SRC]] || The [[Characters|character]] whose strength, dexterity or intelligence is being changed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Arguments==&lt;br /&gt;
The following arguments are set for this trigger. If an argument is marked as &amp;quot;In&amp;quot; then a value will be passed in to the trigger, if an argument is marked as &amp;quot;Out&amp;quot; then it can be set to a value to affect Sphere's behaviour:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Argument''' || '''In/Out''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| ARGN1 || I/O || The stat being changed.&lt;br /&gt;
{| cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Value''' || '''Stat'''&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Strength&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Intelligence&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Dexterity&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Food&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Hits&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Mana&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Stam&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Maxfood&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Modstr&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Modint&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Moddex&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| ARGN2 || I/O || The current stat value.&lt;br /&gt;
|-&lt;br /&gt;
| ARGN3 || I/O || The new stat value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Return Values==&lt;br /&gt;
The following return values are explicitly defined for this trigger:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Return Value''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Prevents the character's stat from being changed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Reference Compendium]]&lt;br /&gt;
[[Category: Triggers]]&lt;/div&gt;</summary>
		<author><name>Wuffel</name></author>	</entry>

	</feed>