<?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=Soulless</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=Soulless"/>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Special:Contributions/Soulless"/>
		<updated>2026-04-16T23:20:51Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.28.0</generator>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Main_Page&amp;diff=8096</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Main_Page&amp;diff=8096"/>
				<updated>2023-08-03T17:35:46Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;background-color:#a7bcdc; color:#000; min-width:650px; padding:1px; text-align:center; width:100%;&amp;quot;&amp;gt;&lt;br /&gt;
'''Starting with SphereServer'''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;min-width:650px; width:100%;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div style=&amp;quot;border-right:1px solid #a7bcdc; float:left; height:100%; margin-right:-1px; width:33%;&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
			'''Setup of Sphere'''&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Where to get Sphere]]&lt;br /&gt;
* [[Installing Sphere]]&lt;br /&gt;
* [[Configuring Sphere.ini]]&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
			'''Sphere 101'''&lt;br /&gt;
		&amp;lt;/div&amp;gt;		&lt;br /&gt;
		&amp;lt;div style=&amp;quot;padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Chapter 1]] ''(Numbers, DEFNAME, ITEMDEF, CHARDEF)''&lt;br /&gt;
* [[Chapter 2]] ''(Sphere files explained)''&lt;br /&gt;
* [[Chapter 3]] ''(Scripting NPC's and items, Cool commands)''&lt;br /&gt;
* [[Chapter 4]] ''(Objects, operators, speech)''&lt;br /&gt;
* [[Chapter 5]] ''(Tags, Vars, Locals, Functions)''&lt;br /&gt;
* [[Chapter 6]] ''(LINKs, TIMERs, TARGETs)''&lt;br /&gt;
* [[Chapter 7]] ''(Loops and powerful functions)''&lt;br /&gt;
* [[Chapter 8]] ''(SKILLMENUs, MENUs, Gumps)''&lt;br /&gt;
* [[Chapter 9]] ''(Events)''&lt;br /&gt;
* [[Chapter 10]] ''(String Handling)''&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div style=&amp;quot;border-left:1px solid #a7bcdc; float:left; height:100%; margin-right:-1px; width:67%;&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
			'''Extra Tutorials'''&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Common Mistakes|Common Mistakes Explained]] ''(A revision of Maximus's tutorial on the forums, and continuation of Taran's Misconceptions tutorial)''&lt;br /&gt;
* [[Internet and Sphere]] ''(And how to make the right use of them)''&lt;br /&gt;
* [[Languages Tutorial]] ''(How to script your own language system)''&lt;br /&gt;
* [[Making your own Skills]] ''(How to make and customize your skill)''&lt;br /&gt;
* [[Mul Patching Tutorial|Nazghul's Mul Patching Tutorial]] [http://sorea.profitux.cz/patching/ external link] ''(A document about mul patching and customizing your server)''&lt;br /&gt;
* [[Overriding Hardcoded Commands]] ''(How to override hardcoded commands and functions)''&lt;br /&gt;
* [[Scheduled Reboot]] ''(How to schedule system reboots)''&lt;br /&gt;
* [[Using MySQL]] ''(How to use MySQL)''&lt;br /&gt;
* [[Bitwise Operations]] ''(How to work with FLAGS/ATTR)''&lt;br /&gt;
* [[Script Debugging]] ''(How to fix your scripts)''&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
			'''IMPORTANT LINKS'''&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [https://github.com/Sphereserver SphereServer Official Github]&lt;br /&gt;
* [https://forum.spherecommunity.net/sshare.php?srt=4 Download Nightly Builds] ''(Plus! Extra downloads, like tools and scripts!)''&lt;br /&gt;
* [https://github.com/Sphereserver/Source-X/blob/master/Changelog.txt SphereX Changelog] | [https://github.com/Sphereserver/Source/blob/master/changelog.txt 56d Changelog] | [https://github.com/Sphereserver/Source-X/tree/master/docst Older Changelog]&lt;br /&gt;
* [https://discord.gg/BZj2fEA Join us at Discord] ''(We will solve most of your doubts over there)''&lt;br /&gt;
		&amp;lt;/div&amp;gt;		&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color:#a7bcdc; color:#000; min-width:650px; padding:1px; text-align:center; width:100%;&amp;quot;&amp;gt;&lt;br /&gt;
'''Reference Compendium'''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;min-width:650px; width:100%;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div style=&amp;quot;border-right:1px solid #a7bcdc; float:left; height:100%; margin-right:-1px; width:33%;&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
[[:Category:Definitions|'''Definitions''']]&lt;br /&gt;
		&amp;lt;/div&amp;gt;		&lt;br /&gt;
		&amp;lt;div style=&amp;quot;padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[CHARDEF|Characters]]&lt;br /&gt;
* [[DIALOG|Dialogs]]&lt;br /&gt;
* [[EVENTS|Events]]&lt;br /&gt;
* [[ITEMDEF|Items]]&lt;br /&gt;
* [[MENU|Menus]]&lt;br /&gt;
* [[REGIONRESOURCE|Region Resources]]&lt;br /&gt;
* [[REGIONTYPE|Region Types]]&lt;br /&gt;
* [[AREADEF|Regions]]&lt;br /&gt;
* [[ROOMDEF|Rooms]]&lt;br /&gt;
* [[SKILLCLASS|Skill Classes]]&lt;br /&gt;
* [[SKILLMENU|Skill Menus]]&lt;br /&gt;
* [[SKILL|Skills]]&lt;br /&gt;
* [[SPAWN|Spawn Groups]]&lt;br /&gt;
* [[SPELL|Spells]]&lt;br /&gt;
* [[TYPEDEF|Types]]&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div style=&amp;quot;border-left:1px solid #a7bcdc; float:left; height:100%; margin-right:-1px; width:67%;&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
[[:Category:Objects|'''Objects''']]&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Accounts]]&lt;br /&gt;
* [[Characters]]&lt;br /&gt;
* [[Database]]&lt;br /&gt;
* [[Files]]&lt;br /&gt;
* [[GM Pages]]&lt;br /&gt;
* [[Items]]&lt;br /&gt;
** ''[[Special Items]]''&lt;br /&gt;
* [[Map Points]]&lt;br /&gt;
* [[Parties]]&lt;br /&gt;
* [[Regions]]&lt;br /&gt;
* [[Rooms]]&lt;br /&gt;
* [[Sectors]]&lt;br /&gt;
* [[Server]]&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
[[:Category:Scripts|'''Scripts''']]&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[:Category:Functions|Functions and Triggers]]&lt;br /&gt;
* [[:Category:Variables|General Functions, Properties and References]]&lt;br /&gt;
* [[Intrinsic Functions]]&lt;br /&gt;
* [[:Category:Statements|Statements]]&lt;br /&gt;
* [[:Category:Triggers|Triggers]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
* Modern SphereServer Nightly Downloads (Server) https://forum.spherecommunity.net/sshare.php?srt=4&lt;br /&gt;
* Older/Classic SphereServer downloads (Server) https://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;prj=7&lt;br /&gt;
* Sphere-X Script Pack (Scripts) https://github.com/Sphereserver/Scripts-X&lt;br /&gt;
* Julians Script Vault (Scripts) https://github.com/JulianUO/SphereX-ScriptsVault&lt;br /&gt;
* List of UO Packets (Info) https://docs.polserver.com/packets/index.php&lt;br /&gt;
* Scripts https://mirror.ashkantra.de/scripts/Sphere/&lt;br /&gt;
* GM Commands (Commands) https://wiki.spherecommunity.net/index.php?title=GM_Commands&lt;br /&gt;
* Axis 2 Downloads (GM Tool) https://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;prj=1 &lt;br /&gt;
* Leviathan (GM tool) https://github.com/cbnolok/Leviathan/releases&lt;br /&gt;
* Ultima Online Downloads (Clients) https://mega.nz/folder/6uYxnIpY#tahGzzz_yOkLgNM1c_DxdQ&lt;br /&gt;
* Client 7.0.20 https://mirror.ashkantra.de/fullclients/&lt;br /&gt;
* ClassicUO (Third Party Client) https://www.classicuo.eu/&lt;br /&gt;
* OrionUO (Third Party Client) http://orionuo.online/&lt;br /&gt;
* CentrED (Worldbuilding)  https://uo.wzk.cz/centred/&lt;br /&gt;
* UO-Pixel (Graphics) http://www.uo-pixel.de/&lt;br /&gt;
* UO Fiddler ( MUL Viewer) http://uofiddler.polserver.com/&lt;br /&gt;
* UO Grafiken by Nyray (Graphics) https://nyray.wordpress.com/&lt;br /&gt;
* Vestimisu (Graphics) http://vestimisu.blogspot.com/&lt;br /&gt;
* Ultima Online Graphics By Rubra (Graphcs) http://uographicsrubra.blogspot.com/&lt;br /&gt;
* Isis‘ UO Grafiken (Graphics) https://isispixel.wordpress.com/&lt;br /&gt;
* ServUO (Graphics) https://www.servuo.com/archive/categories/assets.13/&lt;br /&gt;
* UOGateway (Shard Listing) https://uogateway.com/ &lt;br /&gt;
&lt;br /&gt;
==Sphere 3rd Party Tools==&lt;br /&gt;
* [http://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;uid=603 Axis II] - GM Tool for Sphere that will allow you to place objects in-game, spawns, traveling and many other useful functions for shard admins and GMs.&lt;br /&gt;
* [http://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;prj=3 vSCP] - vSCP is the most complete and up-to-date syntax editor for sphere scripting. It does contain syntax highlighting, autocomplete, folding markers to specify blocks of code that can expand or collapse, bookmarks, autoindent, find/replace/gotoline, help guide for all the sphere elements added to your code, and more! &lt;br /&gt;
* [http://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;prj=2 vServerLauncher] - Install and run the latest build of sphereserver in a few clicks with vServerLauncher. It's pretty quick and simple!&lt;br /&gt;
* [http://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;prj=5 SphereService] - Relaunch SphereSvr.exe everytime it closes/crashes. Automatically runs at windows startup and works in a silent mode minimized to Tray.&lt;br /&gt;
* [http://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;prj=4 vCrypter] - Type the client version and the tool will calculate the correct UO login keys for classic or enhanced clients.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Articles==&lt;br /&gt;
&lt;br /&gt;
* [[Armor Calculation]]&lt;br /&gt;
* [[Client Changes]]&lt;br /&gt;
* [[Common Scripting Misconceptions]]&lt;br /&gt;
* [[Custom Object Properties]]&lt;br /&gt;
* [[Error Codes]]&lt;br /&gt;
* [[Experience System]]&lt;br /&gt;
* [[How Combat Works]]&lt;br /&gt;
* [[Occam's Razor]]&lt;br /&gt;
* [[Optimization|Optimization Theory]]&lt;br /&gt;
* [[Override TAGs]]&lt;br /&gt;
* [[Revisions Changelog]]&lt;br /&gt;
* [[Sendpacket]]&lt;br /&gt;
* [[Skill Gain Theory]]&lt;br /&gt;
* [[The Process of Scripting]]&lt;br /&gt;
* [[Building Component Reference]]&lt;br /&gt;
&lt;br /&gt;
==Credits==&lt;br /&gt;
&lt;br /&gt;
'''Special thanks to:'''&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|XuN, Nolok, Ben, and Drk]], for their hard work on the X branch taking Sphere into the next decade.&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|Ben, Cloud_Br, Ellessar, Jdog, Lord Zerofiz, Mordaunt, Nazghul-ll, RanXerox, Rattlehead, Sandman, Sharlenwar, ShiryuX, thelegbra, Maximus, WarAngel and Valios]], for helping to add content.&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|Daleth]], for writing the Sphere Reference Project, and [[WhoIsWho|Mordaunt]] for converting it to .chm format.&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|Tracker]], for writing the Sphere 56 Tracking Changes in Sphereserver.net&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|Taran]], for writing the original and now famous Sphere Scripting for Dummies tutorials, and [[WhoIsWho|MrSugarCube]] for bringing it up-to-date directly from source.&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|Ben, Khaos, Ranxerox, Shiryux, Furio, Radiant, Vjaka, Nazghul-ll, Ellessar, Torfo, Shadow Dragon, MrSugarCube and coruja747]] for continuing to develop Sphere into a powerful and very customizable Ultima Online emulator.&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|Crius]], for providing hosting for the original SphereWiki, and [[WhoIsWho|Torfo]] for providing the current hosting.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
* [[Useful Links]] ''(An ongoing list of useful links for community members)''&lt;br /&gt;
* [http://www.spherecommunity.net/ Official SphereServer Website]&lt;br /&gt;
* [https://forum.spherecommunity.net/sshare.php?srt=4 Nightly builds]&lt;br /&gt;
* [http://nightly.prerelease.sphere.torfo.org/ Nightly builds - OUTDATED, use the link above]&lt;br /&gt;
* [http://spherepack.codeplex.com/ Sphere Community Pack 2.0]&lt;br /&gt;
* [http://uo.torfo.org/packetguide/ Jerrith's UO Packet Guide]&lt;br /&gt;
* [http://uo.torfo.org/packetguideKR/ Wyatt&amp;amp;Kons's UOKR Packet Guide]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Navigation]]&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Error_Codes&amp;diff=8095</id>
		<title>Error Codes</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Error_Codes&amp;diff=8095"/>
				<updated>2023-07-01T17:04:44Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Exit Codes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Error_Codes}}&lt;br /&gt;
&lt;br /&gt;
__FORCETOC__&lt;br /&gt;
==Exit Codes==&lt;br /&gt;
When Sphere closes, an 'exit code' will normally be shown in the console to describe why it is being shut down. In general, an exit code less than 0 is considered to be an error code, and values above 0 are normal shutdown codes. In most cases, a more descriptive error will be shown in the console and/or log file to help better diagnose the reason behind error codes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table lists all of the current codes and their meanings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
| '''Code''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| -10 || Unexpected error occurred&lt;br /&gt;
|-&lt;br /&gt;
| -9 || Failed to bind server port&lt;br /&gt;
|-&lt;br /&gt;
| -8 || Failed to load world save(s)&lt;br /&gt;
|-&lt;br /&gt;
| -3 || Failed to load server settings (script, ini, mul files) ''or'' &amp;lt;br /&amp;gt;did not write AGREE=1 in the sphere.ini&lt;br /&gt;
|-&lt;br /&gt;
| -1 || Shutdown via commandline (/?, /T and /Q switches)&lt;br /&gt;
|-&lt;br /&gt;
|  1 || X in console ''or'' &amp;lt;br /&amp;gt;SIGHUP signal, terminal closed (Linux Only)&lt;br /&gt;
|-&lt;br /&gt;
|  2 || SHUTDOWN command&lt;br /&gt;
|-&lt;br /&gt;
|  4 || Service shutdown ''(Windows Only)''&lt;br /&gt;
|-&lt;br /&gt;
|  5 || Console window closed ''(Windows Only)''&lt;br /&gt;
|-&lt;br /&gt;
|  6 || SIGABRT signal, process aborted ''(Linux Only)''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Garbage Collection==&lt;br /&gt;
The purpose of garbage collection is to validate all of the server objects and free up unused UIDs. Garbage collection is initiated:&lt;br /&gt;
* After the world save is loaded at startup.&lt;br /&gt;
* Before a world save begins, if the [[FORCEGARBAGECOLLECT]] setting is enabled in Sphere.ini.&lt;br /&gt;
* After the [[IMPORT]] or [[RESTORE]] functions have been used on the [[Server|server]] object.&lt;br /&gt;
* When the 'G' command is entered via the Sphere console&lt;br /&gt;
* When the [[GARBAGE]] function is used on the [[Server|server]] object.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When garbage collection encounters a problem with an object it may attempt to automatically correct the error, otherwise the object will be removed. When an object is removed by garbage collection there will normally be an error shown in the console describing the item that was removed along with the reason. The following table lists all of the garbage collection codes along with their description:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
| '''Code''' || '''Message''' || '''Description''' ||&lt;br /&gt;
|-&lt;br /&gt;
| 1102 || Disconnected charr not acting as such || A character has been marked disconnected from the world, but it is not listed in the sector's disconnected character's list. || *&lt;br /&gt;
|-&lt;br /&gt;
| 1103 || Ridden NPC not acting as such || An NPC has the [[FLAGS|statf_ridden]] flag set, but does not have its [[ACTION]] property set to 111. ||&lt;br /&gt;
|-&lt;br /&gt;
| 1104 || Ridden NPC without a mount item || An NPC has the [[FLAGS|statf_ridden]] flag set, but its [[ACTARG1]] property isn't set to the [[UID]] of an item whose [[TYPE]] property is set to [[TYPE|t_figurine]] or [[TYPE|t_eq_horse]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| 1105 || Ridden NPC with a mislinked mount item || An NPC has the [[FLAGS|statf_ridden]] flag set, but its [[ACTARG1]] property isn't set to the [[UID]] of an item whose [[MORE2]] property matches the NPC's [[UID]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| 1106 || Disconnected NPC neither dead nor ridden || An NPC has been disconnected from the world, but does not have either one of the [[FLAGS|statf_ridden]] or [[FLAGS|statf_dead]] flags set. ||&lt;br /&gt;
|-&lt;br /&gt;
| 1107 || In game char that is neither a player nor an NPC || A character is not a player or an NPC. || *&lt;br /&gt;
|-&lt;br /&gt;
| 1108 || Char not on a valid position || A character's [[P|position]] is outside of the map boundaries. ||&lt;br /&gt;
|-&lt;br /&gt;
| 1203 || Ridden NPC not acting as such || Same as 1103. ||&lt;br /&gt;
|-&lt;br /&gt;
| 1204 || Ridden NPC without a mount item || Same as 1104. ||&lt;br /&gt;
|-&lt;br /&gt;
| 1205 || In game char that is neither a player nor an NPC || Same as 1107. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2102 || Item without ITEMDEF || An item does not have an [[ITEMDEF]] section. || *&lt;br /&gt;
|-&lt;br /&gt;
| 2103 || Item ITEMDEF with ID = 0 || An item's [[ITEMDEF]] has an [[ID]] of zero. || *&lt;br /&gt;
|-&lt;br /&gt;
| 2104 || Disconnected item || An item has been marked as disconnected from the world. || *&lt;br /&gt;
|-&lt;br /&gt;
| 2105 || Item not on a valid position || An item is not in a container and its [[P|position]] is outside of the map boundaries. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2106 || Item flagged as being in a container but it isn't || An item is flagged as not being top level, but it does not have a container. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2202 || Item flagged as equipped but it isn't || An item is flagged as being equipped, but its parent is not a character. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2205 || Mislinked item || An item's [[LINK]] property matches its [[UID]], or has been set to a [[UID]] that doesn't exist. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2206 || Gm Robe / Deathshroud not on a char || A GM robe or death shroud ([[ID]] of 0204E or 0204F) is not equipped to a character. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2207 || Deathshroud not on a dead char || A death shroud ([[ID]] of 0204F) is equipped to a character without the [[FLAGS|statf_dead]] flag set. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2208 || Gm Robe on a char without privilege || A GM robe ([[ID]] of 0204E) is equipped to a character whose [[PLEVEL]] is less than 2. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2220 || Trade window memory not equipped in the correct layer || A [[TYPE|t_eq_trade window]] item type is not equipped, has its [[LAYER]] property set to something other than [[LAYER|layer_none]], or is equipped to an NPC. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2221 || Client linger memory not equipped in the correct layer || A [[TYPE|t_eq_client_linger]] item type is not equipped, has its [[LAYER]] property set to something other than [[LAYER|layer_flag_clientlinger]], or is equipped to an NPC. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2222 || Memory not equipped / not in the memory layer / without color || A memory item ([[ID]] of 02007) is not equipped, or a non-memory item has had its [[TYPE]] set to [[TYPE|t_eq_memory_obj]] after creation. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2226 || Mount memory not equipped in the correct layer || A [[TYPE|t_eq_horse]] item type is not equipped, or has its [[LAYER]] property set to something other than [[LAYER|layer_horse]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2227 || Hair/Beard item not equipped / not in a corpse / not in a vendor box || A [[TYPE|t_hair]] or [[TYPE|t_beard]] item type that isn't equipped, is either not in a container or its container has an [[ID]] other than 02006 or 02AF8. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2228 || Hair/Beard item not equipped / not in a corpse / not in a vendor box || A [[TYPE|t_hair]] or [[TYPE|t_beard]] item is equipped, but has its [[LAYER]] property set to something other than [[LAYER|layer_hair]] or [[LAYER|layer_beard]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2229 || Game piece not in a game board || A [[TYPE|t_game_piece]] item has been found outside of a container. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2230 || Item equipped in the trade window layer but it isn't a trade window || An equipped item has been found with its [[LAYER]] property set to [[LAYER|layer_none]], but its [[TYPE|type]] is not [[TYPE|t_eq_trade_window]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2231 || Item equipped in the memory layer but it isn't a memory || An equipped item has been found with its [[LAYER]] property set to [[LAYER|layer_special]], but its [[TYPE|type]] is not [[TYPE|t_eq_memory_obj]] or [[TYPE|t_eq_script]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2233 || Item equipped in the mount memory layer but it isn't a mount memory || An equipped item has been found with its [[LAYER]] property set to [[LAYER|layer_horse]], but its [[TYPE|type]] is not [[TYPE|t_eq_horse]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2234 || Item equipped in the client linger layer but it isn't a client linger memory || An equipped item has been found with its [[LAYER]] property set to [[LAYER|layer_flag_clientlinger]], but its [[TYPE|type]] is not [[TYPE|t_eq_client_linger]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2235 || Item equipped in the murder memory layer but it isn't a murder memory || An equipped item has been found with its [[LAYER]] property set to [[LAYER|layer_flag_murders]], but the character is an NPC or the player has its [[KILLS]] property set to 0. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2236 || Item flagged as decay but without timer set || A top-level item has the [[ATTR|attr_decay]] flag set, but its [[TIMER]] property has not been set. ||&lt;br /&gt;
|-&lt;br /&gt;
| 3101 || Object is totaly lost, no parent exists || An object has no parent. || *&lt;br /&gt;
|-&lt;br /&gt;
| 3102 || Object was deleted or UID is incorrect || An object does not have a valid [[UID]]. || *&lt;br /&gt;
|-&lt;br /&gt;
| 3201 || Object not correctly loaded by server (UID conflict) || More than one object has the same [[UID]] value. || *&lt;br /&gt;
|-&lt;br /&gt;
| 4222 || Memory not equipped / not in the memory layer / without color || A memory item is not flagged as equipped, has its [[LAYER]] property set to something other than [[LAYER|layer_special]], or has its [[COLOR]] property set to 0. ||&lt;br /&gt;
|-&lt;br /&gt;
| 4223 || Memory not on a char || A memory item is flagged as equipped, but it's [[CONT|parent]] is not a character. ||&lt;br /&gt;
|-&lt;br /&gt;
| 4224 || Stone/Guild memory mislinked || A memory item's [[COLOR]] property has one of the [[COLOR|memory_guild]] or [[COLOR|memory_town]] flags set, but the [[LINK]] property is not set to the [[UID]] of a guild or town stone. ||&lt;br /&gt;
|-&lt;br /&gt;
| 4225 || Stone/Guild memory linked to the wrong stone || A memory item's [[COLOR]] property has one of the [[COLOR|memory_guild]] or [[COLOR|memory_town]] flags set, but the character the memory is equipped to is not a member of the guild or town. ||&lt;br /&gt;
|-&lt;br /&gt;
| 7101 || Object's UID does not match up with server's UID table. || An object does not have the expected [[UID]] value. || *&lt;br /&gt;
|-&lt;br /&gt;
| 7102 || Object does not exist. || An object does not exist. || *&lt;br /&gt;
|-&lt;br /&gt;
| FFFF || Bad memory allocation || An exception was thrown whilst checking the object's validity. || *&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note''': ''Garbage collection codes marked with * generally indicate a serious error within an object's internal state and should not normally be seen. If you are experiencing and are able to reliably reproduce any such errors then please report the details to the [http://tracker.sphere.torfo.org/bugs/main_page.php bug tracker].''&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Error_Codes&amp;diff=8094</id>
		<title>Error Codes</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Error_Codes&amp;diff=8094"/>
				<updated>2023-07-01T17:04:24Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Exit Codes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Error_Codes}}&lt;br /&gt;
&lt;br /&gt;
__FORCETOC__&lt;br /&gt;
==Exit Codes==&lt;br /&gt;
When Sphere closes, an 'exit code' will normally be shown in the console to describe why it is being shut down. In general, an exit code less than 0 is considered to be an error code, and values above 0 are normal shutdown codes. In most cases, a more descriptive error will be shown in the console and/or log file to help better diagnose the reason behind error codes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table lists all of the current codes and their meanings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
| '''Code''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| -10 || Unexpected error occurred&lt;br /&gt;
|-&lt;br /&gt;
| -9 || Failed to bind server port&lt;br /&gt;
|-&lt;br /&gt;
| -8 || Failed to load world save(s)&lt;br /&gt;
|-&lt;br /&gt;
| -3 || Failed to load server settings (script, ini, mul files) ''or'' did not write AGREE=1 in the sphere.ini&lt;br /&gt;
|-&lt;br /&gt;
| -1 || Shutdown via commandline (/?, /T and /Q switches)&lt;br /&gt;
|-&lt;br /&gt;
|  1 || X in console ''or'' &amp;lt;br /&amp;gt;SIGHUP signal, terminal closed (Linux Only)&lt;br /&gt;
|-&lt;br /&gt;
|  2 || SHUTDOWN command&lt;br /&gt;
|-&lt;br /&gt;
|  4 || Service shutdown ''(Windows Only)''&lt;br /&gt;
|-&lt;br /&gt;
|  5 || Console window closed ''(Windows Only)''&lt;br /&gt;
|-&lt;br /&gt;
|  6 || SIGABRT signal, process aborted ''(Linux Only)''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Garbage Collection==&lt;br /&gt;
The purpose of garbage collection is to validate all of the server objects and free up unused UIDs. Garbage collection is initiated:&lt;br /&gt;
* After the world save is loaded at startup.&lt;br /&gt;
* Before a world save begins, if the [[FORCEGARBAGECOLLECT]] setting is enabled in Sphere.ini.&lt;br /&gt;
* After the [[IMPORT]] or [[RESTORE]] functions have been used on the [[Server|server]] object.&lt;br /&gt;
* When the 'G' command is entered via the Sphere console&lt;br /&gt;
* When the [[GARBAGE]] function is used on the [[Server|server]] object.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When garbage collection encounters a problem with an object it may attempt to automatically correct the error, otherwise the object will be removed. When an object is removed by garbage collection there will normally be an error shown in the console describing the item that was removed along with the reason. The following table lists all of the garbage collection codes along with their description:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
| '''Code''' || '''Message''' || '''Description''' ||&lt;br /&gt;
|-&lt;br /&gt;
| 1102 || Disconnected charr not acting as such || A character has been marked disconnected from the world, but it is not listed in the sector's disconnected character's list. || *&lt;br /&gt;
|-&lt;br /&gt;
| 1103 || Ridden NPC not acting as such || An NPC has the [[FLAGS|statf_ridden]] flag set, but does not have its [[ACTION]] property set to 111. ||&lt;br /&gt;
|-&lt;br /&gt;
| 1104 || Ridden NPC without a mount item || An NPC has the [[FLAGS|statf_ridden]] flag set, but its [[ACTARG1]] property isn't set to the [[UID]] of an item whose [[TYPE]] property is set to [[TYPE|t_figurine]] or [[TYPE|t_eq_horse]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| 1105 || Ridden NPC with a mislinked mount item || An NPC has the [[FLAGS|statf_ridden]] flag set, but its [[ACTARG1]] property isn't set to the [[UID]] of an item whose [[MORE2]] property matches the NPC's [[UID]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| 1106 || Disconnected NPC neither dead nor ridden || An NPC has been disconnected from the world, but does not have either one of the [[FLAGS|statf_ridden]] or [[FLAGS|statf_dead]] flags set. ||&lt;br /&gt;
|-&lt;br /&gt;
| 1107 || In game char that is neither a player nor an NPC || A character is not a player or an NPC. || *&lt;br /&gt;
|-&lt;br /&gt;
| 1108 || Char not on a valid position || A character's [[P|position]] is outside of the map boundaries. ||&lt;br /&gt;
|-&lt;br /&gt;
| 1203 || Ridden NPC not acting as such || Same as 1103. ||&lt;br /&gt;
|-&lt;br /&gt;
| 1204 || Ridden NPC without a mount item || Same as 1104. ||&lt;br /&gt;
|-&lt;br /&gt;
| 1205 || In game char that is neither a player nor an NPC || Same as 1107. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2102 || Item without ITEMDEF || An item does not have an [[ITEMDEF]] section. || *&lt;br /&gt;
|-&lt;br /&gt;
| 2103 || Item ITEMDEF with ID = 0 || An item's [[ITEMDEF]] has an [[ID]] of zero. || *&lt;br /&gt;
|-&lt;br /&gt;
| 2104 || Disconnected item || An item has been marked as disconnected from the world. || *&lt;br /&gt;
|-&lt;br /&gt;
| 2105 || Item not on a valid position || An item is not in a container and its [[P|position]] is outside of the map boundaries. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2106 || Item flagged as being in a container but it isn't || An item is flagged as not being top level, but it does not have a container. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2202 || Item flagged as equipped but it isn't || An item is flagged as being equipped, but its parent is not a character. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2205 || Mislinked item || An item's [[LINK]] property matches its [[UID]], or has been set to a [[UID]] that doesn't exist. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2206 || Gm Robe / Deathshroud not on a char || A GM robe or death shroud ([[ID]] of 0204E or 0204F) is not equipped to a character. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2207 || Deathshroud not on a dead char || A death shroud ([[ID]] of 0204F) is equipped to a character without the [[FLAGS|statf_dead]] flag set. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2208 || Gm Robe on a char without privilege || A GM robe ([[ID]] of 0204E) is equipped to a character whose [[PLEVEL]] is less than 2. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2220 || Trade window memory not equipped in the correct layer || A [[TYPE|t_eq_trade window]] item type is not equipped, has its [[LAYER]] property set to something other than [[LAYER|layer_none]], or is equipped to an NPC. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2221 || Client linger memory not equipped in the correct layer || A [[TYPE|t_eq_client_linger]] item type is not equipped, has its [[LAYER]] property set to something other than [[LAYER|layer_flag_clientlinger]], or is equipped to an NPC. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2222 || Memory not equipped / not in the memory layer / without color || A memory item ([[ID]] of 02007) is not equipped, or a non-memory item has had its [[TYPE]] set to [[TYPE|t_eq_memory_obj]] after creation. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2226 || Mount memory not equipped in the correct layer || A [[TYPE|t_eq_horse]] item type is not equipped, or has its [[LAYER]] property set to something other than [[LAYER|layer_horse]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2227 || Hair/Beard item not equipped / not in a corpse / not in a vendor box || A [[TYPE|t_hair]] or [[TYPE|t_beard]] item type that isn't equipped, is either not in a container or its container has an [[ID]] other than 02006 or 02AF8. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2228 || Hair/Beard item not equipped / not in a corpse / not in a vendor box || A [[TYPE|t_hair]] or [[TYPE|t_beard]] item is equipped, but has its [[LAYER]] property set to something other than [[LAYER|layer_hair]] or [[LAYER|layer_beard]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2229 || Game piece not in a game board || A [[TYPE|t_game_piece]] item has been found outside of a container. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2230 || Item equipped in the trade window layer but it isn't a trade window || An equipped item has been found with its [[LAYER]] property set to [[LAYER|layer_none]], but its [[TYPE|type]] is not [[TYPE|t_eq_trade_window]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2231 || Item equipped in the memory layer but it isn't a memory || An equipped item has been found with its [[LAYER]] property set to [[LAYER|layer_special]], but its [[TYPE|type]] is not [[TYPE|t_eq_memory_obj]] or [[TYPE|t_eq_script]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2233 || Item equipped in the mount memory layer but it isn't a mount memory || An equipped item has been found with its [[LAYER]] property set to [[LAYER|layer_horse]], but its [[TYPE|type]] is not [[TYPE|t_eq_horse]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2234 || Item equipped in the client linger layer but it isn't a client linger memory || An equipped item has been found with its [[LAYER]] property set to [[LAYER|layer_flag_clientlinger]], but its [[TYPE|type]] is not [[TYPE|t_eq_client_linger]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2235 || Item equipped in the murder memory layer but it isn't a murder memory || An equipped item has been found with its [[LAYER]] property set to [[LAYER|layer_flag_murders]], but the character is an NPC or the player has its [[KILLS]] property set to 0. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2236 || Item flagged as decay but without timer set || A top-level item has the [[ATTR|attr_decay]] flag set, but its [[TIMER]] property has not been set. ||&lt;br /&gt;
|-&lt;br /&gt;
| 3101 || Object is totaly lost, no parent exists || An object has no parent. || *&lt;br /&gt;
|-&lt;br /&gt;
| 3102 || Object was deleted or UID is incorrect || An object does not have a valid [[UID]]. || *&lt;br /&gt;
|-&lt;br /&gt;
| 3201 || Object not correctly loaded by server (UID conflict) || More than one object has the same [[UID]] value. || *&lt;br /&gt;
|-&lt;br /&gt;
| 4222 || Memory not equipped / not in the memory layer / without color || A memory item is not flagged as equipped, has its [[LAYER]] property set to something other than [[LAYER|layer_special]], or has its [[COLOR]] property set to 0. ||&lt;br /&gt;
|-&lt;br /&gt;
| 4223 || Memory not on a char || A memory item is flagged as equipped, but it's [[CONT|parent]] is not a character. ||&lt;br /&gt;
|-&lt;br /&gt;
| 4224 || Stone/Guild memory mislinked || A memory item's [[COLOR]] property has one of the [[COLOR|memory_guild]] or [[COLOR|memory_town]] flags set, but the [[LINK]] property is not set to the [[UID]] of a guild or town stone. ||&lt;br /&gt;
|-&lt;br /&gt;
| 4225 || Stone/Guild memory linked to the wrong stone || A memory item's [[COLOR]] property has one of the [[COLOR|memory_guild]] or [[COLOR|memory_town]] flags set, but the character the memory is equipped to is not a member of the guild or town. ||&lt;br /&gt;
|-&lt;br /&gt;
| 7101 || Object's UID does not match up with server's UID table. || An object does not have the expected [[UID]] value. || *&lt;br /&gt;
|-&lt;br /&gt;
| 7102 || Object does not exist. || An object does not exist. || *&lt;br /&gt;
|-&lt;br /&gt;
| FFFF || Bad memory allocation || An exception was thrown whilst checking the object's validity. || *&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note''': ''Garbage collection codes marked with * generally indicate a serious error within an object's internal state and should not normally be seen. If you are experiencing and are able to reliably reproduce any such errors then please report the details to the [http://tracker.sphere.torfo.org/bugs/main_page.php bug tracker].''&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Error_Codes&amp;diff=8093</id>
		<title>Error Codes</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Error_Codes&amp;diff=8093"/>
				<updated>2023-07-01T17:04:08Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Exit Codes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Error_Codes}}&lt;br /&gt;
&lt;br /&gt;
__FORCETOC__&lt;br /&gt;
==Exit Codes==&lt;br /&gt;
When Sphere closes, an 'exit code' will normally be shown in the console to describe why it is being shut down. In general, an exit code less than 0 is considered to be an error code, and values above 0 are normal shutdown codes. In most cases, a more descriptive error will be shown in the console and/or log file to help better diagnose the reason behind error codes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table lists all of the current codes and their meanings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
| '''Code''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| -10 || Unexpected error occurred&lt;br /&gt;
|-&lt;br /&gt;
| -9 || Failed to bind server port&lt;br /&gt;
|-&lt;br /&gt;
| -8 || Failed to load world save(s)&lt;br /&gt;
|-&lt;br /&gt;
| -3 || Failed to load server settings (script, ini, mul files) Or did not write AGREE=1 in the sphere.ini&lt;br /&gt;
|-&lt;br /&gt;
| -1 || Shutdown via commandline (/?, /T and /Q switches)&lt;br /&gt;
|-&lt;br /&gt;
|  1 || X in console ''or'' &amp;lt;br /&amp;gt;SIGHUP signal, terminal closed (Linux Only)&lt;br /&gt;
|-&lt;br /&gt;
|  2 || SHUTDOWN command&lt;br /&gt;
|-&lt;br /&gt;
|  4 || Service shutdown ''(Windows Only)''&lt;br /&gt;
|-&lt;br /&gt;
|  5 || Console window closed ''(Windows Only)''&lt;br /&gt;
|-&lt;br /&gt;
|  6 || SIGABRT signal, process aborted ''(Linux Only)''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Garbage Collection==&lt;br /&gt;
The purpose of garbage collection is to validate all of the server objects and free up unused UIDs. Garbage collection is initiated:&lt;br /&gt;
* After the world save is loaded at startup.&lt;br /&gt;
* Before a world save begins, if the [[FORCEGARBAGECOLLECT]] setting is enabled in Sphere.ini.&lt;br /&gt;
* After the [[IMPORT]] or [[RESTORE]] functions have been used on the [[Server|server]] object.&lt;br /&gt;
* When the 'G' command is entered via the Sphere console&lt;br /&gt;
* When the [[GARBAGE]] function is used on the [[Server|server]] object.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When garbage collection encounters a problem with an object it may attempt to automatically correct the error, otherwise the object will be removed. When an object is removed by garbage collection there will normally be an error shown in the console describing the item that was removed along with the reason. The following table lists all of the garbage collection codes along with their description:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
| '''Code''' || '''Message''' || '''Description''' ||&lt;br /&gt;
|-&lt;br /&gt;
| 1102 || Disconnected charr not acting as such || A character has been marked disconnected from the world, but it is not listed in the sector's disconnected character's list. || *&lt;br /&gt;
|-&lt;br /&gt;
| 1103 || Ridden NPC not acting as such || An NPC has the [[FLAGS|statf_ridden]] flag set, but does not have its [[ACTION]] property set to 111. ||&lt;br /&gt;
|-&lt;br /&gt;
| 1104 || Ridden NPC without a mount item || An NPC has the [[FLAGS|statf_ridden]] flag set, but its [[ACTARG1]] property isn't set to the [[UID]] of an item whose [[TYPE]] property is set to [[TYPE|t_figurine]] or [[TYPE|t_eq_horse]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| 1105 || Ridden NPC with a mislinked mount item || An NPC has the [[FLAGS|statf_ridden]] flag set, but its [[ACTARG1]] property isn't set to the [[UID]] of an item whose [[MORE2]] property matches the NPC's [[UID]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| 1106 || Disconnected NPC neither dead nor ridden || An NPC has been disconnected from the world, but does not have either one of the [[FLAGS|statf_ridden]] or [[FLAGS|statf_dead]] flags set. ||&lt;br /&gt;
|-&lt;br /&gt;
| 1107 || In game char that is neither a player nor an NPC || A character is not a player or an NPC. || *&lt;br /&gt;
|-&lt;br /&gt;
| 1108 || Char not on a valid position || A character's [[P|position]] is outside of the map boundaries. ||&lt;br /&gt;
|-&lt;br /&gt;
| 1203 || Ridden NPC not acting as such || Same as 1103. ||&lt;br /&gt;
|-&lt;br /&gt;
| 1204 || Ridden NPC without a mount item || Same as 1104. ||&lt;br /&gt;
|-&lt;br /&gt;
| 1205 || In game char that is neither a player nor an NPC || Same as 1107. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2102 || Item without ITEMDEF || An item does not have an [[ITEMDEF]] section. || *&lt;br /&gt;
|-&lt;br /&gt;
| 2103 || Item ITEMDEF with ID = 0 || An item's [[ITEMDEF]] has an [[ID]] of zero. || *&lt;br /&gt;
|-&lt;br /&gt;
| 2104 || Disconnected item || An item has been marked as disconnected from the world. || *&lt;br /&gt;
|-&lt;br /&gt;
| 2105 || Item not on a valid position || An item is not in a container and its [[P|position]] is outside of the map boundaries. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2106 || Item flagged as being in a container but it isn't || An item is flagged as not being top level, but it does not have a container. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2202 || Item flagged as equipped but it isn't || An item is flagged as being equipped, but its parent is not a character. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2205 || Mislinked item || An item's [[LINK]] property matches its [[UID]], or has been set to a [[UID]] that doesn't exist. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2206 || Gm Robe / Deathshroud not on a char || A GM robe or death shroud ([[ID]] of 0204E or 0204F) is not equipped to a character. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2207 || Deathshroud not on a dead char || A death shroud ([[ID]] of 0204F) is equipped to a character without the [[FLAGS|statf_dead]] flag set. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2208 || Gm Robe on a char without privilege || A GM robe ([[ID]] of 0204E) is equipped to a character whose [[PLEVEL]] is less than 2. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2220 || Trade window memory not equipped in the correct layer || A [[TYPE|t_eq_trade window]] item type is not equipped, has its [[LAYER]] property set to something other than [[LAYER|layer_none]], or is equipped to an NPC. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2221 || Client linger memory not equipped in the correct layer || A [[TYPE|t_eq_client_linger]] item type is not equipped, has its [[LAYER]] property set to something other than [[LAYER|layer_flag_clientlinger]], or is equipped to an NPC. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2222 || Memory not equipped / not in the memory layer / without color || A memory item ([[ID]] of 02007) is not equipped, or a non-memory item has had its [[TYPE]] set to [[TYPE|t_eq_memory_obj]] after creation. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2226 || Mount memory not equipped in the correct layer || A [[TYPE|t_eq_horse]] item type is not equipped, or has its [[LAYER]] property set to something other than [[LAYER|layer_horse]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2227 || Hair/Beard item not equipped / not in a corpse / not in a vendor box || A [[TYPE|t_hair]] or [[TYPE|t_beard]] item type that isn't equipped, is either not in a container or its container has an [[ID]] other than 02006 or 02AF8. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2228 || Hair/Beard item not equipped / not in a corpse / not in a vendor box || A [[TYPE|t_hair]] or [[TYPE|t_beard]] item is equipped, but has its [[LAYER]] property set to something other than [[LAYER|layer_hair]] or [[LAYER|layer_beard]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2229 || Game piece not in a game board || A [[TYPE|t_game_piece]] item has been found outside of a container. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2230 || Item equipped in the trade window layer but it isn't a trade window || An equipped item has been found with its [[LAYER]] property set to [[LAYER|layer_none]], but its [[TYPE|type]] is not [[TYPE|t_eq_trade_window]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2231 || Item equipped in the memory layer but it isn't a memory || An equipped item has been found with its [[LAYER]] property set to [[LAYER|layer_special]], but its [[TYPE|type]] is not [[TYPE|t_eq_memory_obj]] or [[TYPE|t_eq_script]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2233 || Item equipped in the mount memory layer but it isn't a mount memory || An equipped item has been found with its [[LAYER]] property set to [[LAYER|layer_horse]], but its [[TYPE|type]] is not [[TYPE|t_eq_horse]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2234 || Item equipped in the client linger layer but it isn't a client linger memory || An equipped item has been found with its [[LAYER]] property set to [[LAYER|layer_flag_clientlinger]], but its [[TYPE|type]] is not [[TYPE|t_eq_client_linger]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2235 || Item equipped in the murder memory layer but it isn't a murder memory || An equipped item has been found with its [[LAYER]] property set to [[LAYER|layer_flag_murders]], but the character is an NPC or the player has its [[KILLS]] property set to 0. ||&lt;br /&gt;
|-&lt;br /&gt;
| 2236 || Item flagged as decay but without timer set || A top-level item has the [[ATTR|attr_decay]] flag set, but its [[TIMER]] property has not been set. ||&lt;br /&gt;
|-&lt;br /&gt;
| 3101 || Object is totaly lost, no parent exists || An object has no parent. || *&lt;br /&gt;
|-&lt;br /&gt;
| 3102 || Object was deleted or UID is incorrect || An object does not have a valid [[UID]]. || *&lt;br /&gt;
|-&lt;br /&gt;
| 3201 || Object not correctly loaded by server (UID conflict) || More than one object has the same [[UID]] value. || *&lt;br /&gt;
|-&lt;br /&gt;
| 4222 || Memory not equipped / not in the memory layer / without color || A memory item is not flagged as equipped, has its [[LAYER]] property set to something other than [[LAYER|layer_special]], or has its [[COLOR]] property set to 0. ||&lt;br /&gt;
|-&lt;br /&gt;
| 4223 || Memory not on a char || A memory item is flagged as equipped, but it's [[CONT|parent]] is not a character. ||&lt;br /&gt;
|-&lt;br /&gt;
| 4224 || Stone/Guild memory mislinked || A memory item's [[COLOR]] property has one of the [[COLOR|memory_guild]] or [[COLOR|memory_town]] flags set, but the [[LINK]] property is not set to the [[UID]] of a guild or town stone. ||&lt;br /&gt;
|-&lt;br /&gt;
| 4225 || Stone/Guild memory linked to the wrong stone || A memory item's [[COLOR]] property has one of the [[COLOR|memory_guild]] or [[COLOR|memory_town]] flags set, but the character the memory is equipped to is not a member of the guild or town. ||&lt;br /&gt;
|-&lt;br /&gt;
| 7101 || Object's UID does not match up with server's UID table. || An object does not have the expected [[UID]] value. || *&lt;br /&gt;
|-&lt;br /&gt;
| 7102 || Object does not exist. || An object does not exist. || *&lt;br /&gt;
|-&lt;br /&gt;
| FFFF || Bad memory allocation || An exception was thrown whilst checking the object's validity. || *&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note''': ''Garbage collection codes marked with * generally indicate a serious error within an object's internal state and should not normally be seen. If you are experiencing and are able to reliably reproduce any such errors then please report the details to the [http://tracker.sphere.torfo.org/bugs/main_page.php bug tracker].''&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Chapter_7&amp;diff=8080</id>
		<title>Chapter 7</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Chapter_7&amp;diff=8080"/>
				<updated>2023-02-09T18:07:33Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* MAP */&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_harmedby_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_harmedby // Loop through memory items with flag 00010=memory_harmedby&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 00010.&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;
| COMPONENTS || The number of components items at the map point.&lt;br /&gt;
|-&lt;br /&gt;
| COMPONENTS.n.ID || The ID of the nth component item at the map point (n starts at 0)&lt;br /&gt;
|-&lt;br /&gt;
| COMPONENTS.n.Z || The Z level of the nth component item at the map point (n starts at 0)&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, triggerEquip&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;,1&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Easy, uh?&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;
===NEWSUMMON===&lt;br /&gt;
This function similar to NEWNPC but is specific to summons. This will allow you to create a new summoned creature for a specific time. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;&lt;br /&gt;
[FUNCTION f_createsummon]&lt;br /&gt;
SERV.NEWSUMMON=c_ogre,15&lt;br /&gt;
NEW.P=&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example will summon and Ogre for 15 seconds at your current location.&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>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=@SpellEffectTick&amp;diff=8027</id>
		<title>@SpellEffectTick</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=@SpellEffectTick&amp;diff=8027"/>
				<updated>2022-09-23T00:48:27Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Description==&lt;br /&gt;
This trigger fires when a character successfully casts a spell.&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;
| [[I]] || The object that is going to be affected.&lt;br /&gt;
|-&lt;br /&gt;
| [[SRC]] || The object that is going to be affected.&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 || Spell Id&lt;br /&gt;
|-&lt;br /&gt;
| ARGN2 || IO || Spell Level&lt;br /&gt;
|-&lt;br /&gt;
| ARGO || IO || The spell memory.(Argo.link holds the caster UID)&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.CHARGES || IO || How many charges are left on the spell memory, this will be automatically decreased by 1 at the end of the method execution. Default value is 1.&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.DELAY || IO || How many seconds until the next spell effect tick. Default value is 5 seconds.&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.EFFECT || IO || The effect value of the spell, harmful or beneficial (if SPELLFLAG_HEAL is enabled).&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.DAMAGETYPE || IO || The damage type of the spell, if you are making a custom spell you must set a value otherwise the spell will not cause damage.&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 || Destroy the spell memory and block the spell execution.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || If the spell has the flag SPELLFLAG_SCRIPTED blocks the spell execution&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>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=@SpellEffectTick&amp;diff=8026</id>
		<title>@SpellEffectTick</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=@SpellEffectTick&amp;diff=8026"/>
				<updated>2022-09-23T00:48:11Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Description==&lt;br /&gt;
This trigger fires when a character successfully casts a spell.&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;
| [[I]] || The object that is going to be affected.&lt;br /&gt;
|-&lt;br /&gt;
| [[SRC]] || The object that is going to be affected.&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 || Spell Id&lt;br /&gt;
|-&lt;br /&gt;
| ARGN2 || IO || Spell Level&lt;br /&gt;
|-&lt;br /&gt;
| ARGO || IO || The spell memory.(Argo.link holds the caster UID)&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.CHARGES || IO || How many charges are left on the spell memory, this will be automatically decreased by 1 at the end of the method execution. Default value is 1.&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.DELAY || IO || How many seconds until the next spell effect tick. Default value is 5 seconds.&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.EFFECT || IO || The effect value of the spell, harmful or beneficial (if SPELLFLAG_HEAL is enabled).&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.DAMAGETYPE || IO || The damage type of the spell, if you are making a custom spell you must set a value otherwise the spell will not cause damage.&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 || Destroy the spell memory and block the spell execution.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || If the spell has the flag SPELLFLAG_SCRIPTED blocks the spell execution&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>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=@SpellEffectTick&amp;diff=8025</id>
		<title>@SpellEffectTick</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=@SpellEffectTick&amp;diff=8025"/>
				<updated>2022-09-23T00:48:00Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Description==&lt;br /&gt;
This trigger fires when a character successfully casts a spell.&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;
| [[I]] || The object that is going to be affected.&lt;br /&gt;
|-&lt;br /&gt;
| [[SRC]] || The object that is going to be affected.&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 || Spell Id&lt;br /&gt;
|-&lt;br /&gt;
| ARGN2 || IO || Spell Level&lt;br /&gt;
|-&lt;br /&gt;
| ARGO || IO || The spell memory.(Argo.link holds the caster UID)&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.CHARGES || IO || How many charges are left on the spell memory, this will be automatically decreased by 1 at the end of the method execution. Default value is 1.&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.DELAY || IO || How many seconds until the next spell effect tick. Default value is 5 seconds.&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.EFFECT || IO || The effect value of the spell, harmful or beneficial (if SPELLFLAG_HEAL is enabled).&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.DAMAGETYPE || IO || The damage type of the spell, if you are making a custom spell you must set a value otherwise the spell will not cause damage.&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 || Destroy the spell memory and block the spell execution.&lt;br /&gt;
| '''Return Value''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| 0 || If the spell has the flag SPELLFLAG_SCRIPTED blocks the spell execution&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>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=@SpellEffectTick&amp;diff=8024</id>
		<title>@SpellEffectTick</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=@SpellEffectTick&amp;diff=8024"/>
				<updated>2022-09-23T00:47:43Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Description==&lt;br /&gt;
This trigger fires when a character successfully casts a spell.&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;
| [[I]] || The object that is going to be affected.&lt;br /&gt;
|-&lt;br /&gt;
| [[SRC]] || The object that is going to be affected.&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 || Spell Id&lt;br /&gt;
|-&lt;br /&gt;
| ARGN2 || IO || Spell Level&lt;br /&gt;
|-&lt;br /&gt;
| ARGO || IO || The spell memory.(Argo.link holds the caster UID)&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.CHARGES || IO || How many charges are left on the spell memory, this will be automatically decreased by 1 at the end of the method execution. Default value is 1.&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.DELAY || IO || How many seconds until the next spell effect tick. Default value is 5 seconds.&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.EFFECT || IO || The effect value of the spell, harmful or beneficial (if SPELLFLAG_HEAL is enabled).&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.DAMAGETYPE || IO || The damage type of the spell, if you are making a custom spell you must set a value otherwise the spell will not cause damage.&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 || Destroy the spell memory and block the spell execution.&lt;br /&gt;
| '''Return Value''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| 0 || If the spell has the flag SPELLFLAG_SCRIPTED blocks the spell execution&lt;br /&gt;
&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>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=@SpellEffectTick&amp;diff=8023</id>
		<title>@SpellEffectTick</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=@SpellEffectTick&amp;diff=8023"/>
				<updated>2022-09-23T00:40:15Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Description==&lt;br /&gt;
Fired when a spell memory has one or more charges (more2) and the spellflag_tick&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;
| [[ARGN1]] || Spell ID&lt;br /&gt;
|-&lt;br /&gt;
| [[ARGN2]] || Spell Level&lt;br /&gt;
|-&lt;br /&gt;
| [[ARGO]] || The spell memory.(Argo.link holds the caster UID)&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 spell that was cast.&lt;br /&gt;
|-&lt;br /&gt;
| ARGN2 || IO || The strength of the spell.&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.CREATEOBJECT1 || O || For field spells, overrides the item [[BASEID]] to use for the east-west direction.&lt;br /&gt;
&lt;br /&gt;
For summon spells, overrides the character [[BASEID]] to summon.&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.CREATEOBJECT2 || O || For field spells, overrides the item [[BASEID]] to use for the north-south direction.&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.FIELDGAUGE || O || For field spells, overrides the default gauge of the field (1).&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.FIELDWIDTH || O || For field spells, overrides the default width of the field (7).&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.EFFECTCOLOR ||O || For field spells, overrides the color of the fields.&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 casting the spell.&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>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=@SpellEffectTick&amp;diff=8022</id>
		<title>@SpellEffectTick</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=@SpellEffectTick&amp;diff=8022"/>
				<updated>2022-09-23T00:39:31Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: Created page with &amp;quot;==Description== Fired when a spell memory has one or more charges (more2) and the spellflag_tick   Fires on: * Characters   ==References== The following object references...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Description==&lt;br /&gt;
Fired when a spell memory has one or more charges (more2) and the spellflag_tick&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 source of the spell. Could be the [[Items|item]] used to cast the spell (e.g. a wand or scroll) or the [[Characters|character]] casting the spell.&lt;br /&gt;
|-&lt;br /&gt;
| [[I]] || The [[Characters|character]] casting the spell.&lt;br /&gt;
|-&lt;br /&gt;
| [[SRC]] || The [[Characters|character]] casting the spell.&lt;br /&gt;
|-&lt;br /&gt;
| [[ACT]] || The target of the spell, if any.&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 spell that was cast.&lt;br /&gt;
|-&lt;br /&gt;
| ARGN2 || IO || The strength of the spell.&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.CREATEOBJECT1 || O || For field spells, overrides the item [[BASEID]] to use for the east-west direction.&lt;br /&gt;
&lt;br /&gt;
For summon spells, overrides the character [[BASEID]] to summon.&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.CREATEOBJECT2 || O || For field spells, overrides the item [[BASEID]] to use for the north-south direction.&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.FIELDGAUGE || O || For field spells, overrides the default gauge of the field (1).&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.FIELDWIDTH || O || For field spells, overrides the default width of the field (7).&lt;br /&gt;
|-&lt;br /&gt;
| LOCAL.EFFECTCOLOR ||O || For field spells, overrides the color of the fields.&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 casting the spell.&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>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=FEVAL&amp;diff=8021</id>
		<title>FEVAL</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=FEVAL&amp;diff=8021"/>
				<updated>2022-09-15T15:53:51Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
FEval is a function that returns the given value treating the last number as a decimal and removing it, the best example is to retrieve your skill points without decimals.&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&amp;lt;spherescript &amp;quot;darkblue&amp;quot;&amp;gt;&lt;br /&gt;
[function ShowAlchemy]&lt;br /&gt;
alchemy=99.9&lt;br /&gt;
say Alchemy is: &amp;lt;feval &amp;lt;alchemy&amp;gt;&amp;gt; // This will say 'Alchemy is: 99', removing the last number (.9).&amp;lt;/spherescript&amp;gt;&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=8020</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=8020"/>
				<updated>2022-08-28T08:25:29Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well worry no more, you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions. Each situation will have it's own unique methods to help you use the tools at your disposal to fix the problem, or guide you to finding out more helpful information.&lt;br /&gt;
&lt;br /&gt;
==Problems Understanding A Trigger==&lt;br /&gt;
Uncertain how a trigger works? &lt;br /&gt;
&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the concept of logging out your results to the console for further insight into what objects a trigger is referencing. This can help you make sure that you are referencing the right object in game and that whatever follows will behave as expected. &lt;br /&gt;
&lt;br /&gt;
Let's say you want to use a trigger that will fire when you kill someone, and when you kill that person you want to give the killer some experience points. You need to reference both the person being killed and the person that killed them.&lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]]. One may think that they will use the default object I as the killer and that SRC will be the person being killed. or that ACT would be the person being killed. But it is best not to assume any of these triggers will use any object reference the same as another, or even the same as a similar trigger. The best practice is to take yourself to the Spherewiki (as YOU already have) and pull up the trigger you are looking for under the Reference Compendium &amp;gt; [[Objects]] &amp;gt; [[Characters]], this will give you a very good idea of what references you can make in that trigger. Once you have that information you can begin to see what you are able to work with and how you can work with it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As MalucoBeleza points out, this practice is required to get proper knowledge to work with a trigger&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essential to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
 ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
Debugging is also a great tool when you are performing calculations. Let’s say that you want to create your own combat system, such as:&lt;br /&gt;
&lt;br /&gt;
 ON=@Hit&lt;br /&gt;
    SERV.LOG &amp;lt;NAME&amp;gt; HAVE JUST HIT &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
    IF (&amp;lt;WEAPON&amp;gt;)&lt;br /&gt;
        SERV.LOG A WEAPON WAS USED: &amp;lt;WEAPON.NAME&amp;gt;&lt;br /&gt;
        SERV.LOG &amp;lt;WEAPON.NAME&amp;gt;'S DAMAGE IS &amp;lt;WEAPON.DAM.LO&amp;gt; - &amp;lt;WEAPON.DAM.HI&amp;gt;&lt;br /&gt;
    ELSE&lt;br /&gt;
        SERV.LOG NO WEAPON WAS USED.&lt;br /&gt;
        SERV.LOG &amp;lt;NAME&amp;gt;'S DAMAGE IS &amp;lt;DAM&amp;gt;&lt;br /&gt;
    ENDIF&lt;br /&gt;
    &lt;br /&gt;
    SERV.LOG DAMAGE STARTED AS &amp;lt;ARGN1&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    SERV.LOG THE SKILL USED IN THIS ATTACK IS &amp;lt;ACTION&amp;gt;&lt;br /&gt;
    IF (&amp;lt;ACTION&amp;gt; == WRESTLING) || (&amp;lt;ACTION&amp;gt; == MACEFIGHTING)&lt;br /&gt;
        ARGN1 = &amp;lt;EVAL &amp;lt;ARGN1&amp;gt; + (&amp;lt;STR&amp;gt;/8)&amp;gt; //APPLY YOUR FORMULA HERE&lt;br /&gt;
    &lt;br /&gt;
    ELIF (&amp;lt;ACTION&amp;gt; == ARCHERY) || (&amp;lt;ACTION&amp;gt; == FENCING)&lt;br /&gt;
        ARGN1 = &amp;lt;EVAL &amp;lt;ARGN1&amp;gt; + (&amp;lt;DEX&amp;gt;/8)&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    ELIF (&amp;lt;ACTION&amp;gt; == SWORDSMANSHIP)&lt;br /&gt;
        ARGN1 = &amp;lt;EVAL &amp;lt;ARGN1&amp;gt; + (&amp;lt;DEX&amp;gt;/16) + (&amp;lt;STR&amp;gt;/16)&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    ENDIF&lt;br /&gt;
    &lt;br /&gt;
    SERV.LOG DAMAGE AFTER STATS BONUS ACCORDING TO THE SKILL IS &amp;lt;ARGN1&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    IF (&amp;lt;SRC.ISPLAYER&amp;gt;) //PLAYER HITS ANOTHER PLAYER&lt;br /&gt;
        SERV.LOG THE ARMOR OF THE DEFENDANT IS &amp;lt;SRC.ARMOR&amp;gt;&lt;br /&gt;
        LOCAL.DAMAGE_REDUCTION = &amp;lt;EVAL &amp;lt;SRC.ARMOR&amp;gt;/20&amp;gt; //APPLY YOUR FORMULA HERE&lt;br /&gt;
        &lt;br /&gt;
    ELSE //PLAYER HITS A NPC&lt;br /&gt;
        SERV.LOG THE ARMOR OF THE DEFENDANT IS &amp;lt;SRC.AC&amp;gt;&lt;br /&gt;
        LOCAL.DAMAGE_REDUCTION = &amp;lt;EVAL &amp;lt;SRC.AC&amp;gt;/20&amp;gt; //APPLY YOUR FORMULA HERE&lt;br /&gt;
    &lt;br /&gt;
    ENDIF&lt;br /&gt;
    ARGN1 -= &amp;lt;LOCAL.DAMAGE_REDUCTION&amp;gt;&lt;br /&gt;
    SERV.LOG AFTER DAMAGE REDUCTION OF &amp;lt;LOCAL.DAMAGE_REDUCTION&amp;gt;, DAMAGE IS &amp;lt;ARGN1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Console Errors Regarding Scripts==&lt;br /&gt;
You are getting errors on your console, and it's telling you about a script but you aren't quite sure what to do. Let's see one as an example : &lt;br /&gt;
&lt;br /&gt;
 00:17:ERROR:(i_dye_tubs.scp,52)Range isn't closed by a '}' character.&lt;br /&gt;
&lt;br /&gt;
Okay from this error we can see the filename 'i_dye_tubs' and the line number is 52. The error is that the 'Range isn't closed by a '}' character.' so let's go see what this line looks like and what we the appropriate line fix is: &lt;br /&gt;
&lt;br /&gt;
So here's what line 52 from i_dye_tubs.scp looks like :&lt;br /&gt;
 color={047e 049a&lt;br /&gt;
&lt;br /&gt;
We can see above that its missing a } at the end just like the console error notified us about. The fix is to simply add the missing }.&lt;br /&gt;
&lt;br /&gt;
this is a very elementary example but this explains the process of breaking down a console error. It's always the same for these script errors : &amp;quot;filename, line number, error description&amp;quot;. With large complicated systems paying attention to the exact nature of your console error will guide you towards figuring out how to fix it.&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=8019</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=8019"/>
				<updated>2022-08-28T08:25:23Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Situations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well worry no more, you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions. Each situation will have it's own unique methods to help you use the tools at your disposal to fix the problem, or guide you to finding out more helpful information.&lt;br /&gt;
&lt;br /&gt;
==Problems Understanding A Trigger==&lt;br /&gt;
Uncertain how a trigger works? &lt;br /&gt;
&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the concept of logging out your results to the console for further insight into what objects a trigger is referencing. This can help you make sure that you are referencing the right object in game and that whatever follows will behave as expected. &lt;br /&gt;
&lt;br /&gt;
Let's say you want to use a trigger that will fire when you kill someone, and when you kill that person you want to give the killer some experience points. You need to reference both the person being killed and the person that killed them.&lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]]. One may think that they will use the default object I as the killer and that SRC will be the person being killed. or that ACT would be the person being killed. But it is best not to assume any of these triggers will use any object reference the same as another, or even the same as a similar trigger. The best practice is to take yourself to the Spherewiki (as YOU already have) and pull up the trigger you are looking for under the Reference Compendium &amp;gt; [[Objects]] &amp;gt; [[Characters]], this will give you a very good idea of what references you can make in that trigger. Once you have that information you can begin to see what you are able to work with and how you can work with it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As MalucoBeleza points out, this practice is required to get proper knowledge to work with a trigger&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essential to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
 ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
Debugging is also a great tool when you are performing calculations. Let’s say that you want to create your own combat system, such as:&lt;br /&gt;
&lt;br /&gt;
 ON=@Hit&lt;br /&gt;
    SERV.LOG &amp;lt;NAME&amp;gt; HAVE JUST HIT &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
    IF (&amp;lt;WEAPON&amp;gt;)&lt;br /&gt;
        SERV.LOG A WEAPON WAS USED: &amp;lt;WEAPON.NAME&amp;gt;&lt;br /&gt;
        SERV.LOG &amp;lt;WEAPON.NAME&amp;gt;'S DAMAGE IS &amp;lt;WEAPON.DAM.LO&amp;gt; - &amp;lt;WEAPON.DAM.HI&amp;gt;&lt;br /&gt;
    ELSE&lt;br /&gt;
        SERV.LOG NO WEAPON WAS USED.&lt;br /&gt;
        SERV.LOG &amp;lt;NAME&amp;gt;'S DAMAGE IS &amp;lt;DAM&amp;gt;&lt;br /&gt;
    ENDIF&lt;br /&gt;
    &lt;br /&gt;
    SERV.LOG DAMAGE STARTED AS &amp;lt;ARGN1&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    SERV.LOG THE SKILL USED IN THIS ATTACK IS &amp;lt;ACTION&amp;gt;&lt;br /&gt;
    IF (&amp;lt;ACTION&amp;gt; == WRESTLING) || (&amp;lt;ACTION&amp;gt; == MACEFIGHTING)&lt;br /&gt;
        ARGN1 = &amp;lt;EVAL &amp;lt;ARGN1&amp;gt; + (&amp;lt;STR&amp;gt;/8)&amp;gt; //APPLY YOUR FORMULA HERE&lt;br /&gt;
    &lt;br /&gt;
    ELIF (&amp;lt;ACTION&amp;gt; == ARCHERY) || (&amp;lt;ACTION&amp;gt; == FENCING)&lt;br /&gt;
        ARGN1 = &amp;lt;EVAL &amp;lt;ARGN1&amp;gt; + (&amp;lt;DEX&amp;gt;/8)&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    ELIF (&amp;lt;ACTION&amp;gt; == SWORDSMANSHIP)&lt;br /&gt;
        ARGN1 = &amp;lt;EVAL &amp;lt;ARGN1&amp;gt; + (&amp;lt;DEX&amp;gt;/16) + (&amp;lt;STR&amp;gt;/16)&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    ENDIF&lt;br /&gt;
    &lt;br /&gt;
    SERV.LOG DAMAGE AFTER STATS BONUS ACCORDING TO THE SKILL IS &amp;lt;ARGN1&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    IF (&amp;lt;SRC.ISPLAYER&amp;gt;) //PLAYER HITS ANOTHER PLAYER&lt;br /&gt;
        SERV.LOG THE ARMOR OF THE DEFENDANT IS &amp;lt;SRC.ARMOR&amp;gt;&lt;br /&gt;
        LOCAL.DAMAGE_REDUCTION = &amp;lt;EVAL &amp;lt;SRC.ARMOR&amp;gt;/20&amp;gt; //APPLY YOUR FORMULA HERE&lt;br /&gt;
        &lt;br /&gt;
    ELSE //PLAYER HITS A NPC&lt;br /&gt;
        SERV.LOG THE ARMOR OF THE DEFENDANT IS &amp;lt;SRC.AC&amp;gt;&lt;br /&gt;
        LOCAL.DAMAGE_REDUCTION = &amp;lt;EVAL &amp;lt;SRC.AC&amp;gt;/20&amp;gt; //APPLY YOUR FORMULA HERE&lt;br /&gt;
    &lt;br /&gt;
    ENDIF&lt;br /&gt;
    ARGN1 -= &amp;lt;LOCAL.DAMAGE_REDUCTION&amp;gt;&lt;br /&gt;
    SERV.LOG AFTER DAMAGE REDUCTION OF &amp;lt;LOCAL.DAMAGE_REDUCTION&amp;gt;, DAMAGE IS &amp;lt;ARGN1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Console Errors Regarding Scripts==&lt;br /&gt;
You are getting errors on your console, and it's telling you about a script but you aren't quite sure what to do. Let's see one as an example : &lt;br /&gt;
&lt;br /&gt;
 00:17:ERROR:(i_dye_tubs.scp,52)Range isn't closed by a '}' character.&lt;br /&gt;
&lt;br /&gt;
Okay from this error we can see the filename 'i_dye_tubs' and the line number is 52. The error is that the 'Range isn't closed by a '}' character.' so let's go see what this line looks like and what we the appropriate line fix is: &lt;br /&gt;
&lt;br /&gt;
So here's what line 52 from i_dye_tubs.scp looks like :&lt;br /&gt;
 color={047e 049a&lt;br /&gt;
&lt;br /&gt;
We can see above that its missing a } at the end just like the console error notified us about. The fix is to simply add the missing }.&lt;br /&gt;
&lt;br /&gt;
this is a very elementary example but this explains the process of breaking down a console error. It's always the same for these script errors : &amp;quot;filename, line number, error description&amp;quot;. With large complicated systems paying attention to the exact nature of your console error will guide you towards figuring out how to fix it.&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=8018</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=8018"/>
				<updated>2022-08-28T08:25:09Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Situations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well worry no more, you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Situations==&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions. Each situation will have it's own unique methods to help you use the tools at your disposal to fix the problem, or guide you to finding out more helpful information. &lt;br /&gt;
&lt;br /&gt;
==Problems Understanding A Trigger==&lt;br /&gt;
Uncertain how a trigger works? &lt;br /&gt;
&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the concept of logging out your results to the console for further insight into what objects a trigger is referencing. This can help you make sure that you are referencing the right object in game and that whatever follows will behave as expected. &lt;br /&gt;
&lt;br /&gt;
Let's say you want to use a trigger that will fire when you kill someone, and when you kill that person you want to give the killer some experience points. You need to reference both the person being killed and the person that killed them.&lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]]. One may think that they will use the default object I as the killer and that SRC will be the person being killed. or that ACT would be the person being killed. But it is best not to assume any of these triggers will use any object reference the same as another, or even the same as a similar trigger. The best practice is to take yourself to the Spherewiki (as YOU already have) and pull up the trigger you are looking for under the Reference Compendium &amp;gt; [[Objects]] &amp;gt; [[Characters]], this will give you a very good idea of what references you can make in that trigger. Once you have that information you can begin to see what you are able to work with and how you can work with it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As MalucoBeleza points out, this practice is required to get proper knowledge to work with a trigger&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essential to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
 ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
Debugging is also a great tool when you are performing calculations. Let’s say that you want to create your own combat system, such as:&lt;br /&gt;
&lt;br /&gt;
 ON=@Hit&lt;br /&gt;
    SERV.LOG &amp;lt;NAME&amp;gt; HAVE JUST HIT &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
    IF (&amp;lt;WEAPON&amp;gt;)&lt;br /&gt;
        SERV.LOG A WEAPON WAS USED: &amp;lt;WEAPON.NAME&amp;gt;&lt;br /&gt;
        SERV.LOG &amp;lt;WEAPON.NAME&amp;gt;'S DAMAGE IS &amp;lt;WEAPON.DAM.LO&amp;gt; - &amp;lt;WEAPON.DAM.HI&amp;gt;&lt;br /&gt;
    ELSE&lt;br /&gt;
        SERV.LOG NO WEAPON WAS USED.&lt;br /&gt;
        SERV.LOG &amp;lt;NAME&amp;gt;'S DAMAGE IS &amp;lt;DAM&amp;gt;&lt;br /&gt;
    ENDIF&lt;br /&gt;
    &lt;br /&gt;
    SERV.LOG DAMAGE STARTED AS &amp;lt;ARGN1&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    SERV.LOG THE SKILL USED IN THIS ATTACK IS &amp;lt;ACTION&amp;gt;&lt;br /&gt;
    IF (&amp;lt;ACTION&amp;gt; == WRESTLING) || (&amp;lt;ACTION&amp;gt; == MACEFIGHTING)&lt;br /&gt;
        ARGN1 = &amp;lt;EVAL &amp;lt;ARGN1&amp;gt; + (&amp;lt;STR&amp;gt;/8)&amp;gt; //APPLY YOUR FORMULA HERE&lt;br /&gt;
    &lt;br /&gt;
    ELIF (&amp;lt;ACTION&amp;gt; == ARCHERY) || (&amp;lt;ACTION&amp;gt; == FENCING)&lt;br /&gt;
        ARGN1 = &amp;lt;EVAL &amp;lt;ARGN1&amp;gt; + (&amp;lt;DEX&amp;gt;/8)&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    ELIF (&amp;lt;ACTION&amp;gt; == SWORDSMANSHIP)&lt;br /&gt;
        ARGN1 = &amp;lt;EVAL &amp;lt;ARGN1&amp;gt; + (&amp;lt;DEX&amp;gt;/16) + (&amp;lt;STR&amp;gt;/16)&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    ENDIF&lt;br /&gt;
    &lt;br /&gt;
    SERV.LOG DAMAGE AFTER STATS BONUS ACCORDING TO THE SKILL IS &amp;lt;ARGN1&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    IF (&amp;lt;SRC.ISPLAYER&amp;gt;) //PLAYER HITS ANOTHER PLAYER&lt;br /&gt;
        SERV.LOG THE ARMOR OF THE DEFENDANT IS &amp;lt;SRC.ARMOR&amp;gt;&lt;br /&gt;
        LOCAL.DAMAGE_REDUCTION = &amp;lt;EVAL &amp;lt;SRC.ARMOR&amp;gt;/20&amp;gt; //APPLY YOUR FORMULA HERE&lt;br /&gt;
        &lt;br /&gt;
    ELSE //PLAYER HITS A NPC&lt;br /&gt;
        SERV.LOG THE ARMOR OF THE DEFENDANT IS &amp;lt;SRC.AC&amp;gt;&lt;br /&gt;
        LOCAL.DAMAGE_REDUCTION = &amp;lt;EVAL &amp;lt;SRC.AC&amp;gt;/20&amp;gt; //APPLY YOUR FORMULA HERE&lt;br /&gt;
    &lt;br /&gt;
    ENDIF&lt;br /&gt;
    ARGN1 -= &amp;lt;LOCAL.DAMAGE_REDUCTION&amp;gt;&lt;br /&gt;
    SERV.LOG AFTER DAMAGE REDUCTION OF &amp;lt;LOCAL.DAMAGE_REDUCTION&amp;gt;, DAMAGE IS &amp;lt;ARGN1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Console Errors Regarding Scripts==&lt;br /&gt;
You are getting errors on your console, and it's telling you about a script but you aren't quite sure what to do. Let's see one as an example : &lt;br /&gt;
&lt;br /&gt;
 00:17:ERROR:(i_dye_tubs.scp,52)Range isn't closed by a '}' character.&lt;br /&gt;
&lt;br /&gt;
Okay from this error we can see the filename 'i_dye_tubs' and the line number is 52. The error is that the 'Range isn't closed by a '}' character.' so let's go see what this line looks like and what we the appropriate line fix is: &lt;br /&gt;
&lt;br /&gt;
So here's what line 52 from i_dye_tubs.scp looks like :&lt;br /&gt;
 color={047e 049a&lt;br /&gt;
&lt;br /&gt;
We can see above that its missing a } at the end just like the console error notified us about. The fix is to simply add the missing }.&lt;br /&gt;
&lt;br /&gt;
this is a very elementary example but this explains the process of breaking down a console error. It's always the same for these script errors : &amp;quot;filename, line number, error description&amp;quot;. With large complicated systems paying attention to the exact nature of your console error will guide you towards figuring out how to fix it.&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Chapter_1&amp;diff=7990</id>
		<title>Chapter 1</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Chapter_1&amp;diff=7990"/>
				<updated>2022-08-19T19:40:40Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Chapter_1}}&lt;br /&gt;
&lt;br /&gt;
==Numbers==&lt;br /&gt;
&lt;br /&gt;
The first thing you'll notice while looking through SPHERE scripts is the wide variety of ways to write numbers. Since numbers are insanely important to a SPHERE scripter, this is the first lesson in the series. By the end of the lesson, I hope that you have a general understanding of hexadecimal, decimal and binary numbering systems, and SPHERE's ways of identifying each. You will also know how to generate random numbers either from a series or from a list of choices.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first thing you need to understand is that the way we count is not the only way to count. Our numbering system contains ten digits (0, 1, 2, 3, 4, 5, 6, 7, 8, and 9). Therefore, at the tenth number, we have to add an extra column to the number, and reset the first column to zero (1, 2, 3, 4, 5, 6, 7, 8, 9, 10). That's why our numbering system works the way it does.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the decimal system, without realizing it, we write our numbers to mean powers of ten. For example, if you take the number 17282 (which I just made up), and divide it down we get this:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| Power of ten      || 4     || 3     || 2     || 1     || 0&lt;br /&gt;
|-&lt;br /&gt;
| Ten to that power || 10000 || 1000  || 100   || 10    || 1&lt;br /&gt;
|-&lt;br /&gt;
| Digit             || 1     || 7     || 2     || 8     || 2 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To reach the number 17282 from here, we simply take ten to the power of the number in the top row, multiply it by the number in the bottom row, and then add all those numbers together. We get 10000 + 7000 + 200 + 80 + 2. Obviously, this is simplistic, and we do it without even realizing we're doing it. You're probably thinking &amp;quot;Riiight, what does Taran think he's getting at?&amp;quot; Well, we aren't so special that our counting system is the only way to count.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, there is another numbering system that is used almost solely by computers. It only contains two numbers (1 and 0) and is therefore called the binary (meaning two) system. Binary numbers look like this: 101011101101, and you often see them in ads for computers and other electronic equipment (oftentimes they are shown streaming out of a CD player on television commercials). Digits in the binary system are called bits (short for BInary digiT)Binary numbers are almost impossible to translate to decimal directly, and so some math must be done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Binary works in the same way, by adding powers of a number. In the case of binary, since there are two numbers in the whole system, that number is naturally two. Here are some examples of powers of two. These numbers might look familiar to some people.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| Power of 2 || Binary number || Decimal number&lt;br /&gt;
|-&lt;br /&gt;
| 0          || 1             || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1          || 10            || 2&lt;br /&gt;
|-&lt;br /&gt;
| 2          || 100           || 4&lt;br /&gt;
|-&lt;br /&gt;
| 3          || 1000          || 8&lt;br /&gt;
|-&lt;br /&gt;
| 4          || 10000         || 16&lt;br /&gt;
|-&lt;br /&gt;
| 5          || 100000        || 32&lt;br /&gt;
|-&lt;br /&gt;
| 6          || 1000000       || 64&lt;br /&gt;
|-&lt;br /&gt;
| 7          || 10000000      || 128&lt;br /&gt;
|-&lt;br /&gt;
| 8          || 100000000     || 256&lt;br /&gt;
|-&lt;br /&gt;
| 9          || 1000000000    || 512&lt;br /&gt;
|-&lt;br /&gt;
| 10         || 10000000000   || 1024&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Ridiculous eh?  :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We need a better system! The reason we get such strange results is because 10 is not a power of two. We need to find a system where the number base IS a power of two. The most commonly used system used is base-16, or hexadecimal. I'm sure if you've perused the SPHERE boards, you've seen the word hex floating around. No, this isn't a curse or evil spell, it's a short way of saying &amp;quot;hexadecimal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| Binary || Decimal || Hexadecimal&lt;br /&gt;
|-&lt;br /&gt;
| 1      || 1       || 1&lt;br /&gt;
|-&lt;br /&gt;
| 10     || 2       || 2&lt;br /&gt;
|-&lt;br /&gt;
| 11     || 3       || 3&lt;br /&gt;
|-&lt;br /&gt;
| 100    || 4       || 4&lt;br /&gt;
|-&lt;br /&gt;
| 101    || 5       || 5&lt;br /&gt;
|-&lt;br /&gt;
| 110    || 6       || 6&lt;br /&gt;
|-&lt;br /&gt;
| 111    || 7       || 7&lt;br /&gt;
|-&lt;br /&gt;
| 1000   || 8       || 8&lt;br /&gt;
|-&lt;br /&gt;
| 1001   || 9       || 9&lt;br /&gt;
|-&lt;br /&gt;
| 1010   || 10      || A&lt;br /&gt;
|-&lt;br /&gt;
| 1011   || 11      || B&lt;br /&gt;
|-&lt;br /&gt;
| 1100   || 12      || C&lt;br /&gt;
|-&lt;br /&gt;
| 1101   || 13      || D&lt;br /&gt;
|-&lt;br /&gt;
| 1110   || 14      || E&lt;br /&gt;
|-&lt;br /&gt;
| 1111   || 15      || F&lt;br /&gt;
|-&lt;br /&gt;
| 10000  || 16      || 10&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See how it works? There are an extra six numbers added onto the end of the system, represented by the first six letters of the alphabet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, in SPHERE scripting, you are almost NEVER going to be dealing with binary numbers that are NOT powers of two, and if you do, you can simply use any scientific calculator to figure it out. But it's a lot easier in hexadecimal.&lt;br /&gt;
&lt;br /&gt;
(This is the last table, I promise!!)&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| Binary        || Hexadecimal  &lt;br /&gt;
|-&lt;br /&gt;
| 000000001 (1) || 01&lt;br /&gt;
|-&lt;br /&gt;
| 000000010 (2) || 02  &lt;br /&gt;
|-&lt;br /&gt;
| 000000100 (3) || 04  &lt;br /&gt;
|-&lt;br /&gt;
| 000001000 (4) || 08  &lt;br /&gt;
|-&lt;br /&gt;
| 000010000 (5) || 010  &lt;br /&gt;
|-&lt;br /&gt;
| 000100000 (6) || 020  &lt;br /&gt;
|-&lt;br /&gt;
| 001000000 (7) || 040  &lt;br /&gt;
|-&lt;br /&gt;
| 010000000 (8) || 080  &lt;br /&gt;
|-&lt;br /&gt;
| 100000000 (9) || 0100  &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see, there's a bit of a pattern in the hexadecimal column. You might be thinking, there seems to be some sort of pattern of the numbers 1, 2, 4 and 8. And you would be right. Another detail you may notice is the zeros in front of the hexadecimal numbers (like 0100, rather than just 100). In SPHERE, that 0 tells the script &amp;quot;Hey, this number is HEX!&amp;quot; 0100 and 100 are very different numbers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let's say, for a SPHERE script, you need to set the 13th bit of a number (FLAGS, for example), you could write something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''SRC.FLAGS |= 8192'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But would you really remember that 8192 is 2 to the 13th power? I didn't think so. What would be easier is to go down through your list in your head, until you reach the 13th number. (Remember, START AT ZERO when you're counting!)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| 01  || 02  || 04  || 08  || 010 || 020 || 040 || 080 || 0100 || 0200 || 0400 || 0800 || 01000 || 02000  &lt;br /&gt;
|-&lt;br /&gt;
| 2^0 || 2^1 || 2^2 || 2^3 || 2^4 || 2^5 || 2^6 || 2^7 || 2^8  || 2^9  || 2^10 || 2^11 || 2^12  || 2^13  &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And there you have it. The first 14 powers of two in hexademical.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''SRC.FLAGS |= 02000'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above code is identical to the previous example. 8192 (decimal) is EQUAL to 02000 (hexadecimal)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8192 = 02000'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may be saying, &amp;quot;How do I know he's just not making all of this up?&amp;quot; Well, our wonderful friends at Microsoft have provided us with a nice tool that converters from decimal to hexadecimal to binary to octal (ANOTHER numbering system that is useless in SPHERE, so we will not deal with it). It's called the Calculator. You may find it by clicking your start button, going to Programs, then Accessories. Calculator should be sitting there looking pretty. Once in the calculator program, go to the View menu, and click Scientific. You'll see the display drastically change. To convert a number between numbering systems, simply click on the original system (Dec), type a number (8192), then click on the button for the other system (Hex). Automagically, Windows will convert your decimal number to hexadecimal. Stick a zero on the front, and SPHERE will be perfectly happy with it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is probably the hardest thing in all of SPHERE scripting to understand. Luckily, because of the next section, you won't have to deal with scary numbers most of the time. If I still have you at the end of this lesson, I know you're going to do great!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Onward to some SPHERE scripting!&lt;br /&gt;
&lt;br /&gt;
==Defnames==&lt;br /&gt;
&lt;br /&gt;
Here's a list of scary numbers you might encounter while programming in SPHERE.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| The Scary Number || What it means  &lt;br /&gt;
|-&lt;br /&gt;
| 0eed             || ID of a gold coin  &lt;br /&gt;
|-&lt;br /&gt;
| 0dda             || ID of a red moongate  &lt;br /&gt;
|-&lt;br /&gt;
| 1650,1440        || Coordinates of Britain  &lt;br /&gt;
|-&lt;br /&gt;
| 021              || The code number for red  &lt;br /&gt;
|-&lt;br /&gt;
| 04000            ||  The invisible color  &lt;br /&gt;
|-&lt;br /&gt;
| 04000efad        || An item's serial number  &lt;br /&gt;
|-&lt;br /&gt;
| 4                || The PLEVEL of a GM  &lt;br /&gt;
|-&lt;br /&gt;
| 2048 (or 0800)   || Flag for incognito spell  &lt;br /&gt;
|-&lt;br /&gt;
| 010 (or 16)    || Memory type for aggressors  &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Obviously, no one is going to want to remember those numbers. Back in the old days, before SPHERE and TUS (pre-.50 SPHERE) and even into the mists of Grayworld (pre-.41 TUS), we all had to remember those numbers. I know all of those numbers I just said (except the serial number which I just made up), plus a couple dozen more, by heart. Luckily for those of you who don't like to sit around remembering numbers all day, SPHERE has developed a system whereby things can be identified by names instead of numbers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Actually, the things are still identified by numbers. It's the numbers which are identified by the name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the game, type .add 0eed and press enter. A target will come up and you'll create a single gold piece.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now type .add i_gold and press enter. You will create the same single gold piece.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now which is easier to remember, 0eed or i_gold. I would say that i_gold wins by a long shot. But how does this magic happen? Let's take a look at the script definition for a piece of gold. Don't worry about understanding it. I'll explain item scripts in full in the next section! You can find this script in the file sphere_item_resources.scp.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;font color=&amp;quot;darkgreen&amp;quot;&amp;gt;[ITEMDEF 0eed]&amp;lt;br /&amp;gt;&lt;br /&gt;
//gold coin&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;ff0000&amp;quot;&amp;gt;DEFNAME=i_gold&amp;lt;/font&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
TYPE=T_GOLD&amp;lt;br /&amp;gt;&lt;br /&gt;
VALUE=1&amp;lt;br /&amp;gt;&lt;br /&gt;
CATEGORY=Provisions - Miscellaneous&amp;lt;br /&amp;gt;&lt;br /&gt;
SUBSECTION=Coins&amp;lt;br /&amp;gt;&lt;br /&gt;
DESCRIPTION=Gold Coin&amp;lt;br /&amp;gt;&lt;br /&gt;
DUPELIST=0eee,0eef&amp;lt;/font&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have highlighted in red the line that really matters for the purposes of this lesson. Take note of the 0eed in the top line of the script, and then ignore the rest of it. That 0eed is the real item number of this item. We'll cover item numbers more in the next section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But the real line we want to see the &amp;lt;font color=&amp;quot;ff0000&amp;quot;&amp;gt;DEFNAME=i_gold&amp;lt;/font&amp;gt; line. This is where the script tells the server, &amp;quot;I want item 0eed to be identified by the text i_gold from here on.&amp;quot; If you tried to refer to i_gold before the server read this script (more on reordering scripts in [[Chapter 2]], the server would spit out an error, but now it knows what that refers to, so you can use it in the game or in another script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You should ALWAYS give items you create a DEFNAME that fits the item. Usually the defname will be defined in the [ITEMDEF] identifier itself (again, more on this later), but if you insist upon using numbers, be sure you give it an easy-to-remember name (not golden_gulash for a viking sword). It makes it easier to remember names than numbers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A second way to define a DEFNAME is by using the [DEFNAME] tag in a script. Here is an example of that:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;font color=&amp;quot;darkgreen&amp;quot;&amp;gt;[DEFNAME colors]&amp;lt;br /&amp;gt;&lt;br /&gt;
color_blue 02&amp;lt;br /&amp;gt;&lt;br /&gt;
color_red 021&amp;lt;br /&amp;gt;&lt;br /&gt;
color_green 041&amp;lt;/font&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You'll find a script similar to this in spheredefs.scp, another file that should be loaded before any other file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here's the rundown on this script, line by line:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 1''': This is where the type of script and the defname (yes colors is the defname of this script) is defined. This tells the server what type of script to expect between this and the next identifier (identifiers are the lines contained in square brackets). All identifiers have this format. The first parameter is the script type. These are numerous, and I will go over them as we get to them. The second parameter is either an ID number or a defname. In most cases, in the scripts you write, it will be a defname. The only exceptions to this I can think of would be if you used a program to insert a new item into the client files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Lines 2-4''': These set up your individual DEFNAME pieces. It says that color_blue is equal to 02, color_red is equal to 021, and color_green is equal to 041. You may have any number of spaces between the name and the value. The definitions contained in spheredefs.scp are among the most useful you will encounter, as they prevent you from writing the long scary numbers we went over in the previous section. These include things like names for flags, names for item attributes, names for the built-in MIDI or MP3 music, names for memory types, and many other things. Look through the file to see what it offers you.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That's about it for DEFNAMEs. You'll see more of these later as we cover other types of scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now go on to learn about items.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==ITEMDEF==&lt;br /&gt;
Or, how to make a mountain from a molehill, SPHERE style&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Most people make item scripting much harder than it needs to be. For the purposes of this tutorial, since there is a more advanced one later, we will simply go over the basics of an ITEM script, line by line. We'll be using the gold script from the previous lesson, provided I can find it again.... &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ah, here it is, conveniently color coded for your viewing pleasure!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[ITEMDEF 0eed]&lt;br /&gt;
//gold coin&lt;br /&gt;
DEFNAME=i_gold&lt;br /&gt;
TYPE=T_GOLD&lt;br /&gt;
VALUE=1&lt;br /&gt;
CATEGORY=Provisions - Miscellaneous&lt;br /&gt;
SUBSECTION=Coins&lt;br /&gt;
DESCRIPTION=Gold Coin&lt;br /&gt;
DUPELIST=0eee,0eef&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the simplest of item scripts, since it has no additional behaviors beyond existing. I will go through this line by line, describing to you what each line does, and how it affects the end result.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 1''': [ITEMDEF 0eed]&lt;br /&gt;
&lt;br /&gt;
The first lines of an item script are frequently the most important. Basically, this line tells the server &amp;quot;Hey this is an item and I want it to be called 0eed!&amp;quot; The server then looks through one of the client files (specifically art.idx), and identifies whether or not this item is one of the built-in items. I think all items below 04500 are defined as built-in items, so never define a new item in that range. By typing this line, you tell the server that an item script is following. You also define 0eed as a valid item, which will definitely help later on when you try to give gold to players!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 2''': // gold coin&lt;br /&gt;
&lt;br /&gt;
This is the SPHERE version of comment. C programmers will recognize the format immediately. If you type // on any line of code, everything beyond that is ignored by the script reader. This can be on a line by itself, or at the end of a line to explain what the specific line does. In all cases, it won't affect your program, just make it easier to read.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 3''': DEFNAME=i_gold&lt;br /&gt;
&lt;br /&gt;
You should know by now what this does! If you don't, go back and read the previous lesson! It tells the server that i_gold and 0eed mean the same thing. In item scripts, all parameters are defined in that format:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
variable=value&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will see later on, when we get into scripting, how that format will help you more than you would believe. Items have a good number of variables that you can define, including:&lt;br /&gt;
&lt;br /&gt;
* DEFNAME&lt;br /&gt;
* ID&lt;br /&gt;
* TYPE&lt;br /&gt;
* VALUE&lt;br /&gt;
* RESOURCES&lt;br /&gt;
Other variables depend on the value of the TYPE. Which leads us right into...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 4''': TYPE=t_gold&lt;br /&gt;
&lt;br /&gt;
The first thing you might say is &amp;quot;What the heck is t_gold?&amp;quot; Well it's a DEFNAME. Actually it's a number. And that number is 72. If you want to check me on this, look in spheredefs.scp, it's there! Writing TYPE=72 would have the exact same effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are, currently, 183 built-in item types. These are hardcoded item types that contain predefined actions for an item. If an item has no type, when you click it, you get the &amp;quot;You cannot think of a way to use that item&amp;quot; message. There is a complete list of types, and how to set them up, here . All you need to know for now is that setting the type of this item to t_gold has no effect other than to make the item act like a gold coin (i.e. you can buy stuff with it!) Setting another item to type t_gold would probably make the server think that you can buy stuff with that item too. I've never tried this. It might be an interesting way to have unique currencies...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 5''': VALUE=1&lt;br /&gt;
&lt;br /&gt;
This defines how much the item costs when purchased, in gold. Of course, this is one gold piece, which is worth, well, one gold piece. So the value of the item is one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Lines 6-8''': CATEGORY, SUBSECTION, DESCRIPTION&lt;br /&gt;
&lt;br /&gt;
These are lines used only by SPHERE's GM tool, Axis, which actually saves you a lot of work by typing &amp;quot;.add i_gold&amp;quot; for you. More importantly, it types &amp;quot;.add 01737&amp;quot; and things like that for you, for items that were not important enough to get their own separate DEFNAME.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 9''': DUPEITEM&lt;br /&gt;
&lt;br /&gt;
It would be a ton of work for the SPHERE team to define all 8000 items that came with the game, especially when many of them are the same. (For an example of this, use the .xflip command on a door or sign. It cycles through all of the DUPEITEMs for that the item being flipped.) The numbers listed here are item numbers, which probably have not been defined yet. Here is the script for item 0eee:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[ITEMDEF 0eee]&lt;br /&gt;
//gold coins&lt;br /&gt;
DUPEITEM=0eed&lt;br /&gt;
CATEGORY=Provisions - Miscellaneous&lt;br /&gt;
SUBSECTION=Coins&lt;br /&gt;
DESCRIPTION=Gold Coins&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see, there is only one parameter for this whole item. It reiterates the DUPEITEM and sends the server looking to our 0eed (or i_gold) item for more information, such as TYPE and VALUE. DUPEITEM only exists to save typing. You probably won't use it.&lt;br /&gt;
&lt;br /&gt;
==CHARDEF==&lt;br /&gt;
Or, what it takes to make a naked man who can stand around and say &amp;quot;Huh?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NPCs... They make the world go around. They are what makes UO a unique multiplayer game. The monsters and NPCs you create make your server unique from any other. This section of chapter one will cover how to create a simple naked man who walks around and says little more than &amp;quot;Huh?&amp;quot; (or &amp;quot;Stop thief!&amp;quot; if you tell him to!).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First of all, we'll look at the script for a simple naked man. I'm pulling this out of spherechar_human.scp.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[CHARDEF 0190]&lt;br /&gt;
DEFNAME=c_man&lt;br /&gt;
Name=Man&lt;br /&gt;
ICON=i_pet_MAN&lt;br /&gt;
CAN=MT_EQUIP|MT_WALK|MT_RUN|MT_USEHANDS&lt;br /&gt;
RESOURCES=i_flesh_head, i_flesh_torso, i_flesh_right_arm, i_flesh_left_arm&lt;br /&gt;
FOODTYPE=15 t_food, t_fruit&lt;br /&gt;
DESIRES=i_gold,e_notoriety&lt;br /&gt;
AVERSIONS=t_TRAP,t_eerie_stuff&lt;br /&gt;
SHELTER=r_house&lt;br /&gt;
BLOODCOLOR=0&lt;br /&gt;
&lt;br /&gt;
TSPEECH=spk_human_prime&lt;br /&gt;
TSPEECH=spk_human_default&lt;br /&gt;
TEVENTS=e_Human_HearUnk&lt;br /&gt;
DESCRIPTION=Man&lt;br /&gt;
SUBSECTION=Miscellaneous&lt;br /&gt;
CATEGORY=Civilized&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see, it doesn't look a lot different than the item scripts we examined in the previous section. There are a lot of variables set that are the same, including DEFNAME, DESCRIPTION, and the other Axis variables.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But, there are a lot of new things here that we will again go over, one line at a time! And it's longer this time! Let the good times roll! (Sorry if you're not American.. All my American clichés are probably growing irritating!)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 1''': [CHARDEF 0190]&lt;br /&gt;
&lt;br /&gt;
Surprise surprise! It's an identifier, telling the server that we are going to be defined a character between this and the next [identifier]. And we also tell it that our character, or NPC, will have the ID 0190. The server knows that this ID is one of the built-in IDs. In fact, it's the ID of a naked man. You also know that 0190 is hexadecimal is 400 in decimal right?  :) Well why didn't you know that! Oh I'm just kidding, you don't need to know things like that.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 2''': DEFNAME=c_man&lt;br /&gt;
&lt;br /&gt;
Nothing new here. c_man is now the same as 0190. Most character DEFNAMEs will begin with C and then an underscore (c_) like you see above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 3''': Name=Man&lt;br /&gt;
&lt;br /&gt;
Oh oh! Something new! Items come with default names, built in to the server. Characters don't. So we have to assign him a name. We can give him any name we want, but since this isn't a specific man, we just give him a name telling us what he is. In this case &amp;quot;Man&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 4''': ICON=i_pet_man&lt;br /&gt;
&lt;br /&gt;
It took me a while to figure this one out. ICON defines what little picture you see when you're using the Tracking skill and all those little miniature creatures appear in the window. Those are actually items, all the i_pet items. To find out what the i_pet item for your creature should be, create him in the game using .addnpc, then use the .shrink command on him. The ID of the item that he becomes is your i_pet item.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 5''': CAN=mt_*&lt;br /&gt;
&lt;br /&gt;
(In case you don't know, * means &amp;quot;anything&amp;quot; for those who use Linux.)&lt;br /&gt;
&lt;br /&gt;
This is one of the most important lines of your character script, next to the ID we give him in the first line. First, because it allows us to tell the game what our NPC can do and what he can't do. There are only a few mt_* items, all of which are defined in spheredefs.scp. For the purpose of the lesson, I am going to copy them here. (The purple comments are mine.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;MT_NONMOVER        0 // We can't move at all&lt;br /&gt;
MT_GHOST          01 // We can walk through doors and such, like a ghost&lt;br /&gt;
MT_SWIM           02 // I can swim! (Water elementals, dolphins, etc)&lt;br /&gt;
MT_WALK           04 // I can move. Set this if you want your creature to move.&lt;br /&gt;
MT_FLY           010 // Moves through (supposed to be over) trees&lt;br /&gt;
MT_FIRE_IMMUNE   020 // Immune to damage by fire. Setting this on a player is bad.  :)&lt;br /&gt;
MT_EQUIP       00100 // Can equip things&lt;br /&gt;
MT_USEHANDS    00200 // Can use his hands to carry things (or open doors)&lt;br /&gt;
MT_MALE            0 // Is a male&lt;br /&gt;
MT_FEMALE      00800 // Is a female&lt;br /&gt;
MT_NONHUM      01000 // Non-human. I'm not sure what this does.&lt;br /&gt;
MT_RUN         02000 // Can move really fast!&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
According to this chart, we can see that if we don't give a creature a CAN flag, it will be an MT_MALE and an MT_NONMOVER (the two zeros). You can see from the example that by putting a | (found by pressing shift+backslash) between two CAN flags, we can give him more than one. In this case, we allow our man to equip things, walk, run, and use his hands. (An interesting fact is, even creatures that don't have hands can be set to use their hands, thus allowing them to carry light sources. Fire elementals do this. That's how they glow.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 6''': RESOURCES&lt;br /&gt;
&lt;br /&gt;
Resources is a very morbid name for this setting. Especially for a person. These are the items that you get whenever you chop up this creature's corpse. Scary eh?  :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 7-10''': FOODTYPE, DESIRES, AVERSIONS&lt;br /&gt;
&lt;br /&gt;
'''FOODTYPE''': Defines what kind of food the npc will eat and if NPC_AI_FOOD is on it'll make the npc look for this food + grass when he's hunger.&lt;br /&gt;
&lt;br /&gt;
'''DESIRES''': Defines what kind of items will the npc be interested in, if NPC_AI_EXTRA is on it'll show what items the npc will loot of players corpses or walk towards when it's on the ground.&lt;br /&gt;
&lt;br /&gt;
'''AVERSIONS''': No idea, but I think it tells the npc what sort of NPCs he'll try to fight, for example: I have a horse with e_horse as an event, and an imp without any events, if the npc has AVERSIONS=e_horse it'll prefer to fight the horse.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 11''': BLOODCOLOR&lt;br /&gt;
&lt;br /&gt;
Ever wanted to make your players have green blood? This is where you do it! A color number or a color defname will work fine. (Try to learn the numbers for common colors, it makes it so much easier.)&lt;br /&gt;
&lt;br /&gt;
The rest of it: TSPEECH and TEVENTS &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We're going to cover these in sections of their own. They are probably the most complex topics in scripting! (How many times do you suppose I'm going to say that before it's actually true?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;Some other things:&amp;lt;/font&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On 56B we have some other fields like MOVERATE,RESLEVEL,RESDISPDNID and RESDISPDNHUE. They sound some difficult and strange thing but they aren't. Here's the explanation for them: &lt;br /&gt;
&lt;br /&gt;
'''MOVERATE''': This setting (that can only be writed at the npc chardef) controls how fast the npc moves. The smaller the value, the faster the npc is. For example, if I have a horse chardef with default moverate (100) and another with moverate=60, the one with 60 will walk and run a lot faster than the other horse. This is great for making really difficult monsters to kill. &lt;br /&gt;
&lt;br /&gt;
'''RESLEVEL''': This tells sphere what version of uo this monster is from, for example, a Wanderer of the Void will have RESLEVEL=3 (3=AOS) (see sphere_defs.scp for a complete list), so only accounts with RESDISP 3 or bigger can see this monster as he really is. &lt;br /&gt;
&lt;br /&gt;
''NOTE'': If you set a lower value for RESLEVEL, if the player doesn't have this npc anim he'll crash. &lt;br /&gt;
&lt;br /&gt;
'''RESDISPDNID''': As you probably have seen, I used a lot of &amp;quot;as he really&amp;quot; is, exactly because of this setting, this tells the client what monster will the player see instead of the correct one. For example, this Wanderer of the Void will show as Wanderer of the Void for those who has ACCOUNT.RESDISP=3 or bigger, but for those who has smaller values it'll show as a c_spectre (if you so define). &lt;br /&gt;
&lt;br /&gt;
'''RESDISPDNHUE''': This defines what color will the player see the monster if the RESDISPDNID id is shown to him (have an account.resdisp lower than the reslevel of this char)&lt;br /&gt;
&lt;br /&gt;
Here's an example for those new settings:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[CHARDEF 310]&lt;br /&gt;
DEFNAME=c_Wailing_Banshee&lt;br /&gt;
NAME=Wailing Banshee&lt;br /&gt;
SOUND=snd_monster_zombie1&lt;br /&gt;
ICON=i_pet_wailingbanshee&lt;br /&gt;
DAM=11,16&lt;br /&gt;
RESDISPDNID=c_spectre&lt;br /&gt;
RESLEVEL=3&lt;br /&gt;
RESDISPDNHUE=01&lt;br /&gt;
ARMOR=20&lt;br /&gt;
CAN=MT_WALK|MT_FLY&lt;br /&gt;
DESIRES=i_gold,e_notoriety,e_horses,c_man,c_woman,t_corpse&lt;br /&gt;
CATEGORY=New Monsters&lt;br /&gt;
SUBSECTION=AOS&lt;br /&gt;
DESCRIPTION=Wailing Banshee&lt;br /&gt;
&lt;br /&gt;
ON=@Create&lt;br /&gt;
	NPC = brain_monster&lt;br /&gt;
	FAME = {100 3000}&lt;br /&gt;
	KARMA = {-5000 -6999}&lt;br /&gt;
	STR = {126 166}&lt;br /&gt;
	INT = {86 115}&lt;br /&gt;
	DEX = {41 75}&lt;br /&gt;
	MAGICRESISTANCE = {75.0 95.0}&lt;br /&gt;
	TACTICS = {45.0 75.0}&lt;br /&gt;
	WRESTLING = {50.0 70.0}&lt;br /&gt;
&lt;br /&gt;
ON=@NpcRestock&lt;br /&gt;
	ITEM = i_gold, {50 100}&lt;br /&gt;
	ITEM = i_reag_daemon_bone, {2 6}&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And there you have it. A simple character script and some new things. Read the chapter that is all about making NPCs later in the tutorial.&lt;br /&gt;
&lt;br /&gt;
==TEMPLATE==&lt;br /&gt;
Or, how to put great laggy quantities of items into one unlaggy container. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You've all seen it. Those shards out there that don't use TEMPLATEs. When you kill, say, a dragon, on those shards, and go to loot him, you find that rather than neatly organized containers, there are 100 potions scattered about the loot window. Not only that, but all your magical weapons are buried neatly beneath them! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
How do we solve this problem? Well, SPHERE has given us the handy tool of TEMPLATEs. These allow you to define a container item, AND the items inside of it, AT THE SAME TIME. Isn't that neat? I thought so too, when I first figured out what they were. Let's do our traditional take-apart-the-script section. I'll place a nice TEMPLATE from the file spheretemp_loot.scp. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;[TEMPLATE 101505]&amp;lt;br /&amp;gt;&lt;br /&gt;
DEFNAME=backpack_poor&amp;lt;br /&amp;gt;&lt;br /&gt;
CATEGORY=Item Templates&amp;lt;br /&amp;gt;&lt;br /&gt;
SUBSECTION=Loot Templates&amp;lt;br /&amp;gt;&lt;br /&gt;
DESCRIPTION=Poor Backpack&amp;lt;br /&amp;gt;&lt;br /&gt;
CONTAINER=i_backpack&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_food 1 0 3 },{ 1 3 }&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_bottle 1 0 8 }&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_light 1 0 8 }&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_male_tops 1 0 4 }&amp;lt;br /&amp;gt;&lt;br /&gt;
COLOR=colors_all&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_male_pants 1 0 4 }&amp;lt;br /&amp;gt;&lt;br /&gt;
COLOR=colors_all&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM=POOR_GOLD_PILE&amp;lt;br /&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Wow, that looks confusing. But don't worry, by the time we're done, you'll know exactly what it means! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;[TEMPLATE 101505]&amp;lt;/font&amp;gt;: First of all, we look at the header for our template. An interesting thing about templates is that the item name cannot be a DEFNAME like all other scripts. It must be a ridiculously high number like 101505.&lt;br /&gt;
&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;DEFNAME=backpack_poor&amp;lt;/font&amp;gt;: Of course, SPHERE developers are not entirely evil, and have provided us with the ability to give these scary numbers a DEFNAME for easier access. You tell me, which would you rather type? &amp;quot;.add 101505&amp;quot; or &amp;quot;.add backpack_poor&amp;quot;? I thought so.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Since .56c, move DEFNAME to [TEMPLATE ...], e.g. [TEMPLATE backpack_poor]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;CATEGORY, SUBSECTION, DESCRIPTION&amp;lt;/font&amp;gt;: Axis crap. Optional. See the previous sections for a description of what these do. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;CONTAINER=i_backpack&amp;lt;/font&amp;gt;: Ahh, now we're getting down to the meat of this thing. This specifies the holding container that all other items in this template will be in. When you add the item in game, you will see this container. In this case, it's a backpack. Simple enough. This can be any valid item with a TYPE of t_container or t_container_locked. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;ITEM={ random_food 1 0 3},{1 3}&amp;lt;/font&amp;gt; Well, that's certainly cryptic. I think we need to break this line down even further. &lt;br /&gt;
&lt;br /&gt;
But first, we're going to cover RANDOM SELECTORS! Sounds like fun doesn't it? Nah, it doesn't sound fun to me either, but it's absolutely necessary to a good shard. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Basically, they are an easy way to get different numbers with one command. What fun would a shard be where you killed a dragon and got a Platemail of Magic Stuff and a Super Duper Sword of Power every single time? Everyone would be running around with them. What we need is some variety! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are two types of random selectors: weighted random and ranged random. Weighted random makes a statement like this: &amp;quot;Ok, 1 out of 10 times pick Number A, 3 out of 10 times pick Number B, and 6 out of 10 times pick number C&amp;quot;. Ranged random makes a statement like this: &amp;quot;Pick any number between the two numbers I give you&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Our example actually has an example of both ranged random and weighted random. We'll cover them in the order they appear: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{ random_food 1 0 3} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a weighted random selector. The way to interpret these is to take the numbers that appear between the parentheses and divide them into sets of two: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
random_food 1&amp;lt;br&amp;gt;&lt;br /&gt;
0 3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add up the second numbers in both sets, and we get 4. This tells SPHERE, &amp;quot;Ok, 1 out of four times, I want you to pick random_food, and 3 out of four times, I want you to pick zero.&amp;quot; You can even have random sets within random sets, but then it just gets confusing. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{ { random_food 1 0 3} 1 random_clothing 1} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can you figure it out? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
random_clothing 1&lt;br /&gt;
{ random_food 1 0 3} 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2 is our magic number in this case. One out of two times, SPHERE will pick random_clothing, and one out of two times, SPHERE will pick our previous random selector, which will then select one of its own options. If you're confused at this point, don't worry. This is extremely rare, and we'll see in a moment how templates help us to solve this problem. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I did mention, though, that there is another type of random selector, and you can probably see what it is: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{1 3} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE: Spacing here is important. There must be ZERO spaces between the { and the first number, or the } and the last number. It will behave strangely otherwise. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This tells SPHERE &amp;quot;Pick a number between 1 and 3, inclusive&amp;quot;. Inclusive means that SPHERE can pick 1, 3, or any number in between. In this case, the range is rather limited. SPHERE will give you a 1, 2 or 3 here. Ranged random selectors are actually more often used inside of weighted random selectors. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{ {1 3} 3 {4 9} 1} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;quot;One out of four times, pick a number between 4 and 9. Three out of four times, pick a number between 1 and 3.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And with that out of the way, we're going to analyze the actual line of the script from above. The Piece What the Line does ITEM=&lt;br /&gt;
This tells the script &amp;quot;Ok, we're going to add an item to this container. Anything after the = tells the script exactly what it is we're adding and in what amounts. You could easily say ITEM=i_platemail_chest, or something like that, without the mysterious { } sections, but the reason templates are interesting is because they can vary greatly. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;{ random_food 1 0 3}&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the item you will be creating. As we can see from our weighted random selector lesson, 1 out of 4 times, it will be random_food, and 3 out of 4 times, it will be zero. If an ITEM is zero, nothing will be created this time. Basically this is saying &amp;quot;There will be a one in four chance of getting random_food in this container.&amp;quot; What is random_food you ask? Well, it happens to be another TEMPLATE, defined in spheretemplate.scp, I believe. &lt;br /&gt;
&lt;br /&gt;
{1 3} This is the amount of the item that will be created. You should recognize this as a ranged random selector. This tells SPHERE to put between 1 and 3 of this item into the container. Of course, if the item is zero as selected above, this has no effect since one nothing and three nothings are still nothing. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So basically, that is a template script. You then fill it with as many items as you want. You may also notice the following construction: &lt;br /&gt;
&lt;br /&gt;
ITEM=i_sword_long,R11 &lt;br /&gt;
&lt;br /&gt;
This is a shorthand way of writing this: &lt;br /&gt;
&lt;br /&gt;
ITEM={ i_sword_long 1 0 10 } &lt;br /&gt;
&lt;br /&gt;
R11 means &amp;quot;one out of 11 chance of finding this item&amp;quot;. And you can add an amount selector to the end of that as well, which makes it look long and scary: &lt;br /&gt;
&lt;br /&gt;
ITEM=i_sword_long,R11,{4 5} &lt;br /&gt;
&lt;br /&gt;
But why would you want 4 or 5 long swords in one item? That would be bizzare.  :) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And that's about it for templates. Congratulations, you're finished with chapter 1. Now you should be able to understand the examples to follow on the next section. You may also have some questions which are addressed in the common questions area. If you have a question which is not addressed there, perhaps it is too advanced of a topic for chapter 1. I assure you almost every aspect of SPHERE scripting will be covered in later chapters. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''(A template example by Belgar)''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;[TEMPLATE tm_necromancer]&amp;lt;br /&amp;gt;&lt;br /&gt;
CONTAINER=i_bag&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM=random_necro_scroll&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM=random_necro_scroll&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM=random_necro_reagent, {5 12}&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM=random_reagent, {5 12}&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM=random_necro_reagent, {5 12}&amp;lt;br /&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
Or, um. Well I guess there really isn't another way to say &amp;quot;Examples&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This shall be my attempt to create the most basic new items available. You will see things in these examples that are NOT mentioned in the tutorials. The major factor will be ON=@Create, which is the primary topic of Chapter 2. Just know for now that things you can change in game (color, etc) must go under ON=@Create.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1''': A Red Sword&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;[ITEMDEF i_sword_red]&amp;lt;br /&amp;gt;&lt;br /&gt;
ID=i_sword_viking&amp;lt;br /&amp;gt;&lt;br /&gt;
TYPE=t_weapon_sword&amp;lt;br /&amp;gt;&lt;br /&gt;
NAME=The Red Sword&amp;lt;br /&amp;gt;&lt;br /&gt;
CATEGORY=Weapons&amp;lt;br /&amp;gt;&lt;br /&gt;
SUBSECTION=New Swords&amp;lt;br /&amp;gt;&lt;br /&gt;
DESCRIPTION=Red Sword&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ON=@Create&lt;br /&gt;
:COLOR=colors_red // This is a comment. Comments are ignored by SPHERE.&amp;lt;br /&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Wait, what is this weird &amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;//&amp;lt;/font&amp;gt; thing we've got going here? That's called a comment. It's completely ignored by SPHERE, so you can write whatever you want to the end of the line after //. You cannot have multi-line comments in SPHERE unless you use a new //, so don't even try it. SPHERE will give funky errors and then you'll have fun finding them. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2''': A blue ettin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;[CHARDEF c_ettin_blue]&amp;lt;br /&amp;gt;&lt;br /&gt;
ID=02 // You could just as easily use c_ettin here.&amp;lt;br /&amp;gt;&lt;br /&gt;
NAME=My Blue Ettin&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
ON=@Create&amp;lt;br /&amp;gt;&lt;br /&gt;
:COLOR=02 // This is a dark blue color. It's often used for Counselor robes. Remember it.&amp;lt;br /&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 3''': A template from the file, since I'm too lazy to write one myself&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;[TEMPLATE 101521]&amp;lt;br /&amp;gt;&lt;br /&gt;
DEFNAME=goodie_meager_1&amp;lt;br /&amp;gt;&lt;br /&gt;
CATEGORY=Item Templates&amp;lt;br /&amp;gt;&lt;br /&gt;
SUBSECTION=Loot Templates&amp;lt;br /&amp;gt;&lt;br /&gt;
DESCRIPTION=Meager Goodie 1&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ meager_gold_pile 1 backpack_meager 1 pouch_meager 1 }&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_boots 1 0 4 }&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_gorget 1 0 4 }&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_staff 1 0 4 }&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_necklace 1 0 4 }&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ i_cape 1 0 9 }&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;darkred&amp;quot;&amp;gt;COLOR=colors_all&amp;lt;/font&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may notice something new here (especially since I highlighted it in red), and yes, it is legal. Any lines between ITEM= lines will affect the previously created item. The COLOR= line here affects the ITEM created by the line&lt;br /&gt;
&lt;br /&gt;
ITEM={ i_cape 1 0 9 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remember, the best way to learn this type of scripts is to read the scripts provided for you in files like sphereitem_colorarm.scp and sphereitem_beers.scp.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Chapter_1&amp;diff=7989</id>
		<title>Chapter 1</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Chapter_1&amp;diff=7989"/>
				<updated>2022-08-19T19:21:20Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Chapter_1}}&lt;br /&gt;
&lt;br /&gt;
==Numbers==&lt;br /&gt;
&lt;br /&gt;
The first thing you'll notice while looking through SPHERE scripts is the wide variety of ways to write numbers. Since numbers are insanely important to a SPHERE scripter, this is the first lesson in the series. By the end of the lesson, I hope that you have a general understanding of hexadecimal, decimal and binary numbering systems, and SPHERE's ways of identifying each. You will also know how to generate random numbers either from a series or from a list of choices.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first thing you need to understand is that the way we count is not the only way to count. Our numbering system contains ten digits (0, 1, 2, 3, 4, 5, 6, 7, 8, and 9). Therefore, at the tenth number, we have to add an extra column to the number, and reset the first column to zero (1, 2, 3, 4, 5, 6, 7, 8, 9, 10). That's why our numbering system works the way it does.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the decimal system, without realizing it, we write our numbers to mean powers of ten. For example, if you take the number 17282 (which I just made up), and divide it down we get this:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| Power of ten      || 4     || 3     || 2     || 1     || 0&lt;br /&gt;
|-&lt;br /&gt;
| Ten to that power || 10000 || 1000  || 100   || 10    || 1&lt;br /&gt;
|-&lt;br /&gt;
| Digit             || 1     || 7     || 2     || 8     || 2 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To reach the number 17282 from here, we simply take ten to the power of the number in the top row, multiply it by the number in the bottom row, and then add all those numbers together. We get 10000 + 7000 + 200 + 80 + 2. Obviously, this is simplistic, and we do it without even realizing we're doing it. You're probably thinking &amp;quot;Riiight, what does Taran think he's getting at?&amp;quot; Well, we aren't so special that our counting system is the only way to count.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, there is another numbering system that is used almost solely by computers. It only contains two numbers (1 and 0) and is therefore called the binary (meaning two) system. Binary numbers look like this: 101011101101, and you often see them in ads for computers and other electronic equipment (oftentimes they are shown streaming out of a CD player on television commercials). Digits in the binary system are called bits (short for BInary digiT)Binary numbers are almost impossible to translate to decimal directly, and so some math must be done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Binary works in the same way, by adding powers of a number. In the case of binary, since there are two numbers in the whole system, that number is naturally two. Here are some examples of powers of two. These numbers might look familiar to some people.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| Power of 2 || Binary number || Decimal number&lt;br /&gt;
|-&lt;br /&gt;
| 0          || 1             || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1          || 10            || 2&lt;br /&gt;
|-&lt;br /&gt;
| 2          || 100           || 4&lt;br /&gt;
|-&lt;br /&gt;
| 3          || 1000          || 8&lt;br /&gt;
|-&lt;br /&gt;
| 4          || 10000         || 16&lt;br /&gt;
|-&lt;br /&gt;
| 5          || 100000        || 32&lt;br /&gt;
|-&lt;br /&gt;
| 6          || 1000000       || 64&lt;br /&gt;
|-&lt;br /&gt;
| 7          || 10000000      || 128&lt;br /&gt;
|-&lt;br /&gt;
| 8          || 100000000     || 256&lt;br /&gt;
|-&lt;br /&gt;
| 9          || 1000000000    || 512&lt;br /&gt;
|-&lt;br /&gt;
| 10         || 10000000000   || 1024&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Ridiculous eh?  :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We need a better system! The reason we get such strange results is because 10 is not a power of two. We need to find a system where the number base IS a power of two. The most commonly used system used is base-16, or hexadecimal. I'm sure if you've perused the SPHERE boards, you've seen the word hex floating around. No, this isn't a curse or evil spell, it's a short way of saying &amp;quot;hexadecimal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| Binary || Decimal || Hexadecimal&lt;br /&gt;
|-&lt;br /&gt;
| 1      || 1       || 1&lt;br /&gt;
|-&lt;br /&gt;
| 10     || 2       || 2&lt;br /&gt;
|-&lt;br /&gt;
| 11     || 3       || 3&lt;br /&gt;
|-&lt;br /&gt;
| 100    || 4       || 4&lt;br /&gt;
|-&lt;br /&gt;
| 101    || 5       || 5&lt;br /&gt;
|-&lt;br /&gt;
| 110    || 6       || 6&lt;br /&gt;
|-&lt;br /&gt;
| 111    || 7       || 7&lt;br /&gt;
|-&lt;br /&gt;
| 1000   || 8       || 8&lt;br /&gt;
|-&lt;br /&gt;
| 1001   || 9       || 9&lt;br /&gt;
|-&lt;br /&gt;
| 1010   || 10      || A&lt;br /&gt;
|-&lt;br /&gt;
| 1011   || 11      || B&lt;br /&gt;
|-&lt;br /&gt;
| 1100   || 12      || C&lt;br /&gt;
|-&lt;br /&gt;
| 1101   || 13      || D&lt;br /&gt;
|-&lt;br /&gt;
| 1110   || 14      || E&lt;br /&gt;
|-&lt;br /&gt;
| 1111   || 15      || F&lt;br /&gt;
|-&lt;br /&gt;
| 10000  || 16      || 10&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See how it works? There are an extra six numbers added onto the end of the system, represented by the first six letters of the alphabet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, in SPHERE scripting, you are almost NEVER going to be dealing with binary numbers that are NOT powers of two, and if you do, you can simply use any scientific calculator to figure it out. But it's a lot easier in hexadecimal.&lt;br /&gt;
&lt;br /&gt;
(This is the last table, I promise!!)&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| Binary        || Hexadecimal  &lt;br /&gt;
|-&lt;br /&gt;
| 000000001 (1) || 01&lt;br /&gt;
|-&lt;br /&gt;
| 000000010 (2) || 02  &lt;br /&gt;
|-&lt;br /&gt;
| 000000100 (3) || 04  &lt;br /&gt;
|-&lt;br /&gt;
| 000001000 (4) || 08  &lt;br /&gt;
|-&lt;br /&gt;
| 000010000 (5) || 010  &lt;br /&gt;
|-&lt;br /&gt;
| 000100000 (6) || 020  &lt;br /&gt;
|-&lt;br /&gt;
| 001000000 (7) || 040  &lt;br /&gt;
|-&lt;br /&gt;
| 010000000 (8) || 080  &lt;br /&gt;
|-&lt;br /&gt;
| 100000000 (9) || 0100  &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see, there's a bit of a pattern in the hexadecimal column. You might be thinking, there seems to be some sort of pattern of the numbers 1, 2, 4 and 8. And you would be right. Another detail you may notice is the zeros in front of the hexadecimal numbers (like 0100, rather than just 100). In SPHERE, that 0 tells the script &amp;quot;Hey, this number is HEX!&amp;quot; 0100 and 100 are very different numbers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let's say, for a SPHERE script, you need to set the 13th bit of a number (FLAGS, for example), you could write something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''SRC.FLAGS |= 8192'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But would you really remember that 8192 is 2 to the 13th power? I didn't think so. What would be easier is to go down through your list in your head, until you reach the 13th number. (Remember, START AT ZERO when you're counting!)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| 01  || 02  || 04  || 08  || 010 || 020 || 040 || 080 || 0100 || 0200 || 0400 || 0800 || 01000 || 02000  &lt;br /&gt;
|-&lt;br /&gt;
| 2^0 || 2^1 || 2^2 || 2^3 || 2^4 || 2^5 || 2^6 || 2^7 || 2^8  || 2^9  || 2^10 || 2^11 || 2^12  || 2^13  &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And there you have it. The first 14 powers of two in hexademical.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''SRC.FLAGS |= 02000'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above code is identical to the previous example. 8192 (decimal) is EQUAL to 02000 (hexadecimal)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8192 = 02000'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may be saying, &amp;quot;How do I know he's just not making all of this up?&amp;quot; Well, our wonderful friends at Microsoft have provided us with a nice tool that converters from decimal to hexadecimal to binary to octal (ANOTHER numbering system that is useless in SPHERE, so we will not deal with it). It's called the Calculator. You may find it by clicking your start button, going to Programs, then Accessories. Calculator should be sitting there looking pretty. Once in the calculator program, go to the View menu, and click Scientific. You'll see the display drastically change. To convert a number between numbering systems, simply click on the original system (Dec), type a number (8192), then click on the button for the other system (Hex). Automagically, Windows will convert your decimal number to hexadecimal. Stick a zero on the front, and SPHERE will be perfectly happy with it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is probably the hardest thing in all of SPHERE scripting to understand. Luckily, because of the next section, you won't have to deal with scary numbers most of the time. If I still have you at the end of this lesson, I know you're going to do great!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Onward to some SPHERE scripting!&lt;br /&gt;
&lt;br /&gt;
==Defnames==&lt;br /&gt;
&lt;br /&gt;
Here's a list of scary numbers you might encounter while programming in SPHERE.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| The Scary Number || What it means  &lt;br /&gt;
|-&lt;br /&gt;
| 0eed             || ID of a gold coin  &lt;br /&gt;
|-&lt;br /&gt;
| 0dda             || ID of a red moongate  &lt;br /&gt;
|-&lt;br /&gt;
| 1650,1440        || Coordinates of Britain  &lt;br /&gt;
|-&lt;br /&gt;
| 021              || The code number for red  &lt;br /&gt;
|-&lt;br /&gt;
| 04000            ||  The invisible color  &lt;br /&gt;
|-&lt;br /&gt;
| 04000efad        || An item's serial number  &lt;br /&gt;
|-&lt;br /&gt;
| 4                || The PLEVEL of a GM  &lt;br /&gt;
|-&lt;br /&gt;
| 2048 (or 0800)   || Flag for incognito spell  &lt;br /&gt;
|-&lt;br /&gt;
| 010 (or 16)    || Memory type for aggressors  &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Obviously, no one is going to want to remember those numbers. Back in the old days, before SPHERE and TUS (pre-.50 SPHERE) and even into the mists of Grayworld (pre-.41 TUS), we all had to remember those numbers. I know all of those numbers I just said (except the serial number which I just made up), plus a couple dozen more, by heart. Luckily for those of you who don't like to sit around remembering numbers all day, SPHERE has developed a system whereby things can be identified by names instead of numbers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Actually, the things are still identified by numbers. It's the numbers which are identified by the name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the game, type .add 0eed and press enter. A target will come up and you'll create a single gold piece.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now type .add i_gold and press enter. You will create the same single gold piece.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now which is easier to remember, 0eed or i_gold. I would say that i_gold wins by a long shot. But how does this magic happen? Let's take a look at the script definition for a piece of gold. Don't worry about understanding it. I'll explain item scripts in full in the next section! You can find this script in the file sphere_item_resources.scp.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;font color=&amp;quot;darkgreen&amp;quot;&amp;gt;[ITEMDEF 0eed]&amp;lt;br /&amp;gt;&lt;br /&gt;
//gold coin&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;ff0000&amp;quot;&amp;gt;DEFNAME=i_gold&amp;lt;/font&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
TYPE=T_GOLD&amp;lt;br /&amp;gt;&lt;br /&gt;
VALUE=1&amp;lt;br /&amp;gt;&lt;br /&gt;
CATEGORY=Provisions - Miscellaneous&amp;lt;br /&amp;gt;&lt;br /&gt;
SUBSECTION=Coins&amp;lt;br /&amp;gt;&lt;br /&gt;
DESCRIPTION=Gold Coin&amp;lt;br /&amp;gt;&lt;br /&gt;
DUPELIST=0eee,0eef&amp;lt;/font&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have highlighted in red the line that really matters for the purposes of this lesson. Take note of the 0eed in the top line of the script, and then ignore the rest of it. That 0eed is the real item number of this item. We'll cover item numbers more in the next section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But the real line we want to see the &amp;lt;font color=&amp;quot;ff0000&amp;quot;&amp;gt;DEFNAME=i_gold&amp;lt;/font&amp;gt; line. This is where the script tells the server, &amp;quot;I want item 0eed to be identified by the text i_gold from here on.&amp;quot; If you tried to refer to i_gold before the server read this script (more on reordering scripts in [[Chapter 2]], the server would spit out an error, but now it knows what that refers to, so you can use it in the game or in another script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You should ALWAYS give items you create a DEFNAME that fits the item. Usually the defname will be defined in the [ITEMDEF] identifier itself (again, more on this later), but if you insist upon using numbers, be sure you give it an easy-to-remember name (not golden_gulash for a viking sword). It makes it easier to remember names than numbers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A second way to define a DEFNAME is by using the [DEFNAME] tag in a script. Here is an example of that:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;font color=&amp;quot;darkgreen&amp;quot;&amp;gt;[DEFNAME colors]&amp;lt;br /&amp;gt;&lt;br /&gt;
color_blue 02&amp;lt;br /&amp;gt;&lt;br /&gt;
color_red 021&amp;lt;br /&amp;gt;&lt;br /&gt;
color_green 041&amp;lt;/font&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You'll find a script similar to this in spheredefs.scp, another file that should be loaded before any other file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here's the rundown on this script, line by line:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 1''': This is where the type of script and the defname (yes colors is the defname of this script) is defined. This tells the server what type of script to expect between this and the next identifier (identifiers are the lines contained in square brackets). All identifiers have this format. The first parameter is the script type. These are numerous, and I will go over them as we get to them. The second parameter is either an ID number or a defname. In most cases, in the scripts you write, it will be a defname. The only exceptions to this I can think of would be if you used a program to insert a new item into the client files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Lines 2-4''': These set up your individual DEFNAME pieces. It says that color_blue is equal to 02, color_red is equal to 021, and color_green is equal to 041. You may have any number of spaces between the name and the value. The definitions contained in spheredefs.scp are among the most useful you will encounter, as they prevent you from writing the long scary numbers we went over in the previous section. These include things like names for flags, names for item attributes, names for the built-in MIDI or MP3 music, names for memory types, and many other things. Look through the file to see what it offers you.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That's about it for DEFNAMEs. You'll see more of these later as we cover other types of scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now go on to learn about items.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==ITEMDEF==&lt;br /&gt;
Or, how to make a mountain from a molehill, SPHERE style&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Most people make item scripting much harder than it needs to be. For the purposes of this tutorial, since there is a more advanced one later, we will simply go over the basics of an ITEM script, line by line. We'll be using the gold script from the previous lesson, provided I can find it again.... &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ah, here it is, conveniently color coded for your viewing pleasure!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[ITEMDEF 0eed]&lt;br /&gt;
//gold coin&lt;br /&gt;
DEFNAME=i_gold&lt;br /&gt;
TYPE=T_GOLD&lt;br /&gt;
VALUE=1&lt;br /&gt;
CATEGORY=Provisions - Miscellaneous&lt;br /&gt;
SUBSECTION=Coins&lt;br /&gt;
DESCRIPTION=Gold Coin&lt;br /&gt;
DUPELIST=0eee,0eef&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the simplest of item scripts, since it has no additional behaviors beyond existing. I will go through this line by line, describing to you what each line does, and how it affects the end result.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 1''': [ITEMDEF 0eed]&lt;br /&gt;
&lt;br /&gt;
The first lines of an item script are frequently the most important. Basically, this line tells the server &amp;quot;Hey this is an item and I want it to be called 0eed!&amp;quot; The server then looks through one of the client files (specifically art.idx), and identifies whether or not this item is one of the built-in items. I think all items below 04500 are defined as built-in items, so never define a new item in that range. By typing this line, you tell the server that an item script is following. You also define 0eed as a valid item, which will definitely help later on when you try to give gold to players!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 2''': // gold coin&lt;br /&gt;
&lt;br /&gt;
This is the SPHERE version of comment. C programmers will recognize the format immediately. If you type // on any line of code, everything beyond that is ignored by the script reader. This can be on a line by itself, or at the end of a line to explain what the specific line does. In all cases, it won't affect your program, just make it easier to read.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 3''': DEFNAME=i_gold&lt;br /&gt;
&lt;br /&gt;
You should know by now what this does! If you don't, go back and read the previous lesson! It tells the server that i_gold and 0eed mean the same thing. In item scripts, all parameters are defined in that format:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
variable=value&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will see later on, when we get into scripting, how that format will help you more than you would believe. Items have a good number of variables that you can define, including:&lt;br /&gt;
&lt;br /&gt;
* DEFNAME&lt;br /&gt;
* ID&lt;br /&gt;
* TYPE&lt;br /&gt;
* VALUE&lt;br /&gt;
* RESOURCES&lt;br /&gt;
Other variables depend on the value of the TYPE. Which leads us right into...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 4''': TYPE=t_gold&lt;br /&gt;
&lt;br /&gt;
The first thing you might say is &amp;quot;What the heck is t_gold?&amp;quot; Well it's a DEFNAME. Actually it's a number. And that number is 72. If you want to check me on this, look in spheredefs.scp, it's there! Writing TYPE=72 would have the exact same effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are, currently, 183 built-in item types. These are hardcoded item types that contain predefined actions for an item. If an item has no type, when you click it, you get the &amp;quot;You cannot think of a way to use that item&amp;quot; message. There is a complete list of types, and how to set them up, here . All you need to know for now is that setting the type of this item to t_gold has no effect other than to make the item act like a gold coin (i.e. you can buy stuff with it!) Setting another item to type t_gold would probably make the server think that you can buy stuff with that item too. I've never tried this. It might be an interesting way to have unique currencies...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 5''': VALUE=1&lt;br /&gt;
&lt;br /&gt;
This defines how much the item costs when purchased, in gold. Of course, this is one gold piece, which is worth, well, one gold piece. So the value of the item is one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Lines 6-8''': CATEGORY, SUBSECTION, DESCRIPTION&lt;br /&gt;
&lt;br /&gt;
These are lines used only by SPHERE's GM tool, Axis, which actually saves you a lot of work by typing &amp;quot;.add i_gold&amp;quot; for you. More importantly, it types &amp;quot;.add 01737&amp;quot; and things like that for you, for items that were not important enough to get their own separate DEFNAME.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 9''': DUPEITEM&lt;br /&gt;
&lt;br /&gt;
It would be a ton of work for the SPHERE team to define all 8000 items that came with the game, especially when many of them are the same. (For an example of this, use the .xflip command on a door or sign. It cycles through all of the DUPEITEMs for that the item being flipped.) The numbers listed here are item numbers, which probably have not been defined yet. Here is the script for item 0eee:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[ITEMDEF 0eee]&lt;br /&gt;
//gold coins&lt;br /&gt;
DUPEITEM=0eed&lt;br /&gt;
CATEGORY=Provisions - Miscellaneous&lt;br /&gt;
SUBSECTION=Coins&lt;br /&gt;
DESCRIPTION=Gold Coins&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see, there is only one parameter for this whole item. It reiterates the DUPEITEM and sends the server looking to our 0eed (or i_gold) item for more information, such as TYPE and VALUE. DUPEITEM only exists to save typing. You probably won't use it.&lt;br /&gt;
&lt;br /&gt;
==CHARDEF==&lt;br /&gt;
Or, what it takes to make a naked man who can stand around and say &amp;quot;Huh?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NPCs... They make the world go around. They are what makes UO a unique multiplayer game. The monsters and NPCs you create make your server unique from any other. This section of chapter one will cover how to create a simple naked man who walks around and says little more than &amp;quot;Huh?&amp;quot; (or &amp;quot;Stop thief!&amp;quot; if you tell him to!).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First of all, we'll look at the script for a simple naked man. I'm pulling this out of spherechar_human.scp.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[CHARDEF 0190]&lt;br /&gt;
DEFNAME=c_man&lt;br /&gt;
Name=Man&lt;br /&gt;
ICON=i_pet_MAN&lt;br /&gt;
CAN=MT_EQUIP|MT_WALK|MT_RUN|MT_USEHANDS&lt;br /&gt;
RESOURCES=i_flesh_head, i_flesh_torso, i_flesh_right_arm, i_flesh_left_arm&lt;br /&gt;
FOODTYPE=15 t_food, t_fruit&lt;br /&gt;
DESIRES=i_gold,e_notoriety&lt;br /&gt;
AVERSIONS=t_TRAP,t_eerie_stuff&lt;br /&gt;
SHELTER=r_house&lt;br /&gt;
BLOODCOLOR=0&lt;br /&gt;
&lt;br /&gt;
TSPEECH=spk_human_prime&lt;br /&gt;
TSPEECH=spk_human_default&lt;br /&gt;
TEVENTS=e_Human_HearUnk&lt;br /&gt;
DESCRIPTION=Man&lt;br /&gt;
SUBSECTION=Miscellaneous&lt;br /&gt;
CATEGORY=Civilized&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see, it doesn't look a lot different than the item scripts we examined in the previous section. There are a lot of variables set that are the same, including DEFNAME, DESCRIPTION, and the other Axis variables.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But, there are a lot of new things here that we will again go over, one line at a time! And it's longer this time! Let the good times roll! (Sorry if you're not American.. All my American clichés are probably growing irritating!)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 1''': [CHARDEF 0190]&lt;br /&gt;
&lt;br /&gt;
Surprise surprise! It's an identifier, telling the server that we are going to be defined a character between this and the next [identifier]. And we also tell it that our character, or NPC, will have the ID 0190. The server knows that this ID is one of the built-in IDs. In fact, it's the ID of a naked man. You also know that 0190 is hexadecimal is 400 in decimal right?  :) Well why didn't you know that! Oh I'm just kidding, you don't need to know things like that.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 2''': DEFNAME=c_man&lt;br /&gt;
&lt;br /&gt;
Nothing new here. c_man is now the same as 0190. Most character DEFNAMEs will begin with C and then an underscore (c_) like you see above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 3''': Name=Man&lt;br /&gt;
&lt;br /&gt;
Oh oh! Something new! Items come with default names, built in to the server. Characters don't. So we have to assign him a name. We can give him any name we want, but since this isn't a specific man, we just give him a name telling us what he is. In this case &amp;quot;Man&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 4''': ICON=i_pet_man&lt;br /&gt;
&lt;br /&gt;
It took me a while to figure this one out. ICON defines what little picture you see when you're using the Tracking skill and all those little miniature creatures appear in the window. Those are actually items, all the i_pet items. To find out what the i_pet item for your creature should be, create him in the game using .addnpc, then use the .shrink command on him. The ID of the item that he becomes is your i_pet item.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 5''': CAN=mt_*&lt;br /&gt;
&lt;br /&gt;
(In case you don't know, * means &amp;quot;anything&amp;quot; for those who use Linux.)&lt;br /&gt;
&lt;br /&gt;
This is one of the most important lines of your character script, next to the ID we give him in the first line. First, because it allows us to tell the game what our NPC can do and what he can't do. There are only a few mt_* items, all of which are defined in spheredefs.scp. For the purpose of the lesson, I am going to copy them here. (The purple comments are mine.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;MT_NONMOVER        0 // We can't move at all&lt;br /&gt;
MT_GHOST          01 // We can walk through doors and such, like a ghost&lt;br /&gt;
MT_SWIM           02 // I can swim! (Water elementals, dolphins, etc)&lt;br /&gt;
MT_WALK           04 // I can move. Set this if you want your creature to move.&lt;br /&gt;
MT_FLY           010 // Moves through (supposed to be over) trees&lt;br /&gt;
MT_FIRE_IMMUNE   020 // Immune to damage by fire. Setting this on a player is bad.  :)&lt;br /&gt;
MT_EQUIP       00100 // Can equip things&lt;br /&gt;
MT_USEHANDS    00200 // Can use his hands to carry things (or open doors)&lt;br /&gt;
MT_MALE            0 // Is a male&lt;br /&gt;
MT_FEMALE      00800 // Is a female&lt;br /&gt;
MT_NONHUM      01000 // Non-human. I'm not sure what this does.&lt;br /&gt;
MT_RUN         02000 // Can move really fast!&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
According to this chart, we can see that if we don't give a creature a CAN flag, it will be an MT_MALE and an MT_NONMOVER (the two zeros). You can see from the example that by putting a | (found by pressing shift+backslash) between two CAN flags, we can give him more than one. In this case, we allow our man to equip things, walk, run, and use his hands. (An interesting fact is, even creatures that don't have hands can be set to use their hands, thus allowing them to carry light sources. Fire elementals do this. That's how they glow.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 6''': RESOURCES&lt;br /&gt;
&lt;br /&gt;
Resources is a very morbid name for this setting. Especially for a person. These are the items that you get whenever you chop up this creature's corpse. Scary eh?  :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 7-10''': FOODTYPE, DESIRES, AVERSIONS&lt;br /&gt;
&lt;br /&gt;
'''FOODTYPE''': Defines what kind of food the npc will eat and if NPC_AI_FOOD is on it'll make the npc look for this food + grass when he's hunger.&lt;br /&gt;
&lt;br /&gt;
'''DESIRES''': Defines what kind of items will the npc be interested in, if NPC_AI_EXTRA is on it'll show what items the npc will loot of players corpses or walk towards when it's on the ground.&lt;br /&gt;
&lt;br /&gt;
'''AVERSIONS''': No idea, but I think it tells the npc what sort of NPCs he'll try to fight, for example: I have a horse with e_horse as an event, and an imp without any events, if the npc has AVERSIONS=e_horse it'll prefer to fight the horse.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 11''': BLOODCOLOR&lt;br /&gt;
&lt;br /&gt;
Ever wanted to make your players have green blood? This is where you do it! A color number or a color defname will work fine. (Try to learn the numbers for common colors, it makes it so much easier.)&lt;br /&gt;
&lt;br /&gt;
The rest of it: TSPEECH and TEVENTS &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We're going to cover these in sections of their own. They are probably the most complex topics in scripting! (How many times do you suppose I'm going to say that before it's actually true?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;Some other things:&amp;lt;/font&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On 56B we have some other fields like MOVERATE,RESLEVEL,RESDISPDNID and RESDISPDNHUE. They sound some difficult and strange thing but they aren't. Here's the explanation for them: &lt;br /&gt;
&lt;br /&gt;
'''MOVERATE''': This setting (that can only be writed at the npc chardef) controls how fast the npc moves. The smaller the value, the faster the npc is. For example, if I have a horse chardef with default moverate (100) and another with moverate=60, the one with 60 will walk and run a lot faster than the other horse. This is great for making really difficult monsters to kill. &lt;br /&gt;
&lt;br /&gt;
'''TAG.OVERRIDE.MOVEDELAY''': Overrides completely the moverate checks and setting the next movement to the given timer, eg 'tag.override.moverate=250' makes the npc move each 250 milliseconds when walking.&lt;br /&gt;
&lt;br /&gt;
'''RESLEVEL''': This tells sphere what version of uo this monster is from, for example, a Wanderer of the Void will have RESLEVEL=3 (3=AOS) (see sphere_defs.scp for a complete list), so only accounts with RESDISP 3 or bigger can see this monster as he really is. &lt;br /&gt;
&lt;br /&gt;
''NOTE'': If you set a lower value for RESLEVEL, if the player doesn't have this npc anim he'll crash. &lt;br /&gt;
&lt;br /&gt;
'''RESDISPDNID''': As you probably have seen, I used a lot of &amp;quot;as he really&amp;quot; is, exactly because of this setting, this tells the client what monster will the player see instead of the correct one. For example, this Wanderer of the Void will show as Wanderer of the Void for those who has ACCOUNT.RESDISP=3 or bigger, but for those who has smaller values it'll show as a c_spectre (if you so define). &lt;br /&gt;
&lt;br /&gt;
'''RESDISPDNHUE''': This defines what color will the player see the monster if the RESDISPDNID id is shown to him (have an account.resdisp lower than the reslevel of this char)&lt;br /&gt;
&lt;br /&gt;
Here's an example for those new settings:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[CHARDEF 310]&lt;br /&gt;
DEFNAME=c_Wailing_Banshee&lt;br /&gt;
NAME=Wailing Banshee&lt;br /&gt;
SOUND=snd_monster_zombie1&lt;br /&gt;
ICON=i_pet_wailingbanshee&lt;br /&gt;
DAM=11,16&lt;br /&gt;
RESDISPDNID=c_spectre&lt;br /&gt;
RESLEVEL=3&lt;br /&gt;
RESDISPDNHUE=01&lt;br /&gt;
ARMOR=20&lt;br /&gt;
CAN=MT_WALK|MT_FLY&lt;br /&gt;
DESIRES=i_gold,e_notoriety,e_horses,c_man,c_woman,t_corpse&lt;br /&gt;
CATEGORY=New Monsters&lt;br /&gt;
SUBSECTION=AOS&lt;br /&gt;
DESCRIPTION=Wailing Banshee&lt;br /&gt;
&lt;br /&gt;
ON=@Create&lt;br /&gt;
	NPC = brain_monster&lt;br /&gt;
	FAME = {100 3000}&lt;br /&gt;
	KARMA = {-5000 -6999}&lt;br /&gt;
	STR = {126 166}&lt;br /&gt;
	INT = {86 115}&lt;br /&gt;
	DEX = {41 75}&lt;br /&gt;
	MAGICRESISTANCE = {75.0 95.0}&lt;br /&gt;
	TACTICS = {45.0 75.0}&lt;br /&gt;
	WRESTLING = {50.0 70.0}&lt;br /&gt;
&lt;br /&gt;
ON=@NpcRestock&lt;br /&gt;
	ITEM = i_gold, {50 100}&lt;br /&gt;
	ITEM = i_reag_daemon_bone, {2 6}&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And there you have it. A simple character script and some new things. Read the chapter that is all about making NPCs later in the tutorial.&lt;br /&gt;
&lt;br /&gt;
==TEMPLATE==&lt;br /&gt;
Or, how to put great laggy quantities of items into one unlaggy container. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You've all seen it. Those shards out there that don't use TEMPLATEs. When you kill, say, a dragon, on those shards, and go to loot him, you find that rather than neatly organized containers, there are 100 potions scattered about the loot window. Not only that, but all your magical weapons are buried neatly beneath them! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
How do we solve this problem? Well, SPHERE has given us the handy tool of TEMPLATEs. These allow you to define a container item, AND the items inside of it, AT THE SAME TIME. Isn't that neat? I thought so too, when I first figured out what they were. Let's do our traditional take-apart-the-script section. I'll place a nice TEMPLATE from the file spheretemp_loot.scp. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;[TEMPLATE 101505]&amp;lt;br /&amp;gt;&lt;br /&gt;
DEFNAME=backpack_poor&amp;lt;br /&amp;gt;&lt;br /&gt;
CATEGORY=Item Templates&amp;lt;br /&amp;gt;&lt;br /&gt;
SUBSECTION=Loot Templates&amp;lt;br /&amp;gt;&lt;br /&gt;
DESCRIPTION=Poor Backpack&amp;lt;br /&amp;gt;&lt;br /&gt;
CONTAINER=i_backpack&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_food 1 0 3 },{ 1 3 }&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_bottle 1 0 8 }&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_light 1 0 8 }&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_male_tops 1 0 4 }&amp;lt;br /&amp;gt;&lt;br /&gt;
COLOR=colors_all&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_male_pants 1 0 4 }&amp;lt;br /&amp;gt;&lt;br /&gt;
COLOR=colors_all&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM=POOR_GOLD_PILE&amp;lt;br /&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Wow, that looks confusing. But don't worry, by the time we're done, you'll know exactly what it means! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;[TEMPLATE 101505]&amp;lt;/font&amp;gt;: First of all, we look at the header for our template. An interesting thing about templates is that the item name cannot be a DEFNAME like all other scripts. It must be a ridiculously high number like 101505.&lt;br /&gt;
&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;DEFNAME=backpack_poor&amp;lt;/font&amp;gt;: Of course, SPHERE developers are not entirely evil, and have provided us with the ability to give these scary numbers a DEFNAME for easier access. You tell me, which would you rather type? &amp;quot;.add 101505&amp;quot; or &amp;quot;.add backpack_poor&amp;quot;? I thought so.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Since .56c, move DEFNAME to [TEMPLATE ...], e.g. [TEMPLATE backpack_poor]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;CATEGORY, SUBSECTION, DESCRIPTION&amp;lt;/font&amp;gt;: Axis crap. Optional. See the previous sections for a description of what these do. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;CONTAINER=i_backpack&amp;lt;/font&amp;gt;: Ahh, now we're getting down to the meat of this thing. This specifies the holding container that all other items in this template will be in. When you add the item in game, you will see this container. In this case, it's a backpack. Simple enough. This can be any valid item with a TYPE of t_container or t_container_locked. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;ITEM={ random_food 1 0 3},{1 3}&amp;lt;/font&amp;gt; Well, that's certainly cryptic. I think we need to break this line down even further. &lt;br /&gt;
&lt;br /&gt;
But first, we're going to cover RANDOM SELECTORS! Sounds like fun doesn't it? Nah, it doesn't sound fun to me either, but it's absolutely necessary to a good shard. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Basically, they are an easy way to get different numbers with one command. What fun would a shard be where you killed a dragon and got a Platemail of Magic Stuff and a Super Duper Sword of Power every single time? Everyone would be running around with them. What we need is some variety! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are two types of random selectors: weighted random and ranged random. Weighted random makes a statement like this: &amp;quot;Ok, 1 out of 10 times pick Number A, 3 out of 10 times pick Number B, and 6 out of 10 times pick number C&amp;quot;. Ranged random makes a statement like this: &amp;quot;Pick any number between the two numbers I give you&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Our example actually has an example of both ranged random and weighted random. We'll cover them in the order they appear: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{ random_food 1 0 3} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a weighted random selector. The way to interpret these is to take the numbers that appear between the parentheses and divide them into sets of two: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
random_food 1&amp;lt;br&amp;gt;&lt;br /&gt;
0 3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add up the second numbers in both sets, and we get 4. This tells SPHERE, &amp;quot;Ok, 1 out of four times, I want you to pick random_food, and 3 out of four times, I want you to pick zero.&amp;quot; You can even have random sets within random sets, but then it just gets confusing. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{ { random_food 1 0 3} 1 random_clothing 1} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can you figure it out? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
random_clothing 1&lt;br /&gt;
{ random_food 1 0 3} 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2 is our magic number in this case. One out of two times, SPHERE will pick random_clothing, and one out of two times, SPHERE will pick our previous random selector, which will then select one of its own options. If you're confused at this point, don't worry. This is extremely rare, and we'll see in a moment how templates help us to solve this problem. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I did mention, though, that there is another type of random selector, and you can probably see what it is: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{1 3} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE: Spacing here is important. There must be ZERO spaces between the { and the first number, or the } and the last number. It will behave strangely otherwise. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This tells SPHERE &amp;quot;Pick a number between 1 and 3, inclusive&amp;quot;. Inclusive means that SPHERE can pick 1, 3, or any number in between. In this case, the range is rather limited. SPHERE will give you a 1, 2 or 3 here. Ranged random selectors are actually more often used inside of weighted random selectors. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{ {1 3} 3 {4 9} 1} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;quot;One out of four times, pick a number between 4 and 9. Three out of four times, pick a number between 1 and 3.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And with that out of the way, we're going to analyze the actual line of the script from above. The Piece What the Line does ITEM=&lt;br /&gt;
This tells the script &amp;quot;Ok, we're going to add an item to this container. Anything after the = tells the script exactly what it is we're adding and in what amounts. You could easily say ITEM=i_platemail_chest, or something like that, without the mysterious { } sections, but the reason templates are interesting is because they can vary greatly. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;{ random_food 1 0 3}&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the item you will be creating. As we can see from our weighted random selector lesson, 1 out of 4 times, it will be random_food, and 3 out of 4 times, it will be zero. If an ITEM is zero, nothing will be created this time. Basically this is saying &amp;quot;There will be a one in four chance of getting random_food in this container.&amp;quot; What is random_food you ask? Well, it happens to be another TEMPLATE, defined in spheretemplate.scp, I believe. &lt;br /&gt;
&lt;br /&gt;
{1 3} This is the amount of the item that will be created. You should recognize this as a ranged random selector. This tells SPHERE to put between 1 and 3 of this item into the container. Of course, if the item is zero as selected above, this has no effect since one nothing and three nothings are still nothing. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So basically, that is a template script. You then fill it with as many items as you want. You may also notice the following construction: &lt;br /&gt;
&lt;br /&gt;
ITEM=i_sword_long,R11 &lt;br /&gt;
&lt;br /&gt;
This is a shorthand way of writing this: &lt;br /&gt;
&lt;br /&gt;
ITEM={ i_sword_long 1 0 10 } &lt;br /&gt;
&lt;br /&gt;
R11 means &amp;quot;one out of 11 chance of finding this item&amp;quot;. And you can add an amount selector to the end of that as well, which makes it look long and scary: &lt;br /&gt;
&lt;br /&gt;
ITEM=i_sword_long,R11,{4 5} &lt;br /&gt;
&lt;br /&gt;
But why would you want 4 or 5 long swords in one item? That would be bizzare.  :) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And that's about it for templates. Congratulations, you're finished with chapter 1. Now you should be able to understand the examples to follow on the next section. You may also have some questions which are addressed in the common questions area. If you have a question which is not addressed there, perhaps it is too advanced of a topic for chapter 1. I assure you almost every aspect of SPHERE scripting will be covered in later chapters. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''(A template example by Belgar)''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;[TEMPLATE tm_necromancer]&amp;lt;br /&amp;gt;&lt;br /&gt;
CONTAINER=i_bag&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM=random_necro_scroll&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM=random_necro_scroll&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM=random_necro_reagent, {5 12}&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM=random_reagent, {5 12}&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM=random_necro_reagent, {5 12}&amp;lt;br /&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
Or, um. Well I guess there really isn't another way to say &amp;quot;Examples&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This shall be my attempt to create the most basic new items available. You will see things in these examples that are NOT mentioned in the tutorials. The major factor will be ON=@Create, which is the primary topic of Chapter 2. Just know for now that things you can change in game (color, etc) must go under ON=@Create.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1''': A Red Sword&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;[ITEMDEF i_sword_red]&amp;lt;br /&amp;gt;&lt;br /&gt;
ID=i_sword_viking&amp;lt;br /&amp;gt;&lt;br /&gt;
TYPE=t_weapon_sword&amp;lt;br /&amp;gt;&lt;br /&gt;
NAME=The Red Sword&amp;lt;br /&amp;gt;&lt;br /&gt;
CATEGORY=Weapons&amp;lt;br /&amp;gt;&lt;br /&gt;
SUBSECTION=New Swords&amp;lt;br /&amp;gt;&lt;br /&gt;
DESCRIPTION=Red Sword&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ON=@Create&lt;br /&gt;
:COLOR=colors_red // This is a comment. Comments are ignored by SPHERE.&amp;lt;br /&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Wait, what is this weird &amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;//&amp;lt;/font&amp;gt; thing we've got going here? That's called a comment. It's completely ignored by SPHERE, so you can write whatever you want to the end of the line after //. You cannot have multi-line comments in SPHERE unless you use a new //, so don't even try it. SPHERE will give funky errors and then you'll have fun finding them. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2''': A blue ettin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;[CHARDEF c_ettin_blue]&amp;lt;br /&amp;gt;&lt;br /&gt;
ID=02 // You could just as easily use c_ettin here.&amp;lt;br /&amp;gt;&lt;br /&gt;
NAME=My Blue Ettin&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
ON=@Create&amp;lt;br /&amp;gt;&lt;br /&gt;
:COLOR=02 // This is a dark blue color. It's often used for Counselor robes. Remember it.&amp;lt;br /&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 3''': A template from the file, since I'm too lazy to write one myself&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;[TEMPLATE 101521]&amp;lt;br /&amp;gt;&lt;br /&gt;
DEFNAME=goodie_meager_1&amp;lt;br /&amp;gt;&lt;br /&gt;
CATEGORY=Item Templates&amp;lt;br /&amp;gt;&lt;br /&gt;
SUBSECTION=Loot Templates&amp;lt;br /&amp;gt;&lt;br /&gt;
DESCRIPTION=Meager Goodie 1&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ meager_gold_pile 1 backpack_meager 1 pouch_meager 1 }&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_boots 1 0 4 }&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_gorget 1 0 4 }&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_staff 1 0 4 }&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_necklace 1 0 4 }&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ i_cape 1 0 9 }&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;darkred&amp;quot;&amp;gt;COLOR=colors_all&amp;lt;/font&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may notice something new here (especially since I highlighted it in red), and yes, it is legal. Any lines between ITEM= lines will affect the previously created item. The COLOR= line here affects the ITEM created by the line&lt;br /&gt;
&lt;br /&gt;
ITEM={ i_cape 1 0 9 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remember, the best way to learn this type of scripts is to read the scripts provided for you in files like sphereitem_colorarm.scp and sphereitem_beers.scp.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Chapter_1&amp;diff=7988</id>
		<title>Chapter 1</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Chapter_1&amp;diff=7988"/>
				<updated>2022-08-19T19:21:01Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Chapter_1}}&lt;br /&gt;
&lt;br /&gt;
==Numbers==&lt;br /&gt;
&lt;br /&gt;
The first thing you'll notice while looking through SPHERE scripts is the wide variety of ways to write numbers. Since numbers are insanely important to a SPHERE scripter, this is the first lesson in the series. By the end of the lesson, I hope that you have a general understanding of hexadecimal, decimal and binary numbering systems, and SPHERE's ways of identifying each. You will also know how to generate random numbers either from a series or from a list of choices.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first thing you need to understand is that the way we count is not the only way to count. Our numbering system contains ten digits (0, 1, 2, 3, 4, 5, 6, 7, 8, and 9). Therefore, at the tenth number, we have to add an extra column to the number, and reset the first column to zero (1, 2, 3, 4, 5, 6, 7, 8, 9, 10). That's why our numbering system works the way it does.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the decimal system, without realizing it, we write our numbers to mean powers of ten. For example, if you take the number 17282 (which I just made up), and divide it down we get this:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| Power of ten      || 4     || 3     || 2     || 1     || 0&lt;br /&gt;
|-&lt;br /&gt;
| Ten to that power || 10000 || 1000  || 100   || 10    || 1&lt;br /&gt;
|-&lt;br /&gt;
| Digit             || 1     || 7     || 2     || 8     || 2 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To reach the number 17282 from here, we simply take ten to the power of the number in the top row, multiply it by the number in the bottom row, and then add all those numbers together. We get 10000 + 7000 + 200 + 80 + 2. Obviously, this is simplistic, and we do it without even realizing we're doing it. You're probably thinking &amp;quot;Riiight, what does Taran think he's getting at?&amp;quot; Well, we aren't so special that our counting system is the only way to count.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, there is another numbering system that is used almost solely by computers. It only contains two numbers (1 and 0) and is therefore called the binary (meaning two) system. Binary numbers look like this: 101011101101, and you often see them in ads for computers and other electronic equipment (oftentimes they are shown streaming out of a CD player on television commercials). Digits in the binary system are called bits (short for BInary digiT)Binary numbers are almost impossible to translate to decimal directly, and so some math must be done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Binary works in the same way, by adding powers of a number. In the case of binary, since there are two numbers in the whole system, that number is naturally two. Here are some examples of powers of two. These numbers might look familiar to some people.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| Power of 2 || Binary number || Decimal number&lt;br /&gt;
|-&lt;br /&gt;
| 0          || 1             || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1          || 10            || 2&lt;br /&gt;
|-&lt;br /&gt;
| 2          || 100           || 4&lt;br /&gt;
|-&lt;br /&gt;
| 3          || 1000          || 8&lt;br /&gt;
|-&lt;br /&gt;
| 4          || 10000         || 16&lt;br /&gt;
|-&lt;br /&gt;
| 5          || 100000        || 32&lt;br /&gt;
|-&lt;br /&gt;
| 6          || 1000000       || 64&lt;br /&gt;
|-&lt;br /&gt;
| 7          || 10000000      || 128&lt;br /&gt;
|-&lt;br /&gt;
| 8          || 100000000     || 256&lt;br /&gt;
|-&lt;br /&gt;
| 9          || 1000000000    || 512&lt;br /&gt;
|-&lt;br /&gt;
| 10         || 10000000000   || 1024&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Ridiculous eh?  :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We need a better system! The reason we get such strange results is because 10 is not a power of two. We need to find a system where the number base IS a power of two. The most commonly used system used is base-16, or hexadecimal. I'm sure if you've perused the SPHERE boards, you've seen the word hex floating around. No, this isn't a curse or evil spell, it's a short way of saying &amp;quot;hexadecimal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| Binary || Decimal || Hexadecimal&lt;br /&gt;
|-&lt;br /&gt;
| 1      || 1       || 1&lt;br /&gt;
|-&lt;br /&gt;
| 10     || 2       || 2&lt;br /&gt;
|-&lt;br /&gt;
| 11     || 3       || 3&lt;br /&gt;
|-&lt;br /&gt;
| 100    || 4       || 4&lt;br /&gt;
|-&lt;br /&gt;
| 101    || 5       || 5&lt;br /&gt;
|-&lt;br /&gt;
| 110    || 6       || 6&lt;br /&gt;
|-&lt;br /&gt;
| 111    || 7       || 7&lt;br /&gt;
|-&lt;br /&gt;
| 1000   || 8       || 8&lt;br /&gt;
|-&lt;br /&gt;
| 1001   || 9       || 9&lt;br /&gt;
|-&lt;br /&gt;
| 1010   || 10      || A&lt;br /&gt;
|-&lt;br /&gt;
| 1011   || 11      || B&lt;br /&gt;
|-&lt;br /&gt;
| 1100   || 12      || C&lt;br /&gt;
|-&lt;br /&gt;
| 1101   || 13      || D&lt;br /&gt;
|-&lt;br /&gt;
| 1110   || 14      || E&lt;br /&gt;
|-&lt;br /&gt;
| 1111   || 15      || F&lt;br /&gt;
|-&lt;br /&gt;
| 10000  || 16      || 10&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See how it works? There are an extra six numbers added onto the end of the system, represented by the first six letters of the alphabet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, in SPHERE scripting, you are almost NEVER going to be dealing with binary numbers that are NOT powers of two, and if you do, you can simply use any scientific calculator to figure it out. But it's a lot easier in hexadecimal.&lt;br /&gt;
&lt;br /&gt;
(This is the last table, I promise!!)&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| Binary        || Hexadecimal  &lt;br /&gt;
|-&lt;br /&gt;
| 000000001 (1) || 01&lt;br /&gt;
|-&lt;br /&gt;
| 000000010 (2) || 02  &lt;br /&gt;
|-&lt;br /&gt;
| 000000100 (3) || 04  &lt;br /&gt;
|-&lt;br /&gt;
| 000001000 (4) || 08  &lt;br /&gt;
|-&lt;br /&gt;
| 000010000 (5) || 010  &lt;br /&gt;
|-&lt;br /&gt;
| 000100000 (6) || 020  &lt;br /&gt;
|-&lt;br /&gt;
| 001000000 (7) || 040  &lt;br /&gt;
|-&lt;br /&gt;
| 010000000 (8) || 080  &lt;br /&gt;
|-&lt;br /&gt;
| 100000000 (9) || 0100  &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see, there's a bit of a pattern in the hexadecimal column. You might be thinking, there seems to be some sort of pattern of the numbers 1, 2, 4 and 8. And you would be right. Another detail you may notice is the zeros in front of the hexadecimal numbers (like 0100, rather than just 100). In SPHERE, that 0 tells the script &amp;quot;Hey, this number is HEX!&amp;quot; 0100 and 100 are very different numbers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let's say, for a SPHERE script, you need to set the 13th bit of a number (FLAGS, for example), you could write something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''SRC.FLAGS |= 8192'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But would you really remember that 8192 is 2 to the 13th power? I didn't think so. What would be easier is to go down through your list in your head, until you reach the 13th number. (Remember, START AT ZERO when you're counting!)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| 01  || 02  || 04  || 08  || 010 || 020 || 040 || 080 || 0100 || 0200 || 0400 || 0800 || 01000 || 02000  &lt;br /&gt;
|-&lt;br /&gt;
| 2^0 || 2^1 || 2^2 || 2^3 || 2^4 || 2^5 || 2^6 || 2^7 || 2^8  || 2^9  || 2^10 || 2^11 || 2^12  || 2^13  &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And there you have it. The first 14 powers of two in hexademical.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''SRC.FLAGS |= 02000'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above code is identical to the previous example. 8192 (decimal) is EQUAL to 02000 (hexadecimal)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8192 = 02000'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may be saying, &amp;quot;How do I know he's just not making all of this up?&amp;quot; Well, our wonderful friends at Microsoft have provided us with a nice tool that converters from decimal to hexadecimal to binary to octal (ANOTHER numbering system that is useless in SPHERE, so we will not deal with it). It's called the Calculator. You may find it by clicking your start button, going to Programs, then Accessories. Calculator should be sitting there looking pretty. Once in the calculator program, go to the View menu, and click Scientific. You'll see the display drastically change. To convert a number between numbering systems, simply click on the original system (Dec), type a number (8192), then click on the button for the other system (Hex). Automagically, Windows will convert your decimal number to hexadecimal. Stick a zero on the front, and SPHERE will be perfectly happy with it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is probably the hardest thing in all of SPHERE scripting to understand. Luckily, because of the next section, you won't have to deal with scary numbers most of the time. If I still have you at the end of this lesson, I know you're going to do great!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Onward to some SPHERE scripting!&lt;br /&gt;
&lt;br /&gt;
==Defnames==&lt;br /&gt;
&lt;br /&gt;
Here's a list of scary numbers you might encounter while programming in SPHERE.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| The Scary Number || What it means  &lt;br /&gt;
|-&lt;br /&gt;
| 0eed             || ID of a gold coin  &lt;br /&gt;
|-&lt;br /&gt;
| 0dda             || ID of a red moongate  &lt;br /&gt;
|-&lt;br /&gt;
| 1650,1440        || Coordinates of Britain  &lt;br /&gt;
|-&lt;br /&gt;
| 021              || The code number for red  &lt;br /&gt;
|-&lt;br /&gt;
| 04000            ||  The invisible color  &lt;br /&gt;
|-&lt;br /&gt;
| 04000efad        || An item's serial number  &lt;br /&gt;
|-&lt;br /&gt;
| 4                || The PLEVEL of a GM  &lt;br /&gt;
|-&lt;br /&gt;
| 2048 (or 0800)   || Flag for incognito spell  &lt;br /&gt;
|-&lt;br /&gt;
| 010 (or 16)    || Memory type for aggressors  &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Obviously, no one is going to want to remember those numbers. Back in the old days, before SPHERE and TUS (pre-.50 SPHERE) and even into the mists of Grayworld (pre-.41 TUS), we all had to remember those numbers. I know all of those numbers I just said (except the serial number which I just made up), plus a couple dozen more, by heart. Luckily for those of you who don't like to sit around remembering numbers all day, SPHERE has developed a system whereby things can be identified by names instead of numbers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Actually, the things are still identified by numbers. It's the numbers which are identified by the name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the game, type .add 0eed and press enter. A target will come up and you'll create a single gold piece.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now type .add i_gold and press enter. You will create the same single gold piece.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now which is easier to remember, 0eed or i_gold. I would say that i_gold wins by a long shot. But how does this magic happen? Let's take a look at the script definition for a piece of gold. Don't worry about understanding it. I'll explain item scripts in full in the next section! You can find this script in the file sphere_item_resources.scp.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;font color=&amp;quot;darkgreen&amp;quot;&amp;gt;[ITEMDEF 0eed]&amp;lt;br /&amp;gt;&lt;br /&gt;
//gold coin&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;ff0000&amp;quot;&amp;gt;DEFNAME=i_gold&amp;lt;/font&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
TYPE=T_GOLD&amp;lt;br /&amp;gt;&lt;br /&gt;
VALUE=1&amp;lt;br /&amp;gt;&lt;br /&gt;
CATEGORY=Provisions - Miscellaneous&amp;lt;br /&amp;gt;&lt;br /&gt;
SUBSECTION=Coins&amp;lt;br /&amp;gt;&lt;br /&gt;
DESCRIPTION=Gold Coin&amp;lt;br /&amp;gt;&lt;br /&gt;
DUPELIST=0eee,0eef&amp;lt;/font&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have highlighted in red the line that really matters for the purposes of this lesson. Take note of the 0eed in the top line of the script, and then ignore the rest of it. That 0eed is the real item number of this item. We'll cover item numbers more in the next section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But the real line we want to see the &amp;lt;font color=&amp;quot;ff0000&amp;quot;&amp;gt;DEFNAME=i_gold&amp;lt;/font&amp;gt; line. This is where the script tells the server, &amp;quot;I want item 0eed to be identified by the text i_gold from here on.&amp;quot; If you tried to refer to i_gold before the server read this script (more on reordering scripts in [[Chapter 2]], the server would spit out an error, but now it knows what that refers to, so you can use it in the game or in another script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You should ALWAYS give items you create a DEFNAME that fits the item. Usually the defname will be defined in the [ITEMDEF] identifier itself (again, more on this later), but if you insist upon using numbers, be sure you give it an easy-to-remember name (not golden_gulash for a viking sword). It makes it easier to remember names than numbers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A second way to define a DEFNAME is by using the [DEFNAME] tag in a script. Here is an example of that:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;font color=&amp;quot;darkgreen&amp;quot;&amp;gt;[DEFNAME colors]&amp;lt;br /&amp;gt;&lt;br /&gt;
color_blue 02&amp;lt;br /&amp;gt;&lt;br /&gt;
color_red 021&amp;lt;br /&amp;gt;&lt;br /&gt;
color_green 041&amp;lt;/font&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You'll find a script similar to this in spheredefs.scp, another file that should be loaded before any other file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here's the rundown on this script, line by line:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 1''': This is where the type of script and the defname (yes colors is the defname of this script) is defined. This tells the server what type of script to expect between this and the next identifier (identifiers are the lines contained in square brackets). All identifiers have this format. The first parameter is the script type. These are numerous, and I will go over them as we get to them. The second parameter is either an ID number or a defname. In most cases, in the scripts you write, it will be a defname. The only exceptions to this I can think of would be if you used a program to insert a new item into the client files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Lines 2-4''': These set up your individual DEFNAME pieces. It says that color_blue is equal to 02, color_red is equal to 021, and color_green is equal to 041. You may have any number of spaces between the name and the value. The definitions contained in spheredefs.scp are among the most useful you will encounter, as they prevent you from writing the long scary numbers we went over in the previous section. These include things like names for flags, names for item attributes, names for the built-in MIDI or MP3 music, names for memory types, and many other things. Look through the file to see what it offers you.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That's about it for DEFNAMEs. You'll see more of these later as we cover other types of scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now go on to learn about items.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==ITEMDEF==&lt;br /&gt;
Or, how to make a mountain from a molehill, SPHERE style&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Most people make item scripting much harder than it needs to be. For the purposes of this tutorial, since there is a more advanced one later, we will simply go over the basics of an ITEM script, line by line. We'll be using the gold script from the previous lesson, provided I can find it again.... &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ah, here it is, conveniently color coded for your viewing pleasure!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[ITEMDEF 0eed]&lt;br /&gt;
//gold coin&lt;br /&gt;
DEFNAME=i_gold&lt;br /&gt;
TYPE=T_GOLD&lt;br /&gt;
VALUE=1&lt;br /&gt;
CATEGORY=Provisions - Miscellaneous&lt;br /&gt;
SUBSECTION=Coins&lt;br /&gt;
DESCRIPTION=Gold Coin&lt;br /&gt;
DUPELIST=0eee,0eef&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the simplest of item scripts, since it has no additional behaviors beyond existing. I will go through this line by line, describing to you what each line does, and how it affects the end result.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 1''': [ITEMDEF 0eed]&lt;br /&gt;
&lt;br /&gt;
The first lines of an item script are frequently the most important. Basically, this line tells the server &amp;quot;Hey this is an item and I want it to be called 0eed!&amp;quot; The server then looks through one of the client files (specifically art.idx), and identifies whether or not this item is one of the built-in items. I think all items below 04500 are defined as built-in items, so never define a new item in that range. By typing this line, you tell the server that an item script is following. You also define 0eed as a valid item, which will definitely help later on when you try to give gold to players!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 2''': // gold coin&lt;br /&gt;
&lt;br /&gt;
This is the SPHERE version of comment. C programmers will recognize the format immediately. If you type // on any line of code, everything beyond that is ignored by the script reader. This can be on a line by itself, or at the end of a line to explain what the specific line does. In all cases, it won't affect your program, just make it easier to read.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 3''': DEFNAME=i_gold&lt;br /&gt;
&lt;br /&gt;
You should know by now what this does! If you don't, go back and read the previous lesson! It tells the server that i_gold and 0eed mean the same thing. In item scripts, all parameters are defined in that format:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
variable=value&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will see later on, when we get into scripting, how that format will help you more than you would believe. Items have a good number of variables that you can define, including:&lt;br /&gt;
&lt;br /&gt;
* DEFNAME&lt;br /&gt;
* ID&lt;br /&gt;
* TYPE&lt;br /&gt;
* VALUE&lt;br /&gt;
* RESOURCES&lt;br /&gt;
Other variables depend on the value of the TYPE. Which leads us right into...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 4''': TYPE=t_gold&lt;br /&gt;
&lt;br /&gt;
The first thing you might say is &amp;quot;What the heck is t_gold?&amp;quot; Well it's a DEFNAME. Actually it's a number. And that number is 72. If you want to check me on this, look in spheredefs.scp, it's there! Writing TYPE=72 would have the exact same effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are, currently, 183 built-in item types. These are hardcoded item types that contain predefined actions for an item. If an item has no type, when you click it, you get the &amp;quot;You cannot think of a way to use that item&amp;quot; message. There is a complete list of types, and how to set them up, here . All you need to know for now is that setting the type of this item to t_gold has no effect other than to make the item act like a gold coin (i.e. you can buy stuff with it!) Setting another item to type t_gold would probably make the server think that you can buy stuff with that item too. I've never tried this. It might be an interesting way to have unique currencies...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 5''': VALUE=1&lt;br /&gt;
&lt;br /&gt;
This defines how much the item costs when purchased, in gold. Of course, this is one gold piece, which is worth, well, one gold piece. So the value of the item is one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Lines 6-8''': CATEGORY, SUBSECTION, DESCRIPTION&lt;br /&gt;
&lt;br /&gt;
These are lines used only by SPHERE's GM tool, Axis, which actually saves you a lot of work by typing &amp;quot;.add i_gold&amp;quot; for you. More importantly, it types &amp;quot;.add 01737&amp;quot; and things like that for you, for items that were not important enough to get their own separate DEFNAME.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 9''': DUPEITEM&lt;br /&gt;
&lt;br /&gt;
It would be a ton of work for the SPHERE team to define all 8000 items that came with the game, especially when many of them are the same. (For an example of this, use the .xflip command on a door or sign. It cycles through all of the DUPEITEMs for that the item being flipped.) The numbers listed here are item numbers, which probably have not been defined yet. Here is the script for item 0eee:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[ITEMDEF 0eee]&lt;br /&gt;
//gold coins&lt;br /&gt;
DUPEITEM=0eed&lt;br /&gt;
CATEGORY=Provisions - Miscellaneous&lt;br /&gt;
SUBSECTION=Coins&lt;br /&gt;
DESCRIPTION=Gold Coins&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see, there is only one parameter for this whole item. It reiterates the DUPEITEM and sends the server looking to our 0eed (or i_gold) item for more information, such as TYPE and VALUE. DUPEITEM only exists to save typing. You probably won't use it.&lt;br /&gt;
&lt;br /&gt;
==CHARDEF==&lt;br /&gt;
Or, what it takes to make a naked man who can stand around and say &amp;quot;Huh?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NPCs... They make the world go around. They are what makes UO a unique multiplayer game. The monsters and NPCs you create make your server unique from any other. This section of chapter one will cover how to create a simple naked man who walks around and says little more than &amp;quot;Huh?&amp;quot; (or &amp;quot;Stop thief!&amp;quot; if you tell him to!).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First of all, we'll look at the script for a simple naked man. I'm pulling this out of spherechar_human.scp.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[CHARDEF 0190]&lt;br /&gt;
DEFNAME=c_man&lt;br /&gt;
Name=Man&lt;br /&gt;
ICON=i_pet_MAN&lt;br /&gt;
CAN=MT_EQUIP|MT_WALK|MT_RUN|MT_USEHANDS&lt;br /&gt;
RESOURCES=i_flesh_head, i_flesh_torso, i_flesh_right_arm, i_flesh_left_arm&lt;br /&gt;
FOODTYPE=15 t_food, t_fruit&lt;br /&gt;
DESIRES=i_gold,e_notoriety&lt;br /&gt;
AVERSIONS=t_TRAP,t_eerie_stuff&lt;br /&gt;
SHELTER=r_house&lt;br /&gt;
BLOODCOLOR=0&lt;br /&gt;
&lt;br /&gt;
TSPEECH=spk_human_prime&lt;br /&gt;
TSPEECH=spk_human_default&lt;br /&gt;
TEVENTS=e_Human_HearUnk&lt;br /&gt;
DESCRIPTION=Man&lt;br /&gt;
SUBSECTION=Miscellaneous&lt;br /&gt;
CATEGORY=Civilized&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see, it doesn't look a lot different than the item scripts we examined in the previous section. There are a lot of variables set that are the same, including DEFNAME, DESCRIPTION, and the other Axis variables.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But, there are a lot of new things here that we will again go over, one line at a time! And it's longer this time! Let the good times roll! (Sorry if you're not American.. All my American clichés are probably growing irritating!)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 1''': [CHARDEF 0190]&lt;br /&gt;
&lt;br /&gt;
Surprise surprise! It's an identifier, telling the server that we are going to be defined a character between this and the next [identifier]. And we also tell it that our character, or NPC, will have the ID 0190. The server knows that this ID is one of the built-in IDs. In fact, it's the ID of a naked man. You also know that 0190 is hexadecimal is 400 in decimal right?  :) Well why didn't you know that! Oh I'm just kidding, you don't need to know things like that.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 2''': DEFNAME=c_man&lt;br /&gt;
&lt;br /&gt;
Nothing new here. c_man is now the same as 0190. Most character DEFNAMEs will begin with C and then an underscore (c_) like you see above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 3''': Name=Man&lt;br /&gt;
&lt;br /&gt;
Oh oh! Something new! Items come with default names, built in to the server. Characters don't. So we have to assign him a name. We can give him any name we want, but since this isn't a specific man, we just give him a name telling us what he is. In this case &amp;quot;Man&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 4''': ICON=i_pet_man&lt;br /&gt;
&lt;br /&gt;
It took me a while to figure this one out. ICON defines what little picture you see when you're using the Tracking skill and all those little miniature creatures appear in the window. Those are actually items, all the i_pet items. To find out what the i_pet item for your creature should be, create him in the game using .addnpc, then use the .shrink command on him. The ID of the item that he becomes is your i_pet item.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 5''': CAN=mt_*&lt;br /&gt;
&lt;br /&gt;
(In case you don't know, * means &amp;quot;anything&amp;quot; for those who use Linux.)&lt;br /&gt;
&lt;br /&gt;
This is one of the most important lines of your character script, next to the ID we give him in the first line. First, because it allows us to tell the game what our NPC can do and what he can't do. There are only a few mt_* items, all of which are defined in spheredefs.scp. For the purpose of the lesson, I am going to copy them here. (The purple comments are mine.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;MT_NONMOVER        0 // We can't move at all&lt;br /&gt;
MT_GHOST          01 // We can walk through doors and such, like a ghost&lt;br /&gt;
MT_SWIM           02 // I can swim! (Water elementals, dolphins, etc)&lt;br /&gt;
MT_WALK           04 // I can move. Set this if you want your creature to move.&lt;br /&gt;
MT_FLY           010 // Moves through (supposed to be over) trees&lt;br /&gt;
MT_FIRE_IMMUNE   020 // Immune to damage by fire. Setting this on a player is bad.  :)&lt;br /&gt;
MT_EQUIP       00100 // Can equip things&lt;br /&gt;
MT_USEHANDS    00200 // Can use his hands to carry things (or open doors)&lt;br /&gt;
MT_MALE            0 // Is a male&lt;br /&gt;
MT_FEMALE      00800 // Is a female&lt;br /&gt;
MT_NONHUM      01000 // Non-human. I'm not sure what this does.&lt;br /&gt;
MT_RUN         02000 // Can move really fast!&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
According to this chart, we can see that if we don't give a creature a CAN flag, it will be an MT_MALE and an MT_NONMOVER (the two zeros). You can see from the example that by putting a | (found by pressing shift+backslash) between two CAN flags, we can give him more than one. In this case, we allow our man to equip things, walk, run, and use his hands. (An interesting fact is, even creatures that don't have hands can be set to use their hands, thus allowing them to carry light sources. Fire elementals do this. That's how they glow.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 6''': RESOURCES&lt;br /&gt;
&lt;br /&gt;
Resources is a very morbid name for this setting. Especially for a person. These are the items that you get whenever you chop up this creature's corpse. Scary eh?  :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 7-10''': FOODTYPE, DESIRES, AVERSIONS&lt;br /&gt;
&lt;br /&gt;
'''FOODTYPE''': Defines what kind of food the npc will eat and if NPC_AI_FOOD is on it'll make the npc look for this food + grass when he's hunger.&lt;br /&gt;
&lt;br /&gt;
'''DESIRES''': Defines what kind of items will the npc be interested in, if NPC_AI_EXTRA is on it'll show what items the npc will loot of players corpses or walk towards when it's on the ground.&lt;br /&gt;
&lt;br /&gt;
'''AVERSIONS''': No idea, but I think it tells the npc what sort of NPCs he'll try to fight, for example: I have a horse with e_horse as an event, and an imp without any events, if the npc has AVERSIONS=e_horse it'll prefer to fight the horse.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Line 11''': BLOODCOLOR&lt;br /&gt;
&lt;br /&gt;
Ever wanted to make your players have green blood? This is where you do it! A color number or a color defname will work fine. (Try to learn the numbers for common colors, it makes it so much easier.)&lt;br /&gt;
&lt;br /&gt;
The rest of it: TSPEECH and TEVENTS &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We're going to cover these in sections of their own. They are probably the most complex topics in scripting! (How many times do you suppose I'm going to say that before it's actually true?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;Some other things:&amp;lt;/font&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On 56B we have some other fields like MOVERATE,RESLEVEL,RESDISPDNID and RESDISPDNHUE. They sound some difficult and strange thing but they aren't. Here's the explanation for them: &lt;br /&gt;
&lt;br /&gt;
'''MOVERATE''': This setting (that can only be writed at the npc chardef) controls how fast the npc moves. The smaller the value, the faster the npc is. For example, if I have a horse chardef with default moverate (100) and another with moverate=60, the one with 60 will walk and run a lot faster than the other horse. This is great for making really difficult monsters to kill. &lt;br /&gt;
&lt;br /&gt;
'''TAG.OVERRIDE.MOVEDELAY''' :Overrides completely the moverate checks and setting the next movement to the given timer, eg 'tag.override.moverate=250' makes the npc move each 250 milliseconds when walking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''RESLEVEL''': This tells sphere what version of uo this monster is from, for example, a Wanderer of the Void will have RESLEVEL=3 (3=AOS) (see sphere_defs.scp for a complete list), so only accounts with RESDISP 3 or bigger can see this monster as he really is. &lt;br /&gt;
&lt;br /&gt;
''NOTE'': If you set a lower value for RESLEVEL, if the player doesn't have this npc anim he'll crash. &lt;br /&gt;
&lt;br /&gt;
'''RESDISPDNID''': As you probably have seen, I used a lot of &amp;quot;as he really&amp;quot; is, exactly because of this setting, this tells the client what monster will the player see instead of the correct one. For example, this Wanderer of the Void will show as Wanderer of the Void for those who has ACCOUNT.RESDISP=3 or bigger, but for those who has smaller values it'll show as a c_spectre (if you so define). &lt;br /&gt;
&lt;br /&gt;
'''RESDISPDNHUE''': This defines what color will the player see the monster if the RESDISPDNID id is shown to him (have an account.resdisp lower than the reslevel of this char)&lt;br /&gt;
&lt;br /&gt;
Here's an example for those new settings:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spherescript&amp;gt;[CHARDEF 310]&lt;br /&gt;
DEFNAME=c_Wailing_Banshee&lt;br /&gt;
NAME=Wailing Banshee&lt;br /&gt;
SOUND=snd_monster_zombie1&lt;br /&gt;
ICON=i_pet_wailingbanshee&lt;br /&gt;
DAM=11,16&lt;br /&gt;
RESDISPDNID=c_spectre&lt;br /&gt;
RESLEVEL=3&lt;br /&gt;
RESDISPDNHUE=01&lt;br /&gt;
ARMOR=20&lt;br /&gt;
CAN=MT_WALK|MT_FLY&lt;br /&gt;
DESIRES=i_gold,e_notoriety,e_horses,c_man,c_woman,t_corpse&lt;br /&gt;
CATEGORY=New Monsters&lt;br /&gt;
SUBSECTION=AOS&lt;br /&gt;
DESCRIPTION=Wailing Banshee&lt;br /&gt;
&lt;br /&gt;
ON=@Create&lt;br /&gt;
	NPC = brain_monster&lt;br /&gt;
	FAME = {100 3000}&lt;br /&gt;
	KARMA = {-5000 -6999}&lt;br /&gt;
	STR = {126 166}&lt;br /&gt;
	INT = {86 115}&lt;br /&gt;
	DEX = {41 75}&lt;br /&gt;
	MAGICRESISTANCE = {75.0 95.0}&lt;br /&gt;
	TACTICS = {45.0 75.0}&lt;br /&gt;
	WRESTLING = {50.0 70.0}&lt;br /&gt;
&lt;br /&gt;
ON=@NpcRestock&lt;br /&gt;
	ITEM = i_gold, {50 100}&lt;br /&gt;
	ITEM = i_reag_daemon_bone, {2 6}&amp;lt;/spherescript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And there you have it. A simple character script and some new things. Read the chapter that is all about making NPCs later in the tutorial.&lt;br /&gt;
&lt;br /&gt;
==TEMPLATE==&lt;br /&gt;
Or, how to put great laggy quantities of items into one unlaggy container. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You've all seen it. Those shards out there that don't use TEMPLATEs. When you kill, say, a dragon, on those shards, and go to loot him, you find that rather than neatly organized containers, there are 100 potions scattered about the loot window. Not only that, but all your magical weapons are buried neatly beneath them! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
How do we solve this problem? Well, SPHERE has given us the handy tool of TEMPLATEs. These allow you to define a container item, AND the items inside of it, AT THE SAME TIME. Isn't that neat? I thought so too, when I first figured out what they were. Let's do our traditional take-apart-the-script section. I'll place a nice TEMPLATE from the file spheretemp_loot.scp. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;[TEMPLATE 101505]&amp;lt;br /&amp;gt;&lt;br /&gt;
DEFNAME=backpack_poor&amp;lt;br /&amp;gt;&lt;br /&gt;
CATEGORY=Item Templates&amp;lt;br /&amp;gt;&lt;br /&gt;
SUBSECTION=Loot Templates&amp;lt;br /&amp;gt;&lt;br /&gt;
DESCRIPTION=Poor Backpack&amp;lt;br /&amp;gt;&lt;br /&gt;
CONTAINER=i_backpack&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_food 1 0 3 },{ 1 3 }&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_bottle 1 0 8 }&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_light 1 0 8 }&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_male_tops 1 0 4 }&amp;lt;br /&amp;gt;&lt;br /&gt;
COLOR=colors_all&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_male_pants 1 0 4 }&amp;lt;br /&amp;gt;&lt;br /&gt;
COLOR=colors_all&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM=POOR_GOLD_PILE&amp;lt;br /&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Wow, that looks confusing. But don't worry, by the time we're done, you'll know exactly what it means! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;[TEMPLATE 101505]&amp;lt;/font&amp;gt;: First of all, we look at the header for our template. An interesting thing about templates is that the item name cannot be a DEFNAME like all other scripts. It must be a ridiculously high number like 101505.&lt;br /&gt;
&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;DEFNAME=backpack_poor&amp;lt;/font&amp;gt;: Of course, SPHERE developers are not entirely evil, and have provided us with the ability to give these scary numbers a DEFNAME for easier access. You tell me, which would you rather type? &amp;quot;.add 101505&amp;quot; or &amp;quot;.add backpack_poor&amp;quot;? I thought so.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Since .56c, move DEFNAME to [TEMPLATE ...], e.g. [TEMPLATE backpack_poor]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;CATEGORY, SUBSECTION, DESCRIPTION&amp;lt;/font&amp;gt;: Axis crap. Optional. See the previous sections for a description of what these do. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;CONTAINER=i_backpack&amp;lt;/font&amp;gt;: Ahh, now we're getting down to the meat of this thing. This specifies the holding container that all other items in this template will be in. When you add the item in game, you will see this container. In this case, it's a backpack. Simple enough. This can be any valid item with a TYPE of t_container or t_container_locked. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;ITEM={ random_food 1 0 3},{1 3}&amp;lt;/font&amp;gt; Well, that's certainly cryptic. I think we need to break this line down even further. &lt;br /&gt;
&lt;br /&gt;
But first, we're going to cover RANDOM SELECTORS! Sounds like fun doesn't it? Nah, it doesn't sound fun to me either, but it's absolutely necessary to a good shard. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Basically, they are an easy way to get different numbers with one command. What fun would a shard be where you killed a dragon and got a Platemail of Magic Stuff and a Super Duper Sword of Power every single time? Everyone would be running around with them. What we need is some variety! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are two types of random selectors: weighted random and ranged random. Weighted random makes a statement like this: &amp;quot;Ok, 1 out of 10 times pick Number A, 3 out of 10 times pick Number B, and 6 out of 10 times pick number C&amp;quot;. Ranged random makes a statement like this: &amp;quot;Pick any number between the two numbers I give you&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Our example actually has an example of both ranged random and weighted random. We'll cover them in the order they appear: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{ random_food 1 0 3} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a weighted random selector. The way to interpret these is to take the numbers that appear between the parentheses and divide them into sets of two: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
random_food 1&amp;lt;br&amp;gt;&lt;br /&gt;
0 3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add up the second numbers in both sets, and we get 4. This tells SPHERE, &amp;quot;Ok, 1 out of four times, I want you to pick random_food, and 3 out of four times, I want you to pick zero.&amp;quot; You can even have random sets within random sets, but then it just gets confusing. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{ { random_food 1 0 3} 1 random_clothing 1} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can you figure it out? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
random_clothing 1&lt;br /&gt;
{ random_food 1 0 3} 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2 is our magic number in this case. One out of two times, SPHERE will pick random_clothing, and one out of two times, SPHERE will pick our previous random selector, which will then select one of its own options. If you're confused at this point, don't worry. This is extremely rare, and we'll see in a moment how templates help us to solve this problem. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I did mention, though, that there is another type of random selector, and you can probably see what it is: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{1 3} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE: Spacing here is important. There must be ZERO spaces between the { and the first number, or the } and the last number. It will behave strangely otherwise. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This tells SPHERE &amp;quot;Pick a number between 1 and 3, inclusive&amp;quot;. Inclusive means that SPHERE can pick 1, 3, or any number in between. In this case, the range is rather limited. SPHERE will give you a 1, 2 or 3 here. Ranged random selectors are actually more often used inside of weighted random selectors. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{ {1 3} 3 {4 9} 1} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;quot;One out of four times, pick a number between 4 and 9. Three out of four times, pick a number between 1 and 3.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And with that out of the way, we're going to analyze the actual line of the script from above. The Piece What the Line does ITEM=&lt;br /&gt;
This tells the script &amp;quot;Ok, we're going to add an item to this container. Anything after the = tells the script exactly what it is we're adding and in what amounts. You could easily say ITEM=i_platemail_chest, or something like that, without the mysterious { } sections, but the reason templates are interesting is because they can vary greatly. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;{ random_food 1 0 3}&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the item you will be creating. As we can see from our weighted random selector lesson, 1 out of 4 times, it will be random_food, and 3 out of 4 times, it will be zero. If an ITEM is zero, nothing will be created this time. Basically this is saying &amp;quot;There will be a one in four chance of getting random_food in this container.&amp;quot; What is random_food you ask? Well, it happens to be another TEMPLATE, defined in spheretemplate.scp, I believe. &lt;br /&gt;
&lt;br /&gt;
{1 3} This is the amount of the item that will be created. You should recognize this as a ranged random selector. This tells SPHERE to put between 1 and 3 of this item into the container. Of course, if the item is zero as selected above, this has no effect since one nothing and three nothings are still nothing. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So basically, that is a template script. You then fill it with as many items as you want. You may also notice the following construction: &lt;br /&gt;
&lt;br /&gt;
ITEM=i_sword_long,R11 &lt;br /&gt;
&lt;br /&gt;
This is a shorthand way of writing this: &lt;br /&gt;
&lt;br /&gt;
ITEM={ i_sword_long 1 0 10 } &lt;br /&gt;
&lt;br /&gt;
R11 means &amp;quot;one out of 11 chance of finding this item&amp;quot;. And you can add an amount selector to the end of that as well, which makes it look long and scary: &lt;br /&gt;
&lt;br /&gt;
ITEM=i_sword_long,R11,{4 5} &lt;br /&gt;
&lt;br /&gt;
But why would you want 4 or 5 long swords in one item? That would be bizzare.  :) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And that's about it for templates. Congratulations, you're finished with chapter 1. Now you should be able to understand the examples to follow on the next section. You may also have some questions which are addressed in the common questions area. If you have a question which is not addressed there, perhaps it is too advanced of a topic for chapter 1. I assure you almost every aspect of SPHERE scripting will be covered in later chapters. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''(A template example by Belgar)''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;[TEMPLATE tm_necromancer]&amp;lt;br /&amp;gt;&lt;br /&gt;
CONTAINER=i_bag&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM=random_necro_scroll&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM=random_necro_scroll&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM=random_necro_reagent, {5 12}&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM=random_reagent, {5 12}&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM=random_necro_reagent, {5 12}&amp;lt;br /&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
Or, um. Well I guess there really isn't another way to say &amp;quot;Examples&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This shall be my attempt to create the most basic new items available. You will see things in these examples that are NOT mentioned in the tutorials. The major factor will be ON=@Create, which is the primary topic of Chapter 2. Just know for now that things you can change in game (color, etc) must go under ON=@Create.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1''': A Red Sword&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;[ITEMDEF i_sword_red]&amp;lt;br /&amp;gt;&lt;br /&gt;
ID=i_sword_viking&amp;lt;br /&amp;gt;&lt;br /&gt;
TYPE=t_weapon_sword&amp;lt;br /&amp;gt;&lt;br /&gt;
NAME=The Red Sword&amp;lt;br /&amp;gt;&lt;br /&gt;
CATEGORY=Weapons&amp;lt;br /&amp;gt;&lt;br /&gt;
SUBSECTION=New Swords&amp;lt;br /&amp;gt;&lt;br /&gt;
DESCRIPTION=Red Sword&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ON=@Create&lt;br /&gt;
:COLOR=colors_red // This is a comment. Comments are ignored by SPHERE.&amp;lt;br /&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Wait, what is this weird &amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;//&amp;lt;/font&amp;gt; thing we've got going here? That's called a comment. It's completely ignored by SPHERE, so you can write whatever you want to the end of the line after //. You cannot have multi-line comments in SPHERE unless you use a new //, so don't even try it. SPHERE will give funky errors and then you'll have fun finding them. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2''': A blue ettin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;[CHARDEF c_ettin_blue]&amp;lt;br /&amp;gt;&lt;br /&gt;
ID=02 // You could just as easily use c_ettin here.&amp;lt;br /&amp;gt;&lt;br /&gt;
NAME=My Blue Ettin&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
ON=@Create&amp;lt;br /&amp;gt;&lt;br /&gt;
:COLOR=02 // This is a dark blue color. It's often used for Counselor robes. Remember it.&amp;lt;br /&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 3''': A template from the file, since I'm too lazy to write one myself&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;[TEMPLATE 101521]&amp;lt;br /&amp;gt;&lt;br /&gt;
DEFNAME=goodie_meager_1&amp;lt;br /&amp;gt;&lt;br /&gt;
CATEGORY=Item Templates&amp;lt;br /&amp;gt;&lt;br /&gt;
SUBSECTION=Loot Templates&amp;lt;br /&amp;gt;&lt;br /&gt;
DESCRIPTION=Meager Goodie 1&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ meager_gold_pile 1 backpack_meager 1 pouch_meager 1 }&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_boots 1 0 4 }&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_gorget 1 0 4 }&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_staff 1 0 4 }&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ random_necklace 1 0 4 }&amp;lt;br /&amp;gt;&lt;br /&gt;
ITEM={ i_cape 1 0 9 }&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;darkred&amp;quot;&amp;gt;COLOR=colors_all&amp;lt;/font&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may notice something new here (especially since I highlighted it in red), and yes, it is legal. Any lines between ITEM= lines will affect the previously created item. The COLOR= line here affects the ITEM created by the line&lt;br /&gt;
&lt;br /&gt;
ITEM={ i_cape 1 0 9 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remember, the best way to learn this type of scripts is to read the scripts provided for you in files like sphereitem_colorarm.scp and sphereitem_beers.scp.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Override_TAGs&amp;diff=7987</id>
		<title>Override TAGs</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Override_TAGs&amp;diff=7987"/>
				<updated>2022-08-19T19:20:13Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Character-based Override TAGs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Override_TAGs}}&lt;br /&gt;
&lt;br /&gt;
==Override Common Data==&lt;br /&gt;
Ever wondered why you can't change for example 'TDATA' values on a per-item basis? Or some default values from Sphere.ini? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The reason is simple: The majority of items, characters and situation will not need individual values there and are working fine with the default ones (either hardcoded or set in the INI or the *DEF sections), so it simply would be a waste of memory to store them again on each game object. Therefore for example a single crossbow in the world reads what items it needs as ammunition not from it's &amp;quot;WORLDITEM&amp;quot; data object, but from it's ITEMDEF (the TDATA property). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alas, as time goes by for some stuff it showed reasonable to allow overriding the default values for a single item, character or even region. Nevertheless it still would be a waste of resources to give all crossbows an &amp;quot;ammunition&amp;quot; property what on almost all of them will read: &amp;quot;default&amp;quot;. So the Sphere developers decided to store the respective individual changes in TAGs: If the TAG exists it will be used, if not, the default is used. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Common to most overrides is the syntax of the TAG's name: '''TAG.OVERRIDE.*''' - where &amp;quot;'''*'''&amp;quot; denotes the name of the respective tag. But there are also some others what were named before this naming scheme was established. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Item-based Override TAGs==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| '''TAG.ALWAYSSEND'''&lt;br /&gt;
| When optional flag OF_OsiMultiSight is on, all items inside a multi are not sent until entering the multi. If you want an item to be always sent, set TAG.ALWYASSEND to 1. This tag also can also go under the ITEMDEF section of an item.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.NOSAVE'''&lt;br /&gt;
| If set to 1 the object will NOT be saved.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE.DAMAGETYPE'''&lt;br /&gt;
| Sets the damage type for a weapon (ARGN2 in @GetHit trigger).&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE.DROPSOUND'''&lt;br /&gt;
| Overrides the sound that will be played when the item is dropped somewhere.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE_LIGHTID'''&lt;br /&gt;
| Overrides TDATA3 for lights (T_LIGHT_LIT, T_LIGHT_OUT). Take notice that there is an underscore in this TAG's name.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE.MAXITEMS'''&lt;br /&gt;
| Overrides the maximum number of items that can be placed into a container (default: 255)&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE.MAXWEIGHT'''&lt;br /&gt;
| Overrides the maximum total weight that can be placed into a container.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE.PRACTICEMAX.SKILL_$skillid'''&lt;br /&gt;
| Overrides SKILLPRACTICEMAX setting from Sphere.ini for a particular skill. $skillid is the numeric ID of the skill.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE.SKILL'''&lt;br /&gt;
| Overrides the SKILL property of the ITEMDEF for a weapon.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE.SPEED'''&lt;br /&gt;
| Overrides the SPEED for a weapon.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE.SOUND_HIT'''&lt;br /&gt;
| Overrides the hit sound for a weapon. Take notice that there is an underscore in this TAG's name. (Removed in newer versions and is just AMMOSOUNDHIT=&amp;lt;Val&amp;gt; without the use of Tag.Override.&amp;lt;String&amp;gt;=&amp;lt;Val&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE.SOUND_MISS'''&lt;br /&gt;
| Overrides the miss sound for a weapon. Take notice that there is an underscore in this TAG's name. (Removed in newer versions and is just AMMOSOUNDMISS=&amp;lt;Val&amp;gt; without the use of Tag.Override.&amp;lt;String&amp;gt;=&amp;lt;Val&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Character-based Override TAGs==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| '''TAG.DEATHFLAGS'''&lt;br /&gt;
| Changes some death related behaviour. The list of supported flags are in sphere_defs.scp.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.MAXPLAYERPETS'''&lt;br /&gt;
| Overrides the maximum number of pets that a player can stable. Default is 10.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.NAME.ALT'''&lt;br /&gt;
| Sets an alternative name, useful for incognito effects.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.NAME.HUE'''&lt;br /&gt;
| Changes the colour of the name displayed above a character.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.NAME.PREFIX'''&lt;br /&gt;
| Sets some text to display before the character's name.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.NAME.SUFFIX'''&lt;br /&gt;
| Sets some text to display after the character's name.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.NOSKILLMSG'''&lt;br /&gt;
| When set to 1, character will receive the &amp;quot;gainradius_not_met&amp;quot; defmessage (sphere_msgs.scp) when skillgain is aborted due to the GAINRADIUS on a skill.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| '''TAG.OVERRIDE.MOVERATE'''&lt;br /&gt;
| Overrides the MOVERATE property of the CHARDEF.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE.MOVEDELAY'''&lt;br /&gt;
|  Overrides completely the moverate checks and setting the next movement to the given timer, eg 'tag.override.moverate=250' makes the npc move each 250 milliseconds when walking.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE.RUNNINGPENALTY'''&lt;br /&gt;
| Overrides RUNNINGPENALTY from Sphere.ini&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE.SKILLCAP_$skillid'''&lt;br /&gt;
| Overrides skill settings from the character's SKILLCLASS. $skillid is the numeric ID of the skill.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE.SKILLSUM'''&lt;br /&gt;
| Overrides SKILLSUM setting from the character's SKILLCLASS.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE.SPIDERWEB&lt;br /&gt;
| When set to 1, NPC will be able to drop spider webs (for a giant spider, if this set to 1 then it will stop it from dropping webs)&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE.STAMINALOSSATWEIGHT'''&lt;br /&gt;
| Overrides STAMINALOSSATWEIGHT from Sphere.ini&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE.STATCAP_$statid'''&lt;br /&gt;
| Overrides STR/DEX/INT settings from the character's SKILLCLASS. (0=STR, 1=INT, 2=DEX)&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE.STATSUM&lt;br /&gt;
| Overrides STATSUM setting from the character's SKILLCLASS.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE.TRAINSKILLMAX'''&lt;br /&gt;
| Overrides NPCTRAINMAX setting from Sphere.ini&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE.TRAINSKILLMAXPERCENT'''&lt;br /&gt;
| Overrides NPCTRAINPERCENT setting from Sphere.ini&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.PARTY_AUTODECLINEINVITE'''&lt;br /&gt;
| When set to 1, character will automatically decline party invitations.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.PARTY_CANLOOTME'''&lt;br /&gt;
| When set to 1, party members will be allow to loot this character without it being counted as a criminal action (linked to the option in the party menu).&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.VENDORMARKUP'''&lt;br /&gt;
| This value is added to the markup percentage that vendors apply to their buy and sell prices. Since the default markup is 15%, this means that a vendor will sell something worth 100gp at 115gp and buy it back for 85gp. If you set this tag to -15 the markup will be cancelled out to 0%, or you can raise/lower it if you want your vendor to sell things at a higher/lower price.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Region-based Override TAGs==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| '''TAG.ANNOUNCEMENT'''&lt;br /&gt;
| Sets a message to be announced to all who enters the region if REGION_FLAG_ANNOUNCE is set.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.GUARDOWNER'''&lt;br /&gt;
| Specifies the owner of the region's guards (ex: &amp;quot;The City&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE.GUARDS'''&lt;br /&gt;
| Specifies the character that will be summoned when guards are called in the region, overriding the &amp;lt;tt&amp;gt;guards {c_h_guard 1 c_h_guard_f 1}&amp;lt;/tt&amp;gt; defname in sphere_defs.scp&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.RED'''&lt;br /&gt;
| Sets the region as a safe place for evil. Murders are considered normal here.&lt;br /&gt;
If region is guarded, guards will be red and protect evil players.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.VENDORMARKUP'''&lt;br /&gt;
| This value is added to the markup percentage that vendors apply to their buy and sell prices. Since the default markup is 15%, this means that a vendor will sell something worth 100gp at 115gp and buy it back for 85gp. If you set this tag to -15 the markup will be cancelled out to 0%, or you can raise/lower it if you want your vendor to sell things at a higher/lower price. If the vendor has this tag set directly on them then this region TAG will not be used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Removed Override TAGs==&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| '''OLD TAG'''&lt;br /&gt;
| '''NEW Variable'''&lt;br /&gt;
| '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.BREATH.DAM&lt;br /&gt;
| Breath.Dam&lt;br /&gt;
| Overrides Damage done from fire breathing.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.RANGE&lt;br /&gt;
| Range&lt;br /&gt;
| Range is now writable for both characters and items.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE.SHIPSPEED.PERIOD&lt;br /&gt;
| ShipSpeed.Period&lt;br /&gt;
| Overrides SHIPSPEED.PERIOD for a ship (the length of time it takes for the ship to move one step, in tenths of a second).&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE.SHIPSPEED.TILES&lt;br /&gt;
| ShipSpeed.Tiles&lt;br /&gt;
| Overrides the amount of tiles moved in each tick.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE.DOORSOUND_CLOSE&lt;br /&gt;
| DOORCLOSESOUND&lt;br /&gt;
| Overrides the sound that will be played for a door when it is being closed.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE.DOORSOUND_OPEN&lt;br /&gt;
| DOOROPENSOUND&lt;br /&gt;
| Overrides the sound that will be played for a door when it is being opened.&lt;br /&gt;
|-&lt;br /&gt;
| '''TAG.OVERRIDE.PORTCULISSOUND&lt;br /&gt;
| PORTCULISSOUND&lt;br /&gt;
| Overrides the sound that will be played for a portcullis when it is used.&lt;br /&gt;
|}&lt;br /&gt;
[[Category: Articles]]&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7986</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7986"/>
				<updated>2022-08-18T19:30:07Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well worry no more, you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Situations=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions. Each situation will have it's own unique methods to help you use the tools at your disposal to fix the problem, or guide you to finding out more helpful information. &lt;br /&gt;
&lt;br /&gt;
==Problems Understanding A Trigger==&lt;br /&gt;
Uncertain how a trigger works? &lt;br /&gt;
&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the concept of logging out your results to the console for further insight into what objects a trigger is referencing. This can help you make sure that you are referencing the right object in game and that whatever follows will behave as expected. &lt;br /&gt;
&lt;br /&gt;
Let's say you want to use a trigger that will fire when you kill someone, and when you kill that person you want to give the killer some experience points. You need to reference both the person being killed and the person that killed them.&lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]]. One may think that they will use the default object I as the killer and that SRC will be the person being killed. or that ACT would be the person being killed. But it is best not to assume any of these triggers will use any object reference the same as another, or even the same as a similar trigger. The best practice is to take yourself to the Spherewiki (as YOU already have) and pull up the trigger you are looking for under the Reference Compendium &amp;gt; [[Objects]] &amp;gt; [[Characters]], this will give you a very good idea of what references you can make in that trigger. Once you have that information you can begin to see what you are able to work with and how you can work with it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As MalucoBeleza points out, this practice is required to get proper knowledge to work with a trigger&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essential to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
 ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
Debugging is also a great tool when you are performing calculations. Let’s say that you want to create your own combat system, such as:&lt;br /&gt;
&lt;br /&gt;
 ON=@Hit&lt;br /&gt;
    SERV.LOG &amp;lt;NAME&amp;gt; HAVE JUST HIT &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
    IF (&amp;lt;WEAPON&amp;gt;)&lt;br /&gt;
        SERV.LOG A WEAPON WAS USED: &amp;lt;WEAPON.NAME&amp;gt;&lt;br /&gt;
        SERV.LOG &amp;lt;WEAPON.NAME&amp;gt;'S DAMAGE IS &amp;lt;WEAPON.DAM.LO&amp;gt; - &amp;lt;WEAPON.DAM.HI&amp;gt;&lt;br /&gt;
    ELSE&lt;br /&gt;
        SERV.LOG NO WEAPON WAS USED.&lt;br /&gt;
        SERV.LOG &amp;lt;NAME&amp;gt;'S DAMAGE IS &amp;lt;DAM&amp;gt;&lt;br /&gt;
    ENDIF&lt;br /&gt;
    &lt;br /&gt;
    SERV.LOG DAMAGE STARTED AS &amp;lt;ARGN1&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    SERV.LOG THE SKILL USED IN THIS ATTACK IS &amp;lt;ACTION&amp;gt;&lt;br /&gt;
    IF (&amp;lt;ACTION&amp;gt; == WRESTLING) || (&amp;lt;ACTION&amp;gt; == MACEFIGHTING)&lt;br /&gt;
        ARGN1 = &amp;lt;EVAL &amp;lt;ARGN1&amp;gt; + (&amp;lt;STR&amp;gt;/8)&amp;gt; //APPLY YOUR FORMULA HERE&lt;br /&gt;
    &lt;br /&gt;
    ELIF (&amp;lt;ACTION&amp;gt; == ARCHERY) || (&amp;lt;ACTION&amp;gt; == FENCING)&lt;br /&gt;
        ARGN1 = &amp;lt;EVAL &amp;lt;ARGN1&amp;gt; + (&amp;lt;DEX&amp;gt;/8)&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    ELIF (&amp;lt;ACTION&amp;gt; == SWORDSMANSHIP)&lt;br /&gt;
        ARGN1 = &amp;lt;EVAL &amp;lt;ARGN1&amp;gt; + (&amp;lt;DEX&amp;gt;/16) + (&amp;lt;STR&amp;gt;/16)&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    ENDIF&lt;br /&gt;
    &lt;br /&gt;
    SERV.LOG DAMAGE AFTER STATS BONUS ACCORDING TO THE SKILL IS &amp;lt;ARGN1&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    IF (&amp;lt;SRC.ISPLAYER&amp;gt;) //PLAYER HITS ANOTHER PLAYER&lt;br /&gt;
        SERV.LOG THE ARMOR OF THE DEFENDANT IS &amp;lt;SRC.ARMOR&amp;gt;&lt;br /&gt;
        LOCAL.DAMAGE_REDUCTION = &amp;lt;EVAL &amp;lt;SRC.ARMOR&amp;gt;/20&amp;gt; //APPLY YOUR FORMULA HERE&lt;br /&gt;
        &lt;br /&gt;
    ELSE //PLAYER HITS A NPC&lt;br /&gt;
        SERV.LOG THE ARMOR OF THE DEFENDANT IS &amp;lt;SRC.AC&amp;gt;&lt;br /&gt;
        LOCAL.DAMAGE_REDUCTION = &amp;lt;EVAL &amp;lt;SRC.AC&amp;gt;/20&amp;gt; //APPLY YOUR FORMULA HERE&lt;br /&gt;
    &lt;br /&gt;
    ENDIF&lt;br /&gt;
    ARGN1 -= &amp;lt;LOCAL.DAMAGE_REDUCTION&amp;gt;&lt;br /&gt;
    SERV.LOG AFTER DAMAGE REDUCTION OF &amp;lt;LOCAL.DAMAGE_REDUCTION&amp;gt;, DAMAGE IS &amp;lt;ARGN1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Console Errors Regarding Scripts==&lt;br /&gt;
You are getting errors on your console, and it's telling you about a script but you aren't quite sure what to do. Let's see one as an example : &lt;br /&gt;
&lt;br /&gt;
 00:17:ERROR:(i_dye_tubs.scp,52)Range isn't closed by a '}' character.&lt;br /&gt;
&lt;br /&gt;
Okay from this error we can see the filename 'i_dye_tubs' and the line number is 52. The error is that the 'Range isn't closed by a '}' character.' so let's go see what this line looks like and what we the appropriate line fix is: &lt;br /&gt;
&lt;br /&gt;
So here's what line 52 from i_dye_tubs.scp looks like :&lt;br /&gt;
 color={047e 049a&lt;br /&gt;
&lt;br /&gt;
We can see above that its missing a } at the end just like the console error notified us about. The fix is to simply add the missing }.&lt;br /&gt;
&lt;br /&gt;
this is a very elementary example but this explains the process of breaking down a console error. It's always the same for these script errors : &amp;quot;filename, line number, error description&amp;quot;. With large complicated systems paying attention to the exact nature of your console error will guide you towards figuring out how to fix it.&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Main_Page&amp;diff=7985</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Main_Page&amp;diff=7985"/>
				<updated>2022-08-18T15:20:34Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;background-color:#a7bcdc; color:#000; min-width:650px; padding:1px; text-align:center; width:100%;&amp;quot;&amp;gt;&lt;br /&gt;
'''Starting with SphereServer'''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;min-width:650px; width:100%;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div style=&amp;quot;border-right:1px solid #a7bcdc; float:left; height:100%; margin-right:-1px; width:33%;&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
			'''Setup of Sphere'''&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Where to get Sphere]]&lt;br /&gt;
* [[Installing Sphere]]&lt;br /&gt;
* [[Configuring Sphere.ini]]&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
			'''Sphere 101'''&lt;br /&gt;
		&amp;lt;/div&amp;gt;		&lt;br /&gt;
		&amp;lt;div style=&amp;quot;padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Chapter 1]] ''(Numbers, DEFNAME, ITEMDEF, CHARDEF)''&lt;br /&gt;
* [[Chapter 2]] ''(Sphere files explained)''&lt;br /&gt;
* [[Chapter 3]] ''(Scripting NPC's and items, Cool commands)''&lt;br /&gt;
* [[Chapter 4]] ''(Objects, operators, speech)''&lt;br /&gt;
* [[Chapter 5]] ''(Tags, Vars, Locals, Functions)''&lt;br /&gt;
* [[Chapter 6]] ''(LINKs, TIMERs, TARGETs)''&lt;br /&gt;
* [[Chapter 7]] ''(Loops and powerful functions)''&lt;br /&gt;
* [[Chapter 8]] ''(SKILLMENUs, MENUs, Gumps)''&lt;br /&gt;
* [[Chapter 9]] ''(Events)''&lt;br /&gt;
* [[Chapter 10]] ''(String Handling)''&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div style=&amp;quot;border-left:1px solid #a7bcdc; float:left; height:100%; margin-right:-1px; width:67%;&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
			'''Extra Tutorials'''&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Common Mistakes|Common Mistakes Explained]] ''(A revision of Maximus's tutorial on the forums, and continuation of Taran's Misconceptions tutorial)''&lt;br /&gt;
* [[Internet and Sphere]] ''(And how to make the right use of them)''&lt;br /&gt;
* [[Languages Tutorial]] ''(How to script your own language system)''&lt;br /&gt;
* [[Making your own Skills]] ''(How to make and customize your skill)''&lt;br /&gt;
* [[Mul Patching Tutorial|Nazghul's Mul Patching Tutorial]] [http://sorea.profitux.cz/patching/ external link] ''(A document about mul patching and customizing your server)''&lt;br /&gt;
* [[Overriding Hardcoded Commands]] ''(How to override hardcoded commands and functions)''&lt;br /&gt;
* [[Scheduled Reboot]] ''(How to schedule system reboots)''&lt;br /&gt;
* [[Using MySQL]] ''(How to use MySQL)''&lt;br /&gt;
* [[Bitwise Operations]] ''(How to work with FLAGS/ATTR)''&lt;br /&gt;
* [[Script Debugging]] ''(How to fix your scripts)''&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
			'''IMPORTANT LINKS'''&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [https://github.com/Sphereserver SphereServer Official Github]&lt;br /&gt;
* [https://forum.spherecommunity.net/sshare.php?srt=4 Download Nightly Builds] ''(Plus! Extra downloads, like tools and scripts!)''&lt;br /&gt;
* [https://github.com/Sphereserver/Source-X/blob/master/Changelog-X1-Nightlies.txt SphereX Changelog] | [https://github.com/Sphereserver/Source/blob/master/changelog.txt 56d Changelog]&lt;br /&gt;
* [https://discord.gg/BZj2fEA Join us at Discord] ''(We will solve most of your doubts over there)''&lt;br /&gt;
		&amp;lt;/div&amp;gt;		&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color:#a7bcdc; color:#000; min-width:650px; padding:1px; text-align:center; width:100%;&amp;quot;&amp;gt;&lt;br /&gt;
'''Reference Compendium'''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;min-width:650px; width:100%;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div style=&amp;quot;border-right:1px solid #a7bcdc; float:left; height:100%; margin-right:-1px; width:33%;&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
[[:Category:Definitions|'''Definitions''']]&lt;br /&gt;
		&amp;lt;/div&amp;gt;		&lt;br /&gt;
		&amp;lt;div style=&amp;quot;padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[CHARDEF|Characters]]&lt;br /&gt;
* [[DIALOG|Dialogs]]&lt;br /&gt;
* [[EVENTS|Events]]&lt;br /&gt;
* [[ITEMDEF|Items]]&lt;br /&gt;
* [[MENU|Menus]]&lt;br /&gt;
* [[REGIONRESOURCE|Region Resources]]&lt;br /&gt;
* [[REGIONTYPE|Region Types]]&lt;br /&gt;
* [[AREADEF|Regions]]&lt;br /&gt;
* [[ROOMDEF|Rooms]]&lt;br /&gt;
* [[SKILLCLASS|Skill Classes]]&lt;br /&gt;
* [[SKILLMENU|Skill Menus]]&lt;br /&gt;
* [[SKILL|Skills]]&lt;br /&gt;
* [[SPAWN|Spawn Groups]]&lt;br /&gt;
* [[SPELL|Spells]]&lt;br /&gt;
* [[TYPEDEF|Types]]&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div style=&amp;quot;border-left:1px solid #a7bcdc; float:left; height:100%; margin-right:-1px; width:67%;&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
[[:Category:Objects|'''Objects''']]&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Accounts]]&lt;br /&gt;
* [[Characters]]&lt;br /&gt;
* [[Database]]&lt;br /&gt;
* [[Files]]&lt;br /&gt;
* [[GM Pages]]&lt;br /&gt;
* [[Items]]&lt;br /&gt;
** ''[[Special Items]]''&lt;br /&gt;
* [[Map Points]]&lt;br /&gt;
* [[Parties]]&lt;br /&gt;
* [[Regions]]&lt;br /&gt;
* [[Rooms]]&lt;br /&gt;
* [[Sectors]]&lt;br /&gt;
* [[Server]]&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
[[:Category:Scripts|'''Scripts''']]&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[:Category:Functions|Functions and Triggers]]&lt;br /&gt;
* [[:Category:Variables|General Functions, Properties and References]]&lt;br /&gt;
* [[Intrinsic Functions]]&lt;br /&gt;
* [[:Category:Statements|Statements]]&lt;br /&gt;
* [[:Category:Triggers|Triggers]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
==Sphere 3rd Party Tools==&lt;br /&gt;
* [http://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;uid=603 Axis II] - GM Tool for Sphere that will allow you to place objects in-game, spawns, traveling and many other useful functions for shard admins and GMs.&lt;br /&gt;
* [http://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;prj=3 vSCP] - vSCP is the most complete and up-to-date syntax editor for sphere scripting. It does contain syntax highlighting, autocomplete, folding markers to specify blocks of code that can expand or collapse, bookmarks, autoindent, find/replace/gotoline, help guide for all the sphere elements added to your code, and more! &lt;br /&gt;
* [http://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;prj=2 vServerLauncher] - Install and run the latest build of sphereserver in a few clicks with vServerLauncher. It's pretty quick and simple!&lt;br /&gt;
* [http://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;prj=5 SphereService] - Relaunch SphereSvr.exe everytime it closes/crashes. Automatically runs at windows startup and works in a silent mode minimized to Tray.&lt;br /&gt;
* [http://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;prj=4 vCrypter] - Type the client version and the tool will calculate the correct UO login keys for classic or enhanced clients.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Articles==&lt;br /&gt;
&lt;br /&gt;
* [[Armor Calculation]]&lt;br /&gt;
* [[Client Changes]]&lt;br /&gt;
* [[Common Scripting Misconceptions]]&lt;br /&gt;
* [[Custom Object Properties]]&lt;br /&gt;
* [[Error Codes]]&lt;br /&gt;
* [[Experience System]]&lt;br /&gt;
* [[How Combat Works]]&lt;br /&gt;
* [[Occam's Razor]]&lt;br /&gt;
* [[Optimization|Optimization Theory]]&lt;br /&gt;
* [[Override TAGs]]&lt;br /&gt;
* [[Revisions Changelog]]&lt;br /&gt;
* [[Sendpacket]]&lt;br /&gt;
* [[Skill Gain Theory]]&lt;br /&gt;
* [[The Process of Scripting]]&lt;br /&gt;
* [[Building Component Reference]]&lt;br /&gt;
&lt;br /&gt;
==Credits==&lt;br /&gt;
&lt;br /&gt;
'''Special thanks to:'''&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|XuN, Nolok, Ben, and Drk]], for their hard work on the X branch taking Sphere into the next decade.&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|Ben, Cloud_Br, Ellessar, Jdog, Lord Zerofiz, Mordaunt, Nazghul-ll, RanXerox, Rattlehead, Sandman, Sharlenwar, ShiryuX, thelegbra, Maximus, WarAngel and Valios]], for helping to add content.&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|Daleth]], for writing the Sphere Reference Project, and [[WhoIsWho|Mordaunt]] for converting it to .chm format.&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|Tracker]], for writing the Sphere 56 Tracking Changes in Sphereserver.net&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|Taran]], for writing the original and now famous Sphere Scripting for Dummies tutorials, and [[WhoIsWho|MrSugarCube]] for bringing it up-to-date directly from source.&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|Ben, Khaos, Ranxerox, Shiryux, Furio, Radiant, Vjaka, Nazghul-ll, Ellessar, Torfo, Shadow Dragon, MrSugarCube and coruja747]] for continuing to develop Sphere into a powerful and very customizable Ultima Online emulator.&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|Crius]], for providing hosting for the original SphereWiki, and [[WhoIsWho|Torfo]] for providing the current hosting.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
* [[Useful Links]] ''(An ongoing list of useful links for community members)''&lt;br /&gt;
* [http://www.spherecommunity.net/ Official SphereServer Website]&lt;br /&gt;
* [https://forum.spherecommunity.net/sshare.php?srt=4 Nightly builds]&lt;br /&gt;
* [http://nightly.prerelease.sphere.torfo.org/ Nightly builds - OUTDATED, use the link above]&lt;br /&gt;
* [http://spherepack.codeplex.com/ Sphere Community Pack 2.0]&lt;br /&gt;
* [http://uo.torfo.org/packetguide/ Jerrith's UO Packet Guide]&lt;br /&gt;
* [http://uo.torfo.org/packetguideKR/ Wyatt&amp;amp;Kons's UOKR Packet Guide]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Navigation]]&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Main_Page&amp;diff=7984</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Main_Page&amp;diff=7984"/>
				<updated>2022-08-18T15:19:28Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;background-color:#a7bcdc; color:#000; min-width:650px; padding:1px; text-align:center; width:100%;&amp;quot;&amp;gt;&lt;br /&gt;
'''Starting with SphereServer'''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;min-width:650px; width:100%;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div style=&amp;quot;border-right:1px solid #a7bcdc; float:left; height:100%; margin-right:-1px; width:33%;&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
			'''Setup of Sphere'''&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Where to get Sphere]]&lt;br /&gt;
* [[Installing Sphere]]&lt;br /&gt;
* [[Configuring Sphere.ini]]&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
			'''Sphere 101'''&lt;br /&gt;
		&amp;lt;/div&amp;gt;		&lt;br /&gt;
		&amp;lt;div style=&amp;quot;padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Chapter 1]] ''(Numbers, DEFNAME, ITEMDEF, CHARDEF)''&lt;br /&gt;
* [[Chapter 2]] ''(Sphere files explained)''&lt;br /&gt;
* [[Chapter 3]] ''(Scripting NPC's and items, Cool commands)''&lt;br /&gt;
* [[Chapter 4]] ''(Objects, operators, speech)''&lt;br /&gt;
* [[Chapter 5]] ''(Tags, Vars, Locals, Functions)''&lt;br /&gt;
* [[Chapter 6]] ''(LINKs, TIMERs, TARGETs)''&lt;br /&gt;
* [[Chapter 7]] ''(Loops and powerful functions)''&lt;br /&gt;
* [[Chapter 8]] ''(SKILLMENUs, MENUs, Gumps)''&lt;br /&gt;
* [[Chapter 9]] ''(Events)''&lt;br /&gt;
* [[Chapter 10]] ''(String Handling)''&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div style=&amp;quot;border-left:1px solid #a7bcdc; float:left; height:100%; margin-right:-1px; width:67%;&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
			'''Extra Tutorials'''&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Common Mistakes|Common Mistakes Explained]] ''(A revision of Maximus's tutorial on the forums, and continuation of Taran's Misconceptions tutorial)''&lt;br /&gt;
* [[Internet and Sphere]] ''(And how to make the right use of them)''&lt;br /&gt;
* [[Languages Tutorial]] ''(How to script your own language system)''&lt;br /&gt;
* [[Making your own Skills]] ''(How to make and customize your skill)''&lt;br /&gt;
* [[Mul Patching Tutorial|Nazghul's Mul Patching Tutorial]] [http://sorea.profitux.cz/patching/ external link] ''(A document about mul patching and customizing your server)''&lt;br /&gt;
* [[Overriding Hardcoded Commands]] ''(How to override hardcoded commands and functions)''&lt;br /&gt;
* [[Scheduled Reboot]] ''(How to schedule system reboots)''&lt;br /&gt;
* [[Using MySQL]] ''(How to use MySQL)''&lt;br /&gt;
* [[Bitwise Operations]] ''(How to work with FLAGS/ATTR)''&lt;br /&gt;
* [[Script Debugging]] ''(How to fix your scripts)''&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
			'''IMPORTANT LINKS'''&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [https://github.com/Sphereserver SphereServer Official Github]&lt;br /&gt;
* [https://forum.spherecommunity.net/sshare.php?srt=4 Download Nightly Builds] ''(Plus! Extra downloads, like tools and scripts!)''&lt;br /&gt;
* [https://github.com/Sphereserver/Source-X/blob/master/Changelog-X1-Nightlies.txt SphereX Changelog] | [https://github.com/Sphereserver/Source/blob/master/changelog.txt 56d Changelog]&lt;br /&gt;
* [https://discord.gg/BZj2fEA Join us at Discord] ''(We will solve most of your doubts over there)''&lt;br /&gt;
* [[Useful Links]] ''(An ongoing list of useful links for community members)''&lt;br /&gt;
		&amp;lt;/div&amp;gt;		&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color:#a7bcdc; color:#000; min-width:650px; padding:1px; text-align:center; width:100%;&amp;quot;&amp;gt;&lt;br /&gt;
'''Reference Compendium'''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;min-width:650px; width:100%;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div style=&amp;quot;border-right:1px solid #a7bcdc; float:left; height:100%; margin-right:-1px; width:33%;&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
[[:Category:Definitions|'''Definitions''']]&lt;br /&gt;
		&amp;lt;/div&amp;gt;		&lt;br /&gt;
		&amp;lt;div style=&amp;quot;padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[CHARDEF|Characters]]&lt;br /&gt;
* [[DIALOG|Dialogs]]&lt;br /&gt;
* [[EVENTS|Events]]&lt;br /&gt;
* [[ITEMDEF|Items]]&lt;br /&gt;
* [[MENU|Menus]]&lt;br /&gt;
* [[REGIONRESOURCE|Region Resources]]&lt;br /&gt;
* [[REGIONTYPE|Region Types]]&lt;br /&gt;
* [[AREADEF|Regions]]&lt;br /&gt;
* [[ROOMDEF|Rooms]]&lt;br /&gt;
* [[SKILLCLASS|Skill Classes]]&lt;br /&gt;
* [[SKILLMENU|Skill Menus]]&lt;br /&gt;
* [[SKILL|Skills]]&lt;br /&gt;
* [[SPAWN|Spawn Groups]]&lt;br /&gt;
* [[SPELL|Spells]]&lt;br /&gt;
* [[TYPEDEF|Types]]&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div style=&amp;quot;border-left:1px solid #a7bcdc; float:left; height:100%; margin-right:-1px; width:67%;&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
[[:Category:Objects|'''Objects''']]&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Accounts]]&lt;br /&gt;
* [[Characters]]&lt;br /&gt;
* [[Database]]&lt;br /&gt;
* [[Files]]&lt;br /&gt;
* [[GM Pages]]&lt;br /&gt;
* [[Items]]&lt;br /&gt;
** ''[[Special Items]]''&lt;br /&gt;
* [[Map Points]]&lt;br /&gt;
* [[Parties]]&lt;br /&gt;
* [[Regions]]&lt;br /&gt;
* [[Rooms]]&lt;br /&gt;
* [[Sectors]]&lt;br /&gt;
* [[Server]]&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
[[:Category:Scripts|'''Scripts''']]&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[:Category:Functions|Functions and Triggers]]&lt;br /&gt;
* [[:Category:Variables|General Functions, Properties and References]]&lt;br /&gt;
* [[Intrinsic Functions]]&lt;br /&gt;
* [[:Category:Statements|Statements]]&lt;br /&gt;
* [[:Category:Triggers|Triggers]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
==Sphere 3rd Party Tools==&lt;br /&gt;
* [http://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;uid=603 Axis II] - GM Tool for Sphere that will allow you to place objects in-game, spawns, traveling and many other useful functions for shard admins and GMs.&lt;br /&gt;
* [http://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;prj=3 vSCP] - vSCP is the most complete and up-to-date syntax editor for sphere scripting. It does contain syntax highlighting, autocomplete, folding markers to specify blocks of code that can expand or collapse, bookmarks, autoindent, find/replace/gotoline, help guide for all the sphere elements added to your code, and more! &lt;br /&gt;
* [http://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;prj=2 vServerLauncher] - Install and run the latest build of sphereserver in a few clicks with vServerLauncher. It's pretty quick and simple!&lt;br /&gt;
* [http://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;prj=5 SphereService] - Relaunch SphereSvr.exe everytime it closes/crashes. Automatically runs at windows startup and works in a silent mode minimized to Tray.&lt;br /&gt;
* [http://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;prj=4 vCrypter] - Type the client version and the tool will calculate the correct UO login keys for classic or enhanced clients.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Articles==&lt;br /&gt;
&lt;br /&gt;
* [[Armor Calculation]]&lt;br /&gt;
* [[Client Changes]]&lt;br /&gt;
* [[Common Scripting Misconceptions]]&lt;br /&gt;
* [[Custom Object Properties]]&lt;br /&gt;
* [[Error Codes]]&lt;br /&gt;
* [[Experience System]]&lt;br /&gt;
* [[How Combat Works]]&lt;br /&gt;
* [[Occam's Razor]]&lt;br /&gt;
* [[Optimization|Optimization Theory]]&lt;br /&gt;
* [[Override TAGs]]&lt;br /&gt;
* [[Revisions Changelog]]&lt;br /&gt;
* [[Sendpacket]]&lt;br /&gt;
* [[Skill Gain Theory]]&lt;br /&gt;
* [[The Process of Scripting]]&lt;br /&gt;
* [[Building Component Reference]]&lt;br /&gt;
&lt;br /&gt;
==Credits==&lt;br /&gt;
&lt;br /&gt;
'''Special thanks to:'''&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|XuN, Nolok, Ben, and Drk]], for their hard work on the X branch taking Sphere into the next decade.&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|Ben, Cloud_Br, Ellessar, Jdog, Lord Zerofiz, Mordaunt, Nazghul-ll, RanXerox, Rattlehead, Sandman, Sharlenwar, ShiryuX, thelegbra, Maximus, WarAngel and Valios]], for helping to add content.&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|Daleth]], for writing the Sphere Reference Project, and [[WhoIsWho|Mordaunt]] for converting it to .chm format.&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|Tracker]], for writing the Sphere 56 Tracking Changes in Sphereserver.net&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|Taran]], for writing the original and now famous Sphere Scripting for Dummies tutorials, and [[WhoIsWho|MrSugarCube]] for bringing it up-to-date directly from source.&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|Ben, Khaos, Ranxerox, Shiryux, Furio, Radiant, Vjaka, Nazghul-ll, Ellessar, Torfo, Shadow Dragon, MrSugarCube and coruja747]] for continuing to develop Sphere into a powerful and very customizable Ultima Online emulator.&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|Crius]], for providing hosting for the original SphereWiki, and [[WhoIsWho|Torfo]] for providing the current hosting.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.spherecommunity.net/ Official SphereServer Website]&lt;br /&gt;
* [https://forum.spherecommunity.net/sshare.php?srt=4 Nightly builds]&lt;br /&gt;
* [http://nightly.prerelease.sphere.torfo.org/ Nightly builds - OUTDATED, use the link above]&lt;br /&gt;
* [http://spherepack.codeplex.com/ Sphere Community Pack 2.0]&lt;br /&gt;
* [http://uo.torfo.org/packetguide/ Jerrith's UO Packet Guide]&lt;br /&gt;
* [http://uo.torfo.org/packetguideKR/ Wyatt&amp;amp;Kons's UOKR Packet Guide]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Navigation]]&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Main_Page&amp;diff=7983</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Main_Page&amp;diff=7983"/>
				<updated>2022-08-18T15:18:48Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;background-color:#a7bcdc; color:#000; min-width:650px; padding:1px; text-align:center; width:100%;&amp;quot;&amp;gt;&lt;br /&gt;
'''Starting with SphereServer'''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;min-width:650px; width:100%;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div style=&amp;quot;border-right:1px solid #a7bcdc; float:left; height:100%; margin-right:-1px; width:33%;&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
			'''Setup of Sphere'''&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Where to get Sphere]]&lt;br /&gt;
* [[Installing Sphere]]&lt;br /&gt;
* [[Configuring Sphere.ini]]&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
			'''Sphere 101'''&lt;br /&gt;
		&amp;lt;/div&amp;gt;		&lt;br /&gt;
		&amp;lt;div style=&amp;quot;padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Chapter 1]] ''(Numbers, DEFNAME, ITEMDEF, CHARDEF)''&lt;br /&gt;
* [[Chapter 2]] ''(Sphere files explained)''&lt;br /&gt;
* [[Chapter 3]] ''(Scripting NPC's and items, Cool commands)''&lt;br /&gt;
* [[Chapter 4]] ''(Objects, operators, speech)''&lt;br /&gt;
* [[Chapter 5]] ''(Tags, Vars, Locals, Functions)''&lt;br /&gt;
* [[Chapter 6]] ''(LINKs, TIMERs, TARGETs)''&lt;br /&gt;
* [[Chapter 7]] ''(Loops and powerful functions)''&lt;br /&gt;
* [[Chapter 8]] ''(SKILLMENUs, MENUs, Gumps)''&lt;br /&gt;
* [[Chapter 9]] ''(Events)''&lt;br /&gt;
* [[Chapter 10]] ''(String Handling)''&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div style=&amp;quot;border-left:1px solid #a7bcdc; float:left; height:100%; margin-right:-1px; width:67%;&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
			'''Extra Tutorials'''&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Common Mistakes|Common Mistakes Explained]] ''(A revision of Maximus's tutorial on the forums, and continuation of Taran's Misconceptions tutorial)''&lt;br /&gt;
* [[Internet and Sphere]] ''(And how to make the right use of them)''&lt;br /&gt;
* [[Languages Tutorial]] ''(How to script your own language system)''&lt;br /&gt;
* [[Making your own Skills]] ''(How to make and customize your skill)''&lt;br /&gt;
* [[Mul Patching Tutorial|Nazghul's Mul Patching Tutorial]] [http://sorea.profitux.cz/patching/ external link] ''(A document about mul patching and customizing your server)''&lt;br /&gt;
* [[Overriding Hardcoded Commands]] ''(How to override hardcoded commands and functions)''&lt;br /&gt;
* [[Scheduled Reboot]] ''(How to schedule system reboots)''&lt;br /&gt;
* [[Using MySQL]] ''(How to use MySQL)''&lt;br /&gt;
* [[Bitwise Operations]] ''(How to work with FLAGS/ATTR)''&lt;br /&gt;
* [[Script Debugging]] ''(How to fix your scripts)''&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
			'''IMPORTANT LINKS'''&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [https://github.com/Sphereserver SphereServer Official Github]&lt;br /&gt;
* [https://forum.spherecommunity.net/sshare.php?srt=4 Download Nightly Builds] ''(Plus! Extra downloads, like tools and scripts!)''&lt;br /&gt;
* [https://github.com/Sphereserver/Source-X/blob/master/Changelog-X1-Nightlies.txt SphereX Changelog] | [https://github.com/Sphereserver/Source/blob/master/changelog.txt 56d Changelog]&lt;br /&gt;
* [https://discord.gg/BZj2fEA Join us at Discord] ''(We will solve most of your doubts over there)''&lt;br /&gt;
		&amp;lt;/div&amp;gt;		&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color:#a7bcdc; color:#000; min-width:650px; padding:1px; text-align:center; width:100%;&amp;quot;&amp;gt;&lt;br /&gt;
'''Reference Compendium'''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;min-width:650px; width:100%;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div style=&amp;quot;border-right:1px solid #a7bcdc; float:left; height:100%; margin-right:-1px; width:33%;&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
[[:Category:Definitions|'''Definitions''']]&lt;br /&gt;
		&amp;lt;/div&amp;gt;		&lt;br /&gt;
		&amp;lt;div style=&amp;quot;padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[CHARDEF|Characters]]&lt;br /&gt;
* [[DIALOG|Dialogs]]&lt;br /&gt;
* [[EVENTS|Events]]&lt;br /&gt;
* [[ITEMDEF|Items]]&lt;br /&gt;
* [[MENU|Menus]]&lt;br /&gt;
* [[REGIONRESOURCE|Region Resources]]&lt;br /&gt;
* [[REGIONTYPE|Region Types]]&lt;br /&gt;
* [[AREADEF|Regions]]&lt;br /&gt;
* [[ROOMDEF|Rooms]]&lt;br /&gt;
* [[SKILLCLASS|Skill Classes]]&lt;br /&gt;
* [[SKILLMENU|Skill Menus]]&lt;br /&gt;
* [[SKILL|Skills]]&lt;br /&gt;
* [[SPAWN|Spawn Groups]]&lt;br /&gt;
* [[SPELL|Spells]]&lt;br /&gt;
* [[TYPEDEF|Types]]&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div style=&amp;quot;border-left:1px solid #a7bcdc; float:left; height:100%; margin-right:-1px; width:67%;&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
[[:Category:Objects|'''Objects''']]&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Accounts]]&lt;br /&gt;
* [[Characters]]&lt;br /&gt;
* [[Database]]&lt;br /&gt;
* [[Files]]&lt;br /&gt;
* [[GM Pages]]&lt;br /&gt;
* [[Items]]&lt;br /&gt;
** ''[[Special Items]]''&lt;br /&gt;
* [[Map Points]]&lt;br /&gt;
* [[Parties]]&lt;br /&gt;
* [[Regions]]&lt;br /&gt;
* [[Rooms]]&lt;br /&gt;
* [[Sectors]]&lt;br /&gt;
* [[Server]]&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;border-bottom:1px solid #a7bcdc; color:#a7bcdc; font-size:18px; padding-left:10px;&amp;quot;&amp;gt;&lt;br /&gt;
[[:Category:Scripts|'''Scripts''']]&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div style=&amp;quot;padding:0px 0px 5px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[:Category:Functions|Functions and Triggers]]&lt;br /&gt;
* [[:Category:Variables|General Functions, Properties and References]]&lt;br /&gt;
* [[Intrinsic Functions]]&lt;br /&gt;
* [[:Category:Statements|Statements]]&lt;br /&gt;
* [[:Category:Triggers|Triggers]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
==Sphere 3rd Party Tools==&lt;br /&gt;
* [http://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;uid=603 Axis II] - GM Tool for Sphere that will allow you to place objects in-game, spawns, traveling and many other useful functions for shard admins and GMs.&lt;br /&gt;
* [http://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;prj=3 vSCP] - vSCP is the most complete and up-to-date syntax editor for sphere scripting. It does contain syntax highlighting, autocomplete, folding markers to specify blocks of code that can expand or collapse, bookmarks, autoindent, find/replace/gotoline, help guide for all the sphere elements added to your code, and more! &lt;br /&gt;
* [http://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;prj=2 vServerLauncher] - Install and run the latest build of sphereserver in a few clicks with vServerLauncher. It's pretty quick and simple!&lt;br /&gt;
* [http://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;prj=5 SphereService] - Relaunch SphereSvr.exe everytime it closes/crashes. Automatically runs at windows startup and works in a silent mode minimized to Tray.&lt;br /&gt;
* [http://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;prj=4 vCrypter] - Type the client version and the tool will calculate the correct UO login keys for classic or enhanced clients.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Articles==&lt;br /&gt;
&lt;br /&gt;
* [[Armor Calculation]]&lt;br /&gt;
* [[Client Changes]]&lt;br /&gt;
* [[Common Scripting Misconceptions]]&lt;br /&gt;
* [[Custom Object Properties]]&lt;br /&gt;
* [[Error Codes]]&lt;br /&gt;
* [[Experience System]]&lt;br /&gt;
* [[How Combat Works]]&lt;br /&gt;
* [[Occam's Razor]]&lt;br /&gt;
* [[Optimization|Optimization Theory]]&lt;br /&gt;
* [[Override TAGs]]&lt;br /&gt;
* [[Revisions Changelog]]&lt;br /&gt;
* [[Sendpacket]]&lt;br /&gt;
* [[Skill Gain Theory]]&lt;br /&gt;
* [[The Process of Scripting]]&lt;br /&gt;
* [[Building Component Reference]]&lt;br /&gt;
&lt;br /&gt;
==Credits==&lt;br /&gt;
&lt;br /&gt;
'''Special thanks to:'''&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|XuN, Nolok, Ben, and Drk]], for their hard work on the X branch taking Sphere into the next decade.&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|Ben, Cloud_Br, Ellessar, Jdog, Lord Zerofiz, Mordaunt, Nazghul-ll, RanXerox, Rattlehead, Sandman, Sharlenwar, ShiryuX, thelegbra, Maximus, WarAngel and Valios]], for helping to add content.&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|Daleth]], for writing the Sphere Reference Project, and [[WhoIsWho|Mordaunt]] for converting it to .chm format.&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|Tracker]], for writing the Sphere 56 Tracking Changes in Sphereserver.net&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|Taran]], for writing the original and now famous Sphere Scripting for Dummies tutorials, and [[WhoIsWho|MrSugarCube]] for bringing it up-to-date directly from source.&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|Ben, Khaos, Ranxerox, Shiryux, Furio, Radiant, Vjaka, Nazghul-ll, Ellessar, Torfo, Shadow Dragon, MrSugarCube and coruja747]] for continuing to develop Sphere into a powerful and very customizable Ultima Online emulator.&lt;br /&gt;
&lt;br /&gt;
[[WhoIsWho|Crius]], for providing hosting for the original SphereWiki, and [[WhoIsWho|Torfo]] for providing the current hosting.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.spherecommunity.net/ Official SphereServer Website]&lt;br /&gt;
* [https://forum.spherecommunity.net/sshare.php?srt=4 Nightly builds]&lt;br /&gt;
* [http://nightly.prerelease.sphere.torfo.org/ Nightly builds - OUTDATED, use the link above]&lt;br /&gt;
* [http://spherepack.codeplex.com/ Sphere Community Pack 2.0]&lt;br /&gt;
* [http://uo.torfo.org/packetguide/ Jerrith's UO Packet Guide]&lt;br /&gt;
* [http://uo.torfo.org/packetguideKR/ Wyatt&amp;amp;Kons's UOKR Packet Guide]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Navigation]]&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Useful_Links&amp;diff=7982</id>
		<title>Useful Links</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Useful_Links&amp;diff=7982"/>
				<updated>2022-08-18T15:18:06Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Modern SphereServer Nightly Downloads (Server) https://forum.spherecommunity.net/sshare.php?srt=4&lt;br /&gt;
&lt;br /&gt;
Older/Classic SphereServer downloads (Server) https://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;prj=7&lt;br /&gt;
&lt;br /&gt;
Sphere-X Script Pack (Scripts) https://github.com/cbnolok/SphereX-Scriptpack&lt;br /&gt;
&lt;br /&gt;
Julians Script Vault (Scripts) https://github.com/JulianUO/SphereX-ScriptsVault&lt;br /&gt;
&lt;br /&gt;
List of UO Packets (Info) https://docs.polserver.com/packets/index.php&lt;br /&gt;
&lt;br /&gt;
Ultima Online Downloads (Clients) https://mega.nz/folder/6uYxnIpY#tahGzzz_yOkLgNM1c_DxdQ&lt;br /&gt;
&lt;br /&gt;
Axis 2 Downloads (GM tool) https://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;prj=1 &lt;br /&gt;
&lt;br /&gt;
Leviathan (GM tool) https://github.com/cbnolok/Leviathan/releases/download/v0.4.3/LeviathanWin64-automated-v0.4.3.zip&lt;br /&gt;
&lt;br /&gt;
CentrED (Worldbuilding)  https://uo.wzk.cz/centred/&lt;br /&gt;
&lt;br /&gt;
UO-Pixel (Graphics) http://www.uo-pixel.de/&lt;br /&gt;
&lt;br /&gt;
UO Fiddler ( MUL Viewer) http://uofiddler.polserver.com/&lt;br /&gt;
&lt;br /&gt;
UO Grafiken by Nyray (Graphics) https://nyray.wordpress.com/&lt;br /&gt;
&lt;br /&gt;
Vestimisu (Graphics) http://vestimisu.blogspot.com/&lt;br /&gt;
&lt;br /&gt;
Ultima Online Graphics By Rubra (Graphcs) http://uographicsrubra.blogspot.com/&lt;br /&gt;
&lt;br /&gt;
Isis‘ UO Grafiken (Graphics) https://isispixel.wordpress.com/&lt;br /&gt;
&lt;br /&gt;
ServUO (Graphics) https://www.servuo.com/archive/categories/assets.13/&lt;br /&gt;
&lt;br /&gt;
UOGateway (Shard Listing) https://uogateway.com/&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Useful_Links&amp;diff=7981</id>
		<title>Useful Links</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Useful_Links&amp;diff=7981"/>
				<updated>2022-08-18T15:17:50Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: Created page with &amp;quot;Modern SphereServer Nightly Downloads (Server) https://forum.spherecommunity.net/sshare.php?srt=4 Older/Classic SphereServer downloads (Server) https://forum.spherecommunity.n...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Modern SphereServer Nightly Downloads (Server) https://forum.spherecommunity.net/sshare.php?srt=4&lt;br /&gt;
Older/Classic SphereServer downloads (Server) https://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;prj=7&lt;br /&gt;
Sphere-X Script Pack (Scripts) https://github.com/cbnolok/SphereX-Scriptpack&lt;br /&gt;
Julians Script Vault (Scripts) https://github.com/JulianUO/SphereX-ScriptsVault&lt;br /&gt;
List of UO Packets (Info) https://docs.polserver.com/packets/index.php&lt;br /&gt;
Ultima Online Downloads (Clients) https://mega.nz/folder/6uYxnIpY#tahGzzz_yOkLgNM1c_DxdQ&lt;br /&gt;
Axis 2 Downloads (GM tool) https://forum.spherecommunity.net/sshare.php?srt=4&amp;amp;prj=1 &lt;br /&gt;
Leviathan (GM tool) https://github.com/cbnolok/Leviathan/releases/download/v0.4.3/LeviathanWin64-automated-v0.4.3.zip&lt;br /&gt;
CentrED (Worldbuilding)  https://uo.wzk.cz/centred/&lt;br /&gt;
UO-Pixel (Graphics) http://www.uo-pixel.de/&lt;br /&gt;
UO Fiddler ( MUL Viewer) http://uofiddler.polserver.com/&lt;br /&gt;
UO Grafiken by Nyray (Graphics) https://nyray.wordpress.com/&lt;br /&gt;
Vestimisu (Graphics) http://vestimisu.blogspot.com/&lt;br /&gt;
Ultima Online Graphics By Rubra (Graphcs) http://uographicsrubra.blogspot.com/&lt;br /&gt;
Isis‘ UO Grafiken (Graphics) https://isispixel.wordpress.com/&lt;br /&gt;
ServUO (Graphics) https://www.servuo.com/archive/categories/assets.13/&lt;br /&gt;
UOGateway (Shard Listing) https://uogateway.com/&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7980</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7980"/>
				<updated>2022-08-18T15:16:38Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well worry no more, you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Situations=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions. Each situation will have it's own unique methods to help you use the tools at your disposal to fix the problem, or guide you to finding out more helpful information. &lt;br /&gt;
&lt;br /&gt;
==Problems Understanding A Trigger==&lt;br /&gt;
Uncertain how a trigger works? &lt;br /&gt;
&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the concept of logging out your results to the console for further insight into what objects a trigger is referencing. This can help you make sure that you are referencing the right object in game and that whatever follows will behave as expected. &lt;br /&gt;
&lt;br /&gt;
Let's say you want to use a trigger that will fire when you kill someone, and when you kill that person you want to give the killer some experience points. You need to reference both the person being killed and the person that killed them.&lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]]. One may think that they will use the default object I as the killer and that SRC will be the person being killed. or that ACT would be the person being killed. But it is best not to assume any of these triggers will use any object reference the same as another, or even the same as a similar trigger. The best practice is to take yourself to the Spherewiki (as YOU already have) and pull up the trigger you are looking for under the Reference Compendium &amp;gt; [[Objects]] &amp;gt; [[Characters]], this will give you a very good idea of what references you can make in that trigger. Once you have that information you can begin to see what you are able to work with and how you can work with it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As MalucoBeleza points out, this practice is required to get proper knowledge to work with a trigger&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essential to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
 ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
==Console Errors Regarding Scripts==&lt;br /&gt;
You are getting errors on your console, and it's telling you about a script but you aren't quite sure what to do. Let's see one as an example : &lt;br /&gt;
&lt;br /&gt;
 00:17:ERROR:(i_dye_tubs.scp,52)Range isn't closed by a '}' character.&lt;br /&gt;
&lt;br /&gt;
Okay from this error we can see the filename 'i_dye_tubs' and the line number is 52. The error is that the 'Range isn't closed by a '}' character.' so let's go see what this line looks like and what we the appropriate line fix is: &lt;br /&gt;
&lt;br /&gt;
So here's what line 52 from i_dye_tubs.scp looks like :&lt;br /&gt;
 color={047e 049a&lt;br /&gt;
&lt;br /&gt;
We can see above that its missing a } at the end just like the console error notified us about. The fix is to simply add the missing }.&lt;br /&gt;
&lt;br /&gt;
this is a very elementary example but this explains the process of breaking down a console error. It's always the same for these script errors : &amp;quot;filename, line number, error description&amp;quot;. With large complicated systems paying attention to the exact nature of your console error will guide you towards figuring out how to fix it.&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7979</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7979"/>
				<updated>2022-08-18T14:47:17Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Problems Understanding A Trigger */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well worry no more, you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions&lt;br /&gt;
&lt;br /&gt;
==Problems Understanding A Trigger==&lt;br /&gt;
Uncertain how a trigger works? &lt;br /&gt;
&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the concept of logging out your results to the console for further insight into what objects a trigger is referencing. This can help you make sure that you are referencing the right object in game and that whatever follows will behave as expected. &lt;br /&gt;
&lt;br /&gt;
Let's say you want to use a trigger that will fire when you kill someone, and when you kill that person you want to give the killer some experience points. You need to reference both the person being killed and the person that killed them.&lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]]. One may think that they will use the default object I as the killer and that SRC will be the person being killed. or that ACT would be the person being killed. But it is best not to assume any of these triggers will use any object reference the same as another, or even the same as a similar trigger. The best practice is to take yourself to the Spherewiki (as YOU already have) and pull up the trigger you are looking for under the Reference Compendium &amp;gt; [[Objects]] &amp;gt; [[Characters]], this will give you a very good idea of what references you can make in that trigger. Once you have that information you can begin to see what you are able to work with and how you can work with it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As MalucoBeleza points out, this practice is required to get proper knowledge to work with a trigger&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essential to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
 ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
==Console Errors Regarding Scripts==&lt;br /&gt;
You are getting errors on your console, and it's telling you about a script but you aren't quite sure what to do. Let's see one as an example : &lt;br /&gt;
&lt;br /&gt;
 00:17:ERROR:(i_dye_tubs.scp,52)Range isn't closed by a '}' character.&lt;br /&gt;
&lt;br /&gt;
Okay from this error we can see the filename 'i_dye_tubs' and the line number is 52. The error is that the 'Range isn't closed by a '}' character.' so let's go see what this line looks like and what we the appropriate line fix is: &lt;br /&gt;
&lt;br /&gt;
So here's what line 52 from i_dye_tubs.scp looks like :&lt;br /&gt;
 color={047e 049a&lt;br /&gt;
&lt;br /&gt;
We can see above that its missing a } at the end just like the console error notified us about. The fix is to simply add the missing }.&lt;br /&gt;
&lt;br /&gt;
this is a very elementary example but this explains the process of breaking down a console error. It's always the same for these script errors : &amp;quot;filename, line number, error description&amp;quot;. With large complicated systems paying attention to the exact nature of your console error will guide you towards figuring out how to fix it.&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7978</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7978"/>
				<updated>2022-08-18T14:46:57Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Console Errors Regarding Scripts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well worry no more, you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions&lt;br /&gt;
&lt;br /&gt;
==Problems Understanding A Trigger==&lt;br /&gt;
Uncertain how a trigger works? &lt;br /&gt;
&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the concept of logging out your results to the console for further insight into what objects a trigger is referencing. This can help you make sure that you are referencing the right object in game and that whatever follows will behave as expected. &lt;br /&gt;
&lt;br /&gt;
Let's say you want to use a trigger that will fire when you kill someone, and when you kill that person you want to give the killer some experience points. You need to reference both the person being killed and the person that killed them.&lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]]. One may think that they will use the default object I as the killer and that SRC will be the person being killed. or that ACT would be the person being killed. But it is best not to assume any of these triggers will use any object reference the same as another, or even the same as a similar trigger. The best practice is to take yourself to the Spherewiki (as YOU already have) and pull up the trigger you are looking for under the Reference Compendium &amp;gt; [[Objects]] &amp;gt; [[Characters]], this will give you a very good idea of what references you can make in that trigger. Once you have that information you can begin to see what you are able to work with and how you can work with it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As MalucoBeleza points out, this practice is required to get proper knowledge to work with a trigger&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essential to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
==Console Errors Regarding Scripts==&lt;br /&gt;
You are getting errors on your console, and it's telling you about a script but you aren't quite sure what to do. Let's see one as an example : &lt;br /&gt;
&lt;br /&gt;
 00:17:ERROR:(i_dye_tubs.scp,52)Range isn't closed by a '}' character.&lt;br /&gt;
&lt;br /&gt;
Okay from this error we can see the filename 'i_dye_tubs' and the line number is 52. The error is that the 'Range isn't closed by a '}' character.' so let's go see what this line looks like and what we the appropriate line fix is: &lt;br /&gt;
&lt;br /&gt;
So here's what line 52 from i_dye_tubs.scp looks like :&lt;br /&gt;
 color={047e 049a&lt;br /&gt;
&lt;br /&gt;
We can see above that its missing a } at the end just like the console error notified us about. The fix is to simply add the missing }.&lt;br /&gt;
&lt;br /&gt;
this is a very elementary example but this explains the process of breaking down a console error. It's always the same for these script errors : &amp;quot;filename, line number, error description&amp;quot;. With large complicated systems paying attention to the exact nature of your console error will guide you towards figuring out how to fix it.&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7977</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7977"/>
				<updated>2022-08-18T14:46:32Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Console Errors Regarding Scripts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well worry no more, you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions&lt;br /&gt;
&lt;br /&gt;
==Problems Understanding A Trigger==&lt;br /&gt;
Uncertain how a trigger works? &lt;br /&gt;
&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the concept of logging out your results to the console for further insight into what objects a trigger is referencing. This can help you make sure that you are referencing the right object in game and that whatever follows will behave as expected. &lt;br /&gt;
&lt;br /&gt;
Let's say you want to use a trigger that will fire when you kill someone, and when you kill that person you want to give the killer some experience points. You need to reference both the person being killed and the person that killed them.&lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]]. One may think that they will use the default object I as the killer and that SRC will be the person being killed. or that ACT would be the person being killed. But it is best not to assume any of these triggers will use any object reference the same as another, or even the same as a similar trigger. The best practice is to take yourself to the Spherewiki (as YOU already have) and pull up the trigger you are looking for under the Reference Compendium &amp;gt; [[Objects]] &amp;gt; [[Characters]], this will give you a very good idea of what references you can make in that trigger. Once you have that information you can begin to see what you are able to work with and how you can work with it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As MalucoBeleza points out, this practice is required to get proper knowledge to work with a trigger&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essential to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
==Console Errors Regarding Scripts==&lt;br /&gt;
You are getting errors on your console, and it's telling you about a script but you aren't quite sure what to do. Let's see one as an example : &lt;br /&gt;
&lt;br /&gt;
 00:17:ERROR:(i_dye_tubs.scp,52)Range isn't closed by a '}' character.&lt;br /&gt;
&lt;br /&gt;
Okay from this error we can see the filename 'i_dye_tubs' and the line number is 52. The error is that the 'Range isn't closed by a '}' character.' so let's go see what this line looks like and what we the appropriate line fix is: &lt;br /&gt;
&lt;br /&gt;
So here's what line 52 from i_dye_tubs.scp looks like : color={047e 049a&lt;br /&gt;
&lt;br /&gt;
We can see above that its missing a } at the end just like the console error notified us about. The fix is to simply add the missing }.&lt;br /&gt;
&lt;br /&gt;
this is a very elementary example but this explains the process of breaking down a console error. It's always the same for these script errors : &amp;quot;filename, line number, error description&amp;quot;. With large complicated systems paying attention to the exact nature of your console error will guide you towards figuring out how to fix it.&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7976</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7976"/>
				<updated>2022-08-18T14:46:23Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Console Errors Regarding Scripts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well worry no more, you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions&lt;br /&gt;
&lt;br /&gt;
==Problems Understanding A Trigger==&lt;br /&gt;
Uncertain how a trigger works? &lt;br /&gt;
&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the concept of logging out your results to the console for further insight into what objects a trigger is referencing. This can help you make sure that you are referencing the right object in game and that whatever follows will behave as expected. &lt;br /&gt;
&lt;br /&gt;
Let's say you want to use a trigger that will fire when you kill someone, and when you kill that person you want to give the killer some experience points. You need to reference both the person being killed and the person that killed them.&lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]]. One may think that they will use the default object I as the killer and that SRC will be the person being killed. or that ACT would be the person being killed. But it is best not to assume any of these triggers will use any object reference the same as another, or even the same as a similar trigger. The best practice is to take yourself to the Spherewiki (as YOU already have) and pull up the trigger you are looking for under the Reference Compendium &amp;gt; [[Objects]] &amp;gt; [[Characters]], this will give you a very good idea of what references you can make in that trigger. Once you have that information you can begin to see what you are able to work with and how you can work with it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As MalucoBeleza points out, this practice is required to get proper knowledge to work with a trigger&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essential to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
==Console Errors Regarding Scripts==&lt;br /&gt;
You are getting errors on your console, and it's telling you about a script but you aren't quite sure what to do. Let's see one as an example : &lt;br /&gt;
&lt;br /&gt;
00:17:ERROR:(i_dye_tubs.scp,52)Range isn't closed by a '}' character.&lt;br /&gt;
&lt;br /&gt;
Okay from this error we can see the filename 'i_dye_tubs' and the line number is 52. The error is that the 'Range isn't closed by a '}' character.' so let's go see what this line looks like and what we the appropriate line fix is: &lt;br /&gt;
&lt;br /&gt;
So here's what line 52 from i_dye_tubs.scp looks like : color={047e 049a&lt;br /&gt;
&lt;br /&gt;
We can see above that its missing a } at the end just like the console error notified us about. The fix is to simply add the missing }.&lt;br /&gt;
&lt;br /&gt;
this is a very elementary example but this explains the process of breaking down a console error. It's always the same for these script errors : &amp;quot;filename, line number, error description&amp;quot;. With large complicated systems paying attention to the exact nature of your console error will guide you towards figuring out how to fix it.&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7975</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7975"/>
				<updated>2022-08-18T14:46:12Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Console Errors Regarding Scripts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well worry no more, you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions&lt;br /&gt;
&lt;br /&gt;
==Problems Understanding A Trigger==&lt;br /&gt;
Uncertain how a trigger works? &lt;br /&gt;
&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the concept of logging out your results to the console for further insight into what objects a trigger is referencing. This can help you make sure that you are referencing the right object in game and that whatever follows will behave as expected. &lt;br /&gt;
&lt;br /&gt;
Let's say you want to use a trigger that will fire when you kill someone, and when you kill that person you want to give the killer some experience points. You need to reference both the person being killed and the person that killed them.&lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]]. One may think that they will use the default object I as the killer and that SRC will be the person being killed. or that ACT would be the person being killed. But it is best not to assume any of these triggers will use any object reference the same as another, or even the same as a similar trigger. The best practice is to take yourself to the Spherewiki (as YOU already have) and pull up the trigger you are looking for under the Reference Compendium &amp;gt; [[Objects]] &amp;gt; [[Characters]], this will give you a very good idea of what references you can make in that trigger. Once you have that information you can begin to see what you are able to work with and how you can work with it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As MalucoBeleza points out, this practice is required to get proper knowledge to work with a trigger&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essential to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
==Console Errors Regarding Scripts==&lt;br /&gt;
You are getting errors on your console, and it's telling you about a script but you aren't quite sure what to do. Let's see one as an example : &lt;br /&gt;
&lt;br /&gt;
00:17:ERROR:(i_dye_tubs.scp,52)Range isn't closed by a '}' character.&lt;br /&gt;
&lt;br /&gt;
Okay from this error we can see the filename 'i_dye_tubs' and the line number is 52. The error is that the 'Range isn't closed by a '}' character.' so let's go see what this line looks like and what we the appropriate line fix is: &lt;br /&gt;
&lt;br /&gt;
So here's what line 52 from i_dye_tubs.scp looks like : color={047e 049a&lt;br /&gt;
&lt;br /&gt;
We can see above that its missing a } at the end just like the console error notified us about. The fix is to simply add the missing }.&lt;br /&gt;
&lt;br /&gt;
 this is a very elementary example but this explains the process of breaking down a console error. It's always the same for these script errors : &amp;quot;filename, line number, error description&amp;quot;. With large complicated systems paying attention to the exact nature of your console error will guide you towards figuring out how to fix it.&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7974</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7974"/>
				<updated>2022-08-18T14:45:41Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Console Errors Regarding Scripts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well worry no more, you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions&lt;br /&gt;
&lt;br /&gt;
==Problems Understanding A Trigger==&lt;br /&gt;
Uncertain how a trigger works? &lt;br /&gt;
&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the concept of logging out your results to the console for further insight into what objects a trigger is referencing. This can help you make sure that you are referencing the right object in game and that whatever follows will behave as expected. &lt;br /&gt;
&lt;br /&gt;
Let's say you want to use a trigger that will fire when you kill someone, and when you kill that person you want to give the killer some experience points. You need to reference both the person being killed and the person that killed them.&lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]]. One may think that they will use the default object I as the killer and that SRC will be the person being killed. or that ACT would be the person being killed. But it is best not to assume any of these triggers will use any object reference the same as another, or even the same as a similar trigger. The best practice is to take yourself to the Spherewiki (as YOU already have) and pull up the trigger you are looking for under the Reference Compendium &amp;gt; [[Objects]] &amp;gt; [[Characters]], this will give you a very good idea of what references you can make in that trigger. Once you have that information you can begin to see what you are able to work with and how you can work with it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As MalucoBeleza points out, this practice is required to get proper knowledge to work with a trigger&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essential to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
==Console Errors Regarding Scripts==&lt;br /&gt;
You are getting errors on your console, and it's telling you about a script but you aren't quite sure what to do. Let's see one as an example : &lt;br /&gt;
&lt;br /&gt;
00:17:ERROR:(i_dye_tubs.scp,52)Range isn't closed by a '}' character.&lt;br /&gt;
&lt;br /&gt;
Okay from this error we can see the filename 'i_dye_tubs' and the line number is 52. The error is that the 'Range isn't closed by a '}' character.' so let's go see what this line looks like and what we the appropriate line fix is: &lt;br /&gt;
&lt;br /&gt;
So here's what line 52 from i_dye_tubs.scp looks like : color={047e 049a&lt;br /&gt;
&lt;br /&gt;
We can see above that its missing a } at the end just like the console error notified us about. this is a very elementary example but this explains the process of breaking down a console error. It's always the same for these script errors : &amp;quot;filename, line number, error description&amp;quot;. With large complicated systems paying attention to the exact nature of your console error will guide you towards figuring out how to fix it.&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7973</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7973"/>
				<updated>2022-08-18T14:42:03Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Console Errors Regarding Scripts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well worry no more, you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions&lt;br /&gt;
&lt;br /&gt;
==Problems Understanding A Trigger==&lt;br /&gt;
Uncertain how a trigger works? &lt;br /&gt;
&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the concept of logging out your results to the console for further insight into what objects a trigger is referencing. This can help you make sure that you are referencing the right object in game and that whatever follows will behave as expected. &lt;br /&gt;
&lt;br /&gt;
Let's say you want to use a trigger that will fire when you kill someone, and when you kill that person you want to give the killer some experience points. You need to reference both the person being killed and the person that killed them.&lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]]. One may think that they will use the default object I as the killer and that SRC will be the person being killed. or that ACT would be the person being killed. But it is best not to assume any of these triggers will use any object reference the same as another, or even the same as a similar trigger. The best practice is to take yourself to the Spherewiki (as YOU already have) and pull up the trigger you are looking for under the Reference Compendium &amp;gt; [[Objects]] &amp;gt; [[Characters]], this will give you a very good idea of what references you can make in that trigger. Once you have that information you can begin to see what you are able to work with and how you can work with it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As MalucoBeleza points out, this practice is required to get proper knowledge to work with a trigger&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essential to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
==Console Errors Regarding Scripts==&lt;br /&gt;
You are getting errors on your console, and it's telling you about a script but you aren't quite sure what to do. Let's see one as an example : &lt;br /&gt;
&lt;br /&gt;
00:17:ERROR:(i_dye_tubs.scp,52)Range isn't closed by a '}' character.&lt;br /&gt;
&lt;br /&gt;
Okay from this error we can see the filename 'i_dye_tubs' and the line number is 52. The error is that the 'Range isn't closed by a '}' character.' so let's go see what this line looks like and what we the appropriate line fix is: &lt;br /&gt;
&lt;br /&gt;
So here's what the line looks like : color={047e 049a&lt;br /&gt;
&lt;br /&gt;
We can see above that its missing a } at the end just like the console error notified us about. this is a very elementary example but this explains the process of breaking down a console error. It's always the same for these script errors : &amp;quot;filename, line number, error description&amp;quot;. With large complicated systems paying attention to the exact nature of your console error will guide you towards figuring out how to fix it.&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7972</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7972"/>
				<updated>2022-08-18T14:41:25Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Console Errors Regarding Scripts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well worry no more, you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions&lt;br /&gt;
&lt;br /&gt;
==Problems Understanding A Trigger==&lt;br /&gt;
Uncertain how a trigger works? &lt;br /&gt;
&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the concept of logging out your results to the console for further insight into what objects a trigger is referencing. This can help you make sure that you are referencing the right object in game and that whatever follows will behave as expected. &lt;br /&gt;
&lt;br /&gt;
Let's say you want to use a trigger that will fire when you kill someone, and when you kill that person you want to give the killer some experience points. You need to reference both the person being killed and the person that killed them.&lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]]. One may think that they will use the default object I as the killer and that SRC will be the person being killed. or that ACT would be the person being killed. But it is best not to assume any of these triggers will use any object reference the same as another, or even the same as a similar trigger. The best practice is to take yourself to the Spherewiki (as YOU already have) and pull up the trigger you are looking for under the Reference Compendium &amp;gt; [[Objects]] &amp;gt; [[Characters]], this will give you a very good idea of what references you can make in that trigger. Once you have that information you can begin to see what you are able to work with and how you can work with it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As MalucoBeleza points out, this practice is required to get proper knowledge to work with a trigger&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essential to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
==Console Errors Regarding Scripts==&lt;br /&gt;
You are getting errors on your console, and it's telling you about a script but you aren't quite sure what to do. Let's see one as an example : &lt;br /&gt;
&lt;br /&gt;
00:17:ERROR:(i_dye_tubs.scp,52)Range isn't closed by a '}' character.&lt;br /&gt;
&lt;br /&gt;
Okay from this error we can see the filename 'i_dye_tubs' and the line number is 52. The error is that the 'Range isn't closed by a '}' character.' so let's go see what this line looks like and what we the appropriate line fix is: &lt;br /&gt;
&lt;br /&gt;
So here's what the line looks like : color={047e 049a&lt;br /&gt;
&lt;br /&gt;
We can see above that its missing a } at the end just like the console error notified us about. this is a very elementary example but this explains the process of breaking down a console error. It's always the same for these script errors : &amp;quot;filename, line number, error description&amp;quot;. With large complicated systems paying attention to the exact nature of your console error will guide to figuring out how to start fixing any problem that might arise.&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7971</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7971"/>
				<updated>2022-08-18T14:40:58Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Console Errors Regarding Scripts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well worry no more, you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions&lt;br /&gt;
&lt;br /&gt;
==Problems Understanding A Trigger==&lt;br /&gt;
Uncertain how a trigger works? &lt;br /&gt;
&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the concept of logging out your results to the console for further insight into what objects a trigger is referencing. This can help you make sure that you are referencing the right object in game and that whatever follows will behave as expected. &lt;br /&gt;
&lt;br /&gt;
Let's say you want to use a trigger that will fire when you kill someone, and when you kill that person you want to give the killer some experience points. You need to reference both the person being killed and the person that killed them.&lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]]. One may think that they will use the default object I as the killer and that SRC will be the person being killed. or that ACT would be the person being killed. But it is best not to assume any of these triggers will use any object reference the same as another, or even the same as a similar trigger. The best practice is to take yourself to the Spherewiki (as YOU already have) and pull up the trigger you are looking for under the Reference Compendium &amp;gt; [[Objects]] &amp;gt; [[Characters]], this will give you a very good idea of what references you can make in that trigger. Once you have that information you can begin to see what you are able to work with and how you can work with it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As MalucoBeleza points out, this practice is required to get proper knowledge to work with a trigger&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essential to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
==Console Errors Regarding Scripts==&lt;br /&gt;
You are getting errors on your console, and it's telling you about a script but you aren't quite sure what to do. Let's see one as an example : &lt;br /&gt;
&lt;br /&gt;
00:17:ERROR:(i_dye_tubs.scp,52)Range isn't closed by a '}' character.&lt;br /&gt;
&lt;br /&gt;
Okay from this error we can see the filename 'i_dye_tubs' and the line number is 52. The error is that the 'Range isn't closed by a '}' character.' so let's go see what this line looks like and what we the appropriate line fix is: &lt;br /&gt;
&lt;br /&gt;
So here's what the line looks like : color={047e 049a&lt;br /&gt;
&lt;br /&gt;
We can see above that its missing a } at the end just like the console error notified us about. this is a very elementary example but this explains the process of breaking down a console error. It's always the same for these script errors : &amp;quot;filename, line number, error description&amp;quot; With large complicated systems paying attention to the exact nature of your console error will guide you well into figuring out how to start fixing any problem that might arise.&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7970</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7970"/>
				<updated>2022-08-18T14:39:31Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Console Errors Regarding Scripts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well worry no more, you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions&lt;br /&gt;
&lt;br /&gt;
==Problems Understanding A Trigger==&lt;br /&gt;
Uncertain how a trigger works? &lt;br /&gt;
&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the concept of logging out your results to the console for further insight into what objects a trigger is referencing. This can help you make sure that you are referencing the right object in game and that whatever follows will behave as expected. &lt;br /&gt;
&lt;br /&gt;
Let's say you want to use a trigger that will fire when you kill someone, and when you kill that person you want to give the killer some experience points. You need to reference both the person being killed and the person that killed them.&lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]]. One may think that they will use the default object I as the killer and that SRC will be the person being killed. or that ACT would be the person being killed. But it is best not to assume any of these triggers will use any object reference the same as another, or even the same as a similar trigger. The best practice is to take yourself to the Spherewiki (as YOU already have) and pull up the trigger you are looking for under the Reference Compendium &amp;gt; [[Objects]] &amp;gt; [[Characters]], this will give you a very good idea of what references you can make in that trigger. Once you have that information you can begin to see what you are able to work with and how you can work with it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As MalucoBeleza points out, this practice is required to get proper knowledge to work with a trigger&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essential to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
==Console Errors Regarding Scripts==&lt;br /&gt;
You are getting errors on your console, and it's telling you about a script but you aren't quite sure what to do. Let's see one as an example : &lt;br /&gt;
&lt;br /&gt;
00:17:ERROR:(i_dye_tubs.scp,52)Range isn't closed by a '}' character.&lt;br /&gt;
&lt;br /&gt;
Okay from this error we can see the filename 'i_dye_tubs' and the line number is 52. The error is that the 'Range isn't closed by a '}' character.' so let's go see what this line looks like and what we the appropriate line fix is: &lt;br /&gt;
&lt;br /&gt;
So here's what the line looks like : color={047e 049a&lt;br /&gt;
&lt;br /&gt;
We can see above that its missing a } at the end just like the console error notified us about. this is a very elementary example but this explains the process of breaking down a console error. It's always the same for these script errors : &amp;quot;filename, line number, error description&amp;quot;&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7969</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7969"/>
				<updated>2022-08-18T14:37:55Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Example 1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well worry no more, you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions&lt;br /&gt;
&lt;br /&gt;
==Problems Understanding A Trigger==&lt;br /&gt;
Uncertain how a trigger works? &lt;br /&gt;
&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the concept of logging out your results to the console for further insight into what objects a trigger is referencing. This can help you make sure that you are referencing the right object in game and that whatever follows will behave as expected. &lt;br /&gt;
&lt;br /&gt;
Let's say you want to use a trigger that will fire when you kill someone, and when you kill that person you want to give the killer some experience points. You need to reference both the person being killed and the person that killed them.&lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]]. One may think that they will use the default object I as the killer and that SRC will be the person being killed. or that ACT would be the person being killed. But it is best not to assume any of these triggers will use any object reference the same as another, or even the same as a similar trigger. The best practice is to take yourself to the Spherewiki (as YOU already have) and pull up the trigger you are looking for under the Reference Compendium &amp;gt; [[Objects]] &amp;gt; [[Characters]], this will give you a very good idea of what references you can make in that trigger. Once you have that information you can begin to see what you are able to work with and how you can work with it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As MalucoBeleza points out, this practice is required to get proper knowledge to work with a trigger&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essential to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
==Console Errors Regarding Scripts==&lt;br /&gt;
You are getting errors on your console, and it's telling you about a script but you aren't quite sure what to do. Let's see one as an example : &lt;br /&gt;
&lt;br /&gt;
00:17:ERROR:(i_dye_tubs.scp,52)Range isn't closed by a '}' character.&lt;br /&gt;
&lt;br /&gt;
Okay from this error we can see the filename 'i_dye_tubs' and the line number is 52. The error is that the 'range is not closed with the } character' so let's go see what this line looks like and what we the appropriate line fix is: &lt;br /&gt;
&lt;br /&gt;
So here's what the line looks like : color={047e 049a&lt;br /&gt;
&lt;br /&gt;
We can see above that its missing a } at the end just like the console error notified us about. this is a very elementary example but this explains the process of breaking down a console error. It's always the same for these script errors : &amp;quot;filename, line number, error description&amp;quot;&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7968</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7968"/>
				<updated>2022-08-18T14:37:14Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Example 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well worry no more, you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions&lt;br /&gt;
&lt;br /&gt;
==Example 1==&lt;br /&gt;
Uncertain how a trigger works? &lt;br /&gt;
&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the concept of logging out your results to the console for further insight into what objects a trigger is referencing. This can help you make sure that you are referencing the right object in game and that whatever follows will behave as expected. &lt;br /&gt;
&lt;br /&gt;
Let's say you want to use a trigger that will fire when you kill someone, and when you kill that person you want to give the killer some experience points. You need to reference both the person being killed and the person that killed them.&lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]]. One may think that they will use the default object I as the killer and that SRC will be the person being killed. or that ACT would be the person being killed. But it is best not to assume any of these triggers will use any object reference the same as another, or even the same as a similar trigger. The best practice is to take yourself to the Spherewiki (as YOU already have) and pull up the trigger you are looking for under the Reference Compendium &amp;gt; [[Objects]] &amp;gt; [[Characters]], this will give you a very good idea of what references you can make in that trigger. Once you have that information you can begin to see what you are able to work with and how you can work with it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As MalucoBeleza points out, this practice is required to get proper knowledge to work with a trigger&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essential to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Console Errors Regarding Scripts==&lt;br /&gt;
You are getting errors on your console, and it's telling you about a script but you aren't quite sure what to do. Let's see one as an example : &lt;br /&gt;
&lt;br /&gt;
00:17:ERROR:(i_dye_tubs.scp,52)Range isn't closed by a '}' character.&lt;br /&gt;
&lt;br /&gt;
Okay from this error we can see the filename 'i_dye_tubs' and the line number is 52. The error is that the 'range is not closed with the } character' so let's go see what this line looks like and what we the appropriate line fix is: &lt;br /&gt;
&lt;br /&gt;
So here's what the line looks like : color={047e 049a&lt;br /&gt;
&lt;br /&gt;
We can see above that its missing a } at the end just like the console error notified us about. this is a very elementary example but this explains the process of breaking down a console error. It's always the same for these script errors : &amp;quot;filename, line number, error description&amp;quot;&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7967</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7967"/>
				<updated>2022-08-18T14:36:56Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Example 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well worry no more, you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions&lt;br /&gt;
&lt;br /&gt;
==Example 1==&lt;br /&gt;
Uncertain how a trigger works? &lt;br /&gt;
&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the concept of logging out your results to the console for further insight into what objects a trigger is referencing. This can help you make sure that you are referencing the right object in game and that whatever follows will behave as expected. &lt;br /&gt;
&lt;br /&gt;
Let's say you want to use a trigger that will fire when you kill someone, and when you kill that person you want to give the killer some experience points. You need to reference both the person being killed and the person that killed them.&lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]]. One may think that they will use the default object I as the killer and that SRC will be the person being killed. or that ACT would be the person being killed. But it is best not to assume any of these triggers will use any object reference the same as another, or even the same as a similar trigger. The best practice is to take yourself to the Spherewiki (as YOU already have) and pull up the trigger you are looking for under the Reference Compendium &amp;gt; [[Objects]] &amp;gt; [[Characters]], this will give you a very good idea of what references you can make in that trigger. Once you have that information you can begin to see what you are able to work with and how you can work with it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As MalucoBeleza points out, this practice is required to get proper knowledge to work with a trigger&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essential to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Example 2==&lt;br /&gt;
You are getting errors on your console, and it's telling you about a script but you aren't quite sure what to do. Let's see one as an example : &lt;br /&gt;
&lt;br /&gt;
00:17:ERROR:(i_dye_tubs.scp,52)Range isn't closed by a '}' character.&lt;br /&gt;
&lt;br /&gt;
Okay from this error we can see the filename 'i_dye_tubs' and the line number is 52. The error is that the 'range is not closed with the } character' so let's go see what this line looks like and what we the appropriate line fix is: &lt;br /&gt;
&lt;br /&gt;
So here's what the line looks like : color={047e 049a&lt;br /&gt;
&lt;br /&gt;
We can see above that its missing a } at the end just like the console error notified us about. this is a very elementary example but this explains the process of breaking down a console error. It's always the same for these script errors : &amp;quot;filename, line number, error description&amp;quot;&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7966</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7966"/>
				<updated>2022-08-18T14:31:41Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well worry no more, you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions&lt;br /&gt;
&lt;br /&gt;
==Example 1==&lt;br /&gt;
Uncertain how a trigger works? &lt;br /&gt;
&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the concept of logging out your results to the console for further insight into what objects a trigger is referencing. This can help you make sure that you are referencing the right object in game and that whatever follows will behave as expected. &lt;br /&gt;
&lt;br /&gt;
Let's say you want to use a trigger that will fire when you kill someone, and when you kill that person you want to give the killer some experience points. You need to reference both the person being killed and the person that killed them.&lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]]. One may think that they will use the default object I as the killer and that SRC will be the person being killed. or that ACT would be the person being killed. But it is best not to assume any of these triggers will use any object reference the same as another, or even the same as a similar trigger. The best practice is to take yourself to the Spherewiki (as YOU already have) and pull up the trigger you are looking for under the Reference Compendium &amp;gt; [[Objects]] &amp;gt; [[Characters]], this will give you a very good idea of what references you can make in that trigger. Once you have that information you can begin to see what you are able to work with and how you can work with it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As MalucoBeleza points out, this practice is required to get proper knowledge to work with a trigger&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essential to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Example 2==&lt;br /&gt;
You are getting errors on your console, and it's telling you about a script but you aren't quite sure what to do. Let's see one as an example : &lt;br /&gt;
&lt;br /&gt;
00:17:ERROR:(i_dye_tubs.scp,52)Range isn't closed by a '}' character.&lt;br /&gt;
&lt;br /&gt;
Okay from this error we can see the filename 'i_dye_tubs' and the line number is 52. The error is that the 'range is not closed with the } character' so let's go see what this line looks like and what we the appropriate line fix is: &lt;br /&gt;
&lt;br /&gt;
So here's what the line looks like : color={047e 049a&lt;br /&gt;
&lt;br /&gt;
We can see above that its missing a } at the end just like the console error notified us about.&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7965</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7965"/>
				<updated>2022-08-18T14:23:34Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well worry no more, you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions&lt;br /&gt;
&lt;br /&gt;
==Example 1==&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the concept of logging out your results to the console for further insight into what objects a trigger is referencing. This can help you make sure that you are referencing the right object in game and that whatever follows will behave as expected. &lt;br /&gt;
&lt;br /&gt;
Let's say you want to use a trigger that will fire when you kill someone, and when you kill that person you want to give the killer some experience points. You need to reference both the person being killed and the person that killed them.&lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]]. One may think that they will use the default object I as the killer and that SRC will be the person being killed. or that ACT would be the person being killed. But it is best not to assume any of these triggers will use any object reference the same as another, or even the same as a similar trigger. The best practice is to take yourself to the Spherewiki (as YOU already have) and pull up the trigger you are looking for under the Reference Compendium &amp;gt; [[Objects]] &amp;gt; [[Characters]], this will give you a very good idea of what references you can make in that trigger. Once you have that information you can begin to see what you are able to work with and how you can work with it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As MalucoBeleza points out, this practice is required to get proper knowledge to work with a trigger&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essential to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7964</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7964"/>
				<updated>2022-08-18T14:23:08Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Example 1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions&lt;br /&gt;
&lt;br /&gt;
==Example 1==&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the concept of logging out your results to the console for further insight into what objects a trigger is referencing. This can help you make sure that you are referencing the right object in game and that whatever follows will behave as expected. &lt;br /&gt;
&lt;br /&gt;
Let's say you want to use a trigger that will fire when you kill someone, and when you kill that person you want to give the killer some experience points. You need to reference both the person being killed and the person that killed them.&lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]]. One may think that they will use the default object I as the killer and that SRC will be the person being killed. or that ACT would be the person being killed. But it is best not to assume any of these triggers will use any object reference the same as another, or even the same as a similar trigger. The best practice is to take yourself to the Spherewiki (as YOU already have) and pull up the trigger you are looking for under the Reference Compendium &amp;gt; [[Objects]] &amp;gt; [[Characters]], this will give you a very good idea of what references you can make in that trigger. Once you have that information you can begin to see what you are able to work with and how you can work with it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As MalucoBeleza points out, this practice is required to get proper knowledge to work with a trigger&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essential to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7963</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7963"/>
				<updated>2022-08-18T14:22:05Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Example 1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions&lt;br /&gt;
&lt;br /&gt;
==Example 1==&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the concept of logging out your results to the console for further insight into what objects a trigger is referencing. This can help you make sure that you are referencing the right object in game and that whatever follows will behave as expected. &lt;br /&gt;
&lt;br /&gt;
Let's say you want to use a trigger that will fire when you kill someone, and when you kill that person you want to give the killer some experience points. You need to reference both the person being killed and the person that killed them.&lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]]. One may think that they will use the default object I as the killer and that SRC will be the person being killed. or that ACT would be the person being killed. But it is best not to assume any of these triggers will use any object reference the same as another, or even the same as a similar trigger. The best practice is to take yourself to the Spherewiki (as YOU already have) and pull up the trigger you are looking for under the Reference Compendium &amp;gt; [[Objects]] &amp;gt; [[Characters]], this will give you a very good idea of what references you can make in that trigger. Once you have that information you can begin to see what you are able to work with and how you can work with it. &lt;br /&gt;
&lt;br /&gt;
Wise words from MalucoBeleza : &lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essencial to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7962</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7962"/>
				<updated>2022-08-18T14:21:38Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Example 1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions&lt;br /&gt;
&lt;br /&gt;
==Example 1==&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the concept of logging out your results to the console for further insight into what objects a trigger is referencing. This can help you make sure that you are referencing the right object in game and that whatever follows will behave as expected. &lt;br /&gt;
&lt;br /&gt;
Let's say you want to use a trigger that will fire when you kill someone, and when you kill that person you want to give the killer some experience points. You need to reference both the person being killed and the person that killed them.&lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]]. One may think that they will use the default object I as the killer and that SRC will be the person being killed. or that ACT would be the person being killed. But it is best not to assume any of these triggers will use any object reference the same as another, or even the same as a similar trigger. The best practice is to take yourself to the Spherewiki (as YOU already have) and pull up the trigger you are looking for under the Reference Compendium &amp;gt; Objects &amp;gt; Characters, this will give you a very good idea of what references you can make in that trigger. Once you have that information you can begin to see what you are able to work with and how you can work with it. &lt;br /&gt;
&lt;br /&gt;
Wise words from MalucoBeleza : &lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essencial to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7961</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7961"/>
				<updated>2022-08-18T14:16:10Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions&lt;br /&gt;
&lt;br /&gt;
==Example 1==&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the concept of logging out your results to the console for further insight into what objects a trigger is referencing. This can help you make sure that you are referencing the right object in game and that whatever follows will behave as expected. &lt;br /&gt;
&lt;br /&gt;
Let's say you want to use a trigger that will fire when you kill someone, and when you kill that person you want to give the killer some experience points. You need to reference both the person being killed and the person that killed them.&lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]]. One may think that they will use the default object as the killer and that SRC will be the person being killed&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I.SAY My name is &amp;lt;I.NAME&amp;gt;!&lt;br /&gt;
&lt;br /&gt;
SRC.SAY My name is &amp;lt;SRC.NAME&amp;gt;!&lt;br /&gt;
&lt;br /&gt;
SAY My name is &amp;lt;NAME&amp;gt;!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essencial to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7960</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7960"/>
				<updated>2022-08-18T14:12:37Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions&lt;br /&gt;
&lt;br /&gt;
==Example 1==&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the concept of logging out your results to the console for further insight into what objects a trigger is referencing. This can help you make sure that you are referencing the right object in game and that whatever follows will behave as expected. &lt;br /&gt;
&lt;br /&gt;
Let's say you want to use a trigger that will fire when you kill someone, and when you kill that person you want to give the killer some experience points. You need to reference both the person being killed and the person that killed them.&lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I.SAY My name is &amp;lt;I.NAME&amp;gt;!&lt;br /&gt;
&lt;br /&gt;
SRC.SAY My name is &amp;lt;SRC.NAME&amp;gt;!&lt;br /&gt;
&lt;br /&gt;
SAY My name is &amp;lt;NAME&amp;gt;!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essencial to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7959</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7959"/>
				<updated>2022-08-18T14:10:05Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions&lt;br /&gt;
&lt;br /&gt;
==Example 1==&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the kind concept of logging out your results to the console for further insight into what objects a trigger is referencing &lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I.SAY My name is &amp;lt;I.NAME&amp;gt;!&lt;br /&gt;
&lt;br /&gt;
SRC.SAY My name is &amp;lt;SRC.NAME&amp;gt;!&lt;br /&gt;
&lt;br /&gt;
SAY My name is &amp;lt;NAME&amp;gt;!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essencial to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7958</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7958"/>
				<updated>2022-08-18T14:09:55Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions&lt;br /&gt;
&lt;br /&gt;
==Example 1==&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the kind concept of logging out your results to the console for further insight into what objects a trigger is referencing &lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]] &lt;br /&gt;
&lt;br /&gt;
I.SAY My name is &amp;lt;I.NAME&amp;gt;!&lt;br /&gt;
&lt;br /&gt;
SRC.SAY My name is &amp;lt;SRC.NAME&amp;gt;!&lt;br /&gt;
&lt;br /&gt;
SAY My name is &amp;lt;NAME&amp;gt;!&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essencial to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7957</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7957"/>
				<updated>2022-08-18T14:09:48Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions&lt;br /&gt;
&lt;br /&gt;
==Example 1==&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the kind concept of logging out your results to the console for further insight into what objects a trigger is referencing &lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]] &lt;br /&gt;
&lt;br /&gt;
I.SAY My name is &amp;lt;I.NAME&amp;gt;!&lt;br /&gt;
SRC.SAY My name is &amp;lt;SRC.NAME&amp;gt;!&lt;br /&gt;
SAY My name is &amp;lt;NAME&amp;gt;!&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essencial to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7956</id>
		<title>Script Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Script_Debugging&amp;diff=7956"/>
				<updated>2022-08-18T14:09:36Z</updated>
		
		<summary type="html">&lt;p&gt;Soulless: /* Example 1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well you're about to help yourself! Let's talk about debugging your script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions&lt;br /&gt;
&lt;br /&gt;
==Example 1==&lt;br /&gt;
This is a great example from MalucoBeleza that illustrates the kind concept of logging out your results to the console for further insight into what objects a trigger is referencing &lt;br /&gt;
&lt;br /&gt;
The trigger in this example is [[@Kill]] || Fires when the character kills another character.&lt;br /&gt;
&lt;br /&gt;
I.SAY My name is &amp;lt;I.NAME&amp;gt;!&lt;br /&gt;
SRC.SAY My name is &amp;lt;SRC.NAME&amp;gt;!&lt;br /&gt;
SAY My name is &amp;lt;NAME&amp;gt;!&lt;br /&gt;
&lt;br /&gt;
When dealing with a trigger that is new to you... its essencial to check the wiki and do tests like this:&lt;br /&gt;
&lt;br /&gt;
ON=@Kill&lt;br /&gt;
  SERV.LOG NAME: &amp;lt;NAME&amp;gt;&lt;br /&gt;
  SERV.LOG I.NAME: &amp;lt;I.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG SRC.NAME: &amp;lt;SRC.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG ARGO.NAME: &amp;lt;ARGO.NAME&amp;gt;&lt;br /&gt;
  SERV.LOG &amp;lt;NAME&amp;gt; (&amp;lt;UID&amp;gt;) HAVE JUST KILLED &amp;lt;ARGO.NAME&amp;gt; (&amp;lt;ARGO&amp;gt;)&lt;/div&gt;</summary>
		<author><name>Soulless</name></author>	</entry>

	</feed>