<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wiki.herc.ws/w/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.herc.ws/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Haru</id>
		<title>Hercules Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.herc.ws/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Haru"/>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Special:Contributions/Haru"/>
		<updated>2026-05-04T05:46:44Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.21.11</generator>

	<entry>
		<id>https://wiki.herc.ws/wiki/Generate_HPM_Hook_with_HPMHookGen.pl</id>
		<title>Generate HPM Hook with HPMHookGen.pl</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Generate_HPM_Hook_with_HPMHookGen.pl"/>
				<updated>2016-09-16T18:59:11Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: Marked as outdated. The correct way to do this is to use the Makefile (make hooks).&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{outdated}}&lt;br /&gt;
&lt;br /&gt;
== Generate HPM Hook on windows. ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First you need to download and install Doxygen and Perl.&lt;br /&gt;
&lt;br /&gt;
Doxygen: http://www.stack.nl/~dimitri/doxygen/download.html&lt;br /&gt;
&lt;br /&gt;
Perl: http://www.activestate.com/activeperl/downloads&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Run &amp;quot;Doxygen GUI frontend&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2. Click on &amp;quot;File&amp;quot; -&amp;gt; &amp;quot;Open&amp;quot;&lt;br /&gt;
&lt;br /&gt;
3. Go on your Hercules folder -&amp;gt; &amp;quot;tools&amp;quot; -&amp;gt; &amp;quot;HPMHookGen&amp;quot; and select &amp;quot;doxygen.conf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
4. Now in the interface you will see Run, go on it.&lt;br /&gt;
&lt;br /&gt;
5. Just click on &amp;quot;Run doxygen&amp;quot; and just close it.&lt;br /&gt;
&lt;br /&gt;
6. Go on the &amp;quot;HPMHookGen&amp;quot; folder then run HPMHookGen.pl&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Menu</id>
		<title>Menu</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Menu"/>
				<updated>2016-09-16T18:55:16Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{obsolete|type=script command|when=long time ago}}&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
* [[menu]] &amp;quot;&amp;lt;option_text&amp;gt;&amp;quot;,&amp;lt;target_label&amp;gt;{,&amp;quot;&amp;lt;option_text&amp;gt;&amp;quot;,&amp;lt;target_label&amp;gt;,...};&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
This command will create a selectable menu for the invoking character. Only one menu can be on screen at the same time.&lt;br /&gt;
&lt;br /&gt;
Depending on what the player picks from the menu, the script execution will continue from the corresponding label (it's string-label pairs, not label-string).&lt;br /&gt;
&lt;br /&gt;
Options can be grouped together, separated by the character ':'.&lt;br /&gt;
 menu &amp;quot;A:B&amp;quot;,L_Wrong,&amp;quot;C&amp;quot;,L_Right;&lt;br /&gt;
&lt;br /&gt;
It also sets a special temporary character variable @menu, which contains the number of option the player picked. (Numbering of options starts at 1.) This number is consistent with empty options and grouped options.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
 	[[menu]] &amp;quot;A::B&amp;quot;,L_Wrong,&amp;quot;&amp;quot;,L_Impossible,&amp;quot;C&amp;quot;,L_Right;&lt;br /&gt;
 L_Wrong:&lt;br /&gt;
 	// If they click &amp;quot;A&amp;quot; or &amp;quot;B&amp;quot; they will end up here&lt;br /&gt;
 	// @menu == 1 if &amp;quot;A&amp;quot;&lt;br /&gt;
 	// @menu == 2 will never happen because the option is empty&lt;br /&gt;
 	// @menu == 3 if &amp;quot;B&amp;quot;&lt;br /&gt;
 L_Impossible:&lt;br /&gt;
 	// Empty options are not displayed and therefore can't be selected&lt;br /&gt;
 	// this label will never be reached from the menu command&lt;br /&gt;
 L_Right:&lt;br /&gt;
 	// If they click &amp;quot;C&amp;quot; they will end up here&lt;br /&gt;
 	// @menu == 5&lt;br /&gt;
&lt;br /&gt;
If a label is '-', the script execution will continue right after the menu command if that option is selected, this can be used to save you time, and optimize big scripts.&lt;br /&gt;
&lt;br /&gt;
 	[[menu]] &amp;quot;A::B:&amp;quot;,-,&amp;quot;C&amp;quot;,L_Right;&lt;br /&gt;
 	// If they click &amp;quot;A&amp;quot; or &amp;quot;B&amp;quot; they will end up here&lt;br /&gt;
 	// @menu == 1 if &amp;quot;A&amp;quot;&lt;br /&gt;
 	// @menu == 3 if &amp;quot;B&amp;quot;&lt;br /&gt;
 L_Right:&lt;br /&gt;
 	// If they click &amp;quot;C&amp;quot; they will end up here&lt;br /&gt;
 	// @menu == 5&lt;br /&gt;
&lt;br /&gt;
Both these examples will perform the exact same task.&lt;br /&gt;
&lt;br /&gt;
If you give an empty string as a menu item, the item will not display. This can effectively be used to script dynamic menus by using empty string for entries that should be unavailable at that time.&lt;br /&gt;
&lt;br /&gt;
You can do it by using arrays, but watch carefully - this trick isn't high wizardry, but minor magic at least. You can't expect to easily duplicate it until you understand how it works.&lt;br /&gt;
&lt;br /&gt;
Create a temporary array of strings to contain your menu items, and populate it with the strings that should go into the menu at this execution, making sure not to leave any gaps. Normally, you do it with a loop and an extra counter, like this:&lt;br /&gt;
&lt;br /&gt;
 [[setarray]] @possiblemenuitems$[0],&amp;lt;list of potential menu items&amp;gt;;&lt;br /&gt;
 [[set]] @j,0; // That's the menu lines counter.&lt;br /&gt;
 &lt;br /&gt;
 // We loop through the list of possible menu items.&lt;br /&gt;
 // @i is our loop counter.&lt;br /&gt;
 [[for]]( [[set]] @i,0; @i&amp;lt;[[getarraysize]](@possiblemenuitems$) ; [[set]] @i,@i+1 )&lt;br /&gt;
 {&lt;br /&gt;
 	// That 'condition' is whatever condition that determines whether &lt;br /&gt;
 	// a menu item number @i actually goes into the menu or not.&lt;br /&gt;
 	&lt;br /&gt;
 	[[if]] (&amp;lt;condition&amp;gt;)&lt;br /&gt;
 	{&lt;br /&gt;
 		// We record the option into the list of options actually available.&lt;br /&gt;
 		&lt;br /&gt;
 		[[set]] @menulist$[@j], @possiblemenuitems$[@i];&lt;br /&gt;
 		&lt;br /&gt;
 		// We just copied the string, we do need it's number for later &lt;br /&gt;
 		// though, so we record it as well.&lt;br /&gt;
 		&lt;br /&gt;
 		[[set]] @menureference[@j],@i;&lt;br /&gt;
 		&lt;br /&gt;
 		// Since we've just added a menu item into the list, we increment &lt;br /&gt;
 		// the menu lines counter.&lt;br /&gt;
 		&lt;br /&gt;
 		[[set]] @j,@j+1;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	// We go on to the next possible menu item.&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This will create you an array @menulist$ which contains the text of all items that should actually go into the menu based on your condition, and an array @menureference, which contains their numbers in the list of possible menu items. (Remember, arrays start with 0.) There's less of them than the possible menu items you've defined, but the menu command can handle the empty lines - only if they are last in the list, and if it's made this way, they are. Now comes a dirty trick:&lt;br /&gt;
&lt;br /&gt;
 	// X is whatever the most menu items you expect to handle.&lt;br /&gt;
 	[[menu]] @menulist$[0],-,@menulist$[1],-,....@menulist$[&amp;lt;X&amp;gt;],-;&lt;br /&gt;
&lt;br /&gt;
This calls up a menu of all your items. Since you didn't copy some of the possible menu items into the list, it's end is empty and so no menu items will show up past the end. But this menu call doesn't jump anywhere, it just continues execution right after the menu command. (And it's a good thing it doesn't, cause you can only explicitly define labels to jump to, and how do you know which ones to define if you don't know beforehand which options will end up where in your menu?) But how do you figure out which option the user picked? Enter the @menu.&lt;br /&gt;
&lt;br /&gt;
'''@menu''' contains the number of option that the user selected from the list, starting with 1 for the first option. You know now which option the user picked and which number in your real list of possible menu items it translated to:&lt;br /&gt;
&lt;br /&gt;
 mes &amp;quot;You selected &amp;quot;+@possiblemenuitems$[@menureference[@menu-1]]+&amp;quot;!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
* @menu is the number of option the user picked.&lt;br /&gt;
* @menu-1 is the array index for the list of actually used menu items that we &lt;br /&gt;
made.&lt;br /&gt;
* @menureference[@menu-1] is the number of the item in the array of possible menu items that we've saved just for this purpose.&lt;br /&gt;
&lt;br /&gt;
And @possiblemenuitems$[@menureference[@menu-1]] is the string that we used to display the menu line the user picked. (Yes, it's a handful, but it works.)&lt;br /&gt;
&lt;br /&gt;
You can set up a bunch of 'if (@menureference[@menu-1]==X) goto Y' statements to route your execution based on the line selected and still generate a different menu every time, which is handy when you want to, for example, make users select items in any specific order before proceeding, or make a randomly shuffled menu.&lt;br /&gt;
&lt;br /&gt;
Kafra code bundled with the standard distribution uses a similar array-based menu technique for teleport lists, but it's much simpler and doesn't use @menu, probably since that wasn't documented anywhere.&lt;br /&gt;
&lt;br /&gt;
See also '[[select]]', which is probably better in this particular case. Instead of menu, you could use 'select' like this:&lt;br /&gt;
&lt;br /&gt;
 [[set]] @dummy, [[select]](@menulist$[0],@menulist$[1],....@menulist$[&amp;lt;X&amp;gt;]);&lt;br /&gt;
    &lt;br /&gt;
For the purposes of the technique described above these two statements are perfectly equivalent.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Menus]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script Command]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Menu</id>
		<title>Menu</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Menu"/>
				<updated>2016-09-16T18:54:49Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{obsolete|type=script command|when=r9788}}&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
* [[menu]] &amp;quot;&amp;lt;option_text&amp;gt;&amp;quot;,&amp;lt;target_label&amp;gt;{,&amp;quot;&amp;lt;option_text&amp;gt;&amp;quot;,&amp;lt;target_label&amp;gt;,...};&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
This command will create a selectable menu for the invoking character. Only one menu can be on screen at the same time.&lt;br /&gt;
&lt;br /&gt;
Depending on what the player picks from the menu, the script execution will continue from the corresponding label (it's string-label pairs, not label-string).&lt;br /&gt;
&lt;br /&gt;
Options can be grouped together, separated by the character ':'.&lt;br /&gt;
 menu &amp;quot;A:B&amp;quot;,L_Wrong,&amp;quot;C&amp;quot;,L_Right;&lt;br /&gt;
&lt;br /&gt;
It also sets a special temporary character variable @menu, which contains the number of option the player picked. (Numbering of options starts at 1.) This number is consistent with empty options and grouped options.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
 	[[menu]] &amp;quot;A::B&amp;quot;,L_Wrong,&amp;quot;&amp;quot;,L_Impossible,&amp;quot;C&amp;quot;,L_Right;&lt;br /&gt;
 L_Wrong:&lt;br /&gt;
 	// If they click &amp;quot;A&amp;quot; or &amp;quot;B&amp;quot; they will end up here&lt;br /&gt;
 	// @menu == 1 if &amp;quot;A&amp;quot;&lt;br /&gt;
 	// @menu == 2 will never happen because the option is empty&lt;br /&gt;
 	// @menu == 3 if &amp;quot;B&amp;quot;&lt;br /&gt;
 L_Impossible:&lt;br /&gt;
 	// Empty options are not displayed and therefore can't be selected&lt;br /&gt;
 	// this label will never be reached from the menu command&lt;br /&gt;
 L_Right:&lt;br /&gt;
 	// If they click &amp;quot;C&amp;quot; they will end up here&lt;br /&gt;
 	// @menu == 5&lt;br /&gt;
&lt;br /&gt;
If a label is '-', the script execution will continue right after the menu command if that option is selected, this can be used to save you time, and optimize big scripts.&lt;br /&gt;
&lt;br /&gt;
 	[[menu]] &amp;quot;A::B:&amp;quot;,-,&amp;quot;C&amp;quot;,L_Right;&lt;br /&gt;
 	// If they click &amp;quot;A&amp;quot; or &amp;quot;B&amp;quot; they will end up here&lt;br /&gt;
 	// @menu == 1 if &amp;quot;A&amp;quot;&lt;br /&gt;
 	// @menu == 3 if &amp;quot;B&amp;quot;&lt;br /&gt;
 L_Right:&lt;br /&gt;
 	// If they click &amp;quot;C&amp;quot; they will end up here&lt;br /&gt;
 	// @menu == 5&lt;br /&gt;
&lt;br /&gt;
Both these examples will perform the exact same task.&lt;br /&gt;
&lt;br /&gt;
If you give an empty string as a menu item, the item will not display. This can effectively be used to script dynamic menus by using empty string for entries that should be unavailable at that time.&lt;br /&gt;
&lt;br /&gt;
You can do it by using arrays, but watch carefully - this trick isn't high wizardry, but minor magic at least. You can't expect to easily duplicate it until you understand how it works.&lt;br /&gt;
&lt;br /&gt;
Create a temporary array of strings to contain your menu items, and populate it with the strings that should go into the menu at this execution, making sure not to leave any gaps. Normally, you do it with a loop and an extra counter, like this:&lt;br /&gt;
&lt;br /&gt;
 [[setarray]] @possiblemenuitems$[0],&amp;lt;list of potential menu items&amp;gt;;&lt;br /&gt;
 [[set]] @j,0; // That's the menu lines counter.&lt;br /&gt;
 &lt;br /&gt;
 // We loop through the list of possible menu items.&lt;br /&gt;
 // @i is our loop counter.&lt;br /&gt;
 [[for]]( [[set]] @i,0; @i&amp;lt;[[getarraysize]](@possiblemenuitems$) ; [[set]] @i,@i+1 )&lt;br /&gt;
 {&lt;br /&gt;
 	// That 'condition' is whatever condition that determines whether &lt;br /&gt;
 	// a menu item number @i actually goes into the menu or not.&lt;br /&gt;
 	&lt;br /&gt;
 	[[if]] (&amp;lt;condition&amp;gt;)&lt;br /&gt;
 	{&lt;br /&gt;
 		// We record the option into the list of options actually available.&lt;br /&gt;
 		&lt;br /&gt;
 		[[set]] @menulist$[@j], @possiblemenuitems$[@i];&lt;br /&gt;
 		&lt;br /&gt;
 		// We just copied the string, we do need it's number for later &lt;br /&gt;
 		// though, so we record it as well.&lt;br /&gt;
 		&lt;br /&gt;
 		[[set]] @menureference[@j],@i;&lt;br /&gt;
 		&lt;br /&gt;
 		// Since we've just added a menu item into the list, we increment &lt;br /&gt;
 		// the menu lines counter.&lt;br /&gt;
 		&lt;br /&gt;
 		[[set]] @j,@j+1;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	// We go on to the next possible menu item.&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This will create you an array @menulist$ which contains the text of all items that should actually go into the menu based on your condition, and an array @menureference, which contains their numbers in the list of possible menu items. (Remember, arrays start with 0.) There's less of them than the possible menu items you've defined, but the menu command can handle the empty lines - only if they are last in the list, and if it's made this way, they are. Now comes a dirty trick:&lt;br /&gt;
&lt;br /&gt;
 	// X is whatever the most menu items you expect to handle.&lt;br /&gt;
 	[[menu]] @menulist$[0],-,@menulist$[1],-,....@menulist$[&amp;lt;X&amp;gt;],-;&lt;br /&gt;
&lt;br /&gt;
This calls up a menu of all your items. Since you didn't copy some of the possible menu items into the list, it's end is empty and so no menu items will show up past the end. But this menu call doesn't jump anywhere, it just continues execution right after the menu command. (And it's a good thing it doesn't, cause you can only explicitly define labels to jump to, and how do you know which ones to define if you don't know beforehand which options will end up where in your menu?) But how do you figure out which option the user picked? Enter the @menu.&lt;br /&gt;
&lt;br /&gt;
'''@menu''' contains the number of option that the user selected from the list, starting with 1 for the first option. You know now which option the user picked and which number in your real list of possible menu items it translated to:&lt;br /&gt;
&lt;br /&gt;
 mes &amp;quot;You selected &amp;quot;+@possiblemenuitems$[@menureference[@menu-1]]+&amp;quot;!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
* @menu is the number of option the user picked.&lt;br /&gt;
* @menu-1 is the array index for the list of actually used menu items that we &lt;br /&gt;
made.&lt;br /&gt;
* @menureference[@menu-1] is the number of the item in the array of possible menu items that we've saved just for this purpose.&lt;br /&gt;
&lt;br /&gt;
And @possiblemenuitems$[@menureference[@menu-1]] is the string that we used to display the menu line the user picked. (Yes, it's a handful, but it works.)&lt;br /&gt;
&lt;br /&gt;
You can set up a bunch of 'if (@menureference[@menu-1]==X) goto Y' statements to route your execution based on the line selected and still generate a different menu every time, which is handy when you want to, for example, make users select items in any specific order before proceeding, or make a randomly shuffled menu.&lt;br /&gt;
&lt;br /&gt;
Kafra code bundled with the standard distribution uses a similar array-based menu technique for teleport lists, but it's much simpler and doesn't use @menu, probably since that wasn't documented anywhere.&lt;br /&gt;
&lt;br /&gt;
See also '[[select]]', which is probably better in this particular case. Instead of menu, you could use 'select' like this:&lt;br /&gt;
&lt;br /&gt;
 [[set]] @dummy, [[select]](@menulist$[0],@menulist$[1],....@menulist$[&amp;lt;X&amp;gt;]);&lt;br /&gt;
    &lt;br /&gt;
For the purposes of the technique described above these two statements are perfectly equivalent.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Menus]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script Command]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Adding_a_Script</id>
		<title>Adding a Script</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Adding_a_Script"/>
				<updated>2016-09-16T18:53:09Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: Marked as outdated (old config syntax)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{outdated}}&lt;br /&gt;
&lt;br /&gt;
== Adding and Activating Scripts ==&lt;br /&gt;
Scripts are usually kept in the ''npc'' folder for the sake of organization even though scripts can contain more than a mere NPC.  All files are saved as text files.  Scripts cannot be loaded on to the server unless their text file is activated in a *.conf file.&lt;br /&gt;
&lt;br /&gt;
=== A New Script ===&lt;br /&gt;
New scripts must be saved as a text file first.  The file may be located anywhere in the Hercules directory, but is in the ''npc'' folder by default.&lt;br /&gt;
&lt;br /&gt;
=== Configuration Files ===&lt;br /&gt;
Any text editor may be used to edit *.conf files.  The ''npc/*.conf'' files are used to determine which script text files should be loaded.  There are about a dozen *.conf that handle different groups of scripts for the purpose of organization.  It does not matter which *.conf holds your custom scripts as long as the path is correct.&lt;br /&gt;
&lt;br /&gt;
Typical *.conf entry layout:&lt;br /&gt;
 npc: npc/path/to/yourscript1.txt&lt;br /&gt;
 // npc: npc/path/to/yourscript2.txt&lt;br /&gt;
Note how the second line is preceded with a double slash.  Content on the same line after double slashes will not be parsed.  In other words, ''script2.txt'' will not be loaded.  The slashes can be used to write comments.&lt;br /&gt;
&lt;br /&gt;
{{git|npc/pre-re/scripts_main.conf}} or {{git|npc/re/scripts_main.conf}} determines which of the *.conf will be read by the server.&lt;br /&gt;
 import: npc/path/to/configuration.conf&lt;br /&gt;
&lt;br /&gt;
=== The NPC in Game ===&lt;br /&gt;
After adding the script, it must be loaded before the script contents take effect in game.  There are a few ways to do this.&lt;br /&gt;
* The map server can be rebooted.  This is generally the safest route though not the most convenient for active servers.&lt;br /&gt;
* The GM command '''@reloadscript''' maybe used in game, though this may cause monster spawn bugs.&lt;br /&gt;
* If a script needs to be reloaded because it has been edited, the GM commands '''@loadnpc''' and '''@unloadnpc''' may be used.  This method is not convenient for script texts that contain multiple NPCs.&lt;br /&gt;
&lt;br /&gt;
== Client Side ==&lt;br /&gt;
The NPC name used in examples is &amp;quot;Teddy&amp;quot;.&lt;br /&gt;
===Lua===&lt;br /&gt;
The two files you will need to open and edit are &amp;quot;jobname.lua&amp;quot; and &amp;quot;npcidentity.lua&amp;quot;. Jobname.lua will look like:&lt;br /&gt;
&lt;br /&gt;
 	[jobtbl.NPCNAME] = &amp;quot;NPCNAME&amp;quot;,&lt;br /&gt;
Example:&lt;br /&gt;
 	[jobtbl.TEDDY] = &amp;quot;TEDDY&amp;quot;,&lt;br /&gt;
npcidentity.lua will look like:&lt;br /&gt;
 	[&amp;quot;NPCNAME&amp;quot;] = NPCID,&lt;br /&gt;
Example:&lt;br /&gt;
 	[&amp;quot;TEDDY&amp;quot;] = 587,&lt;br /&gt;
If your NPC has spaces in its name, its best to either remove them or replace them with underscores. So if the NPC's name was Brown Teddy the sprite's name would be Brown_Teddy.spr or BrownTeddy.spr and the lua files would be BROWN_TEDDY or BROWNTEDDY. Whatever ID you choose for your sprite, either NPC Sprite name(Case-Sensitive, In Capital Letters) or ID will be use in the script. The beginning of my script will look like:&lt;br /&gt;
&lt;br /&gt;
 	xmas_in,111,107,3	script	Teddy	587,{&lt;br /&gt;
 	xmas_in,111,107,3	script	Teddy	TEDDY,{&lt;br /&gt;
&lt;br /&gt;
===Sprite===&lt;br /&gt;
The sprite part is straightforward, just Teddy.spr is fine, you don't need Teddy_m.spr or anything like that, but if you want to add m for male to the name you can do that, but it won't effect its functionality in-game. NPC sprites are located in data/sprite/npc.&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Hints ==&lt;br /&gt;
* If you are copy/pasting a script from a forum, be sure to check that the tabs are still intact.&lt;br /&gt;
* Remember that paths and file names are case sensitive.&lt;br /&gt;
* Remember to save after editing.&lt;br /&gt;
* Create your own NPC folder and *.conf file.  This will make it much easier to keep track of your own scripts and can reduce the hassle when merging new revisions of Hercules.  Follow the basic layout of the other *.conf files and remember to import the *.conf in {{git|npc/scripts_main.conf}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Basic_Scripting</id>
		<title>Basic Scripting</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Basic_Scripting"/>
				<updated>2016-09-16T18:47:38Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: Severely outdated syntax&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{outdated}}&lt;br /&gt;
&lt;br /&gt;
==The Basics==&lt;br /&gt;
&lt;br /&gt;
Scripts control all NPCs, warps, mob spawns, shops, and quests you will find in the game--and nearly everything else!  Clearly they play a large part in customizing a server, but learning isn't very hard.&lt;br /&gt;
&lt;br /&gt;
Scripts are built up of predefined script commands, all of which can be found in {{git|doc/script_commands.txt}} (for explanations, see [[:Category:Script_Command|Script Commands]]).  Every line should begin with a command and the argument it takes, and must end in a semicolon (or you'll get mapserver errors!).  Arguments are usually separated by commas, and are sometimes contained in parentheses () or curly brackets {}.  Tabs and proper indentation are standard scripting measures.&lt;br /&gt;
&lt;br /&gt;
Scripts are saved as text (*.txt) files, so all code can be written in Notepad.  There are also a lot of scripting programs to use: the most recent and comprehensive one is [http://rathena.org/board/topic/56484-enpc-script-editor/ Vince's eNPC]. All defined functions are highlighted, with an autocomplete feature included, and pressing &amp;quot;F1&amp;quot; will display the corresponding explanation for any command.&lt;br /&gt;
&lt;br /&gt;
==Structure==&lt;br /&gt;
&lt;br /&gt;
===NPC===&lt;br /&gt;
A '''Script NPC''' will look something like the following:&lt;br /&gt;
 prontera,156,145,4 &amp;lt;tab&amp;gt; script &amp;lt;tab&amp;gt; Test NPC &amp;lt;tab&amp;gt; 58,{&lt;br /&gt;
&lt;br /&gt;
The first section is the map location of the NPC, followed by its coordinates in x,y and the direction the NPC will face.  Direction numbers are counted counterclockwise in 45º increments, with 0 being the center: &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[1][0][7] &amp;lt;br&amp;gt;&lt;br /&gt;
[2][&amp;amp;nbsp;&amp;amp;nbsp;][6] &amp;lt;br&amp;gt;&lt;br /&gt;
[3][4][5] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the first tab, the type of script is defined.  For our purposes, it'll stay &amp;quot;script&amp;quot; for now, but can also be function, shop, or cashshop, for starters. &amp;lt;br&amp;gt;&lt;br /&gt;
The name of the NPC is next.  You can use up to 24 characters, so make it unique!  Any duplicates will cause warnings or errors, and the NPC will just be automatically renamed anyway. &amp;lt;br&amp;gt;&lt;br /&gt;
The last number is for the sprite (Ai4rei's sprite list can be found [http://nn.ai4rei.net/dev/npclist/ here]).  It's followed by a comma and open curly bracket, marking the beginning of the script contents.  Of course, the script must also end in a curly bracket.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Function===&lt;br /&gt;
A '''Function script''' will look almost identical to:&lt;br /&gt;
 function &amp;lt;tab&amp;gt; script &amp;lt;tab&amp;gt; Function Name &amp;lt;tab&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
The words &amp;quot;function&amp;quot; and &amp;quot;script&amp;quot; won't change; the name must also be unique.  All functions can be called using the &amp;quot;callfunc&amp;quot; command. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Shop===&lt;br /&gt;
A '''Shop''' starts like a normal script:&lt;br /&gt;
 prontera,156,145,4 &amp;lt;tab&amp;gt; shop &amp;lt;tab&amp;gt; Fruit Store &amp;lt;tab&amp;gt; 58,512:-1,513:1000&lt;br /&gt;
&lt;br /&gt;
The first section defines the map, coordinates, and direction.  The word &amp;quot;shop&amp;quot; replaces &amp;quot;script&amp;quot; (alternately, &amp;quot;cashshop&amp;quot; will use Cashpoints instead of Zeny).  The name and sprite ID follow, then a comma. &amp;lt;br&amp;gt;&lt;br /&gt;
Items in the shop are defined in an ID:Price format.  A price of -1 uses the default price in item_db.txt.  Be sure the price is not too low, or a you will open a Zeny exploit in your server! &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fundamentals==&lt;br /&gt;
&lt;br /&gt;
You can always look up commands that you need--even the best scripters don't have everything memorized.  There are a few fundamentals that you should know by heart, though, since they are so commonly used.&lt;br /&gt;
&lt;br /&gt;
===Message===&lt;br /&gt;
&lt;br /&gt;
 *mes &amp;quot;&amp;lt;string&amp;gt;&amp;quot;;&lt;br /&gt;
This is the most basic command.  Start the line with the word mes, then enter the message in quotes (don't forget the semicolon at the end!). &amp;lt;br&amp;gt;&lt;br /&gt;
To add color, simply add ^ and the hex code anywhere in the message.  A list can be found [http://www.immigration-usa.com/html_colors.html here]. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''As an example:''&lt;br /&gt;
 mes &amp;quot;[^FF0000Test NPC^000000]&amp;quot;;&lt;br /&gt;
 mes &amp;quot;Hello!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
''Will display:''&lt;br /&gt;
 [&amp;lt;span style=&amp;quot;color:#FF0000;&amp;quot;&amp;gt;Test NPC&amp;lt;/span&amp;gt;]&lt;br /&gt;
 Hello!&lt;br /&gt;
&lt;br /&gt;
===Labels, Goto, and End===&lt;br /&gt;
&lt;br /&gt;
To create a label, type a label name and a colon at the start of a line.  If the label does not end with an &amp;quot;end;&amp;quot; command, everything following the label will be read, so don't forget it between labels! &amp;lt;br&amp;gt;&lt;br /&gt;
To go to a label, use the simple &amp;quot;goto&amp;quot; command:&lt;br /&gt;
 *goto &amp;lt;label&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
''Note that there are &amp;quot;special&amp;quot; labels that trigger whenever a specific event occurs.  The name usually makes it obvious, but you can find explanations in script_commands.txt.  Here is a brief sampling:''&lt;br /&gt;
 OnClock&amp;lt;hour&amp;gt;&amp;lt;minute&amp;gt;:&lt;br /&gt;
 OnInit:&lt;br /&gt;
 OnAgitStart:&lt;br /&gt;
 OnAgitEnd:&lt;br /&gt;
 OnTouch:&lt;br /&gt;
 OnPCLoginEvent:&lt;br /&gt;
 OnPCLogoutEvent:&lt;br /&gt;
 OnPCBaseLvUpEvent:&lt;br /&gt;
 OnPCJobLvUpEvent:&lt;br /&gt;
 OnPCDieEvent:&lt;br /&gt;
 OnPCKillEvent:&lt;br /&gt;
 OnNPCKillEvent:&lt;br /&gt;
 OnPCLoadMapEvent:&lt;br /&gt;
&lt;br /&gt;
===Menus, Close, and Next===&lt;br /&gt;
{{EntirePage|Menus}}&lt;br /&gt;
&lt;br /&gt;
 *menu &amp;quot;&amp;lt;option_text&amp;gt;&amp;quot;,&amp;lt;target_label&amp;gt;{,&amp;quot;&amp;lt;option_text&amp;gt;&amp;quot;,&amp;lt;target_label&amp;gt;,...};&lt;br /&gt;
 *close;&lt;br /&gt;
 *next;&lt;br /&gt;
Menus create a set of options, which trigger labels when selected.  The text in quotes is what will be displayed, followed by its respective label.  Enter as many choices as you want, and end the last one with a semicolon instead of a comma. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Close&amp;quot; will close any message window that is open (from &amp;quot;mes&amp;quot; commands). &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Next&amp;quot; will clear the message window, bringing up a fresh screen. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''For example:''&lt;br /&gt;
 mes &amp;quot;[Test NPC]&amp;quot;;&lt;br /&gt;
 mes &amp;quot;How are you doing today?&amp;quot;;&lt;br /&gt;
 menu &amp;quot;I am doing okay!&amp;quot;,doingokay,&amp;quot;Not doing too well&amp;quot;,bad;&lt;br /&gt;
 &lt;br /&gt;
 doingokay:&lt;br /&gt;
 mes &amp;quot;Glad to hear it!&amp;quot;;&lt;br /&gt;
 close;&lt;br /&gt;
 end;&lt;br /&gt;
 &lt;br /&gt;
 bad:&lt;br /&gt;
 mes &amp;quot;Aww, I'm sorry about that.&amp;quot;;&lt;br /&gt;
 close;&lt;br /&gt;
 end;&lt;br /&gt;
&lt;br /&gt;
===Conditions, Variables, and Set===&lt;br /&gt;
{{EntirePage|Variables}}&lt;br /&gt;
&lt;br /&gt;
 *if(condition) {&amp;lt;script&amp;gt;;}&lt;br /&gt;
 *else {&amp;lt;script&amp;gt;;}&lt;br /&gt;
Conditional statements &amp;quot;if&amp;quot; and &amp;quot;else&amp;quot; are the same as anywhere else.  Multiple conditions can be specified:  || means ''or'', while &amp;amp;&amp;amp; means ''and''.  == is ''equal'', != is ''not equal''.  Inequalities can be used as well (&amp;lt;, &amp;gt;, &amp;lt;=, &amp;gt;=).&amp;lt;br&amp;gt;&lt;br /&gt;
The &amp;quot;else&amp;quot; can be omitted, and the brackets aren't necessary unless multiple commands follow a conditional statement. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The type of variable used is defined in the name.  There are permanent and temporary variables, as well as scope (temporary NPC), character, global, and global account.  The default type is an integer, and adding $ as a suffix creates a string.&amp;lt;br&amp;gt;&lt;br /&gt;
Here are some example types, taken from script_commands.txt:&lt;br /&gt;
 name  - permanent character integer variable&lt;br /&gt;
 name$ - permanent character string variable&lt;br /&gt;
 @name  - temporary character integer variable&lt;br /&gt;
 @name$ - temporary character string variable&lt;br /&gt;
 $name  - permanent global integer variable&lt;br /&gt;
 $name$ - permanent global string variable&lt;br /&gt;
 $@name  - temporary global integer variable&lt;br /&gt;
 $@name$ - temporary global string variable&lt;br /&gt;
 .name  - NPC integer variable&lt;br /&gt;
 .name$ - NPC string variable&lt;br /&gt;
 .@name  - scope integer variable&lt;br /&gt;
 .@name$ - scope string variable&lt;br /&gt;
 #name  - permanent local account integer variable&lt;br /&gt;
 #name$ - permanent local account string variable&lt;br /&gt;
 ##name  - permanent global account integer variable&lt;br /&gt;
 ##name$ - permanent global account string variable&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;set&amp;quot; command is used to give a value (or string) to a variable:&lt;br /&gt;
 *set &amp;lt;variable&amp;gt;,&amp;lt;expression&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
''The following script will pick a random number, store it as the temporary scope variable .@random, and display two different messages depending on the result:''&lt;br /&gt;
 set .@random, rand(1,2);&lt;br /&gt;
 if (.@random == 1) { mes &amp;quot;I like you! :D&amp;quot;; }&lt;br /&gt;
 else { mes &amp;quot;I don't like you.  Get out of here!&amp;quot;; }&lt;br /&gt;
 close;&lt;br /&gt;
&lt;br /&gt;
===Duplicating===&lt;br /&gt;
&lt;br /&gt;
It would be a huge waste of time and space to code the same NPC over and over again.  By duplication, an NPC can be created in multiple locations. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Take a look at our old Test NPC:&lt;br /&gt;
 prontera,156,145,4 &amp;lt;tab&amp;gt; script &amp;lt;tab&amp;gt; Test NPC &amp;lt;tab&amp;gt; 58,{&lt;br /&gt;
To be able to duplicate this, we will change the heading to this:&lt;br /&gt;
 - &amp;lt;tab&amp;gt; script &amp;lt;tab&amp;gt; Test NPC#01::testnpc &amp;lt;tab&amp;gt; 58,{&lt;br /&gt;
The location doesn't need to be defined in the NPC, since it will be in the duplicates. &amp;lt;br&amp;gt;&lt;br /&gt;
The displayed name remains &amp;quot;Test NPC&amp;quot;.  But since NPC names must be unique, adding #01 separates this one from the rest, which will be #02, #03, etc.  Lastly, ::testnpc is the reference name used for duplicating NPCs; this part is not displayed on the screen. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After creating the base NPC, duplicates can be added anywhere to any file, so long as you use the same NPC name:&lt;br /&gt;
 spl_fild03,150,150,7 &amp;lt;tab&amp;gt; duplicate(testnpc) &amp;lt;tab&amp;gt; Test NPC &amp;lt;tab&amp;gt; 58&lt;br /&gt;
 niflheim,50,50,2 &amp;lt;tab&amp;gt; duplicate(testnpc) &amp;lt;tab&amp;gt; Test NPC &amp;lt;tab&amp;gt; 58&lt;br /&gt;
 tha_scene01,140,190,4 &amp;lt;tab&amp;gt; duplicate(testnpc) &amp;lt;tab&amp;gt; Test NPC &amp;lt;tab&amp;gt; 58&lt;br /&gt;
The first part is ''map,x,y,direction'', as you're probably used to by now. &amp;lt;br&amp;gt;&lt;br /&gt;
To define a duplicate, the word &amp;quot;duplicate&amp;quot; followed by the NPC, in parentheses, is needed.  The last two parameters are the display name and sprite ID (yes, you can change these, too!).&lt;br /&gt;
&lt;br /&gt;
==Finished Product==&lt;br /&gt;
&lt;br /&gt;
Here is an example using the features explained above:&lt;br /&gt;
&lt;br /&gt;
 prontera,156,145,4	script	Test NPC::test	589,{&lt;br /&gt;
     mes &amp;quot;Hello, how are you?&amp;quot;;&lt;br /&gt;
     mes &amp;quot;I am fine, how are you?&amp;quot;;&lt;br /&gt;
     menu &amp;quot;I am doing okay!&amp;quot;,-,&amp;quot;Not doing too good&amp;quot;,bad;&lt;br /&gt;
     mes &amp;quot;That's good, I'm glad to hear that&amp;quot;;&lt;br /&gt;
     close;&lt;br /&gt;
 &lt;br /&gt;
 bad:&lt;br /&gt;
     mes &amp;quot;Awww, that makes me a bit ^FF0000sad^000000. Sorry to hear that.&amp;quot;;&lt;br /&gt;
     next;&lt;br /&gt;
     mes &amp;quot;Would you like some zeny to help yourself feel better?&amp;quot;;&lt;br /&gt;
     next;&lt;br /&gt;
     menu &amp;quot;Sure, give it to me!&amp;quot;,L_zeny,&amp;quot;Naw, No zeny for me&amp;quot;,-;&lt;br /&gt;
     close;&lt;br /&gt;
 &lt;br /&gt;
 L_Zeny:&lt;br /&gt;
     mes &amp;quot;I can only give you zeny if you have 10,000 or less.&amp;quot;;&lt;br /&gt;
     if (Zeny &amp;gt; 10000) goto toomuch;&lt;br /&gt;
     mes &amp;quot;You have 10,000 zeny or less, I see.&amp;quot;;&lt;br /&gt;
     set Zeny,Zeny+10000;&lt;br /&gt;
     next;&lt;br /&gt;
     mes &amp;quot;Hope you feel better!&amp;quot;;&lt;br /&gt;
     close;&lt;br /&gt;
 &lt;br /&gt;
 toomuch:&lt;br /&gt;
     mes &amp;quot;You have over 10,000 zeny, you must feel really good about yourself!&amp;quot;;&lt;br /&gt;
     close;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 lhz_dun01,157,285,4	duplicate(test)	Test NPC	859&lt;br /&gt;
 hu_fild05,186,210,4	duplicate(test)	Test NPC	859&lt;br /&gt;
 yuno_fild07,221,179,4	duplicate(test)	Test NPC	859&lt;br /&gt;
 tha_scene01,139,194,1	duplicate(test)	Test NPC	859&lt;br /&gt;
&lt;br /&gt;
==Adding Scripts==&lt;br /&gt;
{{EntirePage|Adding a Script}}&lt;br /&gt;
For an NPC to be loaded, it needs to be added to a .conf file.  This is typically ''npc/scripts_custom.conf''.&amp;lt;br&amp;gt;&lt;br /&gt;
Add a line, and enter your NPC file in the following format:&lt;br /&gt;
 npc: npc/path/to/script.txt&lt;br /&gt;
That's it!  You're finished!&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
'''Reference Manuals for scriping commands'''&lt;br /&gt;
* {{git|/doc/script_commands.txt}} Original documentation&lt;br /&gt;
&lt;br /&gt;
'''Sprite lists'''&lt;br /&gt;
* http://nn.ai4rei.net/dev/npclist/&lt;br /&gt;
&lt;br /&gt;
'''Color Charts'''&lt;br /&gt;
* http://www.immigration-usa.com/html_colors.html&lt;br /&gt;
* http://www.december.com/html/spec/colorcodes.html&lt;br /&gt;
* [[wikipedia:Hex_triplet|Hex triplet]]&lt;br /&gt;
* http://www.colorschemer.com/online.html&lt;br /&gt;
&lt;br /&gt;
'''Support, Request and Release'''&lt;br /&gt;
* [http://herc.ws/board/forum/22-script-support/ Scripting support on Hercules Boards]&lt;br /&gt;
* #Hercules on irc.rizon.net : Main Hercules channel.&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Adding_Script</id>
		<title>Adding Script</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Adding_Script"/>
				<updated>2016-09-16T18:44:54Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: Marked as outdated (old syntax)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{outdated}}&lt;br /&gt;
&lt;br /&gt;
== Adding and Activating Scripts ==&lt;br /&gt;
Scripts are usually kept in the ''npc'' folder for the sake of organization even though scripts can contain more than a mere NPC.  All files are saved as text files.  Scripts cannot be loaded on to the server unless their text file is activated in a *.conf file.&lt;br /&gt;
&lt;br /&gt;
=== A New Script ===&lt;br /&gt;
New scripts must be saved as a text file first.  The file may be located anywhere in the Hercules directory, but is in the ''npc'' folder by default.&lt;br /&gt;
&lt;br /&gt;
=== Configuration Files ===&lt;br /&gt;
Any text editor may be used to edit *.conf files.  The ''npc/*.conf'' files are used to determine which script text files should be loaded.  There are about a dozen *.conf that handle different groups of scripts for the purpose of organization.  It does not matter which *.conf holds your custom scripts as long as the path is correct.&lt;br /&gt;
&lt;br /&gt;
Typical *.conf entry layout:&lt;br /&gt;
 npc: npc/path/to/yourscript1.txt&lt;br /&gt;
 // npc: npc/path/to/yourscript2.txt&lt;br /&gt;
Note how the second line is preceded with a double slash.  Content on the same line after double slashes will not be parsed.  In other words, ''script2.txt'' will not be loaded.  The slashes can be used to write comments.&lt;br /&gt;
&lt;br /&gt;
{{git|npc/scripts_main.conf}} determines which of the *.conf will be read by the server.&lt;br /&gt;
 import: npc/path/to/configuration.conf&lt;br /&gt;
{{git|npc/re/scripts_main.conf}} Loads the renewal NPCs if RENEWAL is enabled.&lt;br /&gt;
{{git|npc/pre-rere/scripts_main.conf}} Loads the pre-renewal NPCs if RENEWAL is disabled.&lt;br /&gt;
&lt;br /&gt;
=== The NPC in Game ===&lt;br /&gt;
After adding the script, it must be loaded before the script contents take effect in game.  There are a few ways to do this.&lt;br /&gt;
* The map server can be rebooted.  This is generally the safest route though not the most convenient for active servers.&lt;br /&gt;
* The GM command '''@reloadscript''' maybe used in game, though this may cause monster spawn bugs.&lt;br /&gt;
* If a script needs to be reloaded because it has been edited, the GM commands '''@loadnpc''' and '''@unloadnpc''' may be used.  This method is not convenient for script texts that contain multiple NPCs.&lt;br /&gt;
&lt;br /&gt;
== Client Side ==&lt;br /&gt;
The NPC name used in examples is &amp;quot;Teddy&amp;quot;.&lt;br /&gt;
===Lua===&lt;br /&gt;
The two files you will need to open and edit are &amp;quot;jobname.lua&amp;quot; and &amp;quot;npcidentity.lua&amp;quot;. Jobname.lua will look like:&lt;br /&gt;
&lt;br /&gt;
 	[jobtbl.NPCNAME] = &amp;quot;NPCNAME&amp;quot;,&lt;br /&gt;
Example:&lt;br /&gt;
 	[jobtbl.TEDDY] = &amp;quot;TEDDY&amp;quot;,&lt;br /&gt;
npcidentity.lua will look like:&lt;br /&gt;
 	[&amp;quot;NPCNAME&amp;quot;] = NPCID,&lt;br /&gt;
Example:&lt;br /&gt;
 	[&amp;quot;TEDDY&amp;quot;] = 587,&lt;br /&gt;
If your NPC has spaces in its name, its best to either remove them or replace them with underscores. So if the NPC's name was Brown Teddy the sprite's name would be Brown_Teddy.spr or BrownTeddy.spr and the lua files would be BROWN_TEDDY or BROWNTEDDY. Whatever ID you choose for your sprite will be the one you use in the script, so since Teddy has the sprite ID of 587, the beginning of my script will look like:&lt;br /&gt;
&lt;br /&gt;
 	xmas_in,111,107,3	script	Teddy	587,{&lt;br /&gt;
&lt;br /&gt;
===Sprite===&lt;br /&gt;
The sprite part is straightforward, just Teddy.spr is fine, you don't need Teddy_m.spr or anything like that, but if you want to add m for male to the name you can do that, but it won't effect its functionality in-game. NPC sprites are located in data/sprite/npc.&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Hints ==&lt;br /&gt;
* If you are copy/pasting a script from a forum, be sure to check that the tabs are still intact.&lt;br /&gt;
* Remember that paths and file names are case sensitive.&lt;br /&gt;
* Remember to save after editing.&lt;br /&gt;
* Create your own NPC folder and *.conf file.  This will make it much easier to keep track of your own scripts and can reduce the hassle when merging new revisions of Hercules.  Follow the basic layout of the other *.conf files and remember to import the *.conf in {{git|npc/scripts_main.conf}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Connecting</id>
		<title>Connecting</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Connecting"/>
				<updated>2016-09-16T18:41:43Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: Marked as outdated - contains info about old txt conf files&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{outdated}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This article covers taking the configuration steps to ensure a successful connection to your servers. You are required to know the in and outs of your OS,&lt;br /&gt;
as well as what a [[wikipedia:Local area network|LAN IP]] and a [[wikipedia:Wide area network|WAN IP]] are.&lt;br /&gt;
&lt;br /&gt;
==Basics of the three servers==&lt;br /&gt;
===Login Server===&lt;br /&gt;
The login server handles all login packets from the client. The client sees the login server first and connects to it first. The login server listens on the &lt;br /&gt;
port 6900 by default and usually reads data from the login table. The login server connects directly to the character server and passes it's information &lt;br /&gt;
to it once the client has successfully logged in. If your login server won't connect, your players cannot login in, but can play.&lt;br /&gt;
&lt;br /&gt;
===Character Server===&lt;br /&gt;
The character server handles all character selection and character loading for the map server. The character server receives commands to primarily display characters&lt;br /&gt;
once the client has logged in. The character server listens on the port 6121 by default. It also handles the loading and saving of most character data.&lt;br /&gt;
If the character server becomes disconnected, character data saving is not possible.&lt;br /&gt;
&lt;br /&gt;
===Map Server===&lt;br /&gt;
The map server handles all map functions, including, but not limited to, mob functions, map functions, NPC loading and unloading, as well as NPC processing.&lt;br /&gt;
the map server is your bread and butter and allows people to play on your server. It listens on the port 5121 by default.&lt;br /&gt;
&lt;br /&gt;
If the character server becomes disconnected from your map server, it's likely the mapserver will disconnect everyone from it. This is not the case when the &lt;br /&gt;
MySQL server loses its connection to Hercules, as Hercules currently does not restore this connection.&lt;br /&gt;
&lt;br /&gt;
===Port Forwarding===&lt;br /&gt;
&lt;br /&gt;
If you intend to let your players play from an external internet connection, you ''must'' forward ports 6900, 6121, and 5121 respectively in your router's control panel. Simply forwarding port 6900 is not enough to allow clients to connect, and traffic will not be passed solely through your login server, even though they can communicate with one another internally on your localhost address.&lt;br /&gt;
&lt;br /&gt;
==Configuring Hercules for use==&lt;br /&gt;
After you have finished [[compiling]] Hercules, you can set it up for use. There will be four files that we will concentrate on. Any settings we change in these files should '''always''' be moved to the relevant import folder files. If your compiler hasn't already made a copy of the {{git|conf/import-tmpl}} folder and named it /conf/import do that now.&lt;br /&gt;
&lt;br /&gt;
=====Using the /conf/import/ folder ({{git|conf/import-tmpl/}})=====&lt;br /&gt;
In this folder, you can 'import' your settings into each of the respected files. All you need is each parameter. When you do this, your settings will never be overwritten when you need&lt;br /&gt;
to update your GIT, as the import folder is built once. You can throw all of your settings in here and they will remain as they are, and will read AFTER the&lt;br /&gt;
main settings, which means these settings will take priority. &lt;br /&gt;
&lt;br /&gt;
===Step 1. Interserver Communication Passwords===&lt;br /&gt;
First, you will need to set an intercommunication password and user. This is one of the most important steps to securing your server.&lt;br /&gt;
&lt;br /&gt;
In order for the char-server to accept commands and packets from the login server, and for the map-server to accept commands and packets from the char-server they have to 'log-in' to each other, using the Server Communication passwords. &lt;br /&gt;
You MUST set these to something other than defaults, but you can set them to random characters, as long as they are the same in the three places they appear in, which are: {{git|conf/char-server.conf}}, {{git|conf/map-server.conf}} and your login sql table.&lt;br /&gt;
They are defaulted to s1/p1, and '''MUST''' be changed.&lt;br /&gt;
&lt;br /&gt;
Changes must be made to the import folder to ensure proper upgradability. A good habit to get into when working with GIT.&lt;br /&gt;
Simply copy and paste the lines you wish to alter from the .conf file to the relevant .txt file in the import folder.&lt;br /&gt;
Your /conf/import/char_conf.txt ''and'' /conf/import/map_conf.txt files should look as follows, with ''no'' changes made to {{git|conf/char-server.conf}} or {{git|conf/map-server.conf}}: &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;// Server Communication username and password.&lt;br /&gt;
userid: [new user]&lt;br /&gt;
passwd: [new password]&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your login table should match. Use this SQL query (or make the changes using your favourite SQL gui):&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;use databasename_rag;&lt;br /&gt;
UPDATE login&lt;br /&gt;
set `userid` = &amp;quot;[new user]&amp;quot;, `user_pass` = &amp;quot;[new password]&amp;quot; where `account_id` = 1;&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the user and password is set, you can move on down the page.&lt;br /&gt;
&lt;br /&gt;
===Step 2. {{git|conf/login-server.conf}}===&lt;br /&gt;
Usually there is nothing to be done here in terms on connection. &lt;br /&gt;
You may want to edit your login_port to something other than default, but it must be an unused port by your OS. &lt;br /&gt;
&lt;br /&gt;
You can find this out by starting all the services that you need on the server and issuing the following commands to your console:&lt;br /&gt;
&lt;br /&gt;
'''If using Windows:'''&amp;lt;br /&amp;gt;&lt;br /&gt;
Goto Start, then click 'Run'. Type 'cmd' and press enter. Run the following command:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;netstat -a&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
'''If using *nix:'''&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;$ lsof -i&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you have selected a port if you're going to change it, your /conf/import/login_conf.txt file should look as follows, with ''no'' changes made to {{git|conf/login-server.conf}} (again just copy pasting the lines we want to change from one file to the other): &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;// Login Server Port&lt;br /&gt;
login_port: [new port]&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step 3. {{git|conf/char-server.conf}}===&lt;br /&gt;
This file sets parameters for the char-server to read. &lt;br /&gt;
When you open this up, there are a few things we need to do in here. &lt;br /&gt;
&lt;br /&gt;
Firstly we should name our server:&lt;br /&gt;
&lt;br /&gt;
When setting server_name, be sure to not use spaces as it says.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;// Server name, use alternative character such as ASCII 160 for spaces.&lt;br /&gt;
// NOTE: Do not use spaces in the name, or guild emblems won't work client-side!&lt;br /&gt;
server_name: [new server name]&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;// Wisp name for server: used to send wisp from server to players (between 4 to 23 characters)&lt;br /&gt;
wisp_server_name: [new server name]&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usually, Hercules will auto-detect your external and internal IP if the IP fields are [[comments|commented out]], but let's go ahead and remove the two slashes (//) from login_ip and char_ip. &lt;br /&gt;
&lt;br /&gt;
The login_ip will point to the IP address where the login server will be running. Usually this is the localhost, or 127.0.0.1. &lt;br /&gt;
If the login-server is to be located on the same network as the char-server (but on a different PC), use the LAN IP of the login server's machine. &lt;br /&gt;
If you are running a dedicated machine in a datacenter, or you know your IP is not going to change, you can set this to your WAN IP.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;// Login Server IP&lt;br /&gt;
// The character server connects to the login server using this IP address.&lt;br /&gt;
// NOTE: This is useful when you are running behind a firewall or are on&lt;br /&gt;
// a machine with multiple interfaces.&lt;br /&gt;
login_ip: [new ip here]&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The char_ip parameter will '''ALWAYS''' be your WAN IP, no exceptions. This is the IP that the char-server will accept connections with.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;// Character Server IP&lt;br /&gt;
// The IP address which clients will use to connect.&lt;br /&gt;
// Set this to what your server's public IP address is.&lt;br /&gt;
char_ip: [your wan ip here]&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you changed the login_port in login-server.conf, this setting here will need to match it. &lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;// Login Server Port&lt;br /&gt;
login_port: [new port]&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure to make any changes in the import folder as always.&lt;br /&gt;
&lt;br /&gt;
===Step 4. {{git|conf/map-server.conf}}===&lt;br /&gt;
This file sets parameters for the map-server to read.&lt;br /&gt;
&lt;br /&gt;
The char_ip will point to the IP address where the login server will be running. Usually this is the localhost, or 127.0.0.1. &lt;br /&gt;
If the char-server is to be located on the same network as the map-server (but on a different PC), use the LAN IP of the char server's machine. &lt;br /&gt;
If you are running a dedicated machine in a datacenter, or you know your IP is not going to change, you can set this to your WAN IP.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;// Character Server IP&lt;br /&gt;
// The map server connects to the character server using this IP address.&lt;br /&gt;
// NOTE: This is useful when you are running behind a firewall or are on&lt;br /&gt;
// a machine with multiple interfaces.&lt;br /&gt;
char_ip: [new ip here]&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The map_ip parameter will '''ALWAYS''' be your WAN IP, no exceptions. This is the IP that the map-server will accept connections with.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;// Map Server IP&lt;br /&gt;
// The IP address which clients will use to connect.&lt;br /&gt;
// Set this to what your server's public IP address is.&lt;br /&gt;
map_ip: [your wan ip here]&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure to make any changes in the import folder as always.&lt;br /&gt;
&lt;br /&gt;
===Step 5. {{git|conf/inter-server.conf}}===&lt;br /&gt;
About midway down this file, you will find your SQL settings. These will be set as accordingly. &lt;br /&gt;
&lt;br /&gt;
* The 'sql.db' settings control what the login-server reads for it's database settings. &lt;br /&gt;
* Hostname is the IP of the SQL server. &lt;br /&gt;
* Username is the username you use to login. For security, this should '''NEVER''' be root! &lt;br /&gt;
* Password is the password that the user will login with. &lt;br /&gt;
* The database is set to whatever the database name will be. Usually, this is just 'ragnarok'.&lt;br /&gt;
&lt;br /&gt;
If you make any changes in here, copy paste the lines you change into /conf/import/inter_conf.txt and modify them there.&lt;br /&gt;
&lt;br /&gt;
==Starting Hercules==&lt;br /&gt;
When you're all done configuring Hercules, you can start it up. You can do this by simply running each of the three servers, or athena-start.&lt;br /&gt;
&lt;br /&gt;
==Client Side==&lt;br /&gt;
===Diff your client===&lt;br /&gt;
See [[Hexing#Creating_custom_RagRE_client_using_a_DIFF_patcher|Hexing]].&lt;br /&gt;
&lt;br /&gt;
===Data Folder===&lt;br /&gt;
#Download the most recent data folder [http://svn6.assembla.com/svn/ClientSide/ here].&lt;br /&gt;
#Edit your [[Clientinfo|clientinfo.xml]] as needed.&lt;br /&gt;
&lt;br /&gt;
===Connect===&lt;br /&gt;
Execute your exe.&lt;br /&gt;
&lt;br /&gt;
==Trouble Shooting==&lt;br /&gt;
Its always best to post in the [http://herc.ws/board/forum/31-client-side-support/ client support] sub-forum for things that go wrong with the client, and [http://herc.ws/board/forum/14-general-server-support/ server support] sub-forum for things that go wrong with Hercules connecting or if errors pop up in your server log.&lt;br /&gt;
&lt;br /&gt;
===CHARACTER_INFO size error!!===&lt;br /&gt;
To fix this, locate the src/common folder and open mmo.h in notepad. Find the following line:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;#ifndef PACKETVER&lt;br /&gt;
	#define PACKETVER 20110609&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Edit this Part, put:&lt;br /&gt;
&amp;lt;pre&amp;gt;#define PACKETVER YOURCLIENTDATE&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if my client was 2011-10-25aRagexeRE it would look like:&lt;br /&gt;
&amp;lt;pre&amp;gt;#define PACKETVER 20111025&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Configuration]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Db2sql</id>
		<title>Db2sql</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Db2sql"/>
				<updated>2016-09-16T18:37:29Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: Added mob_db to the list of converted files&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Files Converted ==&lt;br /&gt;
* {{git|db/pre-re/item_db.conf}} (only in pre-renewal mode)&lt;br /&gt;
* {{git|db/re/item_db.conf}} (only in renewal mode)&lt;br /&gt;
* {{git|db/item_db2.conf}}&lt;br /&gt;
* {{git|db/pre-re/mob_db.conf}} (only in pre-renewal mode)&lt;br /&gt;
* {{git|db/re/mob_db.conf}} (only in renewal mode)&lt;br /&gt;
* {{git|db/mob_db2.conf}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
This plugin converts the item database configuration files for use with SQL servers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Compiling ==&lt;br /&gt;
The plugin needs to be compiled. If you've already compiled your server and/or other plugins, input these commands:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make plugin.db2sql&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
In Windows, compile the '''db2sql''' plugin in Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Enabling db2sql ==&lt;br /&gt;
Next, the plugin needs to be enabled in {{git|conf/plugins.conf}}:&lt;br /&gt;
 plugins_list: [&lt;br /&gt;
 	/* Enable HPMHooking when plugins in use rely on Hooking */&lt;br /&gt;
 	//&amp;quot;HPMHooking&amp;quot;,&lt;br /&gt;
 	&amp;quot;db2sql&amp;quot;,&lt;br /&gt;
 	//&amp;quot;sample&amp;quot;,&lt;br /&gt;
 	//&amp;quot;other&amp;quot;,&lt;br /&gt;
 ]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
To use the converter, update your changes in the desired item database (using {{git|db/item_db2.conf}} for customisations is recommended); then, run this command:&lt;br /&gt;
 ./map-server --db2sql&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
In Windows, run {{git|db2sql.bat}} in the root directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Output ==&lt;br /&gt;
The resulting files will be output in the {{git|sql-files}} folder as {{git|sql-files/item_db.sql}}, {{git|sql-files/item_db_re.sql}}, and {{git|sql-files/item_db2.sql}}.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Tools]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Gettime</id>
		<title>Gettime</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Gettime"/>
				<updated>2016-09-16T18:31:24Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: Marked as outdated. Should use constants&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{outdated}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
*'''gettime'''(&amp;lt;type&amp;gt;);&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
This function retrieves current system time and date values depending on parameter ''type'':&lt;br /&gt;
#Seconds (0 - 59)&lt;br /&gt;
#Minutes (0 - 59)&lt;br /&gt;
#Hours (0 - 23)&lt;br /&gt;
#Day of Week (0: Sunday - 6: Saturday)&lt;br /&gt;
#Day of Month (1 - 31)&lt;br /&gt;
#Month (1 - 12)&lt;br /&gt;
#Year (1970 - 2038)&lt;br /&gt;
#Day of Year (1 - 366)&lt;br /&gt;
Any other value will cause the function to return -1. Only numbers are returned.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
 [[if]](gettime(4)==6)&lt;br /&gt;
 {&lt;br /&gt;
     [[mes]] &amp;quot;It's a Saturday. I don't work on Saturdays.&amp;quot;;&lt;br /&gt;
     [[close]];&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[gettimestr]]&lt;br /&gt;
* [[gettimetick]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script Command]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Isnight</id>
		<title>Isnight</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Isnight"/>
				<updated>2016-09-16T18:27:49Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: removed isday info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Syntax==&lt;br /&gt;
*'''isnight'''();&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
These functions determine whether server day or night cycle is currently in effect or not. If the server night is in effect, isnight will return true, otherwise false.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
 [[if]](!isnight())&lt;br /&gt;
 {&lt;br /&gt;
     [[mes]] &amp;quot;I do not work at day, come again tomorrow.&amp;quot;;&lt;br /&gt;
     [[close]];&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 if(isnight())&lt;br /&gt;
 {&lt;br /&gt;
     mes &amp;quot;I do not work at night, come again tomorrow.&amp;quot;;&lt;br /&gt;
     close;&lt;br /&gt;
 }&lt;br /&gt;
These two script fragments achieve the same effect.&lt;br /&gt;
&lt;br /&gt;
[[Category:Script Command]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Isnight</id>
		<title>Isnight</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Isnight"/>
				<updated>2016-09-16T18:26:16Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: Haru moved page Isday to Isnight over redirect: The isday() command was removed. Only isnight() stays.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Syntax==&lt;br /&gt;
*'''isday'''();&lt;br /&gt;
*'''isnight'''();&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
These functions determine whether server day or night cycle is currently in effect or not. If the server night is in effect, isday and isnight will return 0 and 1, otherwise 1 and 0 respectively.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
 [[if]](!isday())&lt;br /&gt;
 {&lt;br /&gt;
     [[mes]] &amp;quot;I do not work at day, come again tomorrow.&amp;quot;;&lt;br /&gt;
     [[close]];&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 if(isnight())&lt;br /&gt;
 {&lt;br /&gt;
     mes &amp;quot;I do not work at night, come again tomorrow.&amp;quot;;&lt;br /&gt;
     close;&lt;br /&gt;
 }&lt;br /&gt;
These two script fragments achieve the same effect.&lt;br /&gt;
&lt;br /&gt;
[[Category:Script Command]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Itemskill</id>
		<title>Itemskill</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Itemskill"/>
				<updated>2016-09-16T18:24:52Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: Marked as outdated. The page shows a txt-style item database entry&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{outdated}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
*'''itemskill''' &amp;lt;skill id&amp;gt;, &amp;lt;skill level&amp;gt;;&lt;br /&gt;
*'''itemskill''' &amp;lt;&amp;quot;skill name&amp;quot;&amp;gt;, &amp;lt;skill level&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
This command meant for item scripts to replicate single-use skills in usable items. It will not work properly, if there is a visible dialog window or menu. If the skill is self or auto-targeting, it will be used immediately otherwise a target cursor is shown.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
 605,Anodyne,Anodyne,11,2000,0,100,,,,,10477567,2,,,,,{ itemskill 8,1; },{}&lt;br /&gt;
When Anodyne is used, it will cast Endure (8), Level 1, as if the actual skill has been used from skill tree.&lt;br /&gt;
&lt;br /&gt;
[[Category:Script Command]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Import_folder</id>
		<title>Import folder</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Import_folder"/>
				<updated>2016-09-16T18:24:25Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: Marked as outdated. Should be updated with the libconfig-style config info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{outdated}}&lt;br /&gt;
&lt;br /&gt;
=Import folder Introduction=&lt;br /&gt;
The Import Folder is used to import virtually all of your configuration changes and settings into the core of the Hercules emulator without ever making changes to any .conf files after it is initially configured. This is very helpful when Creating a New Server Build, Compiling , or Updating to the Latest version this will allow retention of all the settings you previously configured without having to deal with possible overwrite conflicts from a git pull or change over to a New Server Build.&lt;br /&gt;
&lt;br /&gt;
=How it works=&lt;br /&gt;
So, It works as such; Once you have configured all of the files you wish to configure within the Conf directory of your server side you will take those same settings and copy them to the corresponding import directory files. For Example: Lets say you make the following changes to;&lt;br /&gt;
&lt;br /&gt;
'''conf/battle/client.conf'''  ---&amp;gt; Make your desired changes, in this case we are changing hair and dye settings.&lt;br /&gt;
 // Valid range of dyes and styles on the client.&lt;br /&gt;
 min_hair_style: 0&lt;br /&gt;
 max_hair_style: 27 ----&amp;gt; Changing to 40&lt;br /&gt;
 min_hair_color: 0&lt;br /&gt;
 max_hair_color: 8 ----&amp;gt; Changing to 200&lt;br /&gt;
 min_cloth_color: 0 &lt;br /&gt;
 max_cloth_color: 4 ----&amp;gt; Changing to 100&lt;br /&gt;
&lt;br /&gt;
'''conf/battle/client.conf'''  ---&amp;gt;  We then simply copy only the changed setting lines into  ---&amp;gt;  conf/import/client_conf.txt&lt;br /&gt;
&lt;br /&gt;
 max_hair_style: 40&lt;br /&gt;
 max_hair_color: 200&lt;br /&gt;
 max_cloth_color: 100&lt;br /&gt;
&lt;br /&gt;
Since these three settings were the only ones we changed in this example these are the only configuration lines to copy from the .conf file into the corresponding import.txt file. This will now allow the server to directly import these changed settings. This can be done with any of the configuration files. The server reads .confs files within the conf directory first, however any settings configured within the /import/ folder will be read second, thus overwriting default settings. Please note over time settings have changed, so please compare Import.txt Files to any New Server Configuration Settings.&lt;br /&gt;
&lt;br /&gt;
=Commonly Imported Settings=&lt;br /&gt;
&lt;br /&gt;
The most common use of these files is for the following parameters:&amp;lt;br /&amp;gt;&lt;br /&gt;
'''/conf/login_athena.conf''' -&amp;gt; /conf/import/login_conf.txt&lt;br /&gt;
 login_port: 6900&lt;br /&gt;
 account.engine: auto&lt;br /&gt;
 account.sql.db_hostname: 127.0.0.1&lt;br /&gt;
 account.sql.db_port: 3306&lt;br /&gt;
 account.sql.db_username: ragnarok&lt;br /&gt;
 account.sql.db_password: ragnarok&lt;br /&gt;
 account.sql.db_database: ragnarok&lt;br /&gt;
&lt;br /&gt;
'''/conf/char_athena.conf''' -&amp;gt; /conf/import/char_conf.txt&lt;br /&gt;
 userid: s1&lt;br /&gt;
 passwd: p1&lt;br /&gt;
 server_name: Hercules&lt;br /&gt;
 login_port: 6900&lt;br /&gt;
 char_ip: 127.0.0.1&lt;br /&gt;
 char_port: 6121&lt;br /&gt;
 start_point: new_1-1,53,111&lt;br /&gt;
&lt;br /&gt;
'''/conf/map_athena.conf''' -&amp;gt; /conf/import/map_conf.txt&lt;br /&gt;
 userid: s1&lt;br /&gt;
 passwd: p1&lt;br /&gt;
 char_ip: 127.0.0.1&lt;br /&gt;
 char_port: 6121&lt;br /&gt;
 map_ip: 127.0.0.1&lt;br /&gt;
 map_port: 5121&lt;br /&gt;
&lt;br /&gt;
'''/conf/inter_athena.conf''' -&amp;gt; /conf/import/inter_conf.txt&lt;br /&gt;
 sql.db_hostname: 127.0.0.1&lt;br /&gt;
 sql.db_port: 3306&lt;br /&gt;
 sql.db_username: ragnarok&lt;br /&gt;
 sql.db_password: ragnarok&lt;br /&gt;
 sql.db_database: ragnarok&lt;br /&gt;
 char_server_ip: 127.0.0.1&lt;br /&gt;
 char_server_port: 3306&lt;br /&gt;
 char_server_id: ragnarok&lt;br /&gt;
 char_server_pw: ragnarok&lt;br /&gt;
 char_server_db: ragnarok&lt;br /&gt;
 map_server_ip: 127.0.0.1&lt;br /&gt;
 map_server_port: 3306&lt;br /&gt;
 map_server_id: ragnarok&lt;br /&gt;
 map_server_pw: ragnarok&lt;br /&gt;
 map_server_db: ragnarok&lt;br /&gt;
 log_db_ip: 127.0.0.1&lt;br /&gt;
 log_db_port: 3306&lt;br /&gt;
 log_db_id: ragnarok&lt;br /&gt;
 log_db_pw: ragnarok&lt;br /&gt;
 log_db_db: ragnarok&lt;br /&gt;
 log_login_db: loginlog&lt;br /&gt;
 use_sql_db: no&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
The Import Folder is a powerful tool and is often overlooked by amateur developers, but it saves a lot of time and effort it is highly recommended to use. The import.txt files can be saved and used in any new build, just ensure you double check the pathways and corresponding configuration settings. The import folder is often incomplete or blank when downloading latest revisions, you will have to add the necessary files or overwrite the blank template files.&lt;br /&gt;
&lt;br /&gt;
[[Category:Configuration]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Menus</id>
		<title>Menus</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Menus"/>
				<updated>2016-09-16T18:20:18Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: Marked as outdated. The section about 'menu' should be gone, only select and prompt are to be used&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{outdated}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Menus=&lt;br /&gt;
&lt;br /&gt;
==Menu Command==&lt;br /&gt;
The menu command is hardly used anymore, but can be helpful for a few quick setups.&lt;br /&gt;
&lt;br /&gt;
* menu &amp;quot;&amp;lt;menu option&amp;gt;&amp;quot;,&amp;lt;label&amp;gt;{,&amp;quot;&amp;lt;menu option&amp;gt;&amp;quot;,&amp;lt;label&amp;gt;,...}; // Thanks to Dj-Yhn&lt;br /&gt;
&lt;br /&gt;
This command has two parts to it, the menu option (which is what the users see to select) and the label (where the menu option takes them if they select it)&lt;br /&gt;
&lt;br /&gt;
===Example 1.1 - Standard Menu Command Setup===&lt;br /&gt;
 menu &amp;quot;Option 1&amp;quot;,L_GoToOption1,&amp;quot;Option 2&amp;quot;,L_GoToOption2;&lt;br /&gt;
 &lt;br /&gt;
 L_GoToOption1:&lt;br /&gt;
 mes &amp;quot;You chose option 1&amp;quot;;&lt;br /&gt;
 close;&lt;br /&gt;
 &lt;br /&gt;
 L_GoToOption2:&lt;br /&gt;
 mes &amp;quot;You chose option 2&amp;quot;;&lt;br /&gt;
 close;&lt;br /&gt;
&lt;br /&gt;
While this is nice, there is also a nifty little trick to this command.&lt;br /&gt;
Notice that L_GoToOption1 is directly under the menu command itself? We don't need to use a label for this option, because we can tell the menu command to simply continue to the line down by replacing the label name in the menu line with a -.&lt;br /&gt;
&lt;br /&gt;
===Example 1.2 - Optimizing the Menu Command===&lt;br /&gt;
 menu &amp;quot;Option 1&amp;quot;,-,&amp;quot;Option 2&amp;quot;,L_GoToOption2;&lt;br /&gt;
 &lt;br /&gt;
 mes &amp;quot;You chose option 1&amp;quot;;&lt;br /&gt;
 close;&lt;br /&gt;
 &lt;br /&gt;
 L_GoToOption2:&lt;br /&gt;
 mes &amp;quot;You chose option 2&amp;quot;;&lt;br /&gt;
 close;&lt;br /&gt;
&lt;br /&gt;
Now we have a simplified menu command that only uses one label, rather than two.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Select Command==&lt;br /&gt;
The Select command followed by the Prompt command are now usually the top two contenders for menu selection.&lt;br /&gt;
* select &amp;quot;Option&amp;quot;{,&amp;quot;Option&amp;quot;,...,&amp;quot;Option&amp;quot;}; // Thanks to Dj-Yhn&lt;br /&gt;
* select &amp;quot;Option 1:Option 2&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Rather than selecting an option and then moving to a label, you get a returned value for the option selected.&lt;br /&gt;
@menu is a character variable that is set after selecting an option.&lt;br /&gt;
&lt;br /&gt;
===Example 2.1 - Standard Select Command Setup===&lt;br /&gt;
 select &amp;quot;Option 1&amp;quot;,&amp;quot;Option 2&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 if (@menu == 1) { mes &amp;quot;You chose option 1&amp;quot;; }&lt;br /&gt;
 else { mes &amp;quot;You chose option 2&amp;quot;; }&lt;br /&gt;
 close;&lt;br /&gt;
&lt;br /&gt;
This can be further broken down into an even more efficient method.&lt;br /&gt;
&lt;br /&gt;
===Example 2.2.1 - Optimizing the Select Command===&lt;br /&gt;
 if (select(&amp;quot;Option 1&amp;quot;,&amp;quot;Option 2&amp;quot;) == 1) { mes &amp;quot;You chose option 1&amp;quot;; }&lt;br /&gt;
 else { mes &amp;quot;You chose option 2&amp;quot;; )&lt;br /&gt;
 close;&lt;br /&gt;
&lt;br /&gt;
Select also has a different setup than the Menu Command. Notice that there are no labels anymore? That's because we use values returned rather than going to different places.&lt;br /&gt;
&lt;br /&gt;
In the second example, you will notice that the select command can run with a single string separated by a colon for each option. This can be quite handy with arrays and dynamic menu setups, however that will come in a more later discussion.&lt;br /&gt;
&lt;br /&gt;
For a simple method, I will demonstrate how to include a GM Option to your menu that only GM Players can see.&lt;br /&gt;
&lt;br /&gt;
===Example 2.2.2 - Optimizing the Select Command===&lt;br /&gt;
 switch(select(&amp;quot;Option 1:Option 2&amp;quot;)) {&lt;br /&gt;
   case 1:&lt;br /&gt;
     mes &amp;quot;You chose option 1&amp;quot;;&lt;br /&gt;
     break;&lt;br /&gt;
&lt;br /&gt;
   case 2:&lt;br /&gt;
     mes &amp;quot;You chose option 2&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 close;&lt;br /&gt;
&lt;br /&gt;
You can also jump right into the switch statement with the Select() command. Rather than using the predefined @menu variable, you can simply switch the command itself.&lt;br /&gt;
&lt;br /&gt;
===Example 2.3 - Using a Unique Variable for Returning an Option Choice===&lt;br /&gt;
 set .@playerChoice, select(&amp;quot;Option 1:Option 2&amp;quot;);&lt;br /&gt;
 set .@myOtherChoice, select(&amp;quot;Option 1:Option 2&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
By looking at these, if we were to only use the standard @menu, they would overwrite each other, simply for the fact that each one of them would attempt to store @menu as the index chosen. By placing a set and a variable before to the select returned value, we can now distinguish between the two menu options selected.&lt;br /&gt;
&lt;br /&gt;
===Example 2.4 - Simple Dynamic Menu using Select===&lt;br /&gt;
 set .@menu$, &amp;quot;Player Option 1:Player Option 2&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 if (getgmlevel() &amp;gt;= 99) { set .@menu$, .@menu$ + &amp;quot;:GM Menu&amp;quot;; }&lt;br /&gt;
 &lt;br /&gt;
 switch(select(.@menu$)) {&lt;br /&gt;
   case 1:&lt;br /&gt;
     mes &amp;quot;Player Option 1&amp;quot;;&lt;br /&gt;
     close;&lt;br /&gt;
 &lt;br /&gt;
   case 2:&lt;br /&gt;
     mes &amp;quot;Player Option 2&amp;quot;;&lt;br /&gt;
     close;&lt;br /&gt;
   &lt;br /&gt;
   case 3:&lt;br /&gt;
     mes &amp;quot;GM Menu&amp;quot;;&lt;br /&gt;
     close;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Normal players will not be allowed to choose the case 3 option of GM Menu, because it is not added to the menu list unless they meet the criteria of being a level 99 GM.&lt;br /&gt;
&lt;br /&gt;
This can be tricky when trying to add more than a single added option based on criteria due to the fact that the case might not be in order, if you don't add the options. This will be discussed in the &amp;quot;Advanced Scripting&amp;quot; area later.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Prompt Command==&lt;br /&gt;
The Prompt command followed by the Select command are now usually the top two contenders for menu selection.&lt;br /&gt;
* prompt &amp;quot;Option&amp;quot;{,&amp;quot;Option&amp;quot;,...,&amp;quot;Option&amp;quot;}; // Thanks to Dj-Yhn&lt;br /&gt;
* prompt &amp;quot;Option 1:Option 2&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
The prompt command works exactly like the select command however a value of 255 is passed back to the script if the user decides to choose the CANCEL button that is automatically generated by menus.&lt;br /&gt;
&lt;br /&gt;
===Example 3.1 - Quick Example of the Prompt Command===&lt;br /&gt;
 prompt &amp;quot;Click Me:No Click Me&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
 if (@menu == 255) { mes &amp;quot;You should not have closed the menu... BAD BOY!&amp;quot;; close; }&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Monster</id>
		<title>Monster</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Monster"/>
				<updated>2016-09-16T18:18:43Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: Marked as outdated (doesn't use constants)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{outdated}}&lt;br /&gt;
&lt;br /&gt;
{{OtherUse|the script command|the game object|Mob}}&lt;br /&gt;
==Syntax==&lt;br /&gt;
*'''monster''' &amp;lt;&amp;quot;map name&amp;quot;&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;&amp;quot;display name&amp;quot;&amp;gt;, &amp;lt;mob id&amp;gt;, &amp;lt;amount&amp;gt;[, &amp;lt;&amp;quot;event label&amp;quot;&amp;gt;];&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
This command spawns a monster at given map and coordinates, using given class and amount. Monsters spawned with this command will not re-spawn after being killed.&lt;br /&gt;
&lt;br /&gt;
To address the map, on which the running [[NPC]] resides, ''map name'' can be set to &amp;quot;this&amp;quot;. Spawning the monster on random coordinates is accomplished by setting parameters ''x'' and ''y'' to 0. The parameter ''display name'' specifies the in-game name of the monster, which is not necessary required to be the actual name, such as &amp;quot;Prontera minion&amp;quot;. The ''display name'' accepts also two magic names, &amp;quot;--ja--&amp;quot; and &amp;quot;--en--&amp;quot;, which are replaced by the server with the value of the kROName and iROName mob db columns of the given ''mob id'', respectively. Setting the ''mob id'' to -1, -2 or -3 will spawn a random monster from the dead branch, poring box or bloody branch list respectively.&lt;br /&gt;
&lt;br /&gt;
Optionally an ''event label'' can be specified, which has the form &amp;quot;NpcName::OnLabel&amp;quot; and is run upon the monster's death. If the killer was a player, [[RID#Usage|it will be attached]] to the invoked script.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
     [[mes]] &amp;quot;I will spawn 5 Porings for you!&amp;quot;;&lt;br /&gt;
     [[close2]];&lt;br /&gt;
     '''monster''' &amp;quot;this&amp;quot;,0,0,&amp;quot;Poring 1&amp;quot;,1002,1,[[strnpcinfo]](0)+&amp;quot;::OnPoring1Dead&amp;quot;;&lt;br /&gt;
     '''monster''' &amp;quot;this&amp;quot;,0,0,&amp;quot;Poring 2&amp;quot;,1002,1,strnpcinfo(0)+&amp;quot;::OnPoring2Dead&amp;quot;;&lt;br /&gt;
     '''monster''' &amp;quot;this&amp;quot;,0,0,&amp;quot;Poring 3&amp;quot;,1002,1,strnpcinfo(0)+&amp;quot;::OnPoring3Dead&amp;quot;;&lt;br /&gt;
     '''monster''' &amp;quot;this&amp;quot;,0,0,&amp;quot;Poring 4&amp;quot;,1002,1,strnpcinfo(0)+&amp;quot;::OnPoring4Dead&amp;quot;;&lt;br /&gt;
     '''monster''' &amp;quot;this&amp;quot;,0,0,&amp;quot;Poring 5&amp;quot;,1002,1,strnpcinfo(0)+&amp;quot;::OnPoring5Dead&amp;quot;;&lt;br /&gt;
     [[end]];&lt;br /&gt;
 &lt;br /&gt;
 OnPoring1Dead:&lt;br /&gt;
     mes &amp;quot;You killed Poring 1&amp;quot;;&lt;br /&gt;
     [[close]];&lt;br /&gt;
 OnPoring2Dead:&lt;br /&gt;
     mes &amp;quot;You killed Poring 2&amp;quot;;&lt;br /&gt;
     close;&lt;br /&gt;
 OnPoring3Dead:&lt;br /&gt;
     mes &amp;quot;You killed Poring 3&amp;quot;;&lt;br /&gt;
     close;&lt;br /&gt;
 OnPoring4Dead:&lt;br /&gt;
     mes &amp;quot;You killed Poring 4&amp;quot;;&lt;br /&gt;
     close;&lt;br /&gt;
 OnPoring5Dead:&lt;br /&gt;
     mes &amp;quot;You killed Poring 5&amp;quot;;&lt;br /&gt;
     close;&lt;br /&gt;
This will spawn 5 Porings randomly distributed on the map of the invoking character with the names &amp;quot;Poring 1&amp;quot; to &amp;quot;Poring 5&amp;quot;. Each time the player kills one of them, it triggers the given event label in the NPC, which will say &amp;quot;You killed Poring X&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Category:Script Command]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Server_Modification</id>
		<title>Server Modification</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Server_Modification"/>
				<updated>2016-09-16T18:09:36Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: Marked as outdated (does not mention plugins and the HPM)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{outdated}}&lt;br /&gt;
&lt;br /&gt;
You can find here some information to start making server-side source modifications.&lt;br /&gt;
&lt;br /&gt;
== How Hercules works ==&lt;br /&gt;
Hercules has a multi-process architecture. It runs three different processes: '''login-server''', '''char-server''' and '''map-server'''.&lt;br /&gt;
&lt;br /&gt;
=== Login Server ===&lt;br /&gt;
'''Login server''' ''':''' receives the login packet, checks if account exists and if the password is correct. If all is OK, the connection is then passed to the '''char-server'''.&lt;br /&gt;
&lt;br /&gt;
=== Char-Server ===&lt;br /&gt;
&lt;br /&gt;
'''Char-server''' ''':''' controls all the character related, Guild, party, pet, inventory etc.&lt;br /&gt;
&lt;br /&gt;
=== Map-Server ===&lt;br /&gt;
The last one is the '''map-server''', which controls char and NPC position, chats, skills, exp etc.&lt;br /&gt;
&lt;br /&gt;
== Source Modifications ==&lt;br /&gt;
Before you start modifying [[Hercules]], you should better take a look first on [[:Category:Source_Functions]]. &lt;br /&gt;
Remember, it's necessary to [[Compiling|re-compile]] [[Hercules]] after a source modification.&lt;br /&gt;
You can also find information about [[packets]].&lt;br /&gt;
&lt;br /&gt;
=== Pre-Made Modifications ===&lt;br /&gt;
Also can take a look at modifications made by other users.&lt;br /&gt;
* [[:Category:Source Snippets|Source Snippets]]&lt;br /&gt;
* [[Customizing Sheet]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Customization]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Setlook</id>
		<title>Setlook</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Setlook"/>
				<updated>2016-09-16T18:07:56Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: Marked as outdated (missing constants)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{outdated}}&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
* [[setlook]] &amp;lt;look type&amp;gt;,&amp;lt;look value&amp;gt;;&lt;br /&gt;
* [[changelook]] &amp;lt;look type&amp;gt;,&amp;lt;look value&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
[[setlook]] will alter the look data for the invoking character. It is used mainly for changing the palette used on hair and clothes: you specify which look type you want to change, then the palette you want to use. Make sure you specify a palette number that exists/is usable by the client you use. [[changelook]] works the same, but is only client side (it doesn't save the look value).&lt;br /&gt;
&lt;br /&gt;
 // This will change your hair(6), so that it uses palette 8, what ever your &lt;br /&gt;
 // palette 8 is, your hair will use that color&lt;br /&gt;
 &lt;br /&gt;
 setlook 6,8;&lt;br /&gt;
 &lt;br /&gt;
 // This will change your clothes(7), so they are using palette 1, whatever &lt;br /&gt;
 // your palette 1 is, your clothes will then use that set of colors.&lt;br /&gt;
 &lt;br /&gt;
 setlook 7,1;&lt;br /&gt;
&lt;br /&gt;
Here are the possible look types:&lt;br /&gt;
* 0 - Base sprite&lt;br /&gt;
* 1 - Hairstyle&lt;br /&gt;
* 2 - Weapon&lt;br /&gt;
* 3 - Head bottom&lt;br /&gt;
* 4 - Head top&lt;br /&gt;
* 5 - Head mid&lt;br /&gt;
* 6 - Hair color&lt;br /&gt;
* 7 - Clothes color&lt;br /&gt;
* 8 - Shield&lt;br /&gt;
* 9 - Shoes&lt;br /&gt;
&lt;br /&gt;
Whatever 'shoes' means is anyone's guess, ask Gravity - the client does nothing with this value. It still wants it from the server though, so it is kept, but normally doesn't do a thing.&lt;br /&gt;
 &lt;br /&gt;
Only the look data for hairstyle, hair color and clothes color are saved to the char server's database and will persist. The rest freely change as the character puts on and removes equipment, changes maps, logs in and out and otherwise you should not expect to set them. In fact, messing with them is generally hazardous, do it at your own risk, it is not tested what will this actually do - it won't cause database corruption and probably won't cause a server crash, but it's easy to crash the client with just about anything unusual.&lt;br /&gt;
&lt;br /&gt;
However, it might be an easy way to quickly check for empty view IDs for sprites, which is essential for making custom headgear.&lt;br /&gt;
&lt;br /&gt;
Since a lot of people have different palettes for hair and clothes, it's impossible to tell you what all the color numbers are. If you want a serious example, there is a Stylist script inside the default Hercules installation that you can look at, this may help you create a Stylist of your own: {{git|npc/custom/stylist.txt}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Script Command]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Mes</id>
		<title>Mes</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Mes"/>
				<updated>2016-09-16T17:57:49Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: Marked Mes as outdated&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{outdated}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Command]]&lt;br /&gt;
==Syntax==&lt;br /&gt;
* [[mes]] &amp;quot;&amp;lt;message&amp;gt;&amp;quot;;&lt;br /&gt;
* [[mes]] &amp;quot;&amp;lt;Line 1&amp;gt;&amp;quot;,&amp;quot;&amp;lt;Line 2&amp;gt;&amp;quot;,&amp;quot;&amp;lt;Line 3&amp;gt;&amp;quot;;&lt;br /&gt;
* [[mes]] &amp;quot;&amp;lt;message&amp;gt;&amp;quot;+&amp;lt;variable&amp;gt; or command +&amp;quot;&amp;lt;message&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
The most basic scripting command.&amp;lt;br&amp;gt;&lt;br /&gt;
Displays a window with '''&amp;lt;message&amp;gt;''' in it to the invoking character, if the window already exists, it will just display the given message.&amp;lt;br&amp;gt;&lt;br /&gt;
Notice that mes does not create a ''next''  or  ''close'' button, so you have to create one using the [[next]] or [[close]] command, otherwise the player will be stuck in your script.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Use the  +  operator to give out multiple messages combined with variables or some commands(for example [[countitem]], [[getitemname]] or [[strcharinfo]])in one mes.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Use &amp;quot;^&amp;lt;Red&amp;gt;&amp;lt;Green&amp;gt;&amp;lt;Blue&amp;gt; &amp;quot; in front of the message to give '''&amp;lt;message&amp;gt;''' a color.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;Red&amp;gt;&amp;lt;Green&amp;gt;&amp;lt;Blue&amp;gt; stand for three hexadecimal numbers, representing the color components of Red Green and Blue in the wanted colour, like a html-code(see examples).&lt;br /&gt;
&amp;lt;br&amp;gt; Do not forget to set the color to black again, by putting &amp;quot;^000000&amp;quot; after your message, exept you want to color your whole text...&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Be careful: &amp;lt;span style=&amp;quot;color:#ff00ff&amp;gt;Magenta&amp;lt;/span&amp;gt; (ff00ff) is considered as transparent in the client, using it in a Dialogue will result in a weird (or funny) effect.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&amp;lt;pre&amp;gt;mes &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
//Will open up a text box with:&amp;lt;/pre&amp;gt;&lt;br /&gt;
Hello World&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mes &amp;quot;Hello 1&amp;quot;,&amp;quot;Hello 2&amp;quot;,&amp;quot;Hello 3&amp;quot;;&lt;br /&gt;
// This will Generate 3 lines&amp;lt;/pre&amp;gt;&lt;br /&gt;
Hello 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Hello 2&amp;lt;br /&amp;gt;&lt;br /&gt;
Hello 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mes &amp;quot;Hello&amp;quot;+strcharinfo(0)+&amp;quot;, how are you?&amp;quot;;&lt;br /&gt;
// Will upon up a textbox printing:&amp;lt;/pre&amp;gt;&lt;br /&gt;
Hello Charname, how are you?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mes &amp;quot;^FF0000 Hello World^000000&amp;quot;;&lt;br /&gt;
//Will open up a text box with&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Hello World&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mes &amp;quot;\'Hello!\'&amp;quot;;&lt;br /&gt;
// use \as prefix to include Symbols:&lt;br /&gt;
// will print:&amp;lt;/pre&amp;gt;&lt;br /&gt;
'Hello!'&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Compiling/Windows</id>
		<title>Compiling/Windows</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Compiling/Windows"/>
				<updated>2016-04-25T12:58:43Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: /* Using Cygwin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For compiling on Windows, Visual Studio is the preferred method, although using Cygwin is also possible.&lt;br /&gt;
&lt;br /&gt;
=== Using Visual Studio ===&lt;br /&gt;
[[Image:Compile-hercules.PNG|thumb|300px|MS Visual Studio 2015: Compile configuration (&amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;red&amp;lt;/span&amp;gt;) and solution (&amp;lt;span style=&amp;quot;color:blue;&amp;quot;&amp;gt;blue&amp;lt;/span&amp;gt;) with it's child projects.]]&lt;br /&gt;
Hercules ships with solution and project files for Visual Studio from 2012 onwards.&lt;br /&gt;
* Download the latest version of [https://www.visualstudio.com Visual Studio] (at the time of writing, MS Visual Studio 2015 Community Edition) and install it, if you do not have Visual Studio already installed.&lt;br /&gt;
* Open '''Hercules-14.sln''' in your Hercules folder if you use Visual Studio 2015, for Visual Studio 2013, you need to open '''Hercules-12.sln''', for Visual Studio 2012, you need to open '''Hercules-11.sln''' instead.&lt;br /&gt;
* Select the desired compile configuration (marked &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;red&amp;lt;/span&amp;gt;). Use '''Release''' when you compile the server, where players will be playing on. '''Debug''' compiles the server without optimizations and with debugging information.&lt;br /&gt;
* Right-click the solution node (marked &amp;lt;span style=&amp;quot;color:blue;&amp;quot;&amp;gt;blue&amp;lt;/span&amp;gt;) and select '''Build solution'''. If you have compiled the server before, it is recommended to use '''Rebuild solution''', as it forces the compiling of all components, not just those, which seem to have changed since last compile.&lt;br /&gt;
* If the compilation was successful, the resulting executables are in the same folder as the solution named ''login-server.exe'', ''char-server.exe'', ''map-server.exe'' and ''mapcache.exe''.&lt;br /&gt;
&lt;br /&gt;
=== Using Cygwin ===&lt;br /&gt;
[http://www.cygwin.com/ Cygwin] is a POSIX compatibility layer for Windows. As such it enables compiling the way it would be done on Linux. Compiling in Cygwin is '''not recommended''' due to lower performance and increased installation complexity.&lt;br /&gt;
&lt;br /&gt;
* Download [http://www.cygwin.com/setup.exe Cygwin] and install it, if not already done so. When installing, select following packages:&lt;br /&gt;
** from ''Devel'': ''cmake'', ''gcc'' and ''make'' &lt;br /&gt;
** from ''Lib'': ''libidn-devel'', ''libpcre-devel'', ''readline'', ''zlib-devel''&lt;br /&gt;
* Running Cygwin Terminal will create folder &amp;lt;code&amp;gt;'''home/user'''&amp;lt;/code&amp;gt; inside Cygwin installation folder, where ''user'' is the name currently logged on Windows user.&lt;br /&gt;
* SQL server needs to be installed in Cygwin so the compiler can access the SQL libraries. Download the .tar.gz archive from the [http://dev.mysql.com/downloads/mysql/?current_os=src MySQL website], such as '''mysql-5.5.20.tar.gz'''.&lt;br /&gt;
* Place the archive into &amp;lt;code&amp;gt;'''/home/user'''&amp;lt;/code&amp;gt; and execute following inside Cygwin Terminal to unpack it:&lt;br /&gt;
  cd ~&lt;br /&gt;
  tar xvzf mysql-5.5.20.tar.gz&lt;br /&gt;
* Navigate to directory with unpacked archive:&lt;br /&gt;
  cd mysql-5.5.20&lt;br /&gt;
* To avoid conficts, replace ''dtoa()'' with ''_dtoa()'' in ''strings/dtoa.c'' file:&lt;br /&gt;
  sed -i 's/dtoa(/_dtoa(/g' ./strings/dtoa.c&lt;br /&gt;
* Build MySQL with following commands:&lt;br /&gt;
  cmake .&lt;br /&gt;
  make mysqlclient libmysql&lt;br /&gt;
  make install&lt;br /&gt;
* After everything completes, Cygwin is ready for compiling Hercules. Navigate to the Hercules folder in Cygwin. Windows drives are accesible as &amp;lt;code&amp;gt;/cygdrive/x&amp;lt;/code&amp;gt; where ''x'' is the letter assigned to the drive by Windows.&lt;br /&gt;
* Execute following commands inside Hercules folder to compile it:&lt;br /&gt;
  ./configure --with-mysql=/usr/local/mysql/bin/mysql_config&lt;br /&gt;
  make sql&lt;br /&gt;
* If the compilation was successful, the resulting executables are in the Hercules folder named ''login-server_sql.exe'', ''char-server_sql.exe'' and ''map-server_sql.exe''.&lt;br /&gt;
* Server executables can be run inside Cygwin Terminal or directly, but in this case you need to copy required libraries to Hercules folder:&lt;br /&gt;
** ''cygwin1.dll'', ''cygz.dll'', ''cyggcc_s-1.dll'', ''cygpcre-0.dll'' from &amp;lt;code&amp;gt;/bin&amp;lt;/code&amp;gt;&lt;br /&gt;
** ''cygmysqlclient-18.dll'' from &amp;lt;code&amp;gt;/usr/local/mysql/lib&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Compiling/Windows</id>
		<title>Compiling/Windows</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Compiling/Windows"/>
				<updated>2016-04-25T12:57:34Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: /* Using Visual Studio */ Updated Visual Studio versions and links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For compiling on Windows, Visual Studio is the preferred method, although using Cygwin is also possible.&lt;br /&gt;
&lt;br /&gt;
=== Using Visual Studio ===&lt;br /&gt;
[[Image:Compile-hercules.PNG|thumb|300px|MS Visual Studio 2015: Compile configuration (&amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;red&amp;lt;/span&amp;gt;) and solution (&amp;lt;span style=&amp;quot;color:blue;&amp;quot;&amp;gt;blue&amp;lt;/span&amp;gt;) with it's child projects.]]&lt;br /&gt;
Hercules ships with solution and project files for Visual Studio from 2012 onwards.&lt;br /&gt;
* Download the latest version of [https://www.visualstudio.com Visual Studio] (at the time of writing, MS Visual Studio 2015 Community Edition) and install it, if you do not have Visual Studio already installed.&lt;br /&gt;
* Open '''Hercules-14.sln''' in your Hercules folder if you use Visual Studio 2015, for Visual Studio 2013, you need to open '''Hercules-12.sln''', for Visual Studio 2012, you need to open '''Hercules-11.sln''' instead.&lt;br /&gt;
* Select the desired compile configuration (marked &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;red&amp;lt;/span&amp;gt;). Use '''Release''' when you compile the server, where players will be playing on. '''Debug''' compiles the server without optimizations and with debugging information.&lt;br /&gt;
* Right-click the solution node (marked &amp;lt;span style=&amp;quot;color:blue;&amp;quot;&amp;gt;blue&amp;lt;/span&amp;gt;) and select '''Build solution'''. If you have compiled the server before, it is recommended to use '''Rebuild solution''', as it forces the compiling of all components, not just those, which seem to have changed since last compile.&lt;br /&gt;
* If the compilation was successful, the resulting executables are in the same folder as the solution named ''login-server.exe'', ''char-server.exe'', ''map-server.exe'' and ''mapcache.exe''.&lt;br /&gt;
&lt;br /&gt;
=== Using Cygwin ===&lt;br /&gt;
[http://www.cygwin.com/ Cygwin] is a Linux environment emulation for Windows. As such it enables compiling the way it would be done on Linux. Compiling in Cygwin is '''not recommended''' due to lower performance and increased installation complexity.&lt;br /&gt;
&lt;br /&gt;
* Download [http://www.cygwin.com/setup.exe Cygwin] and install it, if not already done so. When installing, select following packages:&lt;br /&gt;
** from ''Devel'': ''cmake'', ''gcc'' and ''make'' &lt;br /&gt;
** from ''Lib'': ''libidn-devel'', ''libpcre-devel'', ''readline'', ''zlib-devel''&lt;br /&gt;
* Running Cygwin Terminal will create folder &amp;lt;code&amp;gt;'''home/user'''&amp;lt;/code&amp;gt; inside Cygwin installation folder, where ''user'' is the name currently logged on Windows user.&lt;br /&gt;
* SQL server needs to be installed in Cygwin so the compiler can access the SQL libraries. Download the .tar.gz archive from the [http://dev.mysql.com/downloads/mysql/?current_os=src MySQL website], such as '''mysql-5.5.20.tar.gz'''.&lt;br /&gt;
* Place the archive into &amp;lt;code&amp;gt;'''/home/user'''&amp;lt;/code&amp;gt; and execute following inside Cygwin Terminal to unpack it:&lt;br /&gt;
  cd ~&lt;br /&gt;
  tar xvzf mysql-5.5.20.tar.gz&lt;br /&gt;
* Navigate to directory with unpacked archive:&lt;br /&gt;
  cd mysql-5.5.20&lt;br /&gt;
* To avoid conficts, replace ''dtoa()'' with ''_dtoa()'' in ''strings/dtoa.c'' file:&lt;br /&gt;
  sed -i 's/dtoa(/_dtoa(/g' ./strings/dtoa.c&lt;br /&gt;
* Build MySQL with following commands:&lt;br /&gt;
  cmake .&lt;br /&gt;
  make mysqlclient libmysql&lt;br /&gt;
  make install&lt;br /&gt;
* After everything completes, Cygwin is ready for compiling Hercules. Navigate to the Hercules folder in Cygwin. Windows drives are accesible as &amp;lt;code&amp;gt;/cygdrive/x&amp;lt;/code&amp;gt; where ''x'' is the letter assigned to the drive by Windows.&lt;br /&gt;
* Execute following commands inside Hercules folder to compile it:&lt;br /&gt;
  ./configure --with-mysql=/usr/local/mysql/bin/mysql_config&lt;br /&gt;
  make sql&lt;br /&gt;
* If the compilation was successful, the resulting executables are in the Hercules folder named ''login-server_sql.exe'', ''char-server_sql.exe'' and ''map-server_sql.exe''.&lt;br /&gt;
* Server executables can be run inside Cygwin Terminal or directly, but in this case you need to copy required libraries to Hercules folder:&lt;br /&gt;
** ''cygwin1.dll'', ''cygz.dll'', ''cyggcc_s-1.dll'', ''cygpcre-0.dll'' from &amp;lt;code&amp;gt;/bin&amp;lt;/code&amp;gt;&lt;br /&gt;
** ''cygmysqlclient-18.dll'' from &amp;lt;code&amp;gt;/usr/local/mysql/lib&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Compiling</id>
		<title>Compiling</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Compiling"/>
				<updated>2016-04-25T12:48:34Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: /* Make */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Unix ==&lt;br /&gt;
=== Using configure &amp;amp; make ===&lt;br /&gt;
Configure and make are commands used commonly to configure, build and install Linux applications.&lt;br /&gt;
==== Configure ====&lt;br /&gt;
{{:Configure}}&lt;br /&gt;
==== Make ====&lt;br /&gt;
 make sql&lt;br /&gt;
You should be now noticing that you have 3 new files: '''char-server''', '''map-server''', and '''login-server'''.&lt;br /&gt;
Make install is not yet supported.&lt;br /&gt;
&lt;br /&gt;
=== Using cmake &amp;amp; make ===&lt;br /&gt;
[http://www.vtk.org/Wiki/CMake Cmake] is a cross-platform configure.&lt;br /&gt;
&lt;br /&gt;
Start creating a new sub directory and move there&lt;br /&gt;
   mkdir build&lt;br /&gt;
   cd build&lt;br /&gt;
&lt;br /&gt;
==== Building makefiles ====&lt;br /&gt;
Generate the make files by cmake&lt;br /&gt;
   cmake -G&amp;quot;Unix Makefiles&amp;quot; -DINSTALL_TO_SOURCE=ON ..&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-- The C compiler identification is GNU&lt;br /&gt;
-- Check for working C compiler: /usr/bin/gcc&lt;br /&gt;
-- Check for working C compiler: /usr/bin/gcc -- works&lt;br /&gt;
-- Detecting C compiler ABI info&lt;br /&gt;
-- Detecting C compiler ABI info - done&lt;br /&gt;
-- Detecting system MYSQL&lt;br /&gt;
-- Found MYSQL: /usr/lib/libmysqlclient.so (found version &amp;quot;5.1.58&amp;quot;)&lt;br /&gt;
-- Detecting system MYSQL - done&lt;br /&gt;
-- Configuring for system MYSQL&lt;br /&gt;
-- Configuring for system MYSQL - done&lt;br /&gt;
-- Detecting system PCRE&lt;br /&gt;
-- Found PCRE: /usr/lib/i386-linux-gnu/libpcre.so (found version &amp;quot;8.12&amp;quot;)&lt;br /&gt;
-- Detecting system PCRE - done&lt;br /&gt;
-- Configuring for system PCRE&lt;br /&gt;
...&lt;br /&gt;
-- Creating target login-server_sql&lt;br /&gt;
-- Creating target login-server_sql - done&lt;br /&gt;
-- Creating target char-server_sql&lt;br /&gt;
-- Creating target char-server_sql - done&lt;br /&gt;
-- Creating target map-server_sql&lt;br /&gt;
-- Enabled PCRE code&lt;br /&gt;
-- Creating target map-server_sql - done&lt;br /&gt;
-- Creating target mapcache&lt;br /&gt;
-- Creating target mapcache - done&lt;br /&gt;
-- Disabled dbghelpplug plugin target (requires WIN32 and HAVE_DBGHELP_H)&lt;br /&gt;
-- Available targets:&lt;br /&gt;
-- 	common_base&lt;br /&gt;
-- 	common_sql&lt;br /&gt;
-- 	login-server_sql&lt;br /&gt;
-- 	map-server_sql&lt;br /&gt;
-- 	mapcache&lt;br /&gt;
-- Configuring done&lt;br /&gt;
-- Generating done&lt;br /&gt;
-- Build files have been written to: /home/*/Hercules/build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Compilation ====&lt;br /&gt;
Then compile&lt;br /&gt;
   make install&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scanning dependencies of target common_base&lt;br /&gt;
[  1%] Building C object src/common/CMakeFiles/common_base.dir/__/__/3rdparty/mt19937ar/mt19937ar.c.o&lt;br /&gt;
[  1%] Building C object src/common/CMakeFiles/common_base.dir/core.c.o&lt;br /&gt;
[  2%] Building C object src/common/CMakeFiles/common_base.dir/db.c.o&lt;br /&gt;
[  3%] Building C object src/common/CMakeFiles/common_base.dir/des.c.o&lt;br /&gt;
...&lt;br /&gt;
[ 98%] Building C object src/tool/CMakeFiles/mapcache.dir/__/common/grfio.c.o&lt;br /&gt;
[ 99%] Building C object src/tool/CMakeFiles/mapcache.dir/__/common/utils.c.o&lt;br /&gt;
[100%] Building C object src/tool/CMakeFiles/mapcache.dir/mapcache.c.o&lt;br /&gt;
...&lt;br /&gt;
-- Installing: ~/Hercules/./login-server_sql&lt;br /&gt;
-- Installing: ~/Hercules/./char-server_sql&lt;br /&gt;
-- Installing: ~/Hercules/./map-server_sql&lt;br /&gt;
-- Installing: ~/Hercules/./mapcache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You'll see nice green output progression then finally login-server_sql, map-server_sql, char-server_sql, in main folder&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
{{:Compiling/Windows}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Configure</id>
		<title>Configure</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Configure"/>
				<updated>2016-04-25T12:48:01Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Using '''configure''' script is a method to generate makefiles before compilation in Unix systems.&lt;br /&gt;
&lt;br /&gt;
When installing Hercules, configure script should be run after [[Git Clone]] and before compiling.&lt;br /&gt;
&lt;br /&gt;
== Basic usage ==&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;&amp;lt;includeonly&amp;gt;&amp;lt;blockquote&amp;gt;''Main article: [[Configure]].''&amp;lt;/blockquote&amp;gt;&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
To avoid errors in server-client communication, &amp;lt;code&amp;gt;[[PACKETVER]]&amp;lt;/code&amp;gt; must be set to date the client you're going to use has been released at (in YYYYMMDD format), eg &amp;lt;code&amp;gt;20100730&amp;lt;/code&amp;gt; for 2010-07-30aRagexeRE. Instead of editing [[mmo.h]] directly, &amp;lt;code&amp;gt;PACKETVER&amp;lt;/code&amp;gt; can be set to desired date with configure switch &amp;lt;code&amp;gt;--enable-packetver=YYYYMMDD&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Run following command, replacing ''YYYYMMDD'' with your client release date, eg ''20100730''.&lt;br /&gt;
  ./configure --enable-packetver=YYYYMMDD&lt;br /&gt;
Configure script will perform necessary tests and generate makefiles.&lt;br /&gt;
&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
=== Sample output ===&lt;br /&gt;
&amp;lt;pre&amp;gt;checking whether make sets $(MAKE)... yes&lt;br /&gt;
checking for gcc... gcc&lt;br /&gt;
checking for C compiler default output file name... a.out&lt;br /&gt;
checking whether the C compiler works... yes&lt;br /&gt;
checking whether we are cross compiling... no&lt;br /&gt;
checking for suffix of executables...&lt;br /&gt;
checking for suffix of object files... o&lt;br /&gt;
checking whether we are using the GNU C compiler... yes&lt;br /&gt;
checking whether gcc accepts -g... yes&lt;br /&gt;
checking for gcc option to accept ANSI C... none needed&lt;br /&gt;
checking how to run the C preprocessor... gcc -E&lt;br /&gt;
checking whether byte ordering is bigendian... no&lt;br /&gt;
checking whether pointers can be stored in ints (old code)... yes&lt;br /&gt;
checking whether gcc supports -Wno-unused-parameter... yes&lt;br /&gt;
checking whether gcc supports -Wno-pointer-sign... yes&lt;br /&gt;
checking whether gcc can actually use -Wno-pointer-sign... yes&lt;br /&gt;
checking whether gcc supports -Wno-switch... yes&lt;br /&gt;
checking whether gcc supports -fPIC... yes&lt;br /&gt;
checking whether gcc needs -fPIC for shared objects... no&lt;br /&gt;
checking whether gcc supports -fno-strict-aliasing... yes&lt;br /&gt;
checking whether gcc is able to typecast to union... yes&lt;br /&gt;
checking for setrlimit... yes&lt;br /&gt;
checking for strnlen... yes&lt;br /&gt;
checking for inflateEnd in -lz... yes&lt;br /&gt;
checking zlib.h usability... yes&lt;br /&gt;
checking zlib.h presence... yes&lt;br /&gt;
checking for zlib.h... yes&lt;br /&gt;
checking for library containing sqrt... -lm&lt;br /&gt;
checking for library containing clock_gettime... -lrt&lt;br /&gt;
checking whether CLOCK_MONOTONIC is supported and works... yes&lt;br /&gt;
checking for mysql_config... /usr/bin/mysql_config&lt;br /&gt;
checking for mysql_init in -lmysqlclient... yes&lt;br /&gt;
checking mysql.h usability... yes&lt;br /&gt;
checking mysql.h presence... yes&lt;br /&gt;
checking for mysql.h... yes&lt;br /&gt;
checking MySQL library (optional)... yes (5.0.51a)&lt;br /&gt;
checking for pcre_study in -lpcre... yes&lt;br /&gt;
checking PCRE library (optional)... yes&lt;br /&gt;
checking host OS... Linux&lt;br /&gt;
checking for MinGW... no&lt;br /&gt;
configure: creating ./config.status&lt;br /&gt;
config.status: creating Makefile&lt;br /&gt;
config.status: creating src/common/Makefile&lt;br /&gt;
config.status: creating 3rdparty/mt19937ar/Makefile&lt;br /&gt;
config.status: creating src/char/Makefile&lt;br /&gt;
config.status: creating src/login/Makefile&lt;br /&gt;
config.status: creating src/char_sql/Makefile&lt;br /&gt;
config.status: creating src/txt-converter/Makefile&lt;br /&gt;
config.status: creating src/map/Makefile&lt;br /&gt;
config.status: creating src/plugins/Makefile&lt;br /&gt;
config.status: creating src/tool/Makefile&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Setting executable bit ===&lt;br /&gt;
In order to run configure script it must be executable, ie have the ''execute'' permission set. When checking out a working copy from a git repository repository, executable bit should be set automatically. However, if it fails for some reason, running &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; will bring the following message (or similar):&lt;br /&gt;
  bash: ./configure: Permission denied&lt;br /&gt;
To fix this, set executable permission with:&lt;br /&gt;
  chmod +x ./configure&lt;br /&gt;
&lt;br /&gt;
== Additional switches ==&lt;br /&gt;
To display all available switches use:&lt;br /&gt;
  ./configure --help&lt;br /&gt;
&lt;br /&gt;
=== Debug mode ===&lt;br /&gt;
It is possible to compile Hercules in debug mode with &amp;lt;code&amp;gt;--enable-debug&amp;lt;/code&amp;gt; switch.&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/NPC</id>
		<title>NPC</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/NPC"/>
				<updated>2016-04-25T12:33:19Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: Corrected forum URL&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Kafra2.gif|thumb|[[Kafra]] NPC]]&lt;br /&gt;
[[NPC]] stands for Non-Player (or playable) Character. An NPC is any person or &amp;quot;living&amp;quot; creature in a game not controlled by a player. For example, any units in any game that would give you a quest, tell you what to do, or just stand there while you speak to them is considered an NPC.&lt;br /&gt;
&lt;br /&gt;
In [[Ragnarok Online]], NPCs are a pretty big part of the game. The [[Hercules]] scripting language is used to create NPCs. You can find many premade NPCs on the [http://herc.ws/board/ Hercules Boards]. Any character you speak to in Ragnarok Online not controlled by a player is an NPC. From warpers, over healers and quest guides, to item sellers. Generally, in Ragnarok Online, a monster is referred to as a [[mob]], and not an NPC, however they are technically considered NPCs as well.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Adding a Script|Adding a NPC script]]&lt;br /&gt;
* [[Basic Scripting]]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
* [http://herc.ws/board/ Hercules Boards]&lt;br /&gt;
* [http://img476.imageshack.us/img476/6914/npcs7bh.jpg ID and images of RO Sprites]&lt;br /&gt;
* http://kalen.s79.xrea.com/npc/npc.shtml&lt;br /&gt;
* http://nn.nachtwolke.com/dev/npclist/&lt;br /&gt;
&lt;br /&gt;
[[Category:Basics]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Import_folder</id>
		<title>Import folder</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Import_folder"/>
				<updated>2016-04-25T12:26:55Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: /* How it works */ removed references to svn&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Import folder Introduction=&lt;br /&gt;
The Import Folder is used to import virtually all of your configuration changes and settings into the core of the Hercules emulator without ever making changes to any .conf files after it is initially configured. This is very helpful when Creating a New Server Build, Compiling , or Updating to the Latest version this will allow retention of all the settings you previously configured without having to deal with possible overwrite conflicts from a git pull or change over to a New Server Build.&lt;br /&gt;
&lt;br /&gt;
=How it works=&lt;br /&gt;
So, It works as such; Once you have configured all of the files you wish to configure within the Conf directory of your server side you will take those same settings and copy them to the corresponding import directory files. For Example: Lets say you make the following changes to;&lt;br /&gt;
&lt;br /&gt;
'''conf/battle/client.conf'''  ---&amp;gt; Make your desired changes, in this case we are changing hair and dye settings.&lt;br /&gt;
 // Valid range of dyes and styles on the client.&lt;br /&gt;
 min_hair_style: 0&lt;br /&gt;
 max_hair_style: 27 ----&amp;gt; Changing to 40&lt;br /&gt;
 min_hair_color: 0&lt;br /&gt;
 max_hair_color: 8 ----&amp;gt; Changing to 200&lt;br /&gt;
 min_cloth_color: 0 &lt;br /&gt;
 max_cloth_color: 4 ----&amp;gt; Changing to 100&lt;br /&gt;
&lt;br /&gt;
'''conf/battle/client.conf'''  ---&amp;gt;  We then simply copy only the changed setting lines into  ---&amp;gt;  conf/import/client_conf.txt&lt;br /&gt;
&lt;br /&gt;
 max_hair_style: 40&lt;br /&gt;
 max_hair_color: 200&lt;br /&gt;
 max_cloth_color: 100&lt;br /&gt;
&lt;br /&gt;
Since these three settings were the only ones we changed in this example these are the only configuration lines to copy from the .conf file into the corresponding import.txt file. This will now allow the server to directly import these changed settings. This can be done with any of the configuration files. The server reads .confs files within the conf directory first, however any settings configured within the /import/ folder will be read second, thus overwriting default settings. Please note over time settings have changed, so please compare Import.txt Files to any New Server Configuration Settings.&lt;br /&gt;
&lt;br /&gt;
=Commonly Imported Settings=&lt;br /&gt;
&lt;br /&gt;
The most common use of these files is for the following parameters:&amp;lt;br /&amp;gt;&lt;br /&gt;
'''/conf/login_athena.conf''' -&amp;gt; /conf/import/login_conf.txt&lt;br /&gt;
 login_port: 6900&lt;br /&gt;
 account.engine: auto&lt;br /&gt;
 account.sql.db_hostname: 127.0.0.1&lt;br /&gt;
 account.sql.db_port: 3306&lt;br /&gt;
 account.sql.db_username: ragnarok&lt;br /&gt;
 account.sql.db_password: ragnarok&lt;br /&gt;
 account.sql.db_database: ragnarok&lt;br /&gt;
&lt;br /&gt;
'''/conf/char_athena.conf''' -&amp;gt; /conf/import/char_conf.txt&lt;br /&gt;
 userid: s1&lt;br /&gt;
 passwd: p1&lt;br /&gt;
 server_name: Hercules&lt;br /&gt;
 login_port: 6900&lt;br /&gt;
 char_ip: 127.0.0.1&lt;br /&gt;
 char_port: 6121&lt;br /&gt;
 start_point: new_1-1,53,111&lt;br /&gt;
&lt;br /&gt;
'''/conf/map_athena.conf''' -&amp;gt; /conf/import/map_conf.txt&lt;br /&gt;
 userid: s1&lt;br /&gt;
 passwd: p1&lt;br /&gt;
 char_ip: 127.0.0.1&lt;br /&gt;
 char_port: 6121&lt;br /&gt;
 map_ip: 127.0.0.1&lt;br /&gt;
 map_port: 5121&lt;br /&gt;
&lt;br /&gt;
'''/conf/inter_athena.conf''' -&amp;gt; /conf/import/inter_conf.txt&lt;br /&gt;
 sql.db_hostname: 127.0.0.1&lt;br /&gt;
 sql.db_port: 3306&lt;br /&gt;
 sql.db_username: ragnarok&lt;br /&gt;
 sql.db_password: ragnarok&lt;br /&gt;
 sql.db_database: ragnarok&lt;br /&gt;
 char_server_ip: 127.0.0.1&lt;br /&gt;
 char_server_port: 3306&lt;br /&gt;
 char_server_id: ragnarok&lt;br /&gt;
 char_server_pw: ragnarok&lt;br /&gt;
 char_server_db: ragnarok&lt;br /&gt;
 map_server_ip: 127.0.0.1&lt;br /&gt;
 map_server_port: 3306&lt;br /&gt;
 map_server_id: ragnarok&lt;br /&gt;
 map_server_pw: ragnarok&lt;br /&gt;
 map_server_db: ragnarok&lt;br /&gt;
 log_db_ip: 127.0.0.1&lt;br /&gt;
 log_db_port: 3306&lt;br /&gt;
 log_db_id: ragnarok&lt;br /&gt;
 log_db_pw: ragnarok&lt;br /&gt;
 log_db_db: ragnarok&lt;br /&gt;
 log_login_db: loginlog&lt;br /&gt;
 use_sql_db: no&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
The Import Folder is a powerful tool and is often overlooked by amateur developers, but it saves a lot of time and effort it is highly recommended to use. The import.txt files can be saved and used in any new build, just ensure you double check the pathways and corresponding configuration settings. The import folder is often incomplete or blank when downloading latest revisions, you will have to add the necessary files or overwrite the blank template files.&lt;br /&gt;
&lt;br /&gt;
[[Category:Configuration]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Import_folder</id>
		<title>Import folder</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Import_folder"/>
				<updated>2016-04-25T12:26:31Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: /* Import folder Introduction */ removes svn references&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Import folder Introduction=&lt;br /&gt;
The Import Folder is used to import virtually all of your configuration changes and settings into the core of the Hercules emulator without ever making changes to any .conf files after it is initially configured. This is very helpful when Creating a New Server Build, Compiling , or Updating to the Latest version this will allow retention of all the settings you previously configured without having to deal with possible overwrite conflicts from a git pull or change over to a New Server Build.&lt;br /&gt;
&lt;br /&gt;
=How it works=&lt;br /&gt;
So, It works as such; Once you have configured all of the files you wish to configure within the Conf directory of your server side you will take those same settings and copy them to the corresponding import directory files. For Example: Lets say you make the following changes to;&lt;br /&gt;
&lt;br /&gt;
'''svn/conf/battle/client.conf'''  ---&amp;gt; Make your desired changes, in this case we are changing hair and dye settings.&lt;br /&gt;
 // Valid range of dyes and styles on the client.&lt;br /&gt;
 min_hair_style: 0&lt;br /&gt;
 max_hair_style: 27 ----&amp;gt; Changing to 40&lt;br /&gt;
 min_hair_color: 0&lt;br /&gt;
 max_hair_color: 8 ----&amp;gt; Changing to 200&lt;br /&gt;
 min_cloth_color: 0 &lt;br /&gt;
 max_cloth_color: 4 ----&amp;gt; Changing to 100&lt;br /&gt;
&lt;br /&gt;
'''svn/conf/battle/client.conf'''  ---&amp;gt;  We then simply copy only the changed setting lines into  ---&amp;gt;  svn/conf/import/client_conf.txt&lt;br /&gt;
&lt;br /&gt;
 max_hair_style: 40&lt;br /&gt;
 max_hair_color: 200&lt;br /&gt;
 max_cloth_color: 100&lt;br /&gt;
&lt;br /&gt;
Since these three settings were the only ones we changed in this example these are the only configuration lines to copy from the .conf file into the corresponding import.txt file. This will now allow the server to directly import these changed settings. This can be done with any of the configuration files. The server reads .confs files within the conf directory first, however any settings configured within the /import/ folder will be read second, thus overwriting default settings. Please note over time settings have changed, so please compare Import.txt Files to any New Server Configuration Settings.&lt;br /&gt;
&lt;br /&gt;
=Commonly Imported Settings=&lt;br /&gt;
&lt;br /&gt;
The most common use of these files is for the following parameters:&amp;lt;br /&amp;gt;&lt;br /&gt;
'''/conf/login_athena.conf''' -&amp;gt; /conf/import/login_conf.txt&lt;br /&gt;
 login_port: 6900&lt;br /&gt;
 account.engine: auto&lt;br /&gt;
 account.sql.db_hostname: 127.0.0.1&lt;br /&gt;
 account.sql.db_port: 3306&lt;br /&gt;
 account.sql.db_username: ragnarok&lt;br /&gt;
 account.sql.db_password: ragnarok&lt;br /&gt;
 account.sql.db_database: ragnarok&lt;br /&gt;
&lt;br /&gt;
'''/conf/char_athena.conf''' -&amp;gt; /conf/import/char_conf.txt&lt;br /&gt;
 userid: s1&lt;br /&gt;
 passwd: p1&lt;br /&gt;
 server_name: Hercules&lt;br /&gt;
 login_port: 6900&lt;br /&gt;
 char_ip: 127.0.0.1&lt;br /&gt;
 char_port: 6121&lt;br /&gt;
 start_point: new_1-1,53,111&lt;br /&gt;
&lt;br /&gt;
'''/conf/map_athena.conf''' -&amp;gt; /conf/import/map_conf.txt&lt;br /&gt;
 userid: s1&lt;br /&gt;
 passwd: p1&lt;br /&gt;
 char_ip: 127.0.0.1&lt;br /&gt;
 char_port: 6121&lt;br /&gt;
 map_ip: 127.0.0.1&lt;br /&gt;
 map_port: 5121&lt;br /&gt;
&lt;br /&gt;
'''/conf/inter_athena.conf''' -&amp;gt; /conf/import/inter_conf.txt&lt;br /&gt;
 sql.db_hostname: 127.0.0.1&lt;br /&gt;
 sql.db_port: 3306&lt;br /&gt;
 sql.db_username: ragnarok&lt;br /&gt;
 sql.db_password: ragnarok&lt;br /&gt;
 sql.db_database: ragnarok&lt;br /&gt;
 char_server_ip: 127.0.0.1&lt;br /&gt;
 char_server_port: 3306&lt;br /&gt;
 char_server_id: ragnarok&lt;br /&gt;
 char_server_pw: ragnarok&lt;br /&gt;
 char_server_db: ragnarok&lt;br /&gt;
 map_server_ip: 127.0.0.1&lt;br /&gt;
 map_server_port: 3306&lt;br /&gt;
 map_server_id: ragnarok&lt;br /&gt;
 map_server_pw: ragnarok&lt;br /&gt;
 map_server_db: ragnarok&lt;br /&gt;
 log_db_ip: 127.0.0.1&lt;br /&gt;
 log_db_port: 3306&lt;br /&gt;
 log_db_id: ragnarok&lt;br /&gt;
 log_db_pw: ragnarok&lt;br /&gt;
 log_db_db: ragnarok&lt;br /&gt;
 log_login_db: loginlog&lt;br /&gt;
 use_sql_db: no&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
The Import Folder is a powerful tool and is often overlooked by amateur developers, but it saves a lot of time and effort it is highly recommended to use. The import.txt files can be saved and used in any new build, just ensure you double check the pathways and corresponding configuration settings. The import folder is often incomplete or blank when downloading latest revisions, you will have to add the necessary files or overwrite the blank template files.&lt;br /&gt;
&lt;br /&gt;
[[Category:Configuration]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Custom_Items</id>
		<title>Custom Items</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Custom_Items"/>
				<updated>2016-04-25T12:25:38Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: /* Item Script */ removed references to svn&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Structure=&lt;br /&gt;
First, let's take a look at the item_db.conf in the db folder, and its structure:&lt;br /&gt;
 item_db: (&lt;br /&gt;
 {&lt;br /&gt;
 	// =================== Mandatory fields ===============================&lt;br /&gt;
 	Id: ID                        (int)&lt;br /&gt;
 	AegisName: &amp;quot;Aegis_Name&amp;quot;       (string, optional if Inherit: true)&lt;br /&gt;
 	Name: &amp;quot;Item Name&amp;quot;             (string, optional if Inherit: true)&lt;br /&gt;
 	// =================== Optional fields ================================&lt;br /&gt;
 	Type: Item Type               (int, defaults to 3 = etc item)&lt;br /&gt;
 	Buy: Buy Price                (int, defaults to Sell * 2)&lt;br /&gt;
 	Sell: Sell Price              (int, defaults to Buy / 2)&lt;br /&gt;
 	Weight: Item Weight           (int, defaults to 0)&lt;br /&gt;
 	Atk: Attack                   (int, defaults to 0)&lt;br /&gt;
 	Matk: Magical Attack          (int, defaults to 0, ignored in pre-re)&lt;br /&gt;
 	Def: Defense                  (int, defaults to 0)&lt;br /&gt;
 	Range: Attack Range           (int, defaults to 0)&lt;br /&gt;
 	Slots: Slots                  (int, defaults to 0)&lt;br /&gt;
 	Job: Job mask                 (int, defaults to all jobs = 0xFFFFFFFF)&lt;br /&gt;
 	Upper: Upper mask             (int, defaults to any = 0x3f)&lt;br /&gt;
 	Gender: Gender                (int, defaults to both = 2)&lt;br /&gt;
 	Loc: Equip location           (int, required value for equipment)&lt;br /&gt;
 	WeaponLv: Weapon Level        (int, defaults to 0)&lt;br /&gt;
 	EquipLv: Equip required level (int, defaults to 0)&lt;br /&gt;
 	EquipLv: [min, max]           (alternative syntax with min / max level)&lt;br /&gt;
 	Refine: Refineable            (boolean, defaults to true)&lt;br /&gt;
 	View: View ID                 (int, defaults to 0)&lt;br /&gt;
 	BindOnEquip: true/false       (boolean, defaults to false)&lt;br /&gt;
 	Script: &amp;lt;&amp;quot;&lt;br /&gt;
 		Script&lt;br /&gt;
 		(it can be multi-line)&lt;br /&gt;
 	&amp;quot;&amp;gt;&lt;br /&gt;
 	OnEquipScript: &amp;lt;&amp;quot; OnEquip Script (can also be multi-line) &amp;quot;&amp;gt;&lt;br /&gt;
 	OnUnequipScript: &amp;lt;&amp;quot; OnUnequip Script (can also be multi-line) &amp;quot;&amp;gt;&lt;br /&gt;
 	// =================== Optional fields (item_db2 only) ================&lt;br /&gt;
 	Inherit: true/false           (boolean, if true, inherit the values&lt;br /&gt;
 	                              that weren't specified, from item_db.conf,&lt;br /&gt;
 	                              else override it and use default values)&lt;br /&gt;
 },&lt;br /&gt;
 ...&lt;br /&gt;
 )&lt;br /&gt;
&lt;br /&gt;
* '''ID''': ID of the item.&lt;br /&gt;
* '''AegisName''': Server name to reference the item in scripts and lookups, should use no spaces.&lt;br /&gt;
* '''Name''': Name in English for displaying as output for @ and script commands.&lt;br /&gt;
* '''Type''': Purpose of the item.&lt;br /&gt;
 0 = Usable : healing&lt;br /&gt;
 2 = Usable : other&lt;br /&gt;
 3 = Misc&lt;br /&gt;
 4 = Weapon&lt;br /&gt;
 5 = Armor&lt;br /&gt;
 6 = Card&lt;br /&gt;
 7 = Pet Egg&lt;br /&gt;
 8 = Pet Equipment&lt;br /&gt;
 10 = Arrow/Ammunition&lt;br /&gt;
 11 = Usable : delayed consumption (items with script &amp;quot;pet&amp;quot; or &amp;quot;itemskill&amp;quot;)&lt;br /&gt;
 18 = Another delayed consume that requires user confirmation before using item.&lt;br /&gt;
* '''Buy''': Default [[NPC]] buying price in Zeny. When not specified, becomes double the sell price.&lt;br /&gt;
* '''Sell''': Default [[NPC]] selling price in Zeny. When not specified, becomes half the buy price.&lt;br /&gt;
* '''Weight''': Item's weight. Each 10 is 1 weight. When not specified, becomes 0.&lt;br /&gt;
* '''ATK''': Base weapon attack, in case of a weapon. When not specified, becomes 0.&lt;br /&gt;
** In '''RE''' enabled servers this field have a optional delimiter ''':''' to define this item's weaponMATK bonus, for example, '''30:50''' would mean the item gives 30 atk and 50 weaponMATK&lt;br /&gt;
* '''Matk''': Weapon's magical attack (only used in renewal mode, ignored in pre-renewal). When not specified, becomes 0.&lt;br /&gt;
* '''DEF''': Base defense for armor-type items. When not specified, becomes 0.&lt;br /&gt;
* '''Range''': Maximum range in map cells a weapon allows to be the player apart from it's target. When not specified, becomes 0.&lt;br /&gt;
* '''Slots''': Amount of card slots in weapon/armor-type items. When not specified, becomes 0.&lt;br /&gt;
* '''Job''': Which jobs this item is available for. Values below can be combined to achieve availability for multiple job classes, i. e. &amp;lt;code&amp;gt;0x2|0x4 -&amp;gt; 0x6&amp;lt;/code&amp;gt; (Swordman+Mage)&lt;br /&gt;
 (S.) Novice         (2^00): 0x00000001&lt;br /&gt;
 Swordman            (2^01): 0x00000002&lt;br /&gt;
 Mage                (2^02): 0x00000004&lt;br /&gt;
 Archer              (2^03): 0x00000008&lt;br /&gt;
 Acolyte             (2^04): 0x00000010&lt;br /&gt;
 Merchant            (2^05): 0x00000020&lt;br /&gt;
 Thief               (2^06): 0x00000040&lt;br /&gt;
 Knight              (2^07): 0x00000080&lt;br /&gt;
 Priest              (2^08): 0x00000100&lt;br /&gt;
 Wizard              (2^09): 0x00000200&lt;br /&gt;
 Blacksmith          (2^10): 0x00000400&lt;br /&gt;
 Hunter              (2^11): 0x00000800&lt;br /&gt;
 Assassin            (2^12): 0x00001000&lt;br /&gt;
 ''Unused''              (2^13): 0x00002000&lt;br /&gt;
 Crusader            (2^14): 0x00004000&lt;br /&gt;
 Monk                (2^15): 0x00008000&lt;br /&gt;
 Sage                (2^16): 0x00010000&lt;br /&gt;
 Rogue               (2^17): 0x00020000&lt;br /&gt;
 Alchemist           (2^18): 0x00040000&lt;br /&gt;
 Bard/Dancer         (2^19): 0x00080000&lt;br /&gt;
 ''Unused''              (2^20): 0x00100000&lt;br /&gt;
 Taekwon             (2^21): 0x00200000&lt;br /&gt;
 StarGladiator       (2^22): 0x00400000&lt;br /&gt;
 Soul Linker         (2^23): 0x00800000&lt;br /&gt;
 Gunslinger          (2^24): 0x01000000&lt;br /&gt;
 Ninja               (2^25): 0x02000000&lt;br /&gt;
 Gangsi              (2^26): 0x04000000&lt;br /&gt;
 Death Knight        (2^27): 0x08000000&lt;br /&gt;
 Dark Collector      (2^28): 0x10000000&lt;br /&gt;
 Kagerou/Oboro       (2^29): 0x20000000&lt;br /&gt;
 Rebellion           (2^30): 0x40000000&lt;br /&gt;
 '''Some other commonly used values:'''&lt;br /&gt;
 All Classes               : 0xFFFFFFFF&lt;br /&gt;
 Every Job Except Novice   : 0xFFFFFFFE&lt;br /&gt;
* '''Upper''': Specifies whether the item can be used by normal, baby or reborn classes. Values below can be combined, i. e. &amp;lt;code&amp;gt;1|4 -&amp;gt; 5&amp;lt;/code&amp;gt; (Normal+Baby Classes)&lt;br /&gt;
** Note: Setting &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; enables the item for Transcendant and 3rd classes. Use &amp;lt;code&amp;gt;8&amp;lt;/code&amp;gt; to enable the item for 3rd classes only.&lt;br /&gt;
 Normal jobs:      0x01 (1)&lt;br /&gt;
 Upper jobs:       0x02 (2)&lt;br /&gt;
 Baby jobs:        0x04 (4)&lt;br /&gt;
 Third jobs:       0x08 (8)&lt;br /&gt;
 Upper Third jobs: 0x10 (16)&lt;br /&gt;
 Baby Third jobs:  0x20 (32)&lt;br /&gt;
 &lt;br /&gt;
 Under pre-re mode third classes are considered upper, making use of&lt;br /&gt;
 the 8 and above masks is therefore not necessary unless in renewal&lt;br /&gt;
 mode. When no value is specified, all classes (mask 0x3f) are able to&lt;br /&gt;
 equip the item.&lt;br /&gt;
* '''Gender''': Gender restriction for the item.&lt;br /&gt;
 0 = Female&lt;br /&gt;
 1 = Male&lt;br /&gt;
 2 = No restriction (both)&lt;br /&gt;
* '''Loc''': Equipment location of armor and arrow-type items. Values below can be combined, i. e. 136 would indicate both accessory slots (typical value for accessories).&lt;br /&gt;
 (2^0)        1 = Lower headgear&lt;br /&gt;
 (2^1)        2 = Right hand&lt;br /&gt;
 (2^2)        4 = Mantle&lt;br /&gt;
 (2^3)        8 = Accessory 1&lt;br /&gt;
 (2^4)       16 = Armor&lt;br /&gt;
 (2^5)       32 = Left hand&lt;br /&gt;
 (2^6)       64 = Shoes&lt;br /&gt;
 (2^7)      128 = Accessory 2&lt;br /&gt;
 (2^8)      256 = Upper headgear&lt;br /&gt;
 (2^9)      512 = Middle headgear&lt;br /&gt;
 (2^10)    1024 = Costume Top Headgear&lt;br /&gt;
 (2^11)    2048 = Costume Mid Headgear&lt;br /&gt;
 (2^12)    4096 = Costume Low Headgear&lt;br /&gt;
 (2^13)    8192 = Costume Garment/Robe&lt;br /&gt;
 (2^15)   32768 = Arrow (arrow-type items only)&lt;br /&gt;
 (2^16)   65536 = Shadow Armor&lt;br /&gt;
 (2^17)  131072 = Shadow Weapon&lt;br /&gt;
 (2^18)  262144 = Shadow Shield&lt;br /&gt;
 (2^19)  524288 = Shadow Shoes&lt;br /&gt;
 (2^20) 1048576 = Shadow Accessory 2&lt;br /&gt;
 (2^21) 2097152 = Shadow Accessory 1&lt;br /&gt;
* '''WeaponLv''': Weapon level of an item (1-4), Becomes 0 when not specified.&lt;br /&gt;
* '''EquipLv''': Base level required to be able to equip. It is possible to specify two values, if an item has a maximum level, by using the following syntax:&lt;br /&gt;
 EquipLv: [minLv, maxLv]&lt;br /&gt;
 &lt;br /&gt;
 	If only one value is specified, maxLv becomes the current server's&lt;br /&gt;
 	MAX_LEVEL. If no values are specified, minLv becomes 0.&lt;br /&gt;
* '''Refineable''': Whether the item is available for refining (1) or not (0). If no value is specified, it defaults to true.&lt;br /&gt;
* '''View''': For normal items, defines a replacement view-sprite for the item &lt;br /&gt;
:(eg: Making apples look like apple juice). The special case are weapons and ammo where this value indicates the weapon-class of the item.&lt;br /&gt;
** Weapon-type items:&lt;br /&gt;
**# Daggers&lt;br /&gt;
**# One-Handed Swords&lt;br /&gt;
**# Two-Handed Swords&lt;br /&gt;
**# One-Handed Spears&lt;br /&gt;
**# Two-Handed Spears&lt;br /&gt;
**# One-Handed Axes&lt;br /&gt;
**# Two-Handed Axes&lt;br /&gt;
**# Maces&lt;br /&gt;
**# ''(not used)''&lt;br /&gt;
**# Wand/Staff&lt;br /&gt;
**# Bows/Crossbows&lt;br /&gt;
**# Knuckle Weapons&lt;br /&gt;
**# Musical Instruments&lt;br /&gt;
**# Whips&lt;br /&gt;
**# Books&lt;br /&gt;
**# Katars&lt;br /&gt;
**# Revolvers&lt;br /&gt;
**# Rifles&lt;br /&gt;
**# Shotguns&lt;br /&gt;
**# Gatling guns&lt;br /&gt;
**# Grenade launchers&lt;br /&gt;
**# Fuuma shuriken&lt;br /&gt;
** Shield-type items:&lt;br /&gt;
**# Guard, Novice Guard&lt;br /&gt;
**# Buckler&lt;br /&gt;
**# Shield, Holy Guard, Evangelist&lt;br /&gt;
**# Mirror Shield&lt;br /&gt;
** Ammunition-type items:&lt;br /&gt;
**# Arrows&lt;br /&gt;
**# Throw-able daggers&lt;br /&gt;
**# Bullets&lt;br /&gt;
**# Shells&lt;br /&gt;
**# Grenades&lt;br /&gt;
**# Shuriken&lt;br /&gt;
**# Kunai&lt;br /&gt;
**# Cannonballs&lt;br /&gt;
**# Throwable Items (Sling Item)&lt;br /&gt;
** Headgear-type items: Please see the View IDs section of this guide.&lt;br /&gt;
* '''BindOnEquip''': Whether the item will automatically bind to the character when it is equipped for the first time. &lt;br /&gt;
:An item that has this field set, will display a confirmation dialog the first time it is equipped, and, if accepted, the item will become character-bound.&lt;br /&gt;
* '''Script''': This is where you put your item bonus. Whether it's an usable item or an equip item, it will take effect according to the item type.&lt;br /&gt;
* '''OnEquip_Script''': Script to execute when the item is equipped. Warning, not all item bonuses will work here as expected.&lt;br /&gt;
* '''OnUnequip_Script''': Script to execute when the item is unequipped. Warning, not all item bonuses will work here as expected.&lt;br /&gt;
* '''Inherit''': This can be used only in item_db2.conf, and if set to true, and the item already exists in item_db.conf, &lt;br /&gt;
:all the missing fields will be inherited from there rather than using their default values.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
In the doc folder look for a text file called &amp;quot;item_bonus&amp;quot;, it shows all the scripts items can have and how they work.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
For more information about this structure read [http://hercules.ws/board/topic/2954-item-db-file-structure-overhaul/ Item DB file structure overhaul]&lt;br /&gt;
&lt;br /&gt;
=Defining Item clientside (Renewal Clients &amp;lt;= 2012-04-10a &amp;amp; Main Clients &amp;lt;= 2012-07-10a) =&lt;br /&gt;
After you make your item, put it in your item_db2.txt, so that you will not run into conflicts when updating your repository later. Then go to your data folder and modify the following files, one after another.&lt;br /&gt;
&lt;br /&gt;
==idnum2itemdisplaynametable.txt==&lt;br /&gt;
This file holds the item names, as displayed inside the client. Each item added as:&lt;br /&gt;
 ItemID#ItemName#&lt;br /&gt;
ItemID is the number from your ID column inside the item db. If your item name contains spaces, replace those with _ (underscore).&lt;br /&gt;
&lt;br /&gt;
==idnum2itemdesctable.txt==&lt;br /&gt;
This file contains the description of your item, when it is right-clicked. The syntax for an item is:&lt;br /&gt;
 ItemID#&lt;br /&gt;
 Item Description Line 1&lt;br /&gt;
 Item Description Line 2&lt;br /&gt;
 #&lt;br /&gt;
You can use any amount of lines for the description. If your description contains a #, make sure it is followed by a space character.&lt;br /&gt;
==idnum2itemresnametable.txt==&lt;br /&gt;
This file sets the inventory and drop-sprite for an the item. Item is defined as follows:&lt;br /&gt;
 ItemID#SpriteName#&lt;br /&gt;
The SpriteName is the name of the files in collection and item folders inside texture and the ones inside sprite folder. If you want to use the look of an another item, search for it's id and copy the sprite name from there.&lt;br /&gt;
==itemslotcounttable.txt==&lt;br /&gt;
In this file you set the amount of visible slots for the item. You do not need to add 0 slot items or items, which do not have slots at all (i. e. usable items). Syntax:&lt;br /&gt;
 ItemID#NumberOfSlots#&lt;br /&gt;
NumberOfSlots should be a number from 1-4, larger values might have undesired effects.&lt;br /&gt;
==Files for non-identified items==&lt;br /&gt;
The following files specify the name, description and look for items, which have not yet been identified. Their syntax follows the same rules as for the files with ''idnum'' prefix. Normally the same text is entered for non-equipment and generic description (which can be copied from official items) is used for equipment of all sorts (weapons, armor, headgears).&lt;br /&gt;
* num2itemdesctable.txt&lt;br /&gt;
* num2itemdisplaynametable.txt&lt;br /&gt;
* num2itemresnametable.txt&lt;br /&gt;
&lt;br /&gt;
=Defining Items clientside (For New Clients)=&lt;br /&gt;
If your client date is newer than specified above then you need to specify all the above item information in 1 file &lt;br /&gt;
&lt;br /&gt;
==System/ItemInfo.lub==&lt;br /&gt;
Since ItemInfo.lub is compiled, you need to decompile it to lua , add your customs and recompile back to lub file (Some have said that renaming a decompiled file to lub also works)&lt;br /&gt;
Syntax:&lt;br /&gt;
 [&amp;lt;item id&amp;gt;] = {&lt;br /&gt;
    unidentifiedDisplayName = &amp;lt;item name to show when not magnified&amp;gt;,&lt;br /&gt;
    unidentifiedResourceName = &amp;lt;file name prefix used for all the images and drop sprite when not magnified&amp;gt;,&lt;br /&gt;
    unidentifiedDescriptionName = { &amp;lt;comma separated list of strings&amp;gt;,&amp;lt;to get multiple lines&amp;gt;,&amp;lt;in item description&amp;gt; },&lt;br /&gt;
    identifiedDisplayName = &amp;lt;item name to show when magnified&amp;gt;,&lt;br /&gt;
    identifiedResourceName = &amp;lt;file name prefix used for all the images and drop sprite when magnified&amp;gt;,&lt;br /&gt;
    identifiedDescriptionName = { &amp;lt;same format as unidentifiedDescriptionName but for magnified items&amp;gt; },&lt;br /&gt;
    slotCount = &amp;lt;number of slots&amp;gt;,&lt;br /&gt;
    ClassNum = &amp;lt;View ID - yes the same one that was there item_db&amp;gt;&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;b&amp;gt;For Weapons, ClassNum = View ID specified in Weapon_IDs table (inside weapontable.lub file). Look [[Custom_Items#Weapon_Sprite_Solution_.28For_New_Clients.29|below]] for details.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also put the different values in DescriptionName in separate lines.&lt;br /&gt;
&lt;br /&gt;
Example: Lets say i want to add a weapon to item id 25000 - a One handed sword named Devastator with 3 slots &amp;amp; the image files &amp;amp; drop sprite files are all named Black_Sword.* . Also i want to display a Sword when not magnified.&lt;br /&gt;
&lt;br /&gt;
 [25000] = {&lt;br /&gt;
    unidentifiedDisplayName = &amp;quot;Sword&amp;quot;,&lt;br /&gt;
    unidentifiedResourceName = &amp;quot;¼Òµå&amp;quot;,&lt;br /&gt;
    unidentifiedDescriptionName = { &amp;quot;Unidentified item, can be identified with [Magnifier].&amp;quot; },&lt;br /&gt;
    identifiedDisplayName = &amp;quot;Devastator&amp;quot;,&lt;br /&gt;
    identifiedResourceName = &amp;quot;Black_Sword&amp;quot;,&lt;br /&gt;
    identifiedDescriptionName = { &lt;br /&gt;
                                  &amp;quot;An Unholy Sword that was created with the sole purpose of destruction&amp;quot;,&lt;br /&gt;
                                  &amp;quot;Class :^777777 Sword^000000&amp;quot;,&lt;br /&gt;
                                  &amp;quot;Attack :^777777 325^000000&amp;quot;,&lt;br /&gt;
                                  &amp;quot;Weight :^777777 80^000000&amp;quot;,&lt;br /&gt;
                                  &amp;quot;Weapon Level :^777777 4^000000&amp;quot;,&lt;br /&gt;
                                  &amp;quot;Required Level :^777777 100^000000&amp;quot;,&lt;br /&gt;
                                  &amp;quot;Applicable Job :^777777 Novice, Swordsman Class, Merchant Class, Thief Class^000000&amp;quot;&lt;br /&gt;
                                },&lt;br /&gt;
    slotCount = 3,&lt;br /&gt;
    ClassNum = 2&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
= Allocating Items on Client Side =&lt;br /&gt;
Your custom item will have 4 (6 in case its a headgear or garment) files:&lt;br /&gt;
 1) Drop sprite -&amp;gt; Helmet_drop.spr &lt;br /&gt;
 2) Drop act file -&amp;gt; Helmet_drop.act&lt;br /&gt;
 3) Item Inventory image -&amp;gt; Helmet_item.bmp&lt;br /&gt;
 4) Item Collection image -&amp;gt; Helmet_collection.bmp (the one you see on its description window)&lt;br /&gt;
 5) Headgear View sprite -&amp;gt; Helmet.spr&lt;br /&gt;
 6) Headgear View act file -&amp;gt; Helmet.act&lt;br /&gt;
&lt;br /&gt;
Lets say i downloaded a custom item called Helmet which serves as a headgear and the above six files were in them.&lt;br /&gt;
&lt;br /&gt;
==Step 1:==&lt;br /&gt;
We place the first four files based on what we specified in id2numresnametable.txt (IdentifiedResourceName in Iteminfo.lub).&lt;br /&gt;
For our example lets say i used &amp;quot;Helmet&amp;quot; as the resource name :&lt;br /&gt;
 i)   Copy Helmet_drop.spr to [RO Folder]\data\sprite\¾ÆÀÌÅÛ\Helmet.spr&lt;br /&gt;
 ii)  Copy Helmet_drop.act to [RO Folder]\data\sprite\¾ÆÀÌÅÛ\Helmet.act&lt;br /&gt;
 iii) Copy Helmet_item.bmp to [RO Folder]\data\texture\À¯ÀúÀÎÅÍÆäÀÌ½º\item\Helmet.bmp&lt;br /&gt;
 iv)  Copy Helmet_collection.bmp to [RO Folder]\data\texture\À¯ÀúÀÎÅÍÆäÀÌ½º\collection\Helmet.bmp &lt;br /&gt;
==Step 2 (only for Headgears):==&lt;br /&gt;
For displaying headgear on the character there will be two additional files (sprite &amp;amp; act) or 4 if the sprite author intended for a separate set of files for male &amp;amp; female. In my example i have considered the first scenario.&lt;br /&gt;
&lt;br /&gt;
The filename for headgear sprite are now specified in accname.lua file &amp;lt;b&amp;gt;(details of which is available in the [[Custom_Items#View_IDs.2C_Having_A_Custom_Headgear_Without_Xray|View IDs Section]])&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
lets say i used &lt;br /&gt;
 [ACCESSORY_IDs.HELMET] = &amp;quot;_Helmet&amp;quot;,&lt;br /&gt;
then we need to:&lt;br /&gt;
 i)   Copy Helmet.spr to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\¿©\¿©_Helmet.spr (Female)&lt;br /&gt;
 ii)  Copy Helmet.act to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\¿©\¿©_Helmet.act &lt;br /&gt;
 iii) Copy Helmet.spr to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\³²\³²_Helmet.spr (Male)&lt;br /&gt;
 iv)  Copy Helmet.act to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\³²\³²_Helmet.act &lt;br /&gt;
&lt;br /&gt;
Now it is ready to be used provided you have added entries properly to the lua files.&lt;br /&gt;
&lt;br /&gt;
==Specifications of the files==&lt;br /&gt;
1) Drop sprites - ideally have 1 frame &amp;amp; its act file will be just an empty act (only header will be there inside)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) Equip sprites - typically have 3+ frames to show images for various orientations &amp;amp; its act file will have the info on where to place each frame.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Item bmp - 24x24 size 256 bit bmp file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4) Collection bmp - 75x100 size bmp file (usually 256 bit but there is no restriction)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;How to differentiate between sprite files?&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open both sprite files in [http://ratemyserver.net/download_agent.php?type=1&amp;amp;file_num=10 Spr Conview]. The number of frames in the files can be seen at bottom (Sprite: &amp;lt;currentframe&amp;gt;/&amp;lt;total&amp;gt;). If it says Sprite: 1/1 then its a drop sprite and the other is equip sprite.&lt;br /&gt;
&lt;br /&gt;
Sometimes what sprite authors do is they simply copy the original sprite itself to make a drop sprite. In this case you will see both of them as identical when opened in Spr Conview &amp;amp; we don't need to worry about which one is which (since they are the same).&lt;br /&gt;
&lt;br /&gt;
If the process confused you, [http://www.mediafire.com/?8lzt4cbot100w44 here is an example folder], the sprite is done by drkangel. The folder is virus free.&lt;br /&gt;
&lt;br /&gt;
= View IDs, Having A Custom Headgear Without Xray =&lt;br /&gt;
Look in your data folder and make sure there is a folder named &amp;quot;lua files&amp;quot;, if there is not make it.[http://svn6.assembla.com/svn/ClientSide/Lua_Project/lubs/ Download the most recent lub package] and extract it to your lua files folder in your data folder. [http://svn6.assembla.com/svn/ClientSide/Lua_Project/lua%20files/datainfo/ Download the most recent accname.lua and accessoryid.lua], put it in your datainfo folder that is inside the lua files folder. Now download [http://svn6.assembla.com/svn/ClientSide/Lua_Project/tool/luac5.0.2.exe this lub compiling tool], and put it in the datainfo folder. &lt;br /&gt;
Now, Open accessoryid.lua in the datainfo folder with notepad or a text editor of your choice, go all the way down until the names stop. Add your custom gears before the } symbol. You should use a high number just like with your custom item's database ID, or use unused IDs to be sure you won't have to redo them all in the future, or at least for a while. Example:&lt;br /&gt;
 	ACCESSORY_PINKBUNNY_HAIRBAND = 663,&lt;br /&gt;
 	ACCESSORY_GREENBUNNY_HAIRBAND = 664,&lt;br /&gt;
 	ACCESSORY_OLD_ELFEAR = 665,&lt;br /&gt;
 	ACCESSORY_THA_MAERO_MASK = 666,&lt;br /&gt;
 	ACCESSORY_THANATOS_MAI_MASK = 667,&lt;br /&gt;
 	--668 free&lt;br /&gt;
 	ACCESSORY_FISHPIN = 669,&lt;br /&gt;
 	ACCESSORY_CUSTOM_HAT = 900,&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
''You must compile to lub if you leave space between IDs, if you don't plan on compiling to lub, make sure you do not skip any numbers.''&lt;br /&gt;
&lt;br /&gt;
Now open accname.lua, do basically the same thing but just in a different way, and for the sprite. Add your item to the bottom, have it look like the ones above it, except have your items name and the item's sprite name.&lt;br /&gt;
 	[ACCESSORY_IDs.ACCESSORY_PINKBUNNY_HAIRBAND] = &amp;quot;_ÇÎÅ©Åä³¢¸Ó¸®¶ì&amp;quot;,&lt;br /&gt;
 	[ACCESSORY_IDs.ACCESSORY_GREENBUNNY_HAIRBAND] = &amp;quot;_±×¸°Åä³¢¸Ó¸®¶ì&amp;quot;,&lt;br /&gt;
 	[ACCESSORY_IDs.ACCESSORY_OLD_ELFEAR] = &amp;quot;_°í´ë¿äÁ¤ÀÇ±Í&amp;quot;,&lt;br /&gt;
 	[ACCESSORY_IDs.ACCESSORY_THA_MAERO_MASK] = &amp;quot;_Å¸³ªÅä½ºÀÇ½½ÇÄ°¡¸é&amp;quot;,&lt;br /&gt;
 	[ACCESSORY_IDs.ACCESSORY_THANATOS_MAI_MASK] = &amp;quot;_Å¸³ªÅä½ºÀÇÁõ¿À°¡¸é&amp;quot;,&lt;br /&gt;
 	[ACCESSORY_IDs.ACCESSORY_FISHPIN] = &amp;quot;_¹°°í±âÇÉ&amp;quot;,&lt;br /&gt;
 	[ACCESSORY_IDs.ACCESSORY_CUSTOM_HAT] = &amp;quot;_Sprite_Name_Here&amp;quot;,&lt;br /&gt;
 }&lt;br /&gt;
Delete the accname.lub and accessoryid.lub. Now that you are done, make sure luac.exe is in your datainfo folder, right click the luac.exe, create a shortcut, right click the shortcut, and click properties, in the target area, add right after the quotes, with the quotes:&lt;br /&gt;
 -o &amp;quot;accessoryid.lub&amp;quot; &amp;quot;accessoryid.lua&amp;quot;&lt;br /&gt;
So that it looks something like this:&lt;br /&gt;
 &amp;quot;C:\Program Files (x86)\Gravity\RO\data\lua files\datainfo\luac5.0.2.exe&amp;quot; -o &amp;quot;accessoryid.lub&amp;quot; &amp;quot;accessoryid.lua&amp;quot;&lt;br /&gt;
Do this also to &amp;quot;accname.lub&amp;quot; except instead of accessoryid in the quotes, do accname. If there is any lua file leftover, you may want to move it somewhere else just for future changes, like My Documents. For future reference, this is also how you turn the other lub files to lua files.&lt;br /&gt;
&lt;br /&gt;
=Modifications=&lt;br /&gt;
==Sprite Replacement==&lt;br /&gt;
To replace a headgear with your customized headgear, just delete one of the items you want, and replace your customised item ID with that id.&lt;br /&gt;
&lt;br /&gt;
Lets say you have something like this:&lt;br /&gt;
 15000,Angel_Wing,Angel Wing,4,,10,10,0,,1,0,0,3,0,0,0,0,0,{},{},{}&lt;br /&gt;
And there's an item you wont need, such as:&lt;br /&gt;
 2220,Hat,Hat,5,1000,,200,,2,,0,10477567,2,256,,0,1,16,{},{},{}&lt;br /&gt;
Well, to replace it, just delete everything in the hat line but its ID, and paste there your custom item, all the line but the ID. Should be like this:&lt;br /&gt;
 '''2220''',Hat,Hat,5,1000,,200,,2,,0,10477567,2,256,,0,1,16,{},{},{}&lt;br /&gt;
 15000,'''Angel_Wing,Angel Wing,4,,10,10,0,,1,0,0,3,0,0,0,0,0,{},{},{}'''&lt;br /&gt;
 '''2220,Angel_Wing,Angel Wing,4,,10,10,0,,1,0,0,3,0,0,0,0,0,{},{},{}'''&lt;br /&gt;
All you need to do now is changing the View ID to the Hat, and change your file names to its name. You can find them on the idnum2resnametable.txt Search for 2220 and the gibberish besides it, w/o the # # is the file name, then rename it to your custom item name.&lt;br /&gt;
&lt;br /&gt;
Remember to add the files to data\sprite\¾ÆÀÌÅÛ (Icon sprite) and both data\sprite\¾Ç¼¼»ç¸®\³² (Male Item Sprite) and data\sprite\¾Ç¼¼»ç¸®\¿© (Female Item Sprite). Remember, these 2 last item names, must have either a ³²_ for male or ¿©_ for female, at the beginning of the name, both .spr and .act. Also, don't forget to change the other files:&lt;br /&gt;
&lt;br /&gt;
idnum2itemdisplaynametable.txt , idnum2itemdesctable.txt , idnum2itemdesctable.txt , num2itemdesctable.txt , num2itemdisplaynametable.txt , num2itemresnametable.txt and itemslotcounttable.txt&lt;br /&gt;
&lt;br /&gt;
Use these files if you want to replace sprites, they will be useful.&lt;br /&gt;
* '''actOR:''' with the actor you modify the act file, which is the one who tells the client where does the weapon go and what does it have to do and at a certain moment.&lt;br /&gt;
* '''SPR Conview:''' you can use these to view which sprite is which, and also see sequence per sequence.&lt;br /&gt;
&lt;br /&gt;
==Item Restrictions==&lt;br /&gt;
Look on your db folder for a file called item_trade.txt and open it&lt;br /&gt;
&lt;br /&gt;
Now, the pattern for a flag is:&lt;br /&gt;
&lt;br /&gt;
 Item ID, TradeMask, GM-Level Override&lt;br /&gt;
&lt;br /&gt;
* '''Item ID''': the ID of your item.&lt;br /&gt;
* '''TradeMask''': Testrictions the item will have, such as being dropped, stored or traded. These values can be combined to achieve multiple effects.&lt;br /&gt;
 1:Item can't be dropped&lt;br /&gt;
 2:Item can't be traded (nor vended)&lt;br /&gt;
 4:Item can only be traded with wedded partner&lt;br /&gt;
 8:Item can't be sold to NPCs&lt;br /&gt;
 16:Item can't be placed in the cart&lt;br /&gt;
 32:Item can't be placed in the storage&lt;br /&gt;
 64:Item can't be placed in the guild storage&lt;br /&gt;
* '''GM-Level Override''': This is the minimum GM level a player must have to avoid these restrictions.&lt;br /&gt;
&lt;br /&gt;
==Item Script==&lt;br /&gt;
{{duplication&lt;br /&gt;
|type=section&lt;br /&gt;
|what=[[itemskill]], [[sc_start]] and [[skilleffect]]}}&lt;br /&gt;
{{disputed&lt;br /&gt;
|type=section&lt;br /&gt;
|date=September 2010}}&lt;br /&gt;
Okay, I'll update this as I go; otherwise, I wont have anything new to show. First with usable items.&lt;br /&gt;
&lt;br /&gt;
Well, there are 3 types of usables:&lt;br /&gt;
&lt;br /&gt;
1.- Healing items, they have in the type field a 0.&lt;br /&gt;
&lt;br /&gt;
2.- Other uses items, such as fly wings and so, which doesn't heal, but does have an instant effect, they have in the type field a 2.&lt;br /&gt;
&lt;br /&gt;
3.- Usable items, which are skills that requires a target selection, therefore they have a delayed use, and in newer versions the item wont be gone until the target is chosen and the cast has finished. Means, you wont lose the item if the skill hasn't been done. They have in the type field an 11.&lt;br /&gt;
&lt;br /&gt;
Now, for an item skill, the pattern for a skill is:&lt;br /&gt;
 itemskill &amp;lt;skill id&amp;gt;,&amp;lt;skill level&amp;gt;;&lt;br /&gt;
Without &amp;lt;&amp;gt; of course.&lt;br /&gt;
&lt;br /&gt;
Now, we go to our db\skill_db.txt and search for the blessing ID, searching for AL_ or blessing, but first, the structure of a skill:&lt;br /&gt;
 id,range,hit,inf,element,nk,splash,max,list_num,castcancel,cast_defence_rate,inf2,maxcount,skill_type,blow_count,name,description&lt;br /&gt;
Now, the AL_BLESSING or Blessing Skill:&lt;br /&gt;
 34,9,6,16,0,0x1,0,10,1,yes,0,0,0,magic,0,	AL_BLESSING,Blessing&lt;br /&gt;
We grab the ID and put it on our code:&lt;br /&gt;
 itemskill 34,&amp;lt;skill lvl&amp;gt;;&lt;br /&gt;
Don't mind the actual level of the skill_db.txt for the skill level part. You can actually put the level you want here below 99, so lets pick 4:&lt;br /&gt;
 itemskill 34,4;&lt;br /&gt;
And finally, insert it on the code.&lt;br /&gt;
&amp;lt;pre&amp;gt;,{ itemskill 34,4; },{},{}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There, we have a Lvl 4 Blessing item skill.&lt;br /&gt;
&lt;br /&gt;
Remember, one space before and one after the script, NOT TAB!&lt;br /&gt;
&lt;br /&gt;
And so on with other skills. Just remember these steps and they should be fine. And remember, itemskill is NOT the same as skill. itemskill will make you CAST that skill, while skill will GIVE you the skill. If you give an item, whether delayed use or normal usable two itemskill commands, only the latter will come into effect, as you cannot cast two skills at the same time.&lt;br /&gt;
&lt;br /&gt;
Now, for Potions.&lt;br /&gt;
&lt;br /&gt;
Instead of using itemskill, we will use itemheal:&lt;br /&gt;
 ,{ itemheal 100,0; },{},{}&lt;br /&gt;
The green is the HP, the blue is the SP. To add that random heal amount effect, just pick a set amount, let's say 120, then pick 1 or 2 numbers, up to you. Then, add the rand() command, like this:&lt;br /&gt;
 ,{ itemheal rand(120,9,49),0; },{},{}&lt;br /&gt;
Explanation: This item will heal about 49~120 hp and 0 SP. To heal SP you change the 0 to a number. Like this:&lt;br /&gt;
 ,{ itemheal rand(120,9,49),50; },{},{}&lt;br /&gt;
It will now heal 50 SP.&lt;br /&gt;
Now, for skilleffect and sc_start.&lt;br /&gt;
&lt;br /&gt;
Okay, let's see. Here's a example of an item casting a skill and simulating a skill.&lt;br /&gt;
 ,{ itemskill 34,10; skilleffect 29,0; sc_start 12,140000,5; },{},{}&lt;br /&gt;
skilleffect will display on your client a skill visual effect. The pattern is:&lt;br /&gt;
&lt;br /&gt;
 skilleffect &amp;lt;skill ID&amp;gt;,&amp;lt;number&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
;skill ID&lt;br /&gt;
:Self-explanatory.&lt;br /&gt;
;number&lt;br /&gt;
:Have you seen those skills that shows up numbers upon casting? Such as heal? Well, putting a number there will display it. But only works on skills with numbers floating.&lt;br /&gt;
&lt;br /&gt;
sc_start has the following pattern:&lt;br /&gt;
&lt;br /&gt;
 sc_start &amp;lt;status id&amp;gt;,&amp;lt;duration&amp;gt;,&amp;lt;val1&amp;gt;[,&amp;lt;unit id&amp;gt;];&lt;br /&gt;
&lt;br /&gt;
;status id&lt;br /&gt;
:Refer to const.txt in your db folder for all effects. Open it with a text editor then search by either clicking edit, then find, or press and hold the ctrl key, and while still holding it press the f key, then release, and search for &amp;quot;SC_ALL -1&amp;quot;. Everything below this is an effect. The effects stop at &amp;quot;e_gasp    0&amp;quot; which are emoticons.&lt;br /&gt;
;duration&lt;br /&gt;
:Is the amount time in milliseconds (1000 msec = 1 sec) that the status will be active.&lt;br /&gt;
;val1&lt;br /&gt;
:Typically it's the level of the skill, associated with this status.&lt;br /&gt;
;unit id&lt;br /&gt;
:Allows to start the status on an other unit, than the attached player. For players this is account id. This parameter is optional, and can be omitted.&lt;br /&gt;
&lt;br /&gt;
Now, for the item I said, it will show you the visual effect of Blessing and cast on you a lvl 5 Agi-Up! skill for 140 seconds.&lt;br /&gt;
&lt;br /&gt;
For more item scripts see script_commands.txt in your doc folder, as well as item_bonus.txt in your doc folder.&lt;br /&gt;
&lt;br /&gt;
==Weapon Sprite Solution (Renewal Clients &amp;lt;= 2012-04-10a &amp;amp; Main Clients &amp;lt;= 2012-07-10a)==&lt;br /&gt;
For these clients, Weapons are limited to use a range of Item IDs hardcoded in the clientn for each type.&lt;br /&gt;
For e.g.&lt;br /&gt;
&lt;br /&gt;
 1265,Bloody_Roar,Bloody Roar,4,,10,1000,120,,1,0,4096,7,2,34,4,75,1,16,{ bonus bIgnoreDefRace,RC_DemiHuman; bonus bFlee,-160; bonus bFlee2,-160; bonus bNoRegen,1; bonus bNoRegen,2; },{},{}&lt;br /&gt;
 1266,Test,Test,4,4000,2000,10,165,,1,0,4096,7,2,34,3,33,1,16,{}&lt;br /&gt;
&lt;br /&gt;
 // 1-Handed Axes&lt;br /&gt;
 1301,Axe,Axe,4,500,,800,38,,1,3,8803555,7,2,2,1,3,1,6,{}&lt;br /&gt;
&lt;br /&gt;
Here the item 1266 is a custom katar and it does show up as a katar (if you have the proper sprite files ofcourse). but if i use some id like say 22000, client wont display it. So what is the range of item ids you can use? Look below:&lt;br /&gt;
&lt;br /&gt;
* One handed Swords = 1100-1149, 13400-13499&lt;br /&gt;
* Two handed Swords = 1150-1199, 21000-21999&lt;br /&gt;
 &lt;br /&gt;
* Knives, Daggers etc = 1200-1249, 13000-13099&lt;br /&gt;
* Katars = 1250-1299 ; Has 35 free IDs&lt;br /&gt;
 &lt;br /&gt;
* One handed Axes = 1300-1349; Has 43 free IDs&lt;br /&gt;
* Two handed Axes = 1350-1399; Has 32 free IDs&lt;br /&gt;
 &lt;br /&gt;
* One handed Spears = 1400-1449; Has 34 free IDs&lt;br /&gt;
* Two Handed Spears = 1450-1471, 1474-1499&lt;br /&gt;
 &lt;br /&gt;
* Maces = 1500-1549, 16000-16999&lt;br /&gt;
* Books = 1550-1599 ; Has only 2 IDs.&lt;br /&gt;
* Knuckles = 1800-1899 ; Has 95 free IDs&lt;br /&gt;
 &lt;br /&gt;
* One Handed Staves/Rods = 1600-1699; Has 79 free IDs&lt;br /&gt;
* Two Handed Staves/Rods = 1472,1473,2000-2099&lt;br /&gt;
 &lt;br /&gt;
* Bows = 1700-1749, 18100-18499&lt;br /&gt;
* Guitars = 1900-1949 ; Has 32 free IDs&lt;br /&gt;
* Whips = 1950-1999 ; Has 130 free IDs&lt;br /&gt;
 &lt;br /&gt;
* Handguns = 13100-13149&lt;br /&gt;
* Other guns = 13150-13199&lt;br /&gt;
 &lt;br /&gt;
* Ninja weapons = 13300-13399&lt;br /&gt;
&lt;br /&gt;
The number of unused Item IDs left known for a range has also been mentioned above. Best practice to follow check in your range in official db before adding custom weapon.&lt;br /&gt;
&lt;br /&gt;
==Weapon Sprite Solution (For New Clients) ==&lt;br /&gt;
For new clients the view id system is also applicable to client. To add a custom weapon you need to first edit a file&lt;br /&gt;
called weapontable.lub in your data folder&lt;br /&gt;
 data/luafiles514/lua files/datainfo/weapontable.lub&lt;br /&gt;
&lt;br /&gt;
I will be adding &amp;lt;b&amp;gt;Oriental_Sword&amp;lt;/b&amp;gt; which will be a 1-Handed sword. Open weapontable.lub.&lt;br /&gt;
First you will see a table called &amp;lt;b&amp;gt;Weapon_IDs&amp;lt;/b&amp;gt;. Take note of the first 30 values in this table - these are the only available Weapon types in the client right now.&lt;br /&gt;
&lt;br /&gt;
Anyways go to the last entry which should be for Wizardy Staff = 97. You can use a view id after that like shown below&lt;br /&gt;
  WEAPONTYPE_Oriental_Sword = 98,&lt;br /&gt;
&lt;br /&gt;
Come down and you see the next table called &amp;lt;b&amp;gt;WeaponNameTable&amp;lt;/b&amp;gt;. Here is where you add your sprite name suffix.&amp;lt;br&amp;gt;&lt;br /&gt;
What do i mean by that? Its the last part in your weapon sprite &amp;amp; act file. Before it used to be _&amp;lt;Item ID&amp;gt;.&lt;br /&gt;
 data/sprite/&amp;lt;job dependent folder&amp;gt;/&amp;lt;job dependent prefix&amp;gt;_&amp;lt;gender&amp;gt;&amp;lt;weapon suffix&amp;gt;.spr&lt;br /&gt;
&lt;br /&gt;
OK Back to topic. so I add my entry like shown below.&lt;br /&gt;
 [Weapon_IDs.WEAPONTYPE_Oriental_Sword] = &amp;quot;_Oriental&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Lastly come down further in weapontable.lub and you see the last table called &amp;lt;b&amp;gt;Expansion_Weapon_IDs&amp;lt;/b&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
Remember the 30 types i told you to take note of ? here we assign one of those to our custom (like a mapping or connection).&amp;lt;br&amp;gt;&lt;br /&gt;
Since mine is a 1-Handed Sword I specify it like below.&lt;br /&gt;
 [Weapon_IDs.WEAPONTYPE_Oriental_Sword] = Weapon_IDs.WPCLASS_WEAPONTYPE_SWORD &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Now for the most important part. For our client to actually pick up all these details we need to provide the view id which we used in Weapon_IDs table as the ClassNum value in ItemInfo.lua. Check the [[Custom_Items#System.2FItemInfo.lub|ItemInfo.lub format]] shown above for details.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this your weapon sprite will become visible while attacking.&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Data]]&lt;br /&gt;
[[Category:Customization]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Custom_Items</id>
		<title>Custom Items</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Custom_Items"/>
				<updated>2016-04-25T12:25:05Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: /* Defining Item clientside (Renewal Clients &amp;lt;= 2012-04-10a &amp;amp; Main Clients &amp;lt;= 2012-07-10a) */  Removed reference to svn&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Structure=&lt;br /&gt;
First, let's take a look at the item_db.conf in the db folder, and its structure:&lt;br /&gt;
 item_db: (&lt;br /&gt;
 {&lt;br /&gt;
 	// =================== Mandatory fields ===============================&lt;br /&gt;
 	Id: ID                        (int)&lt;br /&gt;
 	AegisName: &amp;quot;Aegis_Name&amp;quot;       (string, optional if Inherit: true)&lt;br /&gt;
 	Name: &amp;quot;Item Name&amp;quot;             (string, optional if Inherit: true)&lt;br /&gt;
 	// =================== Optional fields ================================&lt;br /&gt;
 	Type: Item Type               (int, defaults to 3 = etc item)&lt;br /&gt;
 	Buy: Buy Price                (int, defaults to Sell * 2)&lt;br /&gt;
 	Sell: Sell Price              (int, defaults to Buy / 2)&lt;br /&gt;
 	Weight: Item Weight           (int, defaults to 0)&lt;br /&gt;
 	Atk: Attack                   (int, defaults to 0)&lt;br /&gt;
 	Matk: Magical Attack          (int, defaults to 0, ignored in pre-re)&lt;br /&gt;
 	Def: Defense                  (int, defaults to 0)&lt;br /&gt;
 	Range: Attack Range           (int, defaults to 0)&lt;br /&gt;
 	Slots: Slots                  (int, defaults to 0)&lt;br /&gt;
 	Job: Job mask                 (int, defaults to all jobs = 0xFFFFFFFF)&lt;br /&gt;
 	Upper: Upper mask             (int, defaults to any = 0x3f)&lt;br /&gt;
 	Gender: Gender                (int, defaults to both = 2)&lt;br /&gt;
 	Loc: Equip location           (int, required value for equipment)&lt;br /&gt;
 	WeaponLv: Weapon Level        (int, defaults to 0)&lt;br /&gt;
 	EquipLv: Equip required level (int, defaults to 0)&lt;br /&gt;
 	EquipLv: [min, max]           (alternative syntax with min / max level)&lt;br /&gt;
 	Refine: Refineable            (boolean, defaults to true)&lt;br /&gt;
 	View: View ID                 (int, defaults to 0)&lt;br /&gt;
 	BindOnEquip: true/false       (boolean, defaults to false)&lt;br /&gt;
 	Script: &amp;lt;&amp;quot;&lt;br /&gt;
 		Script&lt;br /&gt;
 		(it can be multi-line)&lt;br /&gt;
 	&amp;quot;&amp;gt;&lt;br /&gt;
 	OnEquipScript: &amp;lt;&amp;quot; OnEquip Script (can also be multi-line) &amp;quot;&amp;gt;&lt;br /&gt;
 	OnUnequipScript: &amp;lt;&amp;quot; OnUnequip Script (can also be multi-line) &amp;quot;&amp;gt;&lt;br /&gt;
 	// =================== Optional fields (item_db2 only) ================&lt;br /&gt;
 	Inherit: true/false           (boolean, if true, inherit the values&lt;br /&gt;
 	                              that weren't specified, from item_db.conf,&lt;br /&gt;
 	                              else override it and use default values)&lt;br /&gt;
 },&lt;br /&gt;
 ...&lt;br /&gt;
 )&lt;br /&gt;
&lt;br /&gt;
* '''ID''': ID of the item.&lt;br /&gt;
* '''AegisName''': Server name to reference the item in scripts and lookups, should use no spaces.&lt;br /&gt;
* '''Name''': Name in English for displaying as output for @ and script commands.&lt;br /&gt;
* '''Type''': Purpose of the item.&lt;br /&gt;
 0 = Usable : healing&lt;br /&gt;
 2 = Usable : other&lt;br /&gt;
 3 = Misc&lt;br /&gt;
 4 = Weapon&lt;br /&gt;
 5 = Armor&lt;br /&gt;
 6 = Card&lt;br /&gt;
 7 = Pet Egg&lt;br /&gt;
 8 = Pet Equipment&lt;br /&gt;
 10 = Arrow/Ammunition&lt;br /&gt;
 11 = Usable : delayed consumption (items with script &amp;quot;pet&amp;quot; or &amp;quot;itemskill&amp;quot;)&lt;br /&gt;
 18 = Another delayed consume that requires user confirmation before using item.&lt;br /&gt;
* '''Buy''': Default [[NPC]] buying price in Zeny. When not specified, becomes double the sell price.&lt;br /&gt;
* '''Sell''': Default [[NPC]] selling price in Zeny. When not specified, becomes half the buy price.&lt;br /&gt;
* '''Weight''': Item's weight. Each 10 is 1 weight. When not specified, becomes 0.&lt;br /&gt;
* '''ATK''': Base weapon attack, in case of a weapon. When not specified, becomes 0.&lt;br /&gt;
** In '''RE''' enabled servers this field have a optional delimiter ''':''' to define this item's weaponMATK bonus, for example, '''30:50''' would mean the item gives 30 atk and 50 weaponMATK&lt;br /&gt;
* '''Matk''': Weapon's magical attack (only used in renewal mode, ignored in pre-renewal). When not specified, becomes 0.&lt;br /&gt;
* '''DEF''': Base defense for armor-type items. When not specified, becomes 0.&lt;br /&gt;
* '''Range''': Maximum range in map cells a weapon allows to be the player apart from it's target. When not specified, becomes 0.&lt;br /&gt;
* '''Slots''': Amount of card slots in weapon/armor-type items. When not specified, becomes 0.&lt;br /&gt;
* '''Job''': Which jobs this item is available for. Values below can be combined to achieve availability for multiple job classes, i. e. &amp;lt;code&amp;gt;0x2|0x4 -&amp;gt; 0x6&amp;lt;/code&amp;gt; (Swordman+Mage)&lt;br /&gt;
 (S.) Novice         (2^00): 0x00000001&lt;br /&gt;
 Swordman            (2^01): 0x00000002&lt;br /&gt;
 Mage                (2^02): 0x00000004&lt;br /&gt;
 Archer              (2^03): 0x00000008&lt;br /&gt;
 Acolyte             (2^04): 0x00000010&lt;br /&gt;
 Merchant            (2^05): 0x00000020&lt;br /&gt;
 Thief               (2^06): 0x00000040&lt;br /&gt;
 Knight              (2^07): 0x00000080&lt;br /&gt;
 Priest              (2^08): 0x00000100&lt;br /&gt;
 Wizard              (2^09): 0x00000200&lt;br /&gt;
 Blacksmith          (2^10): 0x00000400&lt;br /&gt;
 Hunter              (2^11): 0x00000800&lt;br /&gt;
 Assassin            (2^12): 0x00001000&lt;br /&gt;
 ''Unused''              (2^13): 0x00002000&lt;br /&gt;
 Crusader            (2^14): 0x00004000&lt;br /&gt;
 Monk                (2^15): 0x00008000&lt;br /&gt;
 Sage                (2^16): 0x00010000&lt;br /&gt;
 Rogue               (2^17): 0x00020000&lt;br /&gt;
 Alchemist           (2^18): 0x00040000&lt;br /&gt;
 Bard/Dancer         (2^19): 0x00080000&lt;br /&gt;
 ''Unused''              (2^20): 0x00100000&lt;br /&gt;
 Taekwon             (2^21): 0x00200000&lt;br /&gt;
 StarGladiator       (2^22): 0x00400000&lt;br /&gt;
 Soul Linker         (2^23): 0x00800000&lt;br /&gt;
 Gunslinger          (2^24): 0x01000000&lt;br /&gt;
 Ninja               (2^25): 0x02000000&lt;br /&gt;
 Gangsi              (2^26): 0x04000000&lt;br /&gt;
 Death Knight        (2^27): 0x08000000&lt;br /&gt;
 Dark Collector      (2^28): 0x10000000&lt;br /&gt;
 Kagerou/Oboro       (2^29): 0x20000000&lt;br /&gt;
 Rebellion           (2^30): 0x40000000&lt;br /&gt;
 '''Some other commonly used values:'''&lt;br /&gt;
 All Classes               : 0xFFFFFFFF&lt;br /&gt;
 Every Job Except Novice   : 0xFFFFFFFE&lt;br /&gt;
* '''Upper''': Specifies whether the item can be used by normal, baby or reborn classes. Values below can be combined, i. e. &amp;lt;code&amp;gt;1|4 -&amp;gt; 5&amp;lt;/code&amp;gt; (Normal+Baby Classes)&lt;br /&gt;
** Note: Setting &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; enables the item for Transcendant and 3rd classes. Use &amp;lt;code&amp;gt;8&amp;lt;/code&amp;gt; to enable the item for 3rd classes only.&lt;br /&gt;
 Normal jobs:      0x01 (1)&lt;br /&gt;
 Upper jobs:       0x02 (2)&lt;br /&gt;
 Baby jobs:        0x04 (4)&lt;br /&gt;
 Third jobs:       0x08 (8)&lt;br /&gt;
 Upper Third jobs: 0x10 (16)&lt;br /&gt;
 Baby Third jobs:  0x20 (32)&lt;br /&gt;
 &lt;br /&gt;
 Under pre-re mode third classes are considered upper, making use of&lt;br /&gt;
 the 8 and above masks is therefore not necessary unless in renewal&lt;br /&gt;
 mode. When no value is specified, all classes (mask 0x3f) are able to&lt;br /&gt;
 equip the item.&lt;br /&gt;
* '''Gender''': Gender restriction for the item.&lt;br /&gt;
 0 = Female&lt;br /&gt;
 1 = Male&lt;br /&gt;
 2 = No restriction (both)&lt;br /&gt;
* '''Loc''': Equipment location of armor and arrow-type items. Values below can be combined, i. e. 136 would indicate both accessory slots (typical value for accessories).&lt;br /&gt;
 (2^0)        1 = Lower headgear&lt;br /&gt;
 (2^1)        2 = Right hand&lt;br /&gt;
 (2^2)        4 = Mantle&lt;br /&gt;
 (2^3)        8 = Accessory 1&lt;br /&gt;
 (2^4)       16 = Armor&lt;br /&gt;
 (2^5)       32 = Left hand&lt;br /&gt;
 (2^6)       64 = Shoes&lt;br /&gt;
 (2^7)      128 = Accessory 2&lt;br /&gt;
 (2^8)      256 = Upper headgear&lt;br /&gt;
 (2^9)      512 = Middle headgear&lt;br /&gt;
 (2^10)    1024 = Costume Top Headgear&lt;br /&gt;
 (2^11)    2048 = Costume Mid Headgear&lt;br /&gt;
 (2^12)    4096 = Costume Low Headgear&lt;br /&gt;
 (2^13)    8192 = Costume Garment/Robe&lt;br /&gt;
 (2^15)   32768 = Arrow (arrow-type items only)&lt;br /&gt;
 (2^16)   65536 = Shadow Armor&lt;br /&gt;
 (2^17)  131072 = Shadow Weapon&lt;br /&gt;
 (2^18)  262144 = Shadow Shield&lt;br /&gt;
 (2^19)  524288 = Shadow Shoes&lt;br /&gt;
 (2^20) 1048576 = Shadow Accessory 2&lt;br /&gt;
 (2^21) 2097152 = Shadow Accessory 1&lt;br /&gt;
* '''WeaponLv''': Weapon level of an item (1-4), Becomes 0 when not specified.&lt;br /&gt;
* '''EquipLv''': Base level required to be able to equip. It is possible to specify two values, if an item has a maximum level, by using the following syntax:&lt;br /&gt;
 EquipLv: [minLv, maxLv]&lt;br /&gt;
 &lt;br /&gt;
 	If only one value is specified, maxLv becomes the current server's&lt;br /&gt;
 	MAX_LEVEL. If no values are specified, minLv becomes 0.&lt;br /&gt;
* '''Refineable''': Whether the item is available for refining (1) or not (0). If no value is specified, it defaults to true.&lt;br /&gt;
* '''View''': For normal items, defines a replacement view-sprite for the item &lt;br /&gt;
:(eg: Making apples look like apple juice). The special case are weapons and ammo where this value indicates the weapon-class of the item.&lt;br /&gt;
** Weapon-type items:&lt;br /&gt;
**# Daggers&lt;br /&gt;
**# One-Handed Swords&lt;br /&gt;
**# Two-Handed Swords&lt;br /&gt;
**# One-Handed Spears&lt;br /&gt;
**# Two-Handed Spears&lt;br /&gt;
**# One-Handed Axes&lt;br /&gt;
**# Two-Handed Axes&lt;br /&gt;
**# Maces&lt;br /&gt;
**# ''(not used)''&lt;br /&gt;
**# Wand/Staff&lt;br /&gt;
**# Bows/Crossbows&lt;br /&gt;
**# Knuckle Weapons&lt;br /&gt;
**# Musical Instruments&lt;br /&gt;
**# Whips&lt;br /&gt;
**# Books&lt;br /&gt;
**# Katars&lt;br /&gt;
**# Revolvers&lt;br /&gt;
**# Rifles&lt;br /&gt;
**# Shotguns&lt;br /&gt;
**# Gatling guns&lt;br /&gt;
**# Grenade launchers&lt;br /&gt;
**# Fuuma shuriken&lt;br /&gt;
** Shield-type items:&lt;br /&gt;
**# Guard, Novice Guard&lt;br /&gt;
**# Buckler&lt;br /&gt;
**# Shield, Holy Guard, Evangelist&lt;br /&gt;
**# Mirror Shield&lt;br /&gt;
** Ammunition-type items:&lt;br /&gt;
**# Arrows&lt;br /&gt;
**# Throw-able daggers&lt;br /&gt;
**# Bullets&lt;br /&gt;
**# Shells&lt;br /&gt;
**# Grenades&lt;br /&gt;
**# Shuriken&lt;br /&gt;
**# Kunai&lt;br /&gt;
**# Cannonballs&lt;br /&gt;
**# Throwable Items (Sling Item)&lt;br /&gt;
** Headgear-type items: Please see the View IDs section of this guide.&lt;br /&gt;
* '''BindOnEquip''': Whether the item will automatically bind to the character when it is equipped for the first time. &lt;br /&gt;
:An item that has this field set, will display a confirmation dialog the first time it is equipped, and, if accepted, the item will become character-bound.&lt;br /&gt;
* '''Script''': This is where you put your item bonus. Whether it's an usable item or an equip item, it will take effect according to the item type.&lt;br /&gt;
* '''OnEquip_Script''': Script to execute when the item is equipped. Warning, not all item bonuses will work here as expected.&lt;br /&gt;
* '''OnUnequip_Script''': Script to execute when the item is unequipped. Warning, not all item bonuses will work here as expected.&lt;br /&gt;
* '''Inherit''': This can be used only in item_db2.conf, and if set to true, and the item already exists in item_db.conf, &lt;br /&gt;
:all the missing fields will be inherited from there rather than using their default values.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
In the doc folder look for a text file called &amp;quot;item_bonus&amp;quot;, it shows all the scripts items can have and how they work.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
For more information about this structure read [http://hercules.ws/board/topic/2954-item-db-file-structure-overhaul/ Item DB file structure overhaul]&lt;br /&gt;
&lt;br /&gt;
=Defining Item clientside (Renewal Clients &amp;lt;= 2012-04-10a &amp;amp; Main Clients &amp;lt;= 2012-07-10a) =&lt;br /&gt;
After you make your item, put it in your item_db2.txt, so that you will not run into conflicts when updating your repository later. Then go to your data folder and modify the following files, one after another.&lt;br /&gt;
&lt;br /&gt;
==idnum2itemdisplaynametable.txt==&lt;br /&gt;
This file holds the item names, as displayed inside the client. Each item added as:&lt;br /&gt;
 ItemID#ItemName#&lt;br /&gt;
ItemID is the number from your ID column inside the item db. If your item name contains spaces, replace those with _ (underscore).&lt;br /&gt;
&lt;br /&gt;
==idnum2itemdesctable.txt==&lt;br /&gt;
This file contains the description of your item, when it is right-clicked. The syntax for an item is:&lt;br /&gt;
 ItemID#&lt;br /&gt;
 Item Description Line 1&lt;br /&gt;
 Item Description Line 2&lt;br /&gt;
 #&lt;br /&gt;
You can use any amount of lines for the description. If your description contains a #, make sure it is followed by a space character.&lt;br /&gt;
==idnum2itemresnametable.txt==&lt;br /&gt;
This file sets the inventory and drop-sprite for an the item. Item is defined as follows:&lt;br /&gt;
 ItemID#SpriteName#&lt;br /&gt;
The SpriteName is the name of the files in collection and item folders inside texture and the ones inside sprite folder. If you want to use the look of an another item, search for it's id and copy the sprite name from there.&lt;br /&gt;
==itemslotcounttable.txt==&lt;br /&gt;
In this file you set the amount of visible slots for the item. You do not need to add 0 slot items or items, which do not have slots at all (i. e. usable items). Syntax:&lt;br /&gt;
 ItemID#NumberOfSlots#&lt;br /&gt;
NumberOfSlots should be a number from 1-4, larger values might have undesired effects.&lt;br /&gt;
==Files for non-identified items==&lt;br /&gt;
The following files specify the name, description and look for items, which have not yet been identified. Their syntax follows the same rules as for the files with ''idnum'' prefix. Normally the same text is entered for non-equipment and generic description (which can be copied from official items) is used for equipment of all sorts (weapons, armor, headgears).&lt;br /&gt;
* num2itemdesctable.txt&lt;br /&gt;
* num2itemdisplaynametable.txt&lt;br /&gt;
* num2itemresnametable.txt&lt;br /&gt;
&lt;br /&gt;
=Defining Items clientside (For New Clients)=&lt;br /&gt;
If your client date is newer than specified above then you need to specify all the above item information in 1 file &lt;br /&gt;
&lt;br /&gt;
==System/ItemInfo.lub==&lt;br /&gt;
Since ItemInfo.lub is compiled, you need to decompile it to lua , add your customs and recompile back to lub file (Some have said that renaming a decompiled file to lub also works)&lt;br /&gt;
Syntax:&lt;br /&gt;
 [&amp;lt;item id&amp;gt;] = {&lt;br /&gt;
    unidentifiedDisplayName = &amp;lt;item name to show when not magnified&amp;gt;,&lt;br /&gt;
    unidentifiedResourceName = &amp;lt;file name prefix used for all the images and drop sprite when not magnified&amp;gt;,&lt;br /&gt;
    unidentifiedDescriptionName = { &amp;lt;comma separated list of strings&amp;gt;,&amp;lt;to get multiple lines&amp;gt;,&amp;lt;in item description&amp;gt; },&lt;br /&gt;
    identifiedDisplayName = &amp;lt;item name to show when magnified&amp;gt;,&lt;br /&gt;
    identifiedResourceName = &amp;lt;file name prefix used for all the images and drop sprite when magnified&amp;gt;,&lt;br /&gt;
    identifiedDescriptionName = { &amp;lt;same format as unidentifiedDescriptionName but for magnified items&amp;gt; },&lt;br /&gt;
    slotCount = &amp;lt;number of slots&amp;gt;,&lt;br /&gt;
    ClassNum = &amp;lt;View ID - yes the same one that was there item_db&amp;gt;&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;b&amp;gt;For Weapons, ClassNum = View ID specified in Weapon_IDs table (inside weapontable.lub file). Look [[Custom_Items#Weapon_Sprite_Solution_.28For_New_Clients.29|below]] for details.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also put the different values in DescriptionName in separate lines.&lt;br /&gt;
&lt;br /&gt;
Example: Lets say i want to add a weapon to item id 25000 - a One handed sword named Devastator with 3 slots &amp;amp; the image files &amp;amp; drop sprite files are all named Black_Sword.* . Also i want to display a Sword when not magnified.&lt;br /&gt;
&lt;br /&gt;
 [25000] = {&lt;br /&gt;
    unidentifiedDisplayName = &amp;quot;Sword&amp;quot;,&lt;br /&gt;
    unidentifiedResourceName = &amp;quot;¼Òµå&amp;quot;,&lt;br /&gt;
    unidentifiedDescriptionName = { &amp;quot;Unidentified item, can be identified with [Magnifier].&amp;quot; },&lt;br /&gt;
    identifiedDisplayName = &amp;quot;Devastator&amp;quot;,&lt;br /&gt;
    identifiedResourceName = &amp;quot;Black_Sword&amp;quot;,&lt;br /&gt;
    identifiedDescriptionName = { &lt;br /&gt;
                                  &amp;quot;An Unholy Sword that was created with the sole purpose of destruction&amp;quot;,&lt;br /&gt;
                                  &amp;quot;Class :^777777 Sword^000000&amp;quot;,&lt;br /&gt;
                                  &amp;quot;Attack :^777777 325^000000&amp;quot;,&lt;br /&gt;
                                  &amp;quot;Weight :^777777 80^000000&amp;quot;,&lt;br /&gt;
                                  &amp;quot;Weapon Level :^777777 4^000000&amp;quot;,&lt;br /&gt;
                                  &amp;quot;Required Level :^777777 100^000000&amp;quot;,&lt;br /&gt;
                                  &amp;quot;Applicable Job :^777777 Novice, Swordsman Class, Merchant Class, Thief Class^000000&amp;quot;&lt;br /&gt;
                                },&lt;br /&gt;
    slotCount = 3,&lt;br /&gt;
    ClassNum = 2&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
= Allocating Items on Client Side =&lt;br /&gt;
Your custom item will have 4 (6 in case its a headgear or garment) files:&lt;br /&gt;
 1) Drop sprite -&amp;gt; Helmet_drop.spr &lt;br /&gt;
 2) Drop act file -&amp;gt; Helmet_drop.act&lt;br /&gt;
 3) Item Inventory image -&amp;gt; Helmet_item.bmp&lt;br /&gt;
 4) Item Collection image -&amp;gt; Helmet_collection.bmp (the one you see on its description window)&lt;br /&gt;
 5) Headgear View sprite -&amp;gt; Helmet.spr&lt;br /&gt;
 6) Headgear View act file -&amp;gt; Helmet.act&lt;br /&gt;
&lt;br /&gt;
Lets say i downloaded a custom item called Helmet which serves as a headgear and the above six files were in them.&lt;br /&gt;
&lt;br /&gt;
==Step 1:==&lt;br /&gt;
We place the first four files based on what we specified in id2numresnametable.txt (IdentifiedResourceName in Iteminfo.lub).&lt;br /&gt;
For our example lets say i used &amp;quot;Helmet&amp;quot; as the resource name :&lt;br /&gt;
 i)   Copy Helmet_drop.spr to [RO Folder]\data\sprite\¾ÆÀÌÅÛ\Helmet.spr&lt;br /&gt;
 ii)  Copy Helmet_drop.act to [RO Folder]\data\sprite\¾ÆÀÌÅÛ\Helmet.act&lt;br /&gt;
 iii) Copy Helmet_item.bmp to [RO Folder]\data\texture\À¯ÀúÀÎÅÍÆäÀÌ½º\item\Helmet.bmp&lt;br /&gt;
 iv)  Copy Helmet_collection.bmp to [RO Folder]\data\texture\À¯ÀúÀÎÅÍÆäÀÌ½º\collection\Helmet.bmp &lt;br /&gt;
==Step 2 (only for Headgears):==&lt;br /&gt;
For displaying headgear on the character there will be two additional files (sprite &amp;amp; act) or 4 if the sprite author intended for a separate set of files for male &amp;amp; female. In my example i have considered the first scenario.&lt;br /&gt;
&lt;br /&gt;
The filename for headgear sprite are now specified in accname.lua file &amp;lt;b&amp;gt;(details of which is available in the [[Custom_Items#View_IDs.2C_Having_A_Custom_Headgear_Without_Xray|View IDs Section]])&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
lets say i used &lt;br /&gt;
 [ACCESSORY_IDs.HELMET] = &amp;quot;_Helmet&amp;quot;,&lt;br /&gt;
then we need to:&lt;br /&gt;
 i)   Copy Helmet.spr to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\¿©\¿©_Helmet.spr (Female)&lt;br /&gt;
 ii)  Copy Helmet.act to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\¿©\¿©_Helmet.act &lt;br /&gt;
 iii) Copy Helmet.spr to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\³²\³²_Helmet.spr (Male)&lt;br /&gt;
 iv)  Copy Helmet.act to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\³²\³²_Helmet.act &lt;br /&gt;
&lt;br /&gt;
Now it is ready to be used provided you have added entries properly to the lua files.&lt;br /&gt;
&lt;br /&gt;
==Specifications of the files==&lt;br /&gt;
1) Drop sprites - ideally have 1 frame &amp;amp; its act file will be just an empty act (only header will be there inside)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) Equip sprites - typically have 3+ frames to show images for various orientations &amp;amp; its act file will have the info on where to place each frame.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Item bmp - 24x24 size 256 bit bmp file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4) Collection bmp - 75x100 size bmp file (usually 256 bit but there is no restriction)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;How to differentiate between sprite files?&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open both sprite files in [http://ratemyserver.net/download_agent.php?type=1&amp;amp;file_num=10 Spr Conview]. The number of frames in the files can be seen at bottom (Sprite: &amp;lt;currentframe&amp;gt;/&amp;lt;total&amp;gt;). If it says Sprite: 1/1 then its a drop sprite and the other is equip sprite.&lt;br /&gt;
&lt;br /&gt;
Sometimes what sprite authors do is they simply copy the original sprite itself to make a drop sprite. In this case you will see both of them as identical when opened in Spr Conview &amp;amp; we don't need to worry about which one is which (since they are the same).&lt;br /&gt;
&lt;br /&gt;
If the process confused you, [http://www.mediafire.com/?8lzt4cbot100w44 here is an example folder], the sprite is done by drkangel. The folder is virus free.&lt;br /&gt;
&lt;br /&gt;
= View IDs, Having A Custom Headgear Without Xray =&lt;br /&gt;
Look in your data folder and make sure there is a folder named &amp;quot;lua files&amp;quot;, if there is not make it.[http://svn6.assembla.com/svn/ClientSide/Lua_Project/lubs/ Download the most recent lub package] and extract it to your lua files folder in your data folder. [http://svn6.assembla.com/svn/ClientSide/Lua_Project/lua%20files/datainfo/ Download the most recent accname.lua and accessoryid.lua], put it in your datainfo folder that is inside the lua files folder. Now download [http://svn6.assembla.com/svn/ClientSide/Lua_Project/tool/luac5.0.2.exe this lub compiling tool], and put it in the datainfo folder. &lt;br /&gt;
Now, Open accessoryid.lua in the datainfo folder with notepad or a text editor of your choice, go all the way down until the names stop. Add your custom gears before the } symbol. You should use a high number just like with your custom item's database ID, or use unused IDs to be sure you won't have to redo them all in the future, or at least for a while. Example:&lt;br /&gt;
 	ACCESSORY_PINKBUNNY_HAIRBAND = 663,&lt;br /&gt;
 	ACCESSORY_GREENBUNNY_HAIRBAND = 664,&lt;br /&gt;
 	ACCESSORY_OLD_ELFEAR = 665,&lt;br /&gt;
 	ACCESSORY_THA_MAERO_MASK = 666,&lt;br /&gt;
 	ACCESSORY_THANATOS_MAI_MASK = 667,&lt;br /&gt;
 	--668 free&lt;br /&gt;
 	ACCESSORY_FISHPIN = 669,&lt;br /&gt;
 	ACCESSORY_CUSTOM_HAT = 900,&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
''You must compile to lub if you leave space between IDs, if you don't plan on compiling to lub, make sure you do not skip any numbers.''&lt;br /&gt;
&lt;br /&gt;
Now open accname.lua, do basically the same thing but just in a different way, and for the sprite. Add your item to the bottom, have it look like the ones above it, except have your items name and the item's sprite name.&lt;br /&gt;
 	[ACCESSORY_IDs.ACCESSORY_PINKBUNNY_HAIRBAND] = &amp;quot;_ÇÎÅ©Åä³¢¸Ó¸®¶ì&amp;quot;,&lt;br /&gt;
 	[ACCESSORY_IDs.ACCESSORY_GREENBUNNY_HAIRBAND] = &amp;quot;_±×¸°Åä³¢¸Ó¸®¶ì&amp;quot;,&lt;br /&gt;
 	[ACCESSORY_IDs.ACCESSORY_OLD_ELFEAR] = &amp;quot;_°í´ë¿äÁ¤ÀÇ±Í&amp;quot;,&lt;br /&gt;
 	[ACCESSORY_IDs.ACCESSORY_THA_MAERO_MASK] = &amp;quot;_Å¸³ªÅä½ºÀÇ½½ÇÄ°¡¸é&amp;quot;,&lt;br /&gt;
 	[ACCESSORY_IDs.ACCESSORY_THANATOS_MAI_MASK] = &amp;quot;_Å¸³ªÅä½ºÀÇÁõ¿À°¡¸é&amp;quot;,&lt;br /&gt;
 	[ACCESSORY_IDs.ACCESSORY_FISHPIN] = &amp;quot;_¹°°í±âÇÉ&amp;quot;,&lt;br /&gt;
 	[ACCESSORY_IDs.ACCESSORY_CUSTOM_HAT] = &amp;quot;_Sprite_Name_Here&amp;quot;,&lt;br /&gt;
 }&lt;br /&gt;
Delete the accname.lub and accessoryid.lub. Now that you are done, make sure luac.exe is in your datainfo folder, right click the luac.exe, create a shortcut, right click the shortcut, and click properties, in the target area, add right after the quotes, with the quotes:&lt;br /&gt;
 -o &amp;quot;accessoryid.lub&amp;quot; &amp;quot;accessoryid.lua&amp;quot;&lt;br /&gt;
So that it looks something like this:&lt;br /&gt;
 &amp;quot;C:\Program Files (x86)\Gravity\RO\data\lua files\datainfo\luac5.0.2.exe&amp;quot; -o &amp;quot;accessoryid.lub&amp;quot; &amp;quot;accessoryid.lua&amp;quot;&lt;br /&gt;
Do this also to &amp;quot;accname.lub&amp;quot; except instead of accessoryid in the quotes, do accname. If there is any lua file leftover, you may want to move it somewhere else just for future changes, like My Documents. For future reference, this is also how you turn the other lub files to lua files.&lt;br /&gt;
&lt;br /&gt;
=Modifications=&lt;br /&gt;
==Sprite Replacement==&lt;br /&gt;
To replace a headgear with your customized headgear, just delete one of the items you want, and replace your customised item ID with that id.&lt;br /&gt;
&lt;br /&gt;
Lets say you have something like this:&lt;br /&gt;
 15000,Angel_Wing,Angel Wing,4,,10,10,0,,1,0,0,3,0,0,0,0,0,{},{},{}&lt;br /&gt;
And there's an item you wont need, such as:&lt;br /&gt;
 2220,Hat,Hat,5,1000,,200,,2,,0,10477567,2,256,,0,1,16,{},{},{}&lt;br /&gt;
Well, to replace it, just delete everything in the hat line but its ID, and paste there your custom item, all the line but the ID. Should be like this:&lt;br /&gt;
 '''2220''',Hat,Hat,5,1000,,200,,2,,0,10477567,2,256,,0,1,16,{},{},{}&lt;br /&gt;
 15000,'''Angel_Wing,Angel Wing,4,,10,10,0,,1,0,0,3,0,0,0,0,0,{},{},{}'''&lt;br /&gt;
 '''2220,Angel_Wing,Angel Wing,4,,10,10,0,,1,0,0,3,0,0,0,0,0,{},{},{}'''&lt;br /&gt;
All you need to do now is changing the View ID to the Hat, and change your file names to its name. You can find them on the idnum2resnametable.txt Search for 2220 and the gibberish besides it, w/o the # # is the file name, then rename it to your custom item name.&lt;br /&gt;
&lt;br /&gt;
Remember to add the files to data\sprite\¾ÆÀÌÅÛ (Icon sprite) and both data\sprite\¾Ç¼¼»ç¸®\³² (Male Item Sprite) and data\sprite\¾Ç¼¼»ç¸®\¿© (Female Item Sprite). Remember, these 2 last item names, must have either a ³²_ for male or ¿©_ for female, at the beginning of the name, both .spr and .act. Also, don't forget to change the other files:&lt;br /&gt;
&lt;br /&gt;
idnum2itemdisplaynametable.txt , idnum2itemdesctable.txt , idnum2itemdesctable.txt , num2itemdesctable.txt , num2itemdisplaynametable.txt , num2itemresnametable.txt and itemslotcounttable.txt&lt;br /&gt;
&lt;br /&gt;
Use these files if you want to replace sprites, they will be useful.&lt;br /&gt;
* '''actOR:''' with the actor you modify the act file, which is the one who tells the client where does the weapon go and what does it have to do and at a certain moment.&lt;br /&gt;
* '''SPR Conview:''' you can use these to view which sprite is which, and also see sequence per sequence.&lt;br /&gt;
&lt;br /&gt;
==Item Restrictions==&lt;br /&gt;
Look on your db folder for a file called item_trade.txt and open it&lt;br /&gt;
&lt;br /&gt;
Now, the pattern for a flag is:&lt;br /&gt;
&lt;br /&gt;
 Item ID, TradeMask, GM-Level Override&lt;br /&gt;
&lt;br /&gt;
* '''Item ID''': the ID of your item.&lt;br /&gt;
* '''TradeMask''': Testrictions the item will have, such as being dropped, stored or traded. These values can be combined to achieve multiple effects.&lt;br /&gt;
 1:Item can't be dropped&lt;br /&gt;
 2:Item can't be traded (nor vended)&lt;br /&gt;
 4:Item can only be traded with wedded partner&lt;br /&gt;
 8:Item can't be sold to NPCs&lt;br /&gt;
 16:Item can't be placed in the cart&lt;br /&gt;
 32:Item can't be placed in the storage&lt;br /&gt;
 64:Item can't be placed in the guild storage&lt;br /&gt;
* '''GM-Level Override''': This is the minimum GM level a player must have to avoid these restrictions.&lt;br /&gt;
&lt;br /&gt;
==Item Script==&lt;br /&gt;
{{duplication&lt;br /&gt;
|type=section&lt;br /&gt;
|what=[[itemskill]], [[sc_start]] and [[skilleffect]]}}&lt;br /&gt;
{{disputed&lt;br /&gt;
|type=section&lt;br /&gt;
|date=September 2010}}&lt;br /&gt;
Okay, I'll update this as I go; otherwise, I wont have anything new to show. First with usable items.&lt;br /&gt;
&lt;br /&gt;
Well, there are 3 types of usables:&lt;br /&gt;
&lt;br /&gt;
1.- Healing items, they have in the type field a 0.&lt;br /&gt;
&lt;br /&gt;
2.- Other uses items, such as fly wings and so, which doesn't heal, but does have an instant effect, they have in the type field a 2.&lt;br /&gt;
&lt;br /&gt;
3.- Usable items, which are skills that requires a target selection, therefore they have a delayed use, and in newer SVNs the item wont be gone until the target is chosen and the cast has finished. Means, you wont lose the item if the skill hasn't been done. They have in the type field an 11.&lt;br /&gt;
&lt;br /&gt;
Now, for an item skill, the pattern for a skill is:&lt;br /&gt;
 itemskill &amp;lt;skill id&amp;gt;,&amp;lt;skill level&amp;gt;;&lt;br /&gt;
Without &amp;lt;&amp;gt; of course.&lt;br /&gt;
&lt;br /&gt;
Now, we go to our db\skill_db.txt and search for the blessing ID, searching for AL_ or blessing, but first, the structure of a skill:&lt;br /&gt;
 id,range,hit,inf,element,nk,splash,max,list_num,castcancel,cast_defence_rate,inf2,maxcount,skill_type,blow_count,name,description&lt;br /&gt;
Now, the AL_BLESSING or Blessing Skill:&lt;br /&gt;
 34,9,6,16,0,0x1,0,10,1,yes,0,0,0,magic,0,	AL_BLESSING,Blessing&lt;br /&gt;
We grab the ID and put it on our code:&lt;br /&gt;
 itemskill 34,&amp;lt;skill lvl&amp;gt;;&lt;br /&gt;
Don't mind the actual level of the skill_db.txt for the skill level part. You can actually put the level you want here below 99, so lets pick 4:&lt;br /&gt;
 itemskill 34,4;&lt;br /&gt;
And finally, insert it on the code.&lt;br /&gt;
&amp;lt;pre&amp;gt;,{ itemskill 34,4; },{},{}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There, we have a Lvl 4 Blessing item skill.&lt;br /&gt;
&lt;br /&gt;
Remember, one space before and one after the script, NOT TAB!&lt;br /&gt;
&lt;br /&gt;
And so on with other skills. Just remember these steps and they should be fine. And remember, itemskill is NOT the same as skill. itemskill will make you CAST that skill, while skill will GIVE you the skill. If you give an item, whether delayed use or normal usable two itemskill commands, only the latter will come into effect, as you cannot cast two skills at the same time.&lt;br /&gt;
&lt;br /&gt;
Now, for Potions.&lt;br /&gt;
&lt;br /&gt;
Instead of using itemskill, we will use itemheal:&lt;br /&gt;
 ,{ itemheal 100,0; },{},{}&lt;br /&gt;
The green is the HP, the blue is the SP. To add that random heal amount effect, just pick a set amount, let's say 120, then pick 1 or 2 numbers, up to you. Then, add the rand() command, like this:&lt;br /&gt;
 ,{ itemheal rand(120,9,49),0; },{},{}&lt;br /&gt;
Explanation: This item will heal about 49~120 hp and 0 SP. To heal SP you change the 0 to a number. Like this:&lt;br /&gt;
 ,{ itemheal rand(120,9,49),50; },{},{}&lt;br /&gt;
It will now heal 50 SP.&lt;br /&gt;
Now, for skilleffect and sc_start.&lt;br /&gt;
&lt;br /&gt;
Okay, let's see. Here's a example of an item casting a skill and simulating a skill.&lt;br /&gt;
 ,{ itemskill 34,10; skilleffect 29,0; sc_start 12,140000,5; },{},{}&lt;br /&gt;
skilleffect will display on your client a skill visual effect. The pattern is:&lt;br /&gt;
&lt;br /&gt;
 skilleffect &amp;lt;skill ID&amp;gt;,&amp;lt;number&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
;skill ID&lt;br /&gt;
:Self-explanatory.&lt;br /&gt;
;number&lt;br /&gt;
:Have you seen those skills that shows up numbers upon casting? Such as heal? Well, putting a number there will display it. But only works on skills with numbers floating.&lt;br /&gt;
&lt;br /&gt;
sc_start has the following pattern:&lt;br /&gt;
&lt;br /&gt;
 sc_start &amp;lt;status id&amp;gt;,&amp;lt;duration&amp;gt;,&amp;lt;val1&amp;gt;[,&amp;lt;unit id&amp;gt;];&lt;br /&gt;
&lt;br /&gt;
;status id&lt;br /&gt;
:Refer to const.txt in your db folder for all effects. Open it with a text editor then search by either clicking edit, then find, or press and hold the ctrl key, and while still holding it press the f key, then release, and search for &amp;quot;SC_ALL -1&amp;quot;. Everything below this is an effect. The effects stop at &amp;quot;e_gasp    0&amp;quot; which are emoticons.&lt;br /&gt;
;duration&lt;br /&gt;
:Is the amount time in milliseconds (1000 msec = 1 sec) that the status will be active.&lt;br /&gt;
;val1&lt;br /&gt;
:Typically it's the level of the skill, associated with this status.&lt;br /&gt;
;unit id&lt;br /&gt;
:Allows to start the status on an other unit, than the attached player. For players this is account id. This parameter is optional, and can be omitted.&lt;br /&gt;
&lt;br /&gt;
Now, for the item I said, it will show you the visual effect of Blessing and cast on you a lvl 5 Agi-Up! skill for 140 seconds.&lt;br /&gt;
&lt;br /&gt;
For more item scripts see script_commands.txt in your doc folder, as well as item_bonus.txt in your doc folder.&lt;br /&gt;
&lt;br /&gt;
==Weapon Sprite Solution (Renewal Clients &amp;lt;= 2012-04-10a &amp;amp; Main Clients &amp;lt;= 2012-07-10a)==&lt;br /&gt;
For these clients, Weapons are limited to use a range of Item IDs hardcoded in the clientn for each type.&lt;br /&gt;
For e.g.&lt;br /&gt;
&lt;br /&gt;
 1265,Bloody_Roar,Bloody Roar,4,,10,1000,120,,1,0,4096,7,2,34,4,75,1,16,{ bonus bIgnoreDefRace,RC_DemiHuman; bonus bFlee,-160; bonus bFlee2,-160; bonus bNoRegen,1; bonus bNoRegen,2; },{},{}&lt;br /&gt;
 1266,Test,Test,4,4000,2000,10,165,,1,0,4096,7,2,34,3,33,1,16,{}&lt;br /&gt;
&lt;br /&gt;
 // 1-Handed Axes&lt;br /&gt;
 1301,Axe,Axe,4,500,,800,38,,1,3,8803555,7,2,2,1,3,1,6,{}&lt;br /&gt;
&lt;br /&gt;
Here the item 1266 is a custom katar and it does show up as a katar (if you have the proper sprite files ofcourse). but if i use some id like say 22000, client wont display it. So what is the range of item ids you can use? Look below:&lt;br /&gt;
&lt;br /&gt;
* One handed Swords = 1100-1149, 13400-13499&lt;br /&gt;
* Two handed Swords = 1150-1199, 21000-21999&lt;br /&gt;
 &lt;br /&gt;
* Knives, Daggers etc = 1200-1249, 13000-13099&lt;br /&gt;
* Katars = 1250-1299 ; Has 35 free IDs&lt;br /&gt;
 &lt;br /&gt;
* One handed Axes = 1300-1349; Has 43 free IDs&lt;br /&gt;
* Two handed Axes = 1350-1399; Has 32 free IDs&lt;br /&gt;
 &lt;br /&gt;
* One handed Spears = 1400-1449; Has 34 free IDs&lt;br /&gt;
* Two Handed Spears = 1450-1471, 1474-1499&lt;br /&gt;
 &lt;br /&gt;
* Maces = 1500-1549, 16000-16999&lt;br /&gt;
* Books = 1550-1599 ; Has only 2 IDs.&lt;br /&gt;
* Knuckles = 1800-1899 ; Has 95 free IDs&lt;br /&gt;
 &lt;br /&gt;
* One Handed Staves/Rods = 1600-1699; Has 79 free IDs&lt;br /&gt;
* Two Handed Staves/Rods = 1472,1473,2000-2099&lt;br /&gt;
 &lt;br /&gt;
* Bows = 1700-1749, 18100-18499&lt;br /&gt;
* Guitars = 1900-1949 ; Has 32 free IDs&lt;br /&gt;
* Whips = 1950-1999 ; Has 130 free IDs&lt;br /&gt;
 &lt;br /&gt;
* Handguns = 13100-13149&lt;br /&gt;
* Other guns = 13150-13199&lt;br /&gt;
 &lt;br /&gt;
* Ninja weapons = 13300-13399&lt;br /&gt;
&lt;br /&gt;
The number of unused Item IDs left known for a range has also been mentioned above. Best practice to follow check in your range in official db before adding custom weapon.&lt;br /&gt;
&lt;br /&gt;
==Weapon Sprite Solution (For New Clients) ==&lt;br /&gt;
For new clients the view id system is also applicable to client. To add a custom weapon you need to first edit a file&lt;br /&gt;
called weapontable.lub in your data folder&lt;br /&gt;
 data/luafiles514/lua files/datainfo/weapontable.lub&lt;br /&gt;
&lt;br /&gt;
I will be adding &amp;lt;b&amp;gt;Oriental_Sword&amp;lt;/b&amp;gt; which will be a 1-Handed sword. Open weapontable.lub.&lt;br /&gt;
First you will see a table called &amp;lt;b&amp;gt;Weapon_IDs&amp;lt;/b&amp;gt;. Take note of the first 30 values in this table - these are the only available Weapon types in the client right now.&lt;br /&gt;
&lt;br /&gt;
Anyways go to the last entry which should be for Wizardy Staff = 97. You can use a view id after that like shown below&lt;br /&gt;
  WEAPONTYPE_Oriental_Sword = 98,&lt;br /&gt;
&lt;br /&gt;
Come down and you see the next table called &amp;lt;b&amp;gt;WeaponNameTable&amp;lt;/b&amp;gt;. Here is where you add your sprite name suffix.&amp;lt;br&amp;gt;&lt;br /&gt;
What do i mean by that? Its the last part in your weapon sprite &amp;amp; act file. Before it used to be _&amp;lt;Item ID&amp;gt;.&lt;br /&gt;
 data/sprite/&amp;lt;job dependent folder&amp;gt;/&amp;lt;job dependent prefix&amp;gt;_&amp;lt;gender&amp;gt;&amp;lt;weapon suffix&amp;gt;.spr&lt;br /&gt;
&lt;br /&gt;
OK Back to topic. so I add my entry like shown below.&lt;br /&gt;
 [Weapon_IDs.WEAPONTYPE_Oriental_Sword] = &amp;quot;_Oriental&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Lastly come down further in weapontable.lub and you see the last table called &amp;lt;b&amp;gt;Expansion_Weapon_IDs&amp;lt;/b&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
Remember the 30 types i told you to take note of ? here we assign one of those to our custom (like a mapping or connection).&amp;lt;br&amp;gt;&lt;br /&gt;
Since mine is a 1-Handed Sword I specify it like below.&lt;br /&gt;
 [Weapon_IDs.WEAPONTYPE_Oriental_Sword] = Weapon_IDs.WPCLASS_WEAPONTYPE_SWORD &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Now for the most important part. For our client to actually pick up all these details we need to provide the view id which we used in Weapon_IDs table as the ClassNum value in ItemInfo.lua. Check the [[Custom_Items#System.2FItemInfo.lub|ItemInfo.lub format]] shown above for details.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this your weapon sprite will become visible while attacking.&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Data]]&lt;br /&gt;
[[Category:Customization]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Installation</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Installation"/>
				<updated>2016-04-25T12:24:12Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: Marked svn information as outdated&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article is aimed at downloading Hercules and any dependancies required to run it. In this article, you are expected to know basic file and program &lt;br /&gt;
management of the OS you are attempting to run Hercules on. (Or use Google to search for the answers)&lt;br /&gt;
&lt;br /&gt;
==System Requirements==&lt;br /&gt;
{{EntirePage|System Requirements}}&lt;br /&gt;
Hercules runs on variety of 32-bit and 64-bit (limited) operating systems, including Windows, Linux and Unix. Hardware requirements are ones of typical server environment, whether virtual or dedicated.&lt;br /&gt;
&lt;br /&gt;
==Program Requirements==&lt;br /&gt;
To run Hercules, the following programs must be installed on the machine that will run Hercules:&lt;br /&gt;
===*nix based===&lt;br /&gt;
For *nix, most of these programs will come as [[wikipedia:Software_package_%28installation%29|Packages]] with your OS, for example, &lt;br /&gt;
the FreeBSD Ports collection, or Debians apt-get or aptitude. Please see your OS's help/support pages to find out how to utilize package installations. As a general rule, the following packages will be required to compile Hercules: &amp;lt;br /&amp;gt;&lt;br /&gt;
[http://www.gnu.org/software/wget/ wget], [http://subversion.tigris.org/ subversion], [http://gcc.gnu.org/ GCC], [http://www.gnu.org/software/make/ make] (if running *BSD, gmake is needed instead of make.)&lt;br /&gt;
====libmysqlclient15-dev====&lt;br /&gt;
libmysqlclient15-dev is the library for MySQL and is '''required''' to compile an SQL version of Hercules. This will most likely need to be installed via packages.&lt;br /&gt;
&lt;br /&gt;
===Windows based===&lt;br /&gt;
Depending on how you want to compile, one of two methods can be used. We '''highly recommend''' the use of [http://www.microsoft.com/Express/vc/ Visual C++].&lt;br /&gt;
[http://www.cygwin.com/ Cygwin] can also be used. If cygwin is used, you have some configuration to do, please see below:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Expand the development or devel branch in Cygwin and make sure GCC and Make are checked. These are the only 2 things you need, &lt;br /&gt;
the others are up to you whether you want to download them or not. The downloading and installation of packages may take some time &lt;br /&gt;
depending on your packages, their size, your network speed, and the remote server's network speed. &lt;br /&gt;
This shouldn't take too long if it's just GCC and Make.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
You will also need [http://subversion.tigris.org/ subversion]&lt;br /&gt;
&lt;br /&gt;
==Installing software==&lt;br /&gt;
===Linux OS's===&lt;br /&gt;
A simple make and make install is all that is needed for most of the packages. You can find [[:Category:Installation|instructions]] and readmes in each of the downloads for your distro telling you how to install and compile each package. Once subversion is installed, you can download Hercules's latest source via [[GIT]].&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://github.com/HerculesWS/Hercules.git hercules &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
for trunk&lt;br /&gt;
&lt;br /&gt;
===Windows OS's===&lt;br /&gt;
{{outdated|type=section}}&lt;br /&gt;
When using SVN in Windows, all your commands are in a right click menu integrated into the Windows Shell.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:svnwindows.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
Simply create a new folder, right click on it and select 'SVN Checkout...' and a dialog box will appear.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:checkout.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
Enter your URL (in the example above, simply add /trunk after the URL to checkout Trunk, or /branches/stable for stable) and TSVN will download &lt;br /&gt;
a fresh copy of Hercule's SVN to that folder.&lt;br /&gt;
&lt;br /&gt;
==Compiling==&lt;br /&gt;
Please see [[Compiling]] for more detailed instructions.&lt;br /&gt;
&lt;br /&gt;
For your OS, you will need to compile binaries if you had downloaded Hercules via the SVN. you can then move on to [[:Category:Configuration]] and then running Hercules.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[:Category:Installation|Installation per OS]]&lt;br /&gt;
* [[GIT]]&lt;br /&gt;
* [[Installing_SQL|Installing SQL for Hercules use]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Basics]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Git</id>
		<title>Git</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Git"/>
				<updated>2016-04-25T11:45:23Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: /* Using .diff/.patch files */ removed svn references&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:incomplete]]&lt;br /&gt;
==Preface==&lt;br /&gt;
This article will cover the '''Git''' details related to Hercules. '''Git''' is a version control system that allows multiple users to contribute to the development of Hercules, if permitted. It is also the most efficient method to downloading the source code of Hercules.&lt;br /&gt;
&lt;br /&gt;
==About Git==&lt;br /&gt;
As mentioned above '''Git''' is a version control system that allows users to download the latest source code.&lt;br /&gt;
&lt;br /&gt;
===Checkout===&lt;br /&gt;
When you '''clone''' a git repository, it is downloaded, along with all history, properties and files, onto your machine so you can make local changes or use it in a production environment. &lt;br /&gt;
&lt;br /&gt;
===Commit===&lt;br /&gt;
When you '''commit''' a piece of code, you are saving a set of changes in a form that can be uploaded back to the server. Each commit includes the author's name, what they changed and when they changed it, which can be viewed and referenced later. &lt;br /&gt;
&lt;br /&gt;
===Push===&lt;br /&gt;
When you '''push''' your commits, you are sending your commits to the central git server, to make them available to other people.&lt;br /&gt;
&lt;br /&gt;
Only members of the [[Staff|Hercules development team]] can commit code straight to the Hercules Git.&lt;br /&gt;
&lt;br /&gt;
===Pull===&lt;br /&gt;
When you '''pull''' commits, you are downloading the latest commits that were pushed to the git repository, and merging them to your working copy. In this operation, many files are changed, but some are added, deleted or moved. When you pull changes, a lot of conflicts can happen, so keep an eye out of those.&lt;br /&gt;
&lt;br /&gt;
===Obtain/Install Git===&lt;br /&gt;
Please see the [[:Category:Installation]] appropriate category for installation of Git on your operating system of choice and how to utilize it.&lt;br /&gt;
&lt;br /&gt;
==Hercules Git Details==&lt;br /&gt;
You can find the root or index of the Hercules source code at the following link: &amp;lt;code&amp;gt;{{git||full}}&amp;lt;/code&amp;gt;. This link can be used if you need to view a single file and don't want to dig up your &amp;quot;copy&amp;quot; of the source code.&lt;br /&gt;
&lt;br /&gt;
===Hercules Developer Branches===&lt;br /&gt;
Each developer that contributes to the Hercules Project is welcome to their own branches on the git repository. A lot of times, these separate branches branch are a testing bed for a new feature. You should never assume that any branch that is not trunk or not stable is usable. Often times, it is not.&lt;br /&gt;
&lt;br /&gt;
==Using .diff/.patch files==&lt;br /&gt;
{{EntirePage|Diff}}&lt;br /&gt;
Often times, developers and contributors will release their work with a .diff or .patch file. these files are designed specifically to be applied to Hercules and 'patched' in. &lt;br /&gt;
&lt;br /&gt;
If the revision numbers are different, or the code is different in anyway, the patch will likely fail with the error message that the revision numbers do not match. The diff file will include some important symbols and numbers to help you apply them manually.&lt;br /&gt;
 /path/to/file [Revision 233]&lt;br /&gt;
 @@ +241,4 -241,4 @@&lt;br /&gt;
 + This line will be added at the line number or position indicated above.&lt;br /&gt;
 - This line will be removed at the line number or position indicated above.&lt;br /&gt;
So in the file, we're to remove line 241 and replace it with the line that has the '+' next to it.&lt;br /&gt;
&lt;br /&gt;
[[Category:Basics]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Git</id>
		<title>Git</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Git"/>
				<updated>2016-04-25T11:44:15Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: /* Hercules Git Details */ removed svn references&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:incomplete]]&lt;br /&gt;
==Preface==&lt;br /&gt;
This article will cover the '''Git''' details related to Hercules. '''Git''' is a version control system that allows multiple users to contribute to the development of Hercules, if permitted. It is also the most efficient method to downloading the source code of Hercules.&lt;br /&gt;
&lt;br /&gt;
==About Git==&lt;br /&gt;
As mentioned above '''Git''' is a version control system that allows users to download the latest source code.&lt;br /&gt;
&lt;br /&gt;
===Checkout===&lt;br /&gt;
When you '''clone''' a git repository, it is downloaded, along with all history, properties and files, onto your machine so you can make local changes or use it in a production environment. &lt;br /&gt;
&lt;br /&gt;
===Commit===&lt;br /&gt;
When you '''commit''' a piece of code, you are saving a set of changes in a form that can be uploaded back to the server. Each commit includes the author's name, what they changed and when they changed it, which can be viewed and referenced later. &lt;br /&gt;
&lt;br /&gt;
===Push===&lt;br /&gt;
When you '''push''' your commits, you are sending your commits to the central git server, to make them available to other people.&lt;br /&gt;
&lt;br /&gt;
Only members of the [[Staff|Hercules development team]] can commit code straight to the Hercules Git.&lt;br /&gt;
&lt;br /&gt;
===Pull===&lt;br /&gt;
When you '''pull''' commits, you are downloading the latest commits that were pushed to the git repository, and merging them to your working copy. In this operation, many files are changed, but some are added, deleted or moved. When you pull changes, a lot of conflicts can happen, so keep an eye out of those.&lt;br /&gt;
&lt;br /&gt;
===Obtain/Install Git===&lt;br /&gt;
Please see the [[:Category:Installation]] appropriate category for installation of Git on your operating system of choice and how to utilize it.&lt;br /&gt;
&lt;br /&gt;
==Hercules Git Details==&lt;br /&gt;
You can find the root or index of the Hercules source code at the following link: &amp;lt;code&amp;gt;{{git||full}}&amp;lt;/code&amp;gt;. This link can be used if you need to view a single file and don't want to dig up your &amp;quot;copy&amp;quot; of the source code.&lt;br /&gt;
&lt;br /&gt;
===Hercules Developer Branches===&lt;br /&gt;
Each developer that contributes to the Hercules Project is welcome to their own branches on the git repository. A lot of times, these separate branches branch are a testing bed for a new feature. You should never assume that any branch that is not trunk or not stable is usable. Often times, it is not.&lt;br /&gt;
&lt;br /&gt;
==Using .diff/.patch files==&lt;br /&gt;
{{EntirePage|Diff}}&lt;br /&gt;
Often times, developers and contributors will release their work with a .diff or .patch file. these files are designed specifically to be applied to an SVN revision and 'patched' in. &lt;br /&gt;
&lt;br /&gt;
In Windows, you can apply a diff or patch file by placing the diff file into the SVN directory, right clicking the diff or patch file, navigating to the Subversion menu and clicking 'Apply Patch'.&lt;br /&gt;
&lt;br /&gt;
If the revision numbers are different, or the code is different in anyway, the patch will likely fail with the error message that the revision numbers do not match. The diff file will include some important symbols and numbers to help you apply them manually.&lt;br /&gt;
 /path/to/file [Revision 233]&lt;br /&gt;
 @@ +241,4 -241,4 @@&lt;br /&gt;
 + This line will be added at the line number or position indicated above.&lt;br /&gt;
 - This line will be removed at the line number or position indicated above.&lt;br /&gt;
So in the file, we're to remove line 241 and replace it with the line that has the '+' next to it.&lt;br /&gt;
&lt;br /&gt;
[[Category:Basics]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Git</id>
		<title>Git</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Git"/>
				<updated>2016-04-25T11:42:42Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: /* About Git */ Removed svn references&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:incomplete]]&lt;br /&gt;
==Preface==&lt;br /&gt;
This article will cover the '''Git''' details related to Hercules. '''Git''' is a version control system that allows multiple users to contribute to the development of Hercules, if permitted. It is also the most efficient method to downloading the source code of Hercules.&lt;br /&gt;
&lt;br /&gt;
==About Git==&lt;br /&gt;
As mentioned above '''Git''' is a version control system that allows users to download the latest source code.&lt;br /&gt;
&lt;br /&gt;
===Checkout===&lt;br /&gt;
When you '''clone''' a git repository, it is downloaded, along with all history, properties and files, onto your machine so you can make local changes or use it in a production environment. &lt;br /&gt;
&lt;br /&gt;
===Commit===&lt;br /&gt;
When you '''commit''' a piece of code, you are saving a set of changes in a form that can be uploaded back to the server. Each commit includes the author's name, what they changed and when they changed it, which can be viewed and referenced later. &lt;br /&gt;
&lt;br /&gt;
===Push===&lt;br /&gt;
When you '''push''' your commits, you are sending your commits to the central git server, to make them available to other people.&lt;br /&gt;
&lt;br /&gt;
Only members of the [[Staff|Hercules development team]] can commit code straight to the Hercules Git.&lt;br /&gt;
&lt;br /&gt;
===Pull===&lt;br /&gt;
When you '''pull''' commits, you are downloading the latest commits that were pushed to the git repository, and merging them to your working copy. In this operation, many files are changed, but some are added, deleted or moved. When you pull changes, a lot of conflicts can happen, so keep an eye out of those.&lt;br /&gt;
&lt;br /&gt;
===Obtain/Install Git===&lt;br /&gt;
Please see the [[:Category:Installation]] appropriate category for installation of Git on your operating system of choice and how to utilize it.&lt;br /&gt;
&lt;br /&gt;
==Hercules Git Details==&lt;br /&gt;
You can find the root or index of the Hercules source code at the following link: &amp;lt;code&amp;gt;{{git||full}}&amp;lt;/code&amp;gt;. This link can be used if you need to view a single file and don't want to dig up your &amp;quot;copy&amp;quot; of the source code.&lt;br /&gt;
&lt;br /&gt;
===Hercules Trunk===&lt;br /&gt;
'''Hercules Trunk''' is used as the ''testing'' or otherwise development code. It has all of the latest features, but is not guaranteed to be bug or problem free.&lt;br /&gt;
&lt;br /&gt;
You can checkout the trunk branch from the following link:&lt;br /&gt;
&amp;lt;code&amp;gt;{{git|trunk/}}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hercules Developer Branches===&lt;br /&gt;
Each developer that contributes to the Hercules Project is welcome to their own folder on the SVN, where they may make their own branch. A lot of times, this separate branch is a testing bed for a new feature. You should never assume that any branch that is not trunk or not stable is usable. Often times, it is not.&lt;br /&gt;
&lt;br /&gt;
==Using .diff/.patch files==&lt;br /&gt;
{{EntirePage|Diff}}&lt;br /&gt;
Often times, developers and contributors will release their work with a .diff or .patch file. these files are designed specifically to be applied to an SVN revision and 'patched' in. &lt;br /&gt;
&lt;br /&gt;
In Windows, you can apply a diff or patch file by placing the diff file into the SVN directory, right clicking the diff or patch file, navigating to the Subversion menu and clicking 'Apply Patch'.&lt;br /&gt;
&lt;br /&gt;
If the revision numbers are different, or the code is different in anyway, the patch will likely fail with the error message that the revision numbers do not match. The diff file will include some important symbols and numbers to help you apply them manually.&lt;br /&gt;
 /path/to/file [Revision 233]&lt;br /&gt;
 @@ +241,4 -241,4 @@&lt;br /&gt;
 + This line will be added at the line number or position indicated above.&lt;br /&gt;
 - This line will be removed at the line number or position indicated above.&lt;br /&gt;
So in the file, we're to remove line 241 and replace it with the line that has the '+' next to it.&lt;br /&gt;
&lt;br /&gt;
[[Category:Basics]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Hercules</id>
		<title>Hercules</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Hercules"/>
				<updated>2016-04-25T11:36:19Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: Updated forum links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{infobox/software&lt;br /&gt;
|developer=[[Staff|Hercules Developers]]&lt;br /&gt;
|version=[https://github.com/HerculesWS/Hercules/commit/ GitHub]&lt;br /&gt;
|os=Windows, Linux, FreeBSD, Mac OSX&lt;br /&gt;
|lang=English&lt;br /&gt;
|type=Ragnarok Online Emulator&lt;br /&gt;
|license=GNU General Public License 3 (open source)&lt;br /&gt;
|web=http://herc.ws/}}&lt;br /&gt;
'''Hercules''' is a free and open source implementation of [[wikipedia:AEGIS_(Ragnarok_Online)|Aegis]], a [[wikipedia:Ragnarok Online|Ragnarok Online]] game server,  and is written in [[wikipedia:C_(programming_language)|C]]. Written in C the program is very versatile and provides NPCs, warps and modifications. and is currently version controlled via Git. The project is jointly managed by a group of volunteers located around the world as well as a tremendous community providing QA and support. Hercules is a continuation of the original Athena project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Repository ==&lt;br /&gt;
Hercules is available via [http://herc.ws/board/topic/152-obtaining-hercules/ Git]&lt;br /&gt;
&lt;br /&gt;
== Support ==&lt;br /&gt;
You may access our [http://herc.ws/board/ forums] or [[IRC|IRC channel]] for support.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* [http://herc.ws/board/ Official Hercules Support Board]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Hercules]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Hercules</id>
		<title>Hercules</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Hercules"/>
				<updated>2016-04-25T11:35:48Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: /* Support */ Updated forum link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{infobox/software&lt;br /&gt;
|developer=[[Staff|Hercules Developers]]&lt;br /&gt;
|version=[https://github.com/HerculesWS/Hercules/commit/ GitHub]&lt;br /&gt;
|os=Windows, Linux, FreeBSD, Mac OSX&lt;br /&gt;
|lang=English&lt;br /&gt;
|type=Ragnarok Online Emulator&lt;br /&gt;
|license=GNU General Public License 3 (open source)&lt;br /&gt;
|web=http://hercules.ws/}}&lt;br /&gt;
'''Hercules''' is a free and open source implementation of [[wikipedia:AEGIS_(Ragnarok_Online)|Aegis]], a [[wikipedia:Ragnarok Online|Ragnarok Online]] game server,  and is written in [[wikipedia:C_(programming_language)|C]]. Written in C the program is very versatile and provides NPCs, warps and modifications. and is currently version controlled via Git. The project is jointly managed by a group of volunteers located around the world as well as a tremendous community providing QA and support. Hercules is a continuation of the original Athena project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Repository ==&lt;br /&gt;
Hercules is available via [http://hercules.ws/board/topic/152-obtaining-hercules/ Git]&lt;br /&gt;
&lt;br /&gt;
== Support ==&lt;br /&gt;
You may access our [http://herc.ws/board/ forums] or [[IRC|IRC channel]] for support.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* [http://hercules.ws/board/ Official Hercules Support Board]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Hercules]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Hercules</id>
		<title>Hercules</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Hercules"/>
				<updated>2016-04-25T11:35:18Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: /* Repository */ SVN is deprecated&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{infobox/software&lt;br /&gt;
|developer=[[Staff|Hercules Developers]]&lt;br /&gt;
|version=[https://github.com/HerculesWS/Hercules/commit/ GitHub]&lt;br /&gt;
|os=Windows, Linux, FreeBSD, Mac OSX&lt;br /&gt;
|lang=English&lt;br /&gt;
|type=Ragnarok Online Emulator&lt;br /&gt;
|license=GNU General Public License 3 (open source)&lt;br /&gt;
|web=http://hercules.ws/}}&lt;br /&gt;
'''Hercules''' is a free and open source implementation of [[wikipedia:AEGIS_(Ragnarok_Online)|Aegis]], a [[wikipedia:Ragnarok Online|Ragnarok Online]] game server,  and is written in [[wikipedia:C_(programming_language)|C]]. Written in C the program is very versatile and provides NPCs, warps and modifications. and is currently version controlled via Git. The project is jointly managed by a group of volunteers located around the world as well as a tremendous community providing QA and support. Hercules is a continuation of the original Athena project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Repository ==&lt;br /&gt;
Hercules is available via [http://hercules.ws/board/topic/152-obtaining-hercules/ Git]&lt;br /&gt;
&lt;br /&gt;
== Support ==&lt;br /&gt;
You may access our [http://hercules.ws/board/ forums] or [[IRC|IRC channel]] for support.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* [http://hercules.ws/board/ Official Hercules Support Board]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Hercules]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/System_Requirements</id>
		<title>System Requirements</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/System_Requirements"/>
				<updated>2016-03-06T23:21:12Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: /* Software Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Basic Requirements ==&lt;br /&gt;
&lt;br /&gt;
[[Hercules]] works off of the [[wikipedia:Client–server_model|client-server model]]. The player, usually using a [[Hexing|hexed]] kRO [[Renewal|RE]] client, first connects to the [[Login Server]]. When the client enters their login information, it is given the list of available char-servers, which the player chooses from. After the server has been chosen, the client connects to the selected [[Character Server]], which displays the characters on that player's account. After selecting a character, the client is directed to the [[Map Server]], which maintains maps and the character positions on the server and relays this information to the client.&lt;br /&gt;
&lt;br /&gt;
Hercules is designed to run on a machine that is designated as a Server, either Dedicated or VPS. It can run on a workstation, but using that workstation for other tasks (including playing on the same machine that is running the server) will reduce performance.&lt;br /&gt;
&lt;br /&gt;
== Hardware Requirements ==&lt;br /&gt;
Hercules requires the following resources from the machine in order to function without problems or the common &amp;quot;Lag&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
* 1.5 GHz or faster CPU, either Intel or AMD is acceptable. Some members have reported that they have gotten Hercules to run on other processors.&lt;br /&gt;
* 128 MB of RAM, MINIMUM. The map server in an idle state consumes about 76MB of RAM, depending on how many maps and [[NPC|NPCs]] are loaded (41mb when no NPCs are in use).&lt;br /&gt;
* A video card powerful enough to run the Operating System of your choice (or no video card at all). Hercules is a console based software, which means that all that is required to run it is a console or command access.&lt;br /&gt;
* Fast internet or network connection. This is very hard to predict. A lot of questions arise that ask 'how much bandwidth does Hercules need?'. There is no answer to that. It is all depending on how many characters are connected, from where, and what they do while connected to the server.&lt;br /&gt;
* 250MB of Hard Drive space or better, up-to gigabytes depending on how big the database may get.&lt;br /&gt;
&lt;br /&gt;
== Software Requirements ==&lt;br /&gt;
Hercules, depending on what you plan to do with it and what platform you run it on, will require, at a minimum, the following:&lt;br /&gt;
&lt;br /&gt;
* GCC compatible compiler&lt;br /&gt;
* GNU Make&lt;br /&gt;
* zlib&lt;br /&gt;
* MySQL server and libraries&lt;br /&gt;
* Git&lt;br /&gt;
* pcre&lt;br /&gt;
&lt;br /&gt;
== Supported Operating Systems ==&lt;br /&gt;
The following operating systems have been tested and are known to work:&lt;br /&gt;
=== [[wikipedia:Linux|Linux]] ===&lt;br /&gt;
* Debian Based: [http://www.debian.org/ Debian], [http://www.knoppix.net/ Knoppix], [http://www.ubuntu.com/ Ubuntu Server &amp;amp; Desktop]&lt;br /&gt;
* RPM Based: [http://www.centos.org/ CentOS], [http://fedoraproject.org/ Fedora Core], [http://www2.mandriva.com/ Mandriva], [http://www.redhat.com/rhel/ Red Hat Linux], [http://www.novell.com/linux/ SUSE Linux]&lt;br /&gt;
* Others: [https://www.gentoo.org Gentoo], [http://www.slackware.com/ Slackware]&lt;br /&gt;
&lt;br /&gt;
=== [[wikipedia:Unix|Unix]] ===&lt;br /&gt;
* BSD Based: [http://www.freebsd.org/ FreeBSD], [http://www.openbsd.org/ OpenBSD]&lt;br /&gt;
=== [[wikipedia:Microsoft_Windows|Windows]] ===&lt;br /&gt;
* [[wikipedia:Windows_Server|Server Versions]]: Windows Server 2008, Windows Server 2008 R2, Windows Server 2012&lt;br /&gt;
* Home Versions: Windows Vista, Windows 7, Windows 8, Windows 8.1&lt;br /&gt;
&lt;br /&gt;
[[Category:Basics]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Installing_SQL</id>
		<title>Installing SQL</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Installing_SQL"/>
				<updated>2015-07-08T13:03:20Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: Updated SQL tables information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
This article will guide you through the installation and configuration stages of MySQL for your particular Operating System. What is a MySQL database? [[wikipedia:MySQL|MySQL]] is a multi-user access database that stores a number of different kinds of information in scaleable tables. In layman's terms, it puts a bunch of stuff in charts for your server to read. Hercules no longer supports text based save files (for Accounts, Characters, etc.) and requires a MySQL database to create these save files.&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
This guide will instruct you on installing MySQL on Windows Vista/7, although it should work relatively the same with Windows XP. This guide also assumes you have already [[Installation_on_Windows|installed your Hercules server]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
'''&amp;lt;big&amp;gt;Uninstallation Note&amp;lt;/big&amp;gt;'''&amp;lt;br /&amp;gt;&lt;br /&gt;
Before continuing, it is important to note that if you make an error and decide to start again by uninstalling the MySQL database and software, that you make sure you do a ''thorough'' uninstallation, and then reboot Windows before trying again. A couple tips to make sure your uninstallation is thorough:&lt;br /&gt;
* Uninstall Workbench first&lt;br /&gt;
* Remove the MySQL database folders in your user folder. This is generally in: &lt;br /&gt;
 C:\Users\&amp;lt;YOUR_USER_NAME&amp;gt;\AppData\Roaming\MySQL &lt;br /&gt;
:Just delete the whole folder.&lt;br /&gt;
* Run Administrative Tools -&amp;gt; Services and look to make sure nothing MySQL related is running or set to run (because it shouldn't exist anymore)&lt;br /&gt;
* Go to the location on your hard drive you installed MySQL5 and Workbench and ensure everything is deleted.&lt;br /&gt;
* Make sure you reboot.&lt;br /&gt;
* There is a Oracle made guide [http://dev.mysql.com/doc/refman/5.1/en/windows-installer-uninstalling.html here], but it isn't necessarily thorough.&lt;br /&gt;
* If you still have hanging and crashing during the configuration wizard, you may have to create your root account manually. Do an internet search for this, as it varies by system. And continue afterwards at the &amp;quot;MySQL Workbench&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
To install MySQL Server you will first need to download the package corresponding to your version of Windows. [http://dev.mysql.com/downloads/mysql/ MySQL Community Server] is available for free and is exactly what is needed. Version 5.5 currently works well with Hercules and is recommended. '''ENSURE''' that you download the appropriate bit version (32 or 64) for your system, if you do not, you will receive errors during the execution wizard. This software installs the server on your computer that stores the data files and tables. Although alone, without prior knowledge of MySQL it is very difficult to operate and configure your servers data. That is why you will need MySQL Workbench.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[http://dev.mysql.com/downloads/workbench/5.2.html MySQL Workbench] is a tool for viewing your MySQL database in a GUI environment. As said, it is not required but very beneficial; in addition, it is required by this guide. To be able to install and run MySQL Workbench 5.2 your System also needs to have the libraries listed below installed. The listed items are provided as links to the corresponding download pages where you can fetch the necessary files.&lt;br /&gt;
&lt;br /&gt;
[http://www.microsoft.com/download/en/details.aspx?id=17113 Microsoft .NET Framework 4 Client Profile] &amp;lt;br /&amp;gt;&lt;br /&gt;
[http://www.microsoft.com/download/en/details.aspx?id=5555 Microsoft Visual C++ 2010 Redistributable Package (x86)]&lt;br /&gt;
&lt;br /&gt;
=== Configure Hercules Files ===&lt;br /&gt;
Before you begin with your MySQL installation, you need to setup your server conf files to be ready for the database you are about to install. I choose to do this in advance, because it allows you to have the usernames and passwords ready for use so you don't have to go back and set them, and you can just run your server afterwards with everything all ready.&lt;br /&gt;
* Open &amp;quot;inter-server.conf&amp;quot;, and change sql.db_password, char_server_pw, map_server_pw and log_db_pw to a password of your choice. For this guide we will use the password &amp;quot;Fish&amp;quot;. Passwords are case sensitive. This is not a strong password, and you should use a better one, this is just an example. Also change log_db_db to &amp;quot;log&amp;quot;. All other fields should be let alone, the default username and port functions fine. ([http://imageshack.us/a/img546/9444/interathena.jpg Image])&lt;br /&gt;
* Open &amp;quot;map-server.conf&amp;quot; and &amp;quot;char-server.conf&amp;quot; and locate the server communication passwords:&lt;br /&gt;
 userid: s1&lt;br /&gt;
 passwd: p1&lt;br /&gt;
Change these to whatever you want, but something secure. For this guide we will use &amp;quot;FishUser&amp;quot; and &amp;quot;FishPassword&amp;quot;&lt;br /&gt;
 userid: FishUser&lt;br /&gt;
 passwd: FishPassword&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Make sure these are the same in both map-server and char-server otherwise you will have errors.&lt;br /&gt;
* There are additional SQL configuration features in &amp;quot;login-server.conf&amp;quot; that you should take a look at now, to enable for use (such as IPban features).&lt;br /&gt;
* Write all these passwords down or keep the files open for reference and continue to your MySQL installation!&lt;br /&gt;
&lt;br /&gt;
=== Install MySQL ===&lt;br /&gt;
First, you will need to install the MySQL server where all the data will be stored. After downloading the [http://dev.mysql.com/downloads/mysql/ MySQL Community Server], run the installer and use the following steps (''for this installation version 5.5.28 was used'').&lt;br /&gt;
# Click next and accept the license agreement.&lt;br /&gt;
# Click &amp;quot;Typical&amp;quot; for Setup Type; then click &amp;quot;Install&amp;quot; (you may have to allow UAC control from windows).&lt;br /&gt;
# Click &amp;quot;Next&amp;quot; when the MySQL Enterprise tool pops up, this is a simple advertisement.&lt;br /&gt;
# After installation is finished the completion screen with a &amp;quot;Finish&amp;quot; button will show, make sure you have &amp;quot;Launch the MySQL Instance Configuration Wizard&amp;quot; '''CHECKED'''! The configuration wizard will allow you to setup the server to accept the kind of data you want and by setting it up now you will most likely never have to configure it again.&lt;br /&gt;
# Click &amp;quot;Next&amp;quot; at the first screen, and then click &amp;quot;[http://imageshack.us/a/img90/1771/standardconfig.jpg Standard Configuration]&amp;quot; and hit &amp;quot;Next&amp;quot;.&lt;br /&gt;
# Check both &amp;quot;Install As Windows Service&amp;quot; and &amp;quot;Include Bin Directory in Windows PATH&amp;quot; for the Service Name, name it &amp;quot;''MySQL5''&amp;quot; and ensure &amp;quot;Launch the MySQL Server Automatically is '''CHECKED'''. ([http://imageshack.us/a/img685/3323/serverinstance.jpg Image])&lt;br /&gt;
# On the next screen, you will need to select the root password. This password is very important as you will '''never be able to retrieve it''' so make sure you write it down somewhere safe. The &amp;quot;root&amp;quot; access to your MySQL database can pretty much do anything to your data, so make sure you keep this information safe. If you want to enable root access from a remote machine, check the included box. You probably won't need to enable that unless you know what you're doing. Keep the password you selected available for now.&lt;br /&gt;
# On the next screen just click &amp;quot;Execute&amp;quot; to run the configuration unless you want to go back and change something.&lt;br /&gt;
# Once it is finished, hit &amp;quot;Finish&amp;quot; to close the wizard. It will report if there are any errors (there shouldn't be).&lt;br /&gt;
&lt;br /&gt;
=== MySQL Workbench ===&lt;br /&gt;
Next it is time to install the MySQL Workbench application. This application will allow you to edit your database and prepare it for Hercules, as well as perform maintenance in the future.&lt;br /&gt;
# Run the MySQL Workbench installer and click &amp;quot;Next&amp;quot; on the first screen.&lt;br /&gt;
# Choose your installation directory. The default directory should be fine. Click &amp;quot;Next&amp;quot; to proceed.&lt;br /&gt;
# Select &amp;quot;Complete&amp;quot; and click &amp;quot;Next&amp;quot;, and then install, granting permissions when prompted.&lt;br /&gt;
# Once the wizard is completed, hit &amp;quot;Finish&amp;quot; and the default Workbench screen will come up.&lt;br /&gt;
# This is called the Home Screen and should look like [http://imageshack.us/a/img571/3885/workbenchhome.jpg this].&lt;br /&gt;
# You need to create a new server instance to host your files for Hercules to access. Select &amp;quot;New Server Instance&amp;quot; under the &amp;quot;Server Administration&amp;quot; section.&lt;br /&gt;
# A window will pop up, select &amp;quot;localhost&amp;quot; and click &amp;quot;Next&amp;quot;. This installs the instance on the localhost, which is your computer.&lt;br /&gt;
# On the next screen, leave everything the default. Where it says &amp;quot;Username&amp;quot; leave that at root, so you have root access. Under that, click &amp;quot;[http://imageshack.us/a/img845/4056/storeinvault.jpg Store in Vault]&amp;quot; and enter the root password from earlier (it's alright to copy/paste the password if you put it in a text file).&lt;br /&gt;
# After it has successfully tested the database connection, click &amp;quot;Next&amp;quot;&lt;br /&gt;
# On the next screen, leave the configuration settings defaulted. It should point to the existing service (MySQL5 from earlier) and the default path is fine. ([http://imageshack.us/a/img600/1089/defaultwindowsconfig.jpg Image])&lt;br /&gt;
# On the next screen hit &amp;quot;Next&amp;quot; and then &amp;quot;Continue&amp;quot; on the popup. Leave the Server Instance with the default name of&lt;br /&gt;
 mysqld@localhost&lt;br /&gt;
You are now ready to install your Hercules databases.&lt;br /&gt;
&lt;br /&gt;
=== Database Installation ===&lt;br /&gt;
It is now time to install the pre-installed database files that will allow your Hercules server to connect to your MySQL database and properly store data, such as characters, items, and guilds. Open up MySQL Workbench to the home screen.&lt;br /&gt;
# Double click &amp;quot;localhost&amp;quot; on the left under the &amp;quot;SQL Development&amp;quot; section. ([http://imageshack.us/a/img337/8550/localhostdoubleclick.jpg Image])&lt;br /&gt;
# On the next screen (after a small loading bubble pops up), you will have access to the specific tables that were mentioned earlier. You will enter this screen in the future when you want to edit accounts and other things directly (not common).&lt;br /&gt;
# We need to install a new &amp;quot;Schema&amp;quot;, this is like a folder where all the database tables are stored. [http://imageshack.us/a/img194/2897/newschema.jpg Click the yellow cylinder looking thing in the upper left to create a new Schema]. Name it &amp;quot;ragnarok&amp;quot; - '''NOTE!''' Lower case is important here, make sure it is exactly &amp;quot;ragnarok&amp;quot;. The server collation should be &amp;quot;Server Default&amp;quot;. &lt;br /&gt;
# Click &amp;quot;Apply&amp;quot; to create the Schema. A window will pop up with the actual commands that are going to take place; click &amp;quot;Apply&amp;quot; again to finalize your order.&lt;br /&gt;
# Now right click 'ragnarok' under &amp;quot;Object Browser&amp;quot; and click &amp;quot;Set as default schema&amp;quot;, a line will appear through it telling the browser that any commands you make now will be ordered to that Schema.&lt;br /&gt;
# Next, [http://imageshack.us/a/img571/205/opensqlscript.png click the button directly to the left of the one you just did], it says &amp;quot;SQL&amp;quot; with a tiny folder. Navigate to your Hercules/sql-files/ folder, and open the sql script file &amp;quot;main.sql&amp;quot;.&lt;br /&gt;
# You'll see a bunch of code appear, these are commands that will tell the browser to create plain databases for your Hercules server. Click the yellow lightning bolt in the upper left hand corner to execute it and allow it to finish (ensure you click the first lightning bolt, the one without a cursor symbol or a magnifying glass over it).&lt;br /&gt;
# After it finishes, a bunch of executed commands will appear on the bottom of the screen. You can now expand the ragnarok schema to see a bunch of tables. ([http://imageshack.us/a/img72/1450/ragnaroktables.jpg Image])&lt;br /&gt;
# Now, do the same thing for a schema called &amp;quot;log&amp;quot;, but open and execute logs.sql instead of main.sql. Ensure the tables are there as well.&lt;br /&gt;
# Close the existing query tabs by hitting the &amp;quot;X&amp;quot; in the upper right of the tab. With the ragnarok tables still open, scroll down to the &amp;quot;login&amp;quot; table and '''RIGHT click''' it, then select &amp;quot;Edit Table Data&amp;quot;.&lt;br /&gt;
# Here you'll see existing account information that players can log in with to make characters. If you remember, the first account is the server communication account and it has the default password that you were asked to reset earlier. For our example we chose &amp;quot;FishUser&amp;quot; and &amp;quot;FishPassword&amp;quot;. Enter these in the &amp;quot;username&amp;quot; and &amp;quot;password&amp;quot; field. And then create your first GM account by clicking where the word &amp;quot;null&amp;quot; is on the row with a ' * ' and enter &amp;quot;2000000&amp;quot; for the &amp;quot;account_id&amp;quot; field, with a username and password that you like. For this guide we chose a username of &amp;quot;HercGM&amp;quot; and a password of &amp;quot;12345&amp;quot; and a sex of &amp;quot;M&amp;quot;. To enable full administrator GM, just set the &amp;quot;group_id&amp;quot; to &amp;quot;99&amp;quot;. Zero out everything else. [http://imageshack.us/a/img411/5976/logintables.jpg When you are finished it should look like THIS].&lt;br /&gt;
# Hit the &amp;quot;Apply&amp;quot; button in the corner and then again when the code prompt appears. This should modify your tables. After it is done, you may close the SQL Editor by clicking the &amp;quot;X&amp;quot; on the tab at upper left corner. Hitting the &amp;quot;X&amp;quot; in the upper right closes the whole workbench. If you accidentally close it, just open it again.&lt;br /&gt;
# On the Workbench Home Screen, click &amp;quot;Manage Security&amp;quot; under Server Administration. Select &amp;quot;mysqld@localhost&amp;quot; and then click &amp;quot;OK&amp;quot;.&lt;br /&gt;
# The next screen is the security window. You want to add an account that your server can use to access the databases that is NOT the root account, for enhanced security. Click &amp;quot;Add Account&amp;quot; in the lower left of the default screen.&lt;br /&gt;
# The login name needs to be &amp;quot;ragnarok&amp;quot;, and the password we selected earlier for this guide is &amp;quot;Fish&amp;quot;. The system will tell you how strong your password is... Fish is a very weak password. Leave the connectivity limit box defaulted and then hit &amp;quot;Apply&amp;quot; in the lower right. ([http://imageshack.us/a/img59/2025/newsecurityaccount.jpg Image])&lt;br /&gt;
# You'll see the account show up in the left above root. Select it and then click the &amp;quot;Administrative Roles&amp;quot; tab.&lt;br /&gt;
# Ensure that the &amp;quot;MonitorAdmin&amp;quot;, &amp;quot;DBManager&amp;quot;, &amp;quot;DBDesigner&amp;quot; and &amp;quot;BackupAdmin&amp;quot; are checked. Some of these will select themselves based on what you click. Then click &amp;quot;Apply&amp;quot;. As a note, this step isn't entirely necessary but provides increased security. The simpler step is to just give the user all privileges by clicking the &amp;quot;DBA&amp;quot; option at the top. ([http://imageshack.us/a/img266/5876/useradministrativeroles.png Image]) &lt;br /&gt;
# Click the &amp;quot;Schema Privileges&amp;quot; tab.&lt;br /&gt;
# In this tab, click &amp;quot;ragnarok&amp;quot; and then click the only available button, which is &amp;quot;Add Entry...&amp;quot;.&lt;br /&gt;
# Leave &amp;quot;Any Host&amp;quot; selected and change Schema to &amp;quot;Selected Schemas&amp;quot;. Then select the &amp;quot;ragnarok&amp;quot; schema and hit OK.&lt;br /&gt;
# At the bottom, hit &amp;quot;Select 'ALL'&amp;quot; to enable all database privileges for this Schema. This allows your ''ragnarok'' user to have access to all the tables in the schema of the same name. In other words, it allows your server to read/write the tables in the database you made. Make sure you click &amp;quot;Save Changes&amp;quot;.&lt;br /&gt;
# Do the same for the &amp;quot;log&amp;quot; schema you made. When you are [http://imageshack.us/a/img89/1509/userschemaprivileges.jpg done it should look like this].&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Congratulations!''' You have successful installed the MySQL database and are ready to run your server! See below for further adjustments.&lt;br /&gt;
&lt;br /&gt;
==== Additional Configurations ====&lt;br /&gt;
===== Enabling Logging =====&lt;br /&gt;
Simply open log-server.conf in your conf folder, and look for:&lt;br /&gt;
 // Use MySQL Logs? (SQL Version Only)&lt;br /&gt;
 sql_logs: 0&lt;br /&gt;
Change 0 to 1. You can also go through and change logging options. Your logs will be stored within your log schema. To view IPs in loginlog, you must click it, then right click it and choose alter table, then click on the columns tab. For the PK row, check all of the boxes, then apply it. Now you can double click on the loginlog and view the IPs, though after you are done alter the table again and uncheck all the boxes, this helps insure security. This should only be done for IP bans.&lt;br /&gt;
&lt;br /&gt;
===== Increasing Security =====&lt;br /&gt;
'''Use MD5 to encrypt your password'''&amp;lt;br /&amp;gt;&lt;br /&gt;
** '''WARNING:''' This will turn your passwords gibberish, just numbers and letters, making them unreadable so be sure to note down your password, either in a text file on your C drive, or on a piece of paper. In MySQL Workbench, click edit, then preferences, then click the SQL Queries tab. Uncheck &amp;quot;(Safe Updates) Forbid UPDATE and DELETE statements without a WHERE clause...&amp;quot;, then click OK. Make ragnarok your default schema, by right clicking its name and clicking &amp;quot;Set as Default Schema&amp;quot;, now click File, then Open SQL script, and open convert_passwords.sql. Then click the execute icon.&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
To Install the Mysql Server there is really only a few things that you have to do.&lt;br /&gt;
&lt;br /&gt;
=== Installing MySQL ===&lt;br /&gt;
From your terminal, type&lt;br /&gt;
 sudo yum install mysql-server*&lt;br /&gt;
- OR -&lt;br /&gt;
 sudo apt-get install mysql-server&lt;br /&gt;
&lt;br /&gt;
After your Operating System downloaded and installed MySQL, you will see your terminal window changed and you will be prompted to provide the root password for the MySQL server&lt;br /&gt;
&lt;br /&gt;
=== Setting up your own user ===&lt;br /&gt;
Once the server has been installed you will need to call the server from terminal with this command.&lt;br /&gt;
 mysql -u root&lt;br /&gt;
or&lt;br /&gt;
 mysql -u root -p&lt;br /&gt;
then, type in your password.&lt;br /&gt;
&lt;br /&gt;
You are now logged into the MySQL server as root. The best way to use your own SQL server is to have a username of your own control with your own password. The next command will create your own user. The &amp;lt;code&amp;gt;IDENTIFIED BY&amp;lt;/code&amp;gt; clause defines the password.&lt;br /&gt;
 CREATE USER 'ragnarok'@'%' IDENTIFIED BY 'ragnarok';&lt;br /&gt;
 GRANT ALL PRIVILEGES ON 'ragnarok'.* to 'ragnarok'@'%' IDENTIFIED BY 'ragnarok';&lt;br /&gt;
 flush privileges;&lt;br /&gt;
&lt;br /&gt;
If that doesn't work it my be due to a version syntax error, try the following. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  CREATE USER 'ragnarok'@'%' IDENTIFIED BY 'ragnarok';&lt;br /&gt;
  GRANT ALL PRIVILEGES ON ragnarok.* to 'ragnarok'@'%' IDENTIFIED BY 'ragnarok';&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing the Tables ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  cd /path/to/Hercules/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Afterwards issue this command lines, please have your password prepared since every after command lines issued you will be prompted for it.&lt;br /&gt;
&lt;br /&gt;
# Change directory to the '''sql-files''' folder.&lt;br /&gt;
#: &amp;lt;pre&amp;gt;cd sql-files/&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Execute these commands: &lt;br /&gt;
#: ''When prompted, enter your MySQL root password.''&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; main.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodblog &amp;lt; logs.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
# If your Control Panel software or website requires it, you may also import the item, monster and monster skill databases (not necessary for the correct operation of Hercules)&lt;br /&gt;
#: (pre-renewal)&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; item_db.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_db.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_skill_db.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: (renewal)&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; item_db_re.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_db_re.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_skill_db_re.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: (common to renewal and pre-renewal)&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; item_db2.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_db2.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_skill_db2.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: if you want to use different SQL DBs for login/char/map servers this is the list of databases each server use:&lt;br /&gt;
#login-server: global_acc_reg_num_db, global_acc_reg_str_db, ipbanlist, login, loginlog&lt;br /&gt;
#map-server: autotrade_data, autotrade_merchants, mapreg, npc_market_data&lt;br /&gt;
#char-server: everything else&lt;br /&gt;
Note that the sql_updates table is needed by all three servers.&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Installing_SQL</id>
		<title>Installing SQL</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Installing_SQL"/>
				<updated>2015-07-08T13:01:30Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: Removed reference to the now deprecated SQL item and mob databases&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
This article will guide you through the installation and configuration stages of MySQL for your particular Operating System. What is a MySQL database? [[wikipedia:MySQL|MySQL]] is a multi-user access database that stores a number of different kinds of information in scaleable tables. In layman's terms, it puts a bunch of stuff in charts for your server to read. Hercules no longer supports text based save files (for Accounts, Characters, etc.) and requires a MySQL database to create these save files.&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
This guide will instruct you on installing MySQL on Windows Vista/7, although it should work relatively the same with Windows XP. This guide also assumes you have already [[Installation_on_Windows|installed your Hercules server]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
'''&amp;lt;big&amp;gt;Uninstallation Note&amp;lt;/big&amp;gt;'''&amp;lt;br /&amp;gt;&lt;br /&gt;
Before continuing, it is important to note that if you make an error and decide to start again by uninstalling the MySQL database and software, that you make sure you do a ''thorough'' uninstallation, and then reboot Windows before trying again. A couple tips to make sure your uninstallation is thorough:&lt;br /&gt;
* Uninstall Workbench first&lt;br /&gt;
* Remove the MySQL database folders in your user folder. This is generally in: &lt;br /&gt;
 C:\Users\&amp;lt;YOUR_USER_NAME&amp;gt;\AppData\Roaming\MySQL &lt;br /&gt;
:Just delete the whole folder.&lt;br /&gt;
* Run Administrative Tools -&amp;gt; Services and look to make sure nothing MySQL related is running or set to run (because it shouldn't exist anymore)&lt;br /&gt;
* Go to the location on your hard drive you installed MySQL5 and Workbench and ensure everything is deleted.&lt;br /&gt;
* Make sure you reboot.&lt;br /&gt;
* There is a Oracle made guide [http://dev.mysql.com/doc/refman/5.1/en/windows-installer-uninstalling.html here], but it isn't necessarily thorough.&lt;br /&gt;
* If you still have hanging and crashing during the configuration wizard, you may have to create your root account manually. Do an internet search for this, as it varies by system. And continue afterwards at the &amp;quot;MySQL Workbench&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
To install MySQL Server you will first need to download the package corresponding to your version of Windows. [http://dev.mysql.com/downloads/mysql/ MySQL Community Server] is available for free and is exactly what is needed. Version 5.5 currently works well with Hercules and is recommended. '''ENSURE''' that you download the appropriate bit version (32 or 64) for your system, if you do not, you will receive errors during the execution wizard. This software installs the server on your computer that stores the data files and tables. Although alone, without prior knowledge of MySQL it is very difficult to operate and configure your servers data. That is why you will need MySQL Workbench.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[http://dev.mysql.com/downloads/workbench/5.2.html MySQL Workbench] is a tool for viewing your MySQL database in a GUI environment. As said, it is not required but very beneficial; in addition, it is required by this guide. To be able to install and run MySQL Workbench 5.2 your System also needs to have the libraries listed below installed. The listed items are provided as links to the corresponding download pages where you can fetch the necessary files.&lt;br /&gt;
&lt;br /&gt;
[http://www.microsoft.com/download/en/details.aspx?id=17113 Microsoft .NET Framework 4 Client Profile] &amp;lt;br /&amp;gt;&lt;br /&gt;
[http://www.microsoft.com/download/en/details.aspx?id=5555 Microsoft Visual C++ 2010 Redistributable Package (x86)]&lt;br /&gt;
&lt;br /&gt;
=== Configure Hercules Files ===&lt;br /&gt;
Before you begin with your MySQL installation, you need to setup your server conf files to be ready for the database you are about to install. I choose to do this in advance, because it allows you to have the usernames and passwords ready for use so you don't have to go back and set them, and you can just run your server afterwards with everything all ready.&lt;br /&gt;
* Open &amp;quot;inter-server.conf&amp;quot;, and change sql.db_password, char_server_pw, map_server_pw and log_db_pw to a password of your choice. For this guide we will use the password &amp;quot;Fish&amp;quot;. Passwords are case sensitive. This is not a strong password, and you should use a better one, this is just an example. Also change log_db_db to &amp;quot;log&amp;quot;. All other fields should be let alone, the default username and port functions fine. ([http://imageshack.us/a/img546/9444/interathena.jpg Image])&lt;br /&gt;
* Open &amp;quot;map-server.conf&amp;quot; and &amp;quot;char-server.conf&amp;quot; and locate the server communication passwords:&lt;br /&gt;
 userid: s1&lt;br /&gt;
 passwd: p1&lt;br /&gt;
Change these to whatever you want, but something secure. For this guide we will use &amp;quot;FishUser&amp;quot; and &amp;quot;FishPassword&amp;quot;&lt;br /&gt;
 userid: FishUser&lt;br /&gt;
 passwd: FishPassword&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Make sure these are the same in both map-server and char-server otherwise you will have errors.&lt;br /&gt;
* There are additional SQL configuration features in &amp;quot;login-server.conf&amp;quot; that you should take a look at now, to enable for use (such as IPban features).&lt;br /&gt;
* Write all these passwords down or keep the files open for reference and continue to your MySQL installation!&lt;br /&gt;
&lt;br /&gt;
=== Install MySQL ===&lt;br /&gt;
First, you will need to install the MySQL server where all the data will be stored. After downloading the [http://dev.mysql.com/downloads/mysql/ MySQL Community Server], run the installer and use the following steps (''for this installation version 5.5.28 was used'').&lt;br /&gt;
# Click next and accept the license agreement.&lt;br /&gt;
# Click &amp;quot;Typical&amp;quot; for Setup Type; then click &amp;quot;Install&amp;quot; (you may have to allow UAC control from windows).&lt;br /&gt;
# Click &amp;quot;Next&amp;quot; when the MySQL Enterprise tool pops up, this is a simple advertisement.&lt;br /&gt;
# After installation is finished the completion screen with a &amp;quot;Finish&amp;quot; button will show, make sure you have &amp;quot;Launch the MySQL Instance Configuration Wizard&amp;quot; '''CHECKED'''! The configuration wizard will allow you to setup the server to accept the kind of data you want and by setting it up now you will most likely never have to configure it again.&lt;br /&gt;
# Click &amp;quot;Next&amp;quot; at the first screen, and then click &amp;quot;[http://imageshack.us/a/img90/1771/standardconfig.jpg Standard Configuration]&amp;quot; and hit &amp;quot;Next&amp;quot;.&lt;br /&gt;
# Check both &amp;quot;Install As Windows Service&amp;quot; and &amp;quot;Include Bin Directory in Windows PATH&amp;quot; for the Service Name, name it &amp;quot;''MySQL5''&amp;quot; and ensure &amp;quot;Launch the MySQL Server Automatically is '''CHECKED'''. ([http://imageshack.us/a/img685/3323/serverinstance.jpg Image])&lt;br /&gt;
# On the next screen, you will need to select the root password. This password is very important as you will '''never be able to retrieve it''' so make sure you write it down somewhere safe. The &amp;quot;root&amp;quot; access to your MySQL database can pretty much do anything to your data, so make sure you keep this information safe. If you want to enable root access from a remote machine, check the included box. You probably won't need to enable that unless you know what you're doing. Keep the password you selected available for now.&lt;br /&gt;
# On the next screen just click &amp;quot;Execute&amp;quot; to run the configuration unless you want to go back and change something.&lt;br /&gt;
# Once it is finished, hit &amp;quot;Finish&amp;quot; to close the wizard. It will report if there are any errors (there shouldn't be).&lt;br /&gt;
&lt;br /&gt;
=== MySQL Workbench ===&lt;br /&gt;
Next it is time to install the MySQL Workbench application. This application will allow you to edit your database and prepare it for Hercules, as well as perform maintenance in the future.&lt;br /&gt;
# Run the MySQL Workbench installer and click &amp;quot;Next&amp;quot; on the first screen.&lt;br /&gt;
# Choose your installation directory. The default directory should be fine. Click &amp;quot;Next&amp;quot; to proceed.&lt;br /&gt;
# Select &amp;quot;Complete&amp;quot; and click &amp;quot;Next&amp;quot;, and then install, granting permissions when prompted.&lt;br /&gt;
# Once the wizard is completed, hit &amp;quot;Finish&amp;quot; and the default Workbench screen will come up.&lt;br /&gt;
# This is called the Home Screen and should look like [http://imageshack.us/a/img571/3885/workbenchhome.jpg this].&lt;br /&gt;
# You need to create a new server instance to host your files for Hercules to access. Select &amp;quot;New Server Instance&amp;quot; under the &amp;quot;Server Administration&amp;quot; section.&lt;br /&gt;
# A window will pop up, select &amp;quot;localhost&amp;quot; and click &amp;quot;Next&amp;quot;. This installs the instance on the localhost, which is your computer.&lt;br /&gt;
# On the next screen, leave everything the default. Where it says &amp;quot;Username&amp;quot; leave that at root, so you have root access. Under that, click &amp;quot;[http://imageshack.us/a/img845/4056/storeinvault.jpg Store in Vault]&amp;quot; and enter the root password from earlier (it's alright to copy/paste the password if you put it in a text file).&lt;br /&gt;
# After it has successfully tested the database connection, click &amp;quot;Next&amp;quot;&lt;br /&gt;
# On the next screen, leave the configuration settings defaulted. It should point to the existing service (MySQL5 from earlier) and the default path is fine. ([http://imageshack.us/a/img600/1089/defaultwindowsconfig.jpg Image])&lt;br /&gt;
# On the next screen hit &amp;quot;Next&amp;quot; and then &amp;quot;Continue&amp;quot; on the popup. Leave the Server Instance with the default name of&lt;br /&gt;
 mysqld@localhost&lt;br /&gt;
You are now ready to install your Hercules databases.&lt;br /&gt;
&lt;br /&gt;
=== Database Installation ===&lt;br /&gt;
It is now time to install the pre-installed database files that will allow your Hercules server to connect to your MySQL database and properly store data, such as characters, items, and guilds. Open up MySQL Workbench to the home screen.&lt;br /&gt;
# Double click &amp;quot;localhost&amp;quot; on the left under the &amp;quot;SQL Development&amp;quot; section. ([http://imageshack.us/a/img337/8550/localhostdoubleclick.jpg Image])&lt;br /&gt;
# On the next screen (after a small loading bubble pops up), you will have access to the specific tables that were mentioned earlier. You will enter this screen in the future when you want to edit accounts and other things directly (not common).&lt;br /&gt;
# We need to install a new &amp;quot;Schema&amp;quot;, this is like a folder where all the database tables are stored. [http://imageshack.us/a/img194/2897/newschema.jpg Click the yellow cylinder looking thing in the upper left to create a new Schema]. Name it &amp;quot;ragnarok&amp;quot; - '''NOTE!''' Lower case is important here, make sure it is exactly &amp;quot;ragnarok&amp;quot;. The server collation should be &amp;quot;Server Default&amp;quot;. &lt;br /&gt;
# Click &amp;quot;Apply&amp;quot; to create the Schema. A window will pop up with the actual commands that are going to take place; click &amp;quot;Apply&amp;quot; again to finalize your order.&lt;br /&gt;
# Now right click 'ragnarok' under &amp;quot;Object Browser&amp;quot; and click &amp;quot;Set as default schema&amp;quot;, a line will appear through it telling the browser that any commands you make now will be ordered to that Schema.&lt;br /&gt;
# Next, [http://imageshack.us/a/img571/205/opensqlscript.png click the button directly to the left of the one you just did], it says &amp;quot;SQL&amp;quot; with a tiny folder. Navigate to your Hercules/sql-files/ folder, and open the sql script file &amp;quot;main.sql&amp;quot;.&lt;br /&gt;
# You'll see a bunch of code appear, these are commands that will tell the browser to create plain databases for your Hercules server. Click the yellow lightning bolt in the upper left hand corner to execute it and allow it to finish (ensure you click the first lightning bolt, the one without a cursor symbol or a magnifying glass over it).&lt;br /&gt;
# After it finishes, a bunch of executed commands will appear on the bottom of the screen. You can now expand the ragnarok schema to see a bunch of tables. ([http://imageshack.us/a/img72/1450/ragnaroktables.jpg Image])&lt;br /&gt;
# Now, do the same thing for a schema called &amp;quot;log&amp;quot;, but open and execute logs.sql instead of main.sql. Ensure the tables are there as well.&lt;br /&gt;
# Close the existing query tabs by hitting the &amp;quot;X&amp;quot; in the upper right of the tab. With the ragnarok tables still open, scroll down to the &amp;quot;login&amp;quot; table and '''RIGHT click''' it, then select &amp;quot;Edit Table Data&amp;quot;.&lt;br /&gt;
# Here you'll see existing account information that players can log in with to make characters. If you remember, the first account is the server communication account and it has the default password that you were asked to reset earlier. For our example we chose &amp;quot;FishUser&amp;quot; and &amp;quot;FishPassword&amp;quot;. Enter these in the &amp;quot;username&amp;quot; and &amp;quot;password&amp;quot; field. And then create your first GM account by clicking where the word &amp;quot;null&amp;quot; is on the row with a ' * ' and enter &amp;quot;2000000&amp;quot; for the &amp;quot;account_id&amp;quot; field, with a username and password that you like. For this guide we chose a username of &amp;quot;HercGM&amp;quot; and a password of &amp;quot;12345&amp;quot; and a sex of &amp;quot;M&amp;quot;. To enable full administrator GM, just set the &amp;quot;group_id&amp;quot; to &amp;quot;99&amp;quot;. Zero out everything else. [http://imageshack.us/a/img411/5976/logintables.jpg When you are finished it should look like THIS].&lt;br /&gt;
# Hit the &amp;quot;Apply&amp;quot; button in the corner and then again when the code prompt appears. This should modify your tables. After it is done, you may close the SQL Editor by clicking the &amp;quot;X&amp;quot; on the tab at upper left corner. Hitting the &amp;quot;X&amp;quot; in the upper right closes the whole workbench. If you accidentally close it, just open it again.&lt;br /&gt;
# On the Workbench Home Screen, click &amp;quot;Manage Security&amp;quot; under Server Administration. Select &amp;quot;mysqld@localhost&amp;quot; and then click &amp;quot;OK&amp;quot;.&lt;br /&gt;
# The next screen is the security window. You want to add an account that your server can use to access the databases that is NOT the root account, for enhanced security. Click &amp;quot;Add Account&amp;quot; in the lower left of the default screen.&lt;br /&gt;
# The login name needs to be &amp;quot;ragnarok&amp;quot;, and the password we selected earlier for this guide is &amp;quot;Fish&amp;quot;. The system will tell you how strong your password is... Fish is a very weak password. Leave the connectivity limit box defaulted and then hit &amp;quot;Apply&amp;quot; in the lower right. ([http://imageshack.us/a/img59/2025/newsecurityaccount.jpg Image])&lt;br /&gt;
# You'll see the account show up in the left above root. Select it and then click the &amp;quot;Administrative Roles&amp;quot; tab.&lt;br /&gt;
# Ensure that the &amp;quot;MonitorAdmin&amp;quot;, &amp;quot;DBManager&amp;quot;, &amp;quot;DBDesigner&amp;quot; and &amp;quot;BackupAdmin&amp;quot; are checked. Some of these will select themselves based on what you click. Then click &amp;quot;Apply&amp;quot;. As a note, this step isn't entirely necessary but provides increased security. The simpler step is to just give the user all privileges by clicking the &amp;quot;DBA&amp;quot; option at the top. ([http://imageshack.us/a/img266/5876/useradministrativeroles.png Image]) &lt;br /&gt;
# Click the &amp;quot;Schema Privileges&amp;quot; tab.&lt;br /&gt;
# In this tab, click &amp;quot;ragnarok&amp;quot; and then click the only available button, which is &amp;quot;Add Entry...&amp;quot;.&lt;br /&gt;
# Leave &amp;quot;Any Host&amp;quot; selected and change Schema to &amp;quot;Selected Schemas&amp;quot;. Then select the &amp;quot;ragnarok&amp;quot; schema and hit OK.&lt;br /&gt;
# At the bottom, hit &amp;quot;Select 'ALL'&amp;quot; to enable all database privileges for this Schema. This allows your ''ragnarok'' user to have access to all the tables in the schema of the same name. In other words, it allows your server to read/write the tables in the database you made. Make sure you click &amp;quot;Save Changes&amp;quot;.&lt;br /&gt;
# Do the same for the &amp;quot;log&amp;quot; schema you made. When you are [http://imageshack.us/a/img89/1509/userschemaprivileges.jpg done it should look like this].&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Congratulations!''' You have successful installed the MySQL database and are ready to run your server! See below for further adjustments.&lt;br /&gt;
&lt;br /&gt;
==== Additional Configurations ====&lt;br /&gt;
===== Enabling Logging =====&lt;br /&gt;
Simply open log-server.conf in your conf folder, and look for:&lt;br /&gt;
 // Use MySQL Logs? (SQL Version Only)&lt;br /&gt;
 sql_logs: 0&lt;br /&gt;
Change 0 to 1. You can also go through and change logging options. Your logs will be stored within your log schema. To view IPs in loginlog, you must click it, then right click it and choose alter table, then click on the columns tab. For the PK row, check all of the boxes, then apply it. Now you can double click on the loginlog and view the IPs, though after you are done alter the table again and uncheck all the boxes, this helps insure security. This should only be done for IP bans.&lt;br /&gt;
&lt;br /&gt;
===== Increasing Security =====&lt;br /&gt;
'''Use MD5 to encrypt your password'''&amp;lt;br /&amp;gt;&lt;br /&gt;
** '''WARNING:''' This will turn your passwords gibberish, just numbers and letters, making them unreadable so be sure to note down your password, either in a text file on your C drive, or on a piece of paper. In MySQL Workbench, click edit, then preferences, then click the SQL Queries tab. Uncheck &amp;quot;(Safe Updates) Forbid UPDATE and DELETE statements without a WHERE clause...&amp;quot;, then click OK. Make ragnarok your default schema, by right clicking its name and clicking &amp;quot;Set as Default Schema&amp;quot;, now click File, then Open SQL script, and open convert_passwords.sql. Then click the execute icon.&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
To Install the Mysql Server there is really only a few things that you have to do.&lt;br /&gt;
&lt;br /&gt;
=== Installing MySQL ===&lt;br /&gt;
From your terminal, type&lt;br /&gt;
 sudo yum install mysql-server*&lt;br /&gt;
- OR -&lt;br /&gt;
 sudo apt-get install mysql-server&lt;br /&gt;
&lt;br /&gt;
After your Operating System downloaded and installed MySQL, you will see your terminal window changed and you will be prompted to provide the root password for the MySQL server&lt;br /&gt;
&lt;br /&gt;
=== Setting up your own user ===&lt;br /&gt;
Once the server has been installed you will need to call the server from terminal with this command.&lt;br /&gt;
 mysql -u root&lt;br /&gt;
or&lt;br /&gt;
 mysql -u root -p&lt;br /&gt;
then, type in your password.&lt;br /&gt;
&lt;br /&gt;
You are now logged into the MySQL server as root. The best way to use your own SQL server is to have a username of your own control with your own password. The next command will create your own user. The &amp;lt;code&amp;gt;IDENTIFIED BY&amp;lt;/code&amp;gt; clause defines the password.&lt;br /&gt;
 CREATE USER 'ragnarok'@'%' IDENTIFIED BY 'ragnarok';&lt;br /&gt;
 GRANT ALL PRIVILEGES ON 'ragnarok'.* to 'ragnarok'@'%' IDENTIFIED BY 'ragnarok';&lt;br /&gt;
 flush privileges;&lt;br /&gt;
&lt;br /&gt;
If that doesn't work it my be due to a version syntax error, try the following. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  CREATE USER 'ragnarok'@'%' IDENTIFIED BY 'ragnarok';&lt;br /&gt;
  GRANT ALL PRIVILEGES ON ragnarok.* to 'ragnarok'@'%' IDENTIFIED BY 'ragnarok';&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing the Tables ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  cd /path/to/Hercules/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Afterwards issue this command lines, please have your password prepared since every after command lines issued you will be prompted for it.&lt;br /&gt;
&lt;br /&gt;
# Change directory to the '''sql-files''' folder.&lt;br /&gt;
#: &amp;lt;pre&amp;gt;cd sql-files&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Execute these commands: &lt;br /&gt;
#: ''When prompted, enter your MySQL root password.''&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercules1234_rag &amp;lt; main.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercules1234_rag &amp;lt; item_db.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercules1234_rag &amp;lt; item_db2.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercules1234_rag &amp;lt; mob_db.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercules1234_rag &amp;lt; mob_db2.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercules1234_rag &amp;lt; mob_skill_db.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercules1234_rag &amp;lt; mob_skill_db2.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercules1234_log &amp;lt; logs.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
# If you are using Renewal you also have to import the following&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercules1234_log &amp;lt; item_db_re.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercules1234_log &amp;lt; item_db2_re.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercules1234_log &amp;lt; mob_db_re.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercules1234_log &amp;lt; mob_skill_db_re.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: if you want to use different SQL DBs for login/char/map servers this is the list of databases each server use:&lt;br /&gt;
#login-server: global_reg_value, ipbanlist, login, loginlog&lt;br /&gt;
#map-server: mapreg, item_db, item_db2, mob_db, mob_db2&lt;br /&gt;
#char-server: everything else + global_reg_value once again&lt;br /&gt;
Note that global_reg_value tables are needed by both login-server and char-server (though it may be different tables)&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Installation_(CentOS)</id>
		<title>Installation (CentOS)</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Installation_(CentOS)"/>
				<updated>2015-07-08T13:00:39Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: Updated SQL tabiles information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide covers how to install [[Hercules]] on [[wikipedia:CentOS|CentOS]] and other [[wikipedia:List_of_Linux_distributions#RPM-based|versions of Linux]] that use [[wikipedia:Yellowdog_Updater,_Modified|yum]].&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* [[wikipedia:CentOS|CentOS]] or an [[wikipedia:List_of_Linux_distributions#RPM-based|RPM-based Linux]] that has the '''[[wikipedia:Yellowdog_Updater,_Modified|yum]]''' command&lt;br /&gt;
* root access or access to an account that has [[wikipedia:Sudo|sudo privileges]]&lt;br /&gt;
* an Internet connection to download install packages&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
All of these commands will be typed at the [[wikipedia:Command-line_interface|command-line interface]].&lt;br /&gt;
=== Install Prerequisites ===&lt;br /&gt;
# Login to your server via [[wikipedia:Secure_Shell|SSH]], or if you are already logged into a [[wikipedia:Graphical_user_interface|GUI]] press Ctrl+Alt+T to open a terminal window.&lt;br /&gt;
# Type the following command (this will install GCC, Make, MySQL, MySQL header files, MySQL Server, PCRE header files, Git, and Zlib header files) &lt;br /&gt;
#: &amp;lt;pre&amp;gt;yum install gcc make mysql mysql-devel mysql-server pcre-devel git zlib-devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
# (Optional) type the following command to install some additional packages: &lt;br /&gt;
#: &amp;lt;pre&amp;gt;yum -y install dos2unix gdb nano screen unzip wget zip&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a non-root Linux user ===&lt;br /&gt;
By the [[wikipedia:Principle_of_least_privilege|principle of least privilege]], it is recommended you do '''NOT''' run Hercules as root. &lt;br /&gt;
# Type the following command to create a non-root Linux account:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;useradd --create-home --shell /bin/bash hercules1234&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;code&amp;gt;--create-home&amp;lt;/code&amp;gt; = create the user's home directory&lt;br /&gt;
#: &amp;lt;code&amp;gt;--shell&amp;lt;/code&amp;gt; = sets their login shell to [[wikipedia:Bash_(Unix_shell)|Bash]]&lt;br /&gt;
#: '''&amp;lt;code&amp;gt;hercules1234&amp;lt;/code&amp;gt;''' = the login name of the new Linux account&lt;br /&gt;
#: ''&amp;lt;code&amp;gt;1234&amp;lt;/code&amp;gt;'' = pick your own random numbers to make the username more unique&lt;br /&gt;
# Set a password for the new user (run this command and follow the prompts):&lt;br /&gt;
#: &amp;lt;pre&amp;gt;passwd hercules1234&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure MySQL ===&lt;br /&gt;
&lt;br /&gt;
==== Set a root password ====&lt;br /&gt;
The default MySQL Server install creates a MySQL user 'root'@'localhost' with NO password. It is recommended you create a password for the root user. &lt;br /&gt;
# Run this command and follow the prompts: &lt;br /&gt;
#: Firest Start MySQL:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;/etc/init.d/mysqld start &amp;lt;/pre&amp;gt;&lt;br /&gt;
#: Then configure MySQL by:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql_secure_installation&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Login to your MySQL Server as root: &lt;br /&gt;
#: ''When prompted, enter your root MySQL password.''&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql --user=root -p&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Now your prompt should look like this (the MySQL command prompt): &lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Create SQL database for Hercules ====&lt;br /&gt;
# At the MySQL prompt, type this to [http://dev.mysql.com/doc/refman/5.5/en/create-database.html create a database] (replace &amp;lt;code&amp;gt;hercules1234&amp;lt;/code&amp;gt; with the Linux username you created earlier): &lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql&amp;gt; CREATE DATABASE hercules1234_rag;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Create a separate database for logs: &lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql&amp;gt; CREATE DATABASE hercules1234_log;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Setup a MySQL user for Hercules ====&lt;br /&gt;
# At the MySQL prompt, type something like this to create a new MySQL user: &lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql&amp;gt; CREATE USER 'hercules1234'@'localhost' IDENTIFIED BY 'secretpassword';&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;code&amp;gt;hercules1234&amp;lt;/code&amp;gt; = the name of the MySQL user (we named it the same as the Linux user to make it easier to identify)&lt;br /&gt;
#: &amp;lt;code&amp;gt;localhost&amp;lt;/code&amp;gt; = the hostname or IP it will connect from&lt;br /&gt;
#: '''&amp;lt;code&amp;gt;secretpassword&amp;lt;/code&amp;gt;''' = the password for this MySQL user&lt;br /&gt;
# [http://dev.mysql.com/doc/refman/5.5/en/grant.html Grant privileges] to the 'hercules' MySQL user:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql&amp;gt; GRANT SELECT,INSERT,UPDATE,DELETE ON `hercules1234\_rag`.* TO 'hercules1234'@'localhost';&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql&amp;gt; GRANT SELECT,INSERT ON `hercules1234\_log`.* TO 'hercules1234'@'localhost';&amp;lt;/pre&amp;gt; (note the [http://dev.mysql.com/doc/refman/5.5/en/string-literals.html#character-escape-sequences escaped underscore])&lt;br /&gt;
&lt;br /&gt;
== Install [[Hercules]] ==&lt;br /&gt;
&lt;br /&gt;
=== Login as your non-root Linux user ===&lt;br /&gt;
The rest of the setup is done as hercules1234 (the Linux user you created in step 2.2)&lt;br /&gt;
# Logout from root SSH (or minimize the window).&lt;br /&gt;
# Login to your server via SSH as the hercules1234 Linux user.&lt;br /&gt;
&lt;br /&gt;
=== Git Clone ===&lt;br /&gt;
{{:Git Clone/Unix}}&lt;br /&gt;
&lt;br /&gt;
=== [http://dev.mysql.com/doc/refman/5.5/en/batch-commands.html Import] MySQL Tables ===&lt;br /&gt;
# Change directory to the '''sql-files''' folder.&lt;br /&gt;
#: &amp;lt;pre&amp;gt;cd sql-files/&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Execute these commands: &lt;br /&gt;
#: ''When prompted, enter your MySQL root password.''&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; main.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodblog &amp;lt; logs.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
# If your Control Panel software or website requires it, you may also import the item, monster and monster skill databases (not necessary for the correct operation of Hercules)&lt;br /&gt;
#: (pre-renewal)&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; item_db.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_db.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_skill_db.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: (renewal)&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; item_db_re.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_db_re.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_skill_db_re.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: (common to renewal and pre-renewal)&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; item_db2.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_db2.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_skill_db2.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: if you want to use different SQL DBs for login/char/map servers this is the list of databases each server use:&lt;br /&gt;
#login-server: global_acc_reg_num_db, global_acc_reg_str_db, ipbanlist, login, loginlog&lt;br /&gt;
#map-server: autotrade_data, autotrade_merchants, mapreg, npc_market_data&lt;br /&gt;
#char-server: everything else&lt;br /&gt;
Note that the sql_updates table is needed by all three servers.&lt;br /&gt;
&lt;br /&gt;
=== [[:Category:Configuration|Configure Hercules]]===&lt;br /&gt;
&lt;br /&gt;
=== Compile Source Code ===&lt;br /&gt;
 cd Hercules&lt;br /&gt;
 ./configure&lt;br /&gt;
 make sql&lt;br /&gt;
&lt;br /&gt;
===== How to Recompile =====&lt;br /&gt;
In the future (after you update or edit any file in /src) to recompile, add ''make clean'' before make sql: &lt;br /&gt;
 cd Hercules&lt;br /&gt;
 ./configure&lt;br /&gt;
 '''make clean'''&lt;br /&gt;
 make sql&lt;br /&gt;
&lt;br /&gt;
== Start your Hercules Server ==&lt;br /&gt;
 //change access mode of athena-start file so that you can execute it.&lt;br /&gt;
 //Use (dos2unix athena-start) if yo uare getting ^M errors ie. newline errors &lt;br /&gt;
 chmod a+x athena-start&lt;br /&gt;
&lt;br /&gt;
 //To Start&lt;br /&gt;
 ./athena-start start&lt;br /&gt;
 //To Stop&lt;br /&gt;
 ./athena-start stop&lt;br /&gt;
 //To Restart&lt;br /&gt;
 ./athena-start restart&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation Guides|CentOS]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Installation_(Debian)</id>
		<title>Installation (Debian)</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Installation_(Debian)"/>
				<updated>2015-07-08T12:59:51Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: /* Import MySQL Tables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide covers how to install [[Hercules]] on [[wikipedia:Debian|Debian]] and other [[wikipedia:List_of_Linux_distributions#Debian-based|versions of Linux]] that use apt-get.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* [[wikipedia:Debian|Debian]] or an [[wikipedia:List_of_Linux_distributions##Debian-based]] that has the apt-get command&lt;br /&gt;
* root access or access to an account that has [[wikipedia:Sudo|sudo privileges]]&lt;br /&gt;
* an Internet connection to download install packages&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
All of these commands will be typed at the [[wikipedia:Command-line_interface|command-line interface]].&lt;br /&gt;
=== Install Prerequisites ===&lt;br /&gt;
# Login to your server via [[wikipedia:Secure_Shell|SSH]], or if you are already logged into a [[wikipedia:Graphical_user_interface|GUI]] press Ctrl+Alt+T to open a terminal window.&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get upgrade&lt;br /&gt;
apt-get dist-update  // To update to the latest version of Debian&lt;br /&gt;
# Type the following command (this will install GCC, Make, MySQL Server, MySQL header files,  PCRE header files, git, and Zlib header files) &lt;br /&gt;
#: &amp;lt;pre&amp;gt;apt-get install git make gcc mysql-server libmysqlclient-dev zlib1g-dev libpcre3-dev screen&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a non-root Linux user ===&lt;br /&gt;
By the [[wikipedia:Principle_of_least_privilege|principle of least privilege]], it is recommended you do '''NOT''' run Hercules as root. &lt;br /&gt;
# Type the following command to create a non-root Linux account:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;useradd hercuser&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Be sure not to forget setting new password for new user&lt;br /&gt;
#: &amp;lt;pre&amp;gt;passwd hercuser&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install [[Hercules]] ==&lt;br /&gt;
&lt;br /&gt;
=== Login as your non-root Linux user ===&lt;br /&gt;
The rest of the setup is done as hercuser (the Linux user you created earlier)&lt;br /&gt;
# Logout from root SSH (or minimize the window).&lt;br /&gt;
# Login to your server via SSH as the hercuser Linux user.&lt;br /&gt;
&lt;br /&gt;
=== Git Clone ===&lt;br /&gt;
&amp;lt;pre&amp;gt;git clone https://github.com/HerculesWS/Hercules.git ~/Hercules&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://dev.mysql.com/doc/refman/5.5/en/batch-commands.html Import] MySQL Tables ===&lt;br /&gt;
# Change directory to the '''sql-files''' folder.&lt;br /&gt;
#: &amp;lt;pre&amp;gt;cd sql-files/&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Execute these commands: &lt;br /&gt;
#: ''When prompted, enter your MySQL root password.''&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; main.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodblog &amp;lt; logs.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
# If your Control Panel software or website requires it, you may also import the item, monster and monster skill databases (not necessary for the correct operation of Hercules)&lt;br /&gt;
#: (pre-renewal)&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; item_db.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_db.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_skill_db.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: (renewal)&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; item_db_re.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_db_re.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_skill_db_re.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: (common to renewal and pre-renewal)&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; item_db2.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_db2.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_skill_db2.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: if you want to use different SQL DBs for login/char/map servers this is the list of databases each server use:&lt;br /&gt;
#login-server: global_acc_reg_num_db, global_acc_reg_str_db, ipbanlist, login, loginlog&lt;br /&gt;
#map-server: autotrade_data, autotrade_merchants, mapreg, npc_market_data&lt;br /&gt;
#char-server: everything else&lt;br /&gt;
Note that the sql_updates table is needed by all three servers.&lt;br /&gt;
&lt;br /&gt;
=== [[:Category:Configuration|Configure Hercules]]===&lt;br /&gt;
&lt;br /&gt;
=== Compile Source Code ===&lt;br /&gt;
 cd Hercules&lt;br /&gt;
 ./configure&lt;br /&gt;
 make sql&lt;br /&gt;
&lt;br /&gt;
*If you have added plugins for use with Hercules please use the below syntax instead of the above:&lt;br /&gt;
 cd Hercules&lt;br /&gt;
 ./configure&lt;br /&gt;
 make sql plugins&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== How to Recompile =====&lt;br /&gt;
In the future (after you update or edit any file in /src) to recompile, add ''make clean'' before make sql: &lt;br /&gt;
 cd Hercules&lt;br /&gt;
 ./configure&lt;br /&gt;
 '''make clean'''&lt;br /&gt;
 make sql plugins&lt;br /&gt;
&lt;br /&gt;
== Start your Hercules Server ==&lt;br /&gt;
 //change access mode of athena-start file so that you can execute it.&lt;br /&gt;
 //Use (dos2unix athena-start) if you are getting ^M errors ie. newline errors &lt;br /&gt;
 chmod a+x athena-start&lt;br /&gt;
&lt;br /&gt;
 //To Start&lt;br /&gt;
 ./athena-start start&lt;br /&gt;
 //To Stop&lt;br /&gt;
 ./athena-start stop&lt;br /&gt;
 //To Restart&lt;br /&gt;
 ./athena-start restart&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation Guides|Debian Linux]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Overview_of_Errors</id>
		<title>Overview of Errors</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Overview_of_Errors"/>
				<updated>2015-07-08T12:56:18Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: Corrected item database filenames, removed reference to SQL item databases.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article will, in the end, contain all possible script related errors, what their causes are and what you should do to fix them.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
{{Incomplete|type=section}}&lt;br /&gt;
=== Definition of Error ===&lt;br /&gt;
The errors mentioned in this article, are all the possible script related errors that show in the map-server's console. These errors are often accompanied by a tag in front of it. The tag will be [Error] or [Fatal Error]. (Where fatal error will crash your server.) Also, the errors that display a part of a script with *'s in front of it (Parsing Errors), will be covered in this article.&lt;br /&gt;
Please do note that you must be in debugging mode, which is if I'm not mistaking, the default mode. This article will not cover the different kinds of script related warnings, because the error-list alone is already massive.&lt;br /&gt;
&lt;br /&gt;
=== How to Find and Fix Your Error ===&lt;br /&gt;
Fixing errors in scripts require some handiness. Single errors are easy to do, but sometimes, you get a lot of errors. Do not be afraid then though, because a large list of errors will often be fixed, by fixing the first error. So, when using this guide, search for the topmost error in your server's console first, and try to fix it. If it is fixed, there is a 50% chance that all the other errors will disappear.&lt;br /&gt;
&lt;br /&gt;
Sometimes though, the amount of errors are so huge, that you cannot scroll high enough to find the first error. If this is the case, then there are three ways to make it easier for you:&lt;br /&gt;
* Fetch the error stream and save it to a file&lt;br /&gt;
* Comment out the newly added NPCs, or only make the newly added NPCs load.&lt;br /&gt;
* Divide your NPCs into smaller NPCs.&lt;br /&gt;
How to do the first, I am afraid to say, I forgot. The second one is fairly easy though. Removing your new scripts from the conf files, and starting up your server then, will tell you where to look. If the errors are gone, then they are most likely in your new scripts. Otherwise, they are in the default scripts. If they are in your new scripts, then it is wise to first read to that script again, to remove obvious errors. Also, always check the header. If you make a single mistake in the header, the rest of the script will bug out. If that still doesn't help, decrease the error list, then consider to have your server only load the new scripts, one at the time, in the hope that it will show fewer errors.&lt;br /&gt;
&lt;br /&gt;
However, if that still doesn't allow you to find the topmost error, then there is always the third option - breaking down your script in smaller NPCs. What this means, is that you just randomly put inside your script a } followed by a valid header. Then you've split your script in two halves. 50% chance that 50% of the errors will be gone, and that you are closer to finding the solution. If the error list is still too long, simply split it up again, and again, and again, until you can see all the errors of a single NPC in your screen. That way, you can find the first error in that specific NPC, and fix it. This will result into the mapserver only showing the errors in the broken down NPCs before that NPC. I know, it's a long method, but sometimes, it's the only way. But when you have found the original error, then you can use this guide to find a solution for it.&lt;br /&gt;
&lt;br /&gt;
Each error will have it's own section, in which the exact error is listed. These sections will also contain an explanation on what likely caused this error and what possible fixes are. This all is accompanied by one or more examples, to make everything more clear.&lt;br /&gt;
To quickly find your specific error, search for a part of the error message, of course, without the Error tag. When searching for it, make sure that you do not include the things that can alter, like NPC name, file name, variable name etc.&lt;br /&gt;
&lt;br /&gt;
If the error you want to search for, almost completely contains custom things, like that NPC name etc, and you still want to look for it, then try replacing all the parts that can change by three dots. For example if you want to search for this error:&lt;br /&gt;
 Out of range spawn coordinates: prt_fild08 (-50,-50), map size is (250,250) &lt;br /&gt;
then try using this to search for:&lt;br /&gt;
 Out of range spawn coordinates: ... (...,...), map size is (...,...) &lt;br /&gt;
If this still doesn't give any results, you can always try the main index list. However, older error lines do not show up in this one. So, if you are also unsuccessful there, then please try the [[#Outdated Errors|Outdated Errors]] section as a last resort. It lists all old error message. If you still cannot find it, then you can always try the Scripting Support forum.&lt;br /&gt;
&lt;br /&gt;
=== Using Older GIT Revisions ===&lt;br /&gt;
You are probably not using the latest version of Hercules. Unfortunately, over time, some errors change in text, or even become obsolete (erased). To not put you in a disadvantage, we will keep track of older error reports. At the moment, we have up to Revision 12340 covered for the script.c related errors, and up to 11501 covered for npc.c related errors. &lt;br /&gt;
&lt;br /&gt;
When time comes, we will try to cover even older errors, and change the list if new errors appear, or when they change in syntax. However, if the error that you are looking for, is not in the normal list, nor the Outdated Errors list, then your best chance is asking for support in the Script Support Forum on the forums. Please, do not forget to mention your GIT revision when doing this.&lt;br /&gt;
&lt;br /&gt;
== Overview of Errors ==&lt;br /&gt;
There is a total of over 152 errors at the moment. Currently, 152 of them are covered. This is 100.00% of the total for the script.c section and an unknown percentage for the npc.c section.&lt;br /&gt;
&lt;br /&gt;
=== Outdated Errors ===&lt;br /&gt;
This list contains all currently known old errors messages that have been changed. They will link you to the current version of the error.&lt;br /&gt;
&lt;br /&gt;
==== Up to Revision 10812 ====&lt;br /&gt;
----&lt;br /&gt;
* [[Overview_of_Errors#script:guardian:_invalid_data_type_for_argument_.236_.28from_1.29|buildin_guardian: invalid data type for argument #8 (...).]]&lt;br /&gt;
* [[Overview_of_Errors#script:input:_not_a_variable script:|buildin_input: given argument is not a variable!]]&lt;br /&gt;
* [[Overview_of_Errors#script:set:_not_a_variable|script: buildin_set: not name]]&lt;br /&gt;
* [[Overview_of_Errors#script:callsub:_argument_is_not_a_label|script: callsub: not label !]]&lt;br /&gt;
* [[Overview_of_Errors#script:getvariableofnpc:_can.27t_find_npc_... script:|getvariableofnpc: can't find npc ...]]&lt;br /&gt;
* [[Overview_of_Errors#script:getvariableofnpc:_not_a_variable|script: getvariableofnpc: first argument is not a variable name]]&lt;br /&gt;
* [[Overview_of_Errors#script:getvariableofnpc:_invalid_scope_.28not_npc_variable.29|script: getvariableofnpc: invalid scope ... (not npc variable)]]&lt;br /&gt;
* [[Overview_of_Errors#script:goto:_not_a_label|script:goto: not label!]]&lt;br /&gt;
* [[Overview_of_Errors#script:menu:_argument_.23..._.28from_1.29_is_not_a_label_or_label_not_found.|script:menu: argument #... (from 1) is not a label or label not found (op=...).]]&lt;br /&gt;
* [[Overview_of_Errors#script:menu:_argument_.23..._.28from_1.29_is_not_a_string_or_compatible.|script:menu: argument #... (from 1) is not a string or compatible (op=...).]]&lt;br /&gt;
* [[Overview_of_Errors#script:op_1:_argument_is_not_a_number_.28op.3D....29|script:op_1: invalid type of data op:... data:...]]&lt;br /&gt;
* [[Overview_of_Errors#script:op_1:_unexpected_operator_..._i1.3D...|script:op_1: unexpected operator op:...]]&lt;br /&gt;
* [[Overview_of_Errors#script:op_2:_invalid_data_for_operator_...|script:op_2: invalid type of data op:... left:... right:...]]&lt;br /&gt;
* [[Overview_of_Errors#script:op_2num:_division_by_zero_detected_op.3D..._i1.3D..._i2.3D...|script:op_2num: division by zero detected op:...]]&lt;br /&gt;
* [[Overview_of_Errors#script:op_2num:_unexpected_number_operator_..._i1.3D..._i2.3D...|script:op_2num: unexpected number operator op:...]]&lt;br /&gt;
* [[Overview_of_Errors#script:op2_str:_unexpected_string_operator_...|script:op2_str: unexpected string operator op:...]]&lt;br /&gt;
* [[Overview_of_Errors#script:op_3:_invalid_data_for_the_ternary_operator_test|script:op_3: invalid type of data op:... data:...]]&lt;br /&gt;
* [[Overview_of_Errors#script:warpportal:_npc_is_needed|script:warpportal: npc is needed]]&lt;br /&gt;
&lt;br /&gt;
== In-depth Info on Errors ==&lt;br /&gt;
=== Warnings (script.c) ===&lt;br /&gt;
Warnings do not necessarily mean, that something is wrong, but can work in an undesired way.&lt;br /&gt;
&lt;br /&gt;
==== Unexpected type for argument ... Expected ... ====&lt;br /&gt;
&amp;lt;u&amp;gt;'''Cause'''&amp;lt;/u&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
The data type of the value passed into a build-in function's argument differs from the one defined in that function's BUILDIN_DEF definition, typically passing a number where a string is expected and vice versa. A set of [Debug] messages follow this warning, that specify the function's parameters, the function itself and the NPC that hosts the reported script. This warning occurs only during runtime of a script. Note, that the affected script continues to run and auto-conversion rules apply, except the script command itself stops the execution of the script (typically commands that deal with variables and labels).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;'''Solution'''&amp;lt;/u&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Verify all values passed to the function and make sure, that all of them have the expected type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;'''Example'''&amp;lt;/u&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
 [[itemheal]] &amp;quot;200&amp;quot;,0;&lt;br /&gt;
The first parameter is supposed to be a number (amount of HP to heal). So the correct script would be:&lt;br /&gt;
 itemheal 200,0;&lt;br /&gt;
&lt;br /&gt;
=== Errors (npc.c) ===&lt;br /&gt;
All errors located in npc.c that have the [Error] tag are listed in this section.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==== bad duplicate name (in ...)! : ... ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;bad duplicate name (in %s)! : %s&amp;quot;, file, w2);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The format of your duplicate line is wrong. What is missing, is either which NPC the duplicate command should copy or the use of an incorrect name or incorrect characters. The error is located in the file that is mentioned between the ( and ). The name that the server found, if any there, is displayed after the &amp;lt;b&amp;gt;:&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure that you have put an event label in the duplicate name. The format should be one of the following two:&lt;br /&gt;
 map,x,y,d&amp;lt;tab&amp;gt;duplicate(EVENT LABEL)&amp;lt;tab&amp;gt;New name&amp;lt;tab&amp;gt;sprite&lt;br /&gt;
 map,x,y,d&amp;lt;tab&amp;gt;duplicate(EVENT LABEL)&amp;lt;tab&amp;gt;New name&amp;lt;tab&amp;gt;sprite,triggerx,triggery&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 prontera,200,200,4&amp;lt;tab&amp;gt;script&amp;lt;tab&amp;gt;Original::TestNPC&amp;lt;tab&amp;gt;46,{&lt;br /&gt;
    mes &amp;quot;Hi&amp;quot;;&lt;br /&gt;
    close;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 prontera,210,200,4&amp;lt;tab&amp;gt;duplicate()&amp;lt;tab&amp;gt;Copy&amp;lt;tab&amp;gt;46&lt;br /&gt;
The last line is missing the event label between the brackets. It should be this:&lt;br /&gt;
 prontera,210,200,4&amp;lt;tab&amp;gt;duplicate(TestNPC)&amp;lt;tab&amp;gt;Copy&amp;lt;tab&amp;gt;46&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== bad duplicate name (in ...)! (not exist) : ... ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;bad duplicate name (in %s)! (not exist) : %s\n&amp;quot;, file, srcname);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This error is trying to tell you that you are duplicating a non-existing NPC.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure that the NPC you want to duplicate, has the same Event Label as you specified between the round brackets behind duplicate. Either correct the Event Label of the original NPC or the Event Label in the duplicate line. Or, erase the duplicate line. Remember, the format for the original NPC is:&lt;br /&gt;
 map,x,y,d,&amp;lt;tab&amp;gt;script&amp;lt;tab&amp;gt;Original Name&amp;lt;b&amp;gt;::My_Event_Label&amp;lt;/b&amp;gt;&amp;lt;tab&amp;gt;sprite{,triggerx,triggery},{&lt;br /&gt;
And for the duplicate:&lt;br /&gt;
 map,x,y,d,&amp;lt;tab&amp;gt;duplicate(&amp;lt;b&amp;gt;My_Event_Label&amp;lt;/b&amp;gt;)&amp;lt;tab&amp;gt;New Name&amp;lt;tab&amp;gt;sprite{,triggerx,triggery}&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 prontera,200,200,4&amp;lt;tab&amp;gt;script&amp;lt;tab&amp;gt;Original&amp;lt;tab&amp;gt;46,{&lt;br /&gt;
    mes &amp;quot;Hi&amp;quot;;&lt;br /&gt;
    close;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 prontera,210,200,4&amp;lt;tab&amp;gt;duplicate(TestNPC)&amp;lt;tab&amp;gt;Copy&amp;lt;tab&amp;gt;46&lt;br /&gt;
The first line is missing the event label between the brackets. It should be this:&lt;br /&gt;
 prontera,210,200,4&amp;lt;tab&amp;gt;script&amp;lt;tab&amp;gt;Original&amp;lt;b&amp;gt;::TestNPC&amp;lt;/b&amp;gt;&amp;lt;tab&amp;gt;46&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== bad monster ID : ... ... (file ...) ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;bad monster ID : %s %s (file %s)\n&amp;quot;, w3, w4, current_file);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The monster you are trying to spawn, does not exist. At least, the mapserver could not find it's mob_id in mob_db.txt or mob_db2.txt. (Or possibly not in the homunculus db.)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Either add the monster to the mob_db2.txt file, or change the mob_id number in the spawn line to the correct mob_id number.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 monster &amp;quot;prt_fild08&amp;quot;,100,100,&amp;quot;Poring&amp;quot;,999,5;&lt;br /&gt;
Correct code:&lt;br /&gt;
 monster &amp;quot;prt_fild08&amp;quot;,100,100,&amp;quot;Poring&amp;quot;,1002,5;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== bad monster line : ... ... ... (file ...) ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;bad monster line : %s %s %s (file %s)\n&amp;quot;, w1, w3, w4, current_file);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
For a monster line to be correct, it needs to have at least the following:&lt;br /&gt;
* Valid mapname&lt;br /&gt;
* Valid x&lt;br /&gt;
* Valid y&lt;br /&gt;
And it also needs to have at least:&lt;br /&gt;
* Valid class&lt;br /&gt;
* Valid amount&lt;br /&gt;
If you only have two or less of the topmost, and/or 1 or less of the bottom two, then this error will occur.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure that your monster line contains at least the needed information. Check if you have a mapname, x, y, mob_id and an amount, and correct it where needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 monster &amp;quot;prt_fild08&amp;quot;,&amp;quot;Poring&amp;quot;,5;&lt;br /&gt;
Correct code:&lt;br /&gt;
 monster &amp;quot;prt_fild08&amp;quot;,0,0,&amp;quot;Poring&amp;quot;,1002,5;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== bad script line (in file ...): ... ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;bad script line (in file %s): %s\n&amp;quot;, file, w3);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This error occurs when the header of your NPC is incorrect. There are two separate ways for a NPC header to function correctly:&lt;br /&gt;
 map,x,y,d&amp;lt;tab&amp;gt;script&amp;lt;tab&amp;gt;Name&amp;lt;tab&amp;gt;sprite,{&lt;br /&gt;
 -&amp;lt;tab&amp;gt;script&amp;lt;tab&amp;gt;Name&amp;lt;tab&amp;gt;-1,{&lt;br /&gt;
When the server does not detect a dash (-) at the start of your header, it will check for the other format. If it does not find a mapname, x, y, direction, the word script or a comma after the sprite, then it will give you this error.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck, if you abide the rules of writing a NPC header. Make sure you have all the commas in the right spots, that you have the location setup correctly and that you are using the script identifier word.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 prontera,200,200&amp;lt;tab&amp;gt;script&amp;lt;tab&amp;gt;My NPC&amp;lt;tab&amp;gt;48,{&lt;br /&gt;
Correct code:&lt;br /&gt;
 prontera,200,200,4&amp;lt;tab&amp;gt;script&amp;lt;tab&amp;gt;My NPC&amp;lt;tab&amp;gt;48,{&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== Bad setcell line : ... ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;Bad setcell line : %s\n&amp;quot;,w3);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You did not obey the format for using the setcell command. The format should be: &lt;br /&gt;
 &amp;lt;map name&amp;gt;%TAB%setcell%TAB%&amp;lt;type&amp;gt;,&amp;lt;x1&amp;gt;,&amp;lt;y1&amp;gt;,&amp;lt;x2&amp;gt;,&amp;lt;y2&amp;gt;&lt;br /&gt;
This error occurs when you forgot one of the following five things:&lt;br /&gt;
* Forgot to define the type.&lt;br /&gt;
* Forgot to define x1&lt;br /&gt;
* Forgot to define y1&lt;br /&gt;
* Forgot to define x2&lt;br /&gt;
* Forgot to define y2&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck, if the way you defined your setcell line is correct. There should be a tab, followed by 5 arguments after the setcell keyword.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 prontera&amp;lt;tab&amp;gt;setcell&amp;lt;tab&amp;gt;cell_wall,170,50,171&lt;br /&gt;
Correct code:&lt;br /&gt;
 prontera&amp;lt;tab&amp;gt;setcell&amp;lt;tab&amp;gt;cell_wall,170,50,171,100&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== bad shop line : ... ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;bad shop line : %s\n&amp;quot;, w3);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You did not obey the format of a shop header. Make sure it uses the following format:&lt;br /&gt;
 map,x,y,d&amp;lt;tab&amp;gt;shop&amp;lt;tab&amp;gt;Name&amp;lt;tab&amp;gt;sprite,{item list + prices}&lt;br /&gt;
This error occurs when you are missing the mapname, x, y and/or direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck if you are using the shop header in the correct way. Add the missing mapname, x-coordinate, y-coordinate and/or direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 prontera,100,100&amp;lt;tab&amp;gt;shop&amp;lt;tab&amp;gt;My First Shop&amp;lt;tab&amp;gt;83,501:-1,502:-1,503:-1,504:-1,506:-1&lt;br /&gt;
Correct code:&lt;br /&gt;
 prontera,100,100,4&amp;lt;tab&amp;gt;shop&amp;lt;tab&amp;gt;My First Shop&amp;lt;tab&amp;gt;83,501:-1,502:-1,503:-1,504:-1,506:-1&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== bad warp line : ... ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;bad warp line : %s\n&amp;quot;, w3);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You didn't use the warp NPC header correctly. Make sure it uses the following format:&lt;br /&gt;
 from_map,from_x,from_y,d&amp;lt;tab&amp;gt;warp&amp;lt;tab&amp;gt;Name&amp;lt;tab&amp;gt;trigger_x,trigger_y,to_map,to_x,to_y&lt;br /&gt;
This error occurs when you are missing one of the parameters given after the name. (Destination map and coordinates and trigger size.)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck if you are using the warp header in the correct way. Add what is missing.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 prontera,107,215,0&amp;lt;tab&amp;gt;warp&amp;lt;tab&amp;gt;prt01&amp;lt;tab&amp;gt;prt_in,240,139&lt;br /&gt;
Correct code:&lt;br /&gt;
 prontera,107,215,0&amp;lt;tab&amp;gt;warp&amp;lt;tab&amp;gt;prt01&amp;lt;tab&amp;gt;2,2,prt_in,240,139&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== bad warp line (destination map not found): ... ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;bad warp line (destination map not found): %s\n&amp;quot;, w3);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Your mapserver failed to find the map where the warp is supposed to go to.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure that the destination you typed in your warp line, really exists and is a map loaded by the server. Of course, also check it for typos.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 prontera,107,215,0&amp;lt;tab&amp;gt;warp&amp;lt;tab&amp;gt;prt01&amp;lt;tab&amp;gt;prontera_in,240,139&lt;br /&gt;
Correct code:&lt;br /&gt;
 prontera,107,215,0&amp;lt;tab&amp;gt;warp&amp;lt;tab&amp;gt;prt01&amp;lt;tab&amp;gt;prt_in,240,139&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== Could not parse file '...', line '...'. * ... ... ... ... ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;Could not parse file '%s', line '%i'.\n * %s %s %s %s\n&amp;quot;,current_file,lines,w1,w2,w3,w4);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This can mean a lot of things. Please make sure that your header always looks like this:&lt;br /&gt;
 map,x,y,d&amp;lt;tab&amp;gt;script&amp;lt;tab&amp;gt;Name&amp;lt;tab&amp;gt;sprite{,triggerx,triggery},{&lt;br /&gt;
The server reads this in in the following manner:&lt;br /&gt;
 location_info&amp;lt;tab&amp;gt;script&amp;lt;tab&amp;gt;Name{#tag}{::EventLabel}&amp;lt;tab&amp;gt;other_info&lt;br /&gt;
If you are missing tabs, or any of these four parts, or a combination, then the mapserver will return this error.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Check your NPC header, and make sure it abides the rules.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 prontera,200,200,4&amp;lt;space&amp;gt;My NPC&amp;lt;tab&amp;gt;48,{&lt;br /&gt;
Correct code:&lt;br /&gt;
 prontera,200,200,4&amp;lt;tab&amp;gt;script&amp;lt;tab&amp;gt;My NPC&amp;lt;tab&amp;gt;48,{&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== File not found : ... ====&lt;br /&gt;
Source Syntax: ShowError (&amp;quot;File not found : %s\n&amp;quot;, name);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You have added a NPC to the conf file, but the server cannot find the file you mentioned in there.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Check if the file that the mapserver reports, actually exists. If it does, make sure you typed the entry in the conf file in a case sensitive way. If the file does not exist, comment out or erase the entry in the conf file.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== Invalid map '...' in line ..., file ... ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;Invalid map '%s' in line %d, file %s\n&amp;quot;, mapname, lines, current_file);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This means, that the map which you specified in the header of the script, does not exist. Or at least, the server cannot find it.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck if you spelled the name right and if the map does exist on your server (by warping to it).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 pront,200,200,4&amp;lt;tab&amp;gt;script&amp;lt;tab&amp;gt;My NPC&amp;lt;tab&amp;gt;48,{&lt;br /&gt;
Correct code:&lt;br /&gt;
 prontera,200,200,4&amp;lt;tab&amp;gt;script&amp;lt;tab&amp;gt;My NPC&amp;lt;tab&amp;gt;48,{&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== Missing right curly at file ..., line ... ====&lt;br /&gt;
Source Syntax:&amp;lt;br&amp;gt;&lt;br /&gt;
ShowError(&amp;quot;Missing right curly at file %s, line %d\n&amp;quot;,current_file, *lines);&amp;lt;br&amp;gt;&lt;br /&gt;
ShowError(&amp;quot;Missing right curly at file %s, line %d\n&amp;quot;, file, *lines);&amp;lt;br&amp;gt;&lt;br /&gt;
ShowError(&amp;quot;Missing right curly at file %s, line %d\n&amp;quot;,file, *lines);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The script that loaded, has more left curly brackets than right curly brackets.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Count and check the number and locations of the left and right curly brackets. In a single script, they should be the same amount.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== no such shop npc : ... ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;no such shop npc : %d\n&amp;quot;,id);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried to call a non-existing shop with the callshop command.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure the shop actually exists. Also make sure that it has no sprite (-1) and no location (-) part.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== npc_addeventimer: Event ... does not exists. ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;npc_addeventimer: Event %s does not exists.\n&amp;quot;, name);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried to use a timer in combination with an Event Label. However, the event label was not found by the mapserver.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure that the event label you are referring to exists.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 &amp;lt;header with the npc name Tirza&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 addtimer 60000, &amp;quot;Tirza::OnTimeChecker&amp;quot;;&lt;br /&gt;
 ...&lt;br /&gt;
 OnTimeCheck:&lt;br /&gt;
 ...&lt;br /&gt;
Correct code:&lt;br /&gt;
 &amp;lt;header with the npc name Tirza&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 addtimer 60000, &amp;quot;Tirza::OnTimeCheck&amp;quot;;&lt;br /&gt;
 ...&lt;br /&gt;
 OnTimeCheck:&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== npc_click: npc_id != 0 ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;npc_click: npc_id != 0\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This error seems to occur when a player uses more than one NPC at the same time. Unlike common sense, this is possible. It can happen when an event is triggered by the player (through a timer for example), and while that code is being executed, the player clicks/starts another NPC.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This error is hard to prevent to be honest. You will have to check in some way if there is any way for a player to be using a NPC and at the same time having an event triggered at another NPC.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== npc_event: (mob_kill) event not found [...] ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;npc_event: (mob_kill) event not found [%s]\n&amp;quot;, mobevent);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You created a monster spawn that has an Event Label attached to it (which will trigger when the monster dies). However, the mapserver could not find this event label in your script.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Verify that the monster should have an OnDeath-type label, that the Event Label exists, and that you did not make a typo in it.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== npc_event: event not found [...] ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;npc_event: event not found [%s]\n&amp;quot;, eventname);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Kind of the same as the error above. An event label you want to use, does not exist.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Verify that the Event Label exists, and that you did not make a typo in it.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== npc_parse_script: label name longer than 23 chars! '...' (...) ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;npc_parse_script: label name longer than 23 chars! '%s'\n (%s)&amp;quot;, lname, current_file);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You have created a label (normal or event label) which is longer than 23 characters. The mapserver cannot use labels bigger than that size.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Shorten your (event)label until it has 23 or less characters in it.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 MyFirstLabelWhichITypedTheDayBeforeYesterday: //44 characters O_O&lt;br /&gt;
Correct code:&lt;br /&gt;
 L_MyFirstLabel01: //16 characters.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== npc_script_event: NULL sd. Event Type ... ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;npc_script_event: NULL sd. Event Type %d\n&amp;quot;, type);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Your code triggered an event, which requires a player to be online and attached to the NPC. For some reason, the player isn't there.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
If it is a player attached timer that causes this, and the player logged off, then there is nothing much you can do.&lt;br /&gt;
In any other case, make sure that your script has an attached player. (Like using addtimer instead of initnpctimer.)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== npc_settimerevent_tick: Attached player not found! ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;npc_settimerevent_tick: Attached player not found!\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Your script, or in this specific case, your timer, used to have a player attached to it. The player went missing though.&lt;br /&gt;
This is most likely because the player logged off.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
There is no real solution to this problem. You can make some additional checks to see if the player is still online at a certain moment, and end the script when the person logged off.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== npc_timerevent: Attached player not found. ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;npc_timerevent: Attached player not found.\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This error is of the same type as above.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
There is no real solution to this problem. You can make some additional checks to see if the player is still online at a certain moment, and end the script when the person logged off.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== npc_timerevent: NPC not found?? ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;npc_timerevent: NPC not found??\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Somehow, some way, between the loading of the NPC and the current timerevent, the NPC went missing.&lt;br /&gt;
This is possible in a couple of different ways, but the most likely one is disabling the target NPC or unloading it.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Making a solution for this will be a bit time intensive. You need to make sure that the timerevent cannot be triggered when the NPC is unloaded or disabled.&lt;br /&gt;
A way to do this, is to make a global variable with the status of the new NPC, or using getmapxy to find if the NPC is still there.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== npc_timerevent_start: Attached player not found! ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;npc_timerevent_start: Attached player not found!\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Your script, or in this specific case, your timer, used to have a player attached to it. The player went missing though.&lt;br /&gt;
This is most likely because the player logged off.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
There is no real solution to this problem. You can make some additional checks to see if the player is still online at a certain moment, and end the script when the person logged off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== npc_timerevent_stop: Attached player not found! ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;npc_timerevent_stop: Attached player not found!\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Your script, or in this specific case, your timer, used to have a player attached to it. The player went missing though.&lt;br /&gt;
This is most likely because the player logged off.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
There is no real solution to this problem. You can make some additional checks to see if the player is still online at a certain moment, and end the script when the person logged off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== npc_touch_areanpc : some bug ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;npc_touch_areanpc : some bug \n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This bug should be impossible to produce. If you want to know the details, dive into the source code, but the short explanation is this:&lt;br /&gt;
* Player triggers OnTouch area.&lt;br /&gt;
* Mapserver iterates through all the NPCs on that map, and searches to which NPC this OnTouch area belongs.&lt;br /&gt;
* With this, it runs a counter from 0 to number of npcs - 1.&lt;br /&gt;
* If it finds one, it jumps out early.&lt;br /&gt;
* If it doesn't find one, i is equal to the amount of npcs - 1.&lt;br /&gt;
* i remains untouched then.&lt;br /&gt;
* When i is equal to the max amount of NPCs on the map (so not npcs - 1, but npcs), it gives this error.&lt;br /&gt;
Of course, this is impossible to happen, unless there are no NPCs on the map, but then the OnTouch shouldn't be triggered.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Report this bug to the [[developers]], because it does not have a solution script-wise. Provide them with as much data as possible/&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== Out of range spawn coordinates: ... (...,...), map size is (...,...) - ... ... (file ...) ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;Out of range spawn coordinates: %s (%d,%d), map size is (%d,%d) - %s %s (file %s)\n&amp;quot;, map[mob.m].name, x, y, map[mob.m].xs-1, map[mob.m].ys-1, w1,w3, current_file);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried to spawn a monster outside of the boundaries of the map. This can either be done by negative coordinates, or coordinates bigger than the maximum of the map.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck the actual map size, and make sure the spawn coordinates of your mob does not go beyond that. Also, always keep your spawning coordinates not negative.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 monster &amp;quot;prt_fild08&amp;quot;,-100,5000,&amp;quot;Poring&amp;quot;,1002,5;&lt;br /&gt;
Correct code:&lt;br /&gt;
 monster &amp;quot;prt_fild08&amp;quot;,0,0,&amp;quot;Poring&amp;quot;,1002,5;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== Probably TAB is missing in file '...', line '...': * ... ... ... ... ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;Probably TAB is missing in file '%s', line '%i':\n * %s %s %s %s\n&amp;quot;,current_file,lines,w1,w2,w3,w4);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The mapserver could not detect the type that your script should be. This is most likely happening because you miss a tab before the keyword. Or you are using an invalid keyword.&amp;lt;br&amp;gt;&lt;br /&gt;
The following list is a list of all possible keywords:&lt;br /&gt;
* duplicate&lt;br /&gt;
* function&lt;br /&gt;
* mapflag&lt;br /&gt;
* monster&lt;br /&gt;
* script&lt;br /&gt;
* setcell&lt;br /&gt;
* shop&lt;br /&gt;
* warp&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure you have the tabs in the right place, and that you typed the keyword correctly.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== wrong map name : ... ... (file ...) ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;wrong map name : %s %s (file %s)\n&amp;quot;, w1,w3, current_file);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The map where you wanted to spawn your monster on, does not exist.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure that you typed the name of the map correctly, and that it is loaded by the mapserver. (Check this by warping to it.)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== wrong monsters spawn delays : ... ... (file ...) ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;wrong monsters spawn delays : %s %s (file %s)\n&amp;quot;, w3, w4, current_file);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The spawn delays you entered for your mob are too big. The maximum allowed number for both is: 268435455 (ms).&amp;lt;br&amp;gt;&lt;br /&gt;
This is equal to:&amp;lt;br&amp;gt;&lt;br /&gt;
* 3 days,&lt;br /&gt;
* 2 hours,&lt;br /&gt;
* 33 minutes,&lt;br /&gt;
* 55 seconds,&lt;br /&gt;
* and 455 milliseconds.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Lower the spawn delay times until they are equal to or less than 268435455.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== wrong number of monsters : ... ... (file ...) ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;wrong number of monsters : %s %s (file %s)\n&amp;quot;, w3, w4, current_file);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The amount of monsters you tried to spawn is incorrect. It needs to be bigger than 0 and has a limit of 1000.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Change the amount of monsters that you are trying to spawn, to a number equal or lower than 1000 and higher than 0.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Errors (script.c) ===&lt;br /&gt;
All errors located in script.c that have the [Error] tag are listed in this section.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==== ...: ... broken data ! ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;%s: %s broken data !\n&amp;quot;,mapreg_txt,buf1);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
One of your global variables is corrupted or broken. This can be caused by a hard drive failure, physical damage to the hard-drive or memory and/or saving global variables while the server crashed suddenly. The server detects this by looking if there is any data after the variable name, before a new line is started. The global variable that is broken, is mentioned after the &amp;lt;b&amp;gt;:&amp;lt;/b&amp;gt;. Before the &amp;lt;b&amp;gt;:&amp;lt;/b&amp;gt; will tell you exactly where your global variables are being stored.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The best solution is to manually fix the broken variable. To do this, make sure that your server is completely offline. Then open the file where the global variables are located. Then search for the specific global variable. When you have found the bugged one, either erase it from the file, or give it a correct value (and if needed, array-index). If it is an important variable, you are advised to look in your most recent backup, and use that value as the new value for the broken variable. When you are done, save the file, exit it, and restart your server to see if the error is fixed.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== buildin_callshop: Shop [...] not found (or NPC is not shop type) ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;buildin_callshop: Shop [%s] not found (or NPC is not shop type)\n&amp;quot;, shopname);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You used the callshop command, to call a shop. However, this shop does not exist, or, it does exist, but isn't of the type Shop.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Verify that the shop you want to call is actually a shop, and of course, that it exists. And make sure the shop you are calling obeys the rules of shops that can be called with callshop. (More info regarding this, view the callshop example file: {{git|doc/sample/npc_dynamic_shop.txt}})&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== buildin_checkweight: Wrong item ID or amount. ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;buildin_checkweight: Wrong item ID or amount.\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried to check the weight of an invalid item or a negative amount of items.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Verify that the item id is 500 or higher (and of course, that it exists). Also, make sure that you are using a positive amount, and not 0 or a negative amount. When using variables to dynamically use this command, make sure that they obey these limits as well.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 set @success, checkweight(400,-10);&lt;br /&gt;
Correct code:&lt;br /&gt;
 set @success, checkweight(500,10);&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== buildin_getcharid: invalid parameter (...). ====&lt;br /&gt;
Source Syntax:&amp;lt;br&amp;gt;&lt;br /&gt;
Current: ShowError(&amp;quot;buildin_getcharid: invalid parameter (%d).\n&amp;quot;, num);&amp;lt;br&amp;gt;&lt;br /&gt;
Until Rev. 11638: ShowError(&amp;quot;buildin_getcharid: invalid .\n&amp;quot;); &amp;lt;br&amp;gt;&lt;br /&gt;
Note: The error up until 11638 could not happen since it was inaccessible.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You have passed on an invalid parameter to the getcharid function.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Getcharid() can handle 4 different arguments, being:&lt;br /&gt;
 0 - character id&lt;br /&gt;
 1 - party id&lt;br /&gt;
 2 - guild id&lt;br /&gt;
 3 - account id&lt;br /&gt;
You tried to give it a value smaller than 0 or bigger than 3. Please check which kind of id you tried to request and adjust the number accordingly.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 getcharid(-1); // I want the party ID.&lt;br /&gt;
 getcharid(33); // I want the account ID.&lt;br /&gt;
Correct code:&lt;br /&gt;
 getcharid(1);&lt;br /&gt;
 getcharid(3);&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== buildin_getitem: invalid data type for argument #1 (...). ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;buildin_getitem: invalid data type for argument #1 (%d).&amp;quot;, data-&amp;gt;type);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While using the getitem command, you somehow managed to provide as the first argument, something different than a string or an integer. This command only accepts item names or item ids as a first argument.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure that you have entered a valid number or string as the first argument of getitem. When using a variable, of course, make sure that they also obey this.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 getitem &amp;quot;@item_name$&amp;quot;,4;&lt;br /&gt;
 getitem ^1234, 4;&lt;br /&gt;
Correct code:&lt;br /&gt;
 getitem @item_name$, 4;&lt;br /&gt;
 getitem 1234, 4;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== buildin_getitem: Nonexistant item ... requested. ====&lt;br /&gt;
Source Syntax: &amp;lt;br&amp;gt;&lt;br /&gt;
ShowError(&amp;quot;buildin_getitem: Nonexistant item %s requested.\n&amp;quot;, name);&amp;lt;br&amp;gt;&lt;br /&gt;
ShowError(&amp;quot;buildin_getitem: Nonexistant item %d requested.\n&amp;quot;, nameid);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The item that you wanted to give with getitem does not exist.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure that the name or the item id which you provided is an actual item. Of course, when using variables to give the item, make sure that they obey this as well.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 getitem 400,5;&lt;br /&gt;
 getitem &amp;quot;Appel&amp;quot;,5;&lt;br /&gt;
Correct code:&lt;br /&gt;
 getitem 500,5;&lt;br /&gt;
 getitem &amp;quot;Apple&amp;quot;,5;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== buildin_getmonsterinfo: Wrong Monster ID: ... ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;buildin_getmonsterinfo: Wrong Monster ID: %i\n&amp;quot;, mob_id);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The monster ID of the monster you wanted to get information on, does not exist.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure the mob_id is the mob_id of an existing monster in one of your mob_db files.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 getmonsterinfo(800,MOB_NAME);&lt;br /&gt;
Correct code:&lt;br /&gt;
 getmonsterinfo(1002,MOB_NAME);&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== buildin_getnpctimer: Attached player not found! ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;buildin_getnpctimer: Attached player not found!\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You have attached a player to your NPCTimer. When you tried using getnpctimer on that specific timer, the player was not found anymore. This often means that he is offline.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
First ask yourself, if it is really needed to attach a player to your NPCTimer. If this is the case, and you do not want to get this error, then you might want to consider using addtimer (a player timer) instead. If you truely want to use NPCTimers with a player attached, then before using getnpctimer, do a check if the player is still online.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== buildin_rid2name: BL type unknown. ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;buildin_rid2name: BL type unknown.\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
In some incredible way, you managed to provide the RID of a group that does not exist. This command can be used on the RID of the following groups only:&lt;br /&gt;
* Homunculus&lt;br /&gt;
* Monster&lt;br /&gt;
* NPC&lt;br /&gt;
* Pet&lt;br /&gt;
* Player&lt;br /&gt;
There are some other things which have RIDs, like floor items, skill traps etc. These are not allowed with this function.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The most likely cause for this bug is that you have provided an invalid RID, which accidentally does have a so called BL-status. (BL means BlockList, in which essential data is stored. Too complicated to explain it in here in a few words.) Make sure you are using a valid RID for this function.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== buildin_rid2name: invalid RID ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;buildin_rid2name: invalid RID\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You managed to provide an invalid RID. This means, that the RID you gave to the rid2name command, does not exist and does not have a BL attached to it. Most probable is that you provided 0 as the RID, which never exists, or the RID of something that used to be, but isn't anymore. (For example, a player who logged off, or a monster which got killed.)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck if you are providing a correct RID. If this is the case, check if it can be sensitive for certain events, like player logging off or monster being killed. If this is the case, then put some additional checks in place to prevent this bug for happening. In the case of player logging off, do a check with the isloggedin command. In the case of a monster, check if it is still alive, etc. etc.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== buildin_soundeffectall: insufficient arguments for specific area broadcast. ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;buildin_soundeffectall: insufficient arguments for specific area broadcast.\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You didn't provide enough arguments for soundeffectall. Soundeffectall can be used in two ways. One way is with a predefined coverage (bc_all, bc_map etc. constants), which all have a numerical value lower than 23, even when added to each other. The other way, is providing a coverage equal to or bigger than 23, which allows you to define a custom area on a custom map, where the sound will be played.&amp;lt;br&amp;gt;&lt;br /&gt;
In this case, you provided a coverage which had a numerical value of 23 or higher, you will have to provide a mapname, and an area by giving x0, y0, x1 and y1. Unfortunately, you failed to do exactly that.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
If it was your intend to use a custom area, then make sure you provided all of the 8 arguments. For the custom area, this is the format:&lt;br /&gt;
 soundeffectall &amp;quot;effect filename&amp;quot;,&amp;lt;number&amp;gt;,&amp;lt;coverage&amp;gt;,&amp;quot;mapname&amp;quot;,&amp;lt;x0&amp;gt;,&amp;lt;y0&amp;gt;,&amp;lt;x1&amp;gt;,&amp;lt;y2&amp;gt;;&lt;br /&gt;
where coverage &amp;gt;= 23.&lt;br /&gt;
If you intended to use a predefined area, make sure that the numerical value of coverage is smaller than 23. To check this, open up db/const.txt, and look up the values behind the bc_ entries. Add up the numbers of the bc's that you used, to see if it stays under 23.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== buildin_warp: moving player '...' to &amp;quot;...&amp;quot;,...,... failed. ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;buildin_warp: moving player '%s' to \&amp;quot;%s\&amp;quot;,%d,%d failed.\n&amp;quot;, sd-&amp;gt;status.name, str, x, y); &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The server wasn't able to warp the specific target to its new location. There are two possible reasons for this to happen.&lt;br /&gt;
 1 - Invalid map index.&lt;br /&gt;
 2 - Map not in this map-server, and failed to locate alternate map-server.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure you supplied the correct mapname to the warp function and make sure that the map is loaded and enabled in the mapserver.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== can't read ... ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;can't read %s\n&amp;quot;, line);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Your mapserver failed to open up the file located at: &amp;quot;db/const.txt&amp;quot;.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This can be caused by a couple of things. Either the file isn't located there anymore (it was renamed, moved or deleted), or the file is already opened by some other application which locked it from reading. Make sure that the file exists and isn't in use by any other application, not even a text editor.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== Failed to save the mapreg data! ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;Failed to save the mapreg data!\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This error is not related to bugs in the actual code of a script. It is part of the auto-save routine where the global variables are written to permanent storage (save/mapreg.txt for TXT and SQL, or the mapreg table for SQL if you defined the DMAPREGSQL flag when you compiled your source code). This error does not occur when you compiled your code in such a way that it saves your global variables to the SQL table named mapreg. However, in any other case, at certain intervals, your mapserver auto-saves the global variables to the file in save/mapreg.txt. When it occurs a problem during this, being unable to open or write to the file, then the mapserver will not save the global variables, and will return this error.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
A long story short: You will have to verify that the file save/mapreg.txt is not locked from writing. Reasons for the file to be locked, is when it is opened by another application, like a text editor, or when the last time it was used, it wasn't closed properly. So, make sure that it is not locked anymore. (Do not close the mapserver in the meantime, or all your global variables might get lost.)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== file not found: [...] ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;file not found: &amp;lt;nowiki&amp;gt;[%s]&amp;lt;/nowiki&amp;gt;\n&amp;quot;, cfgName);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This error occurs when your mapserver is unable to find or open conf/script_athena.conf.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure that the file is not locked and does exist. To check if it is locked, check if it is in use by any other program, like a text-editor. If any other application has the file opened, close that application.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== function not found ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;function not found\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This usually happens, when you have declared a function name, but did not implement the function. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Add code for every declared function.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 function NonExistingFunction;&lt;br /&gt;
 // ...&lt;br /&gt;
 NonExistingFunction;&lt;br /&gt;
&lt;br /&gt;
Correct code:&lt;br /&gt;
 function ExistingFunction;&lt;br /&gt;
 // ...&lt;br /&gt;
 ExistingFunction;&lt;br /&gt;
 // ...&lt;br /&gt;
 function ExistingFunction {&lt;br /&gt;
     // code&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== getnpctimer: Invalid NPC ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;getnpctimer: Invalid NPC\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried accessing a NPC timer of a NPC that does not exist.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck if the NPC that you want to look up the NPC timer of, actually exists, and that you did not make any typos in the name.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== initnpctimer: invalid argument type #1 (needs be int or string)). ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;initnpctimer: invalid argument type #1 (needs be int or string)).\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried using initnpctimer, and gave an invalid argument. This command can be used in conjunction with a string (NPC name) or an integer (starting value).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck if you actually needed an argument to use this command, and when this is the case, if it is actually a correct argument.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 initnpctimer &amp;quot;@NPC_Name$&amp;quot;;&lt;br /&gt;
Correct code:&lt;br /&gt;
 initnpctimer @NPC_Name$;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== NPC event parameter deprecated! Please use 'NPCNAME::OnEVENT' instead of '...'. ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;NPC event parameter deprecated! Please use 'NPCNAME::OnEVENT' instead of '%s'.\n&amp;quot;,evt);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
In the past, when you wanted to specify a NPC event, you could simply use OnEvent. This has changed a while back though. Now you must use the format NPCNAME::OnEvent. You most likely forgot to either include the NPC name, or the On part of the event label.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Check if you obey the format, and that your event label really starts with On.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== run_func : ...? (...(...)) ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;run_func : %s? (%d(%d))\n&amp;quot;,str_buf+str_data[func].str,func,str_data[func].type);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This is an error that occurs deep inside the code, and is therefor probably rare to encounter. It basically means, that the function that the server is trying to run, is actually not a function. A possible scenario where this can occur, is a default start up, and while the server is up, you do an @loadnpc &amp;lt;npc&amp;gt;. However, this new NPC has a variable named exactly like a function, and now overwrites it.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Check in your scripts if the function really is a function, and if no other NPC overwrites the function, by using the same name as a variable name or something likewise.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== run_func: '...' (type ...) is not function and command! ====&lt;br /&gt;
Source Syntax: &lt;br /&gt;
ShowError(&amp;quot;run_func: '&amp;quot;CL_WHITE&amp;quot;%s&amp;quot;CL_RESET&amp;quot;' (type %d) is not function and command!\n&amp;quot;, str_buf+str_data[func].str, str_data[func].type);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This is an error that occurs deep inside the code, and is therefor probably rare to encounter. It basically means, that the function that the server is trying to run, is actually not a function. A possible scenario where this can occur, is a default start up, and while the server is up, you do an @loadnpc &amp;lt;npc&amp;gt;. However, this new NPC has a variable named exactly like a function, and now overwrites it.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Check in your scripts if the function really is a function, and if no other NPC overwrites the function, by using the same name as a variable name or something likewise.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== run_script: infinity loop ! ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;run_script: infinity loop !\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You managed to create a loop in your script, which is never ending. Because this may result into a lock up of your server, because of high CPU usage, the mapserver gives you this error.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Check if the infinite loop really needs to exist, and if not, make sure that there is an exit possibility.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 while(1) {&lt;br /&gt;
    set @i, @i + 1;&lt;br /&gt;
    mes @i;&lt;br /&gt;
    next;&lt;br /&gt;
 }&lt;br /&gt;
Correct code:&lt;br /&gt;
 while(@i &amp;lt; 100) {&lt;br /&gt;
    set @i, @i + 1;&lt;br /&gt;
    mes @i;&lt;br /&gt;
    next;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script: jump_zero: not label ! ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script: jump_zero: not label !\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The label you provided with the jump_zero command, isn't a label.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck if the label exists, and uses the correct formatting of label names.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 jumpzero(Zeny), 1337;&lt;br /&gt;
Correct code:&lt;br /&gt;
 jumpzero(Zeny), L_IsBroke;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:callfunc: function not found! [...] ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:callfunc: function not found! [%s]\n&amp;quot;,str);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried to call a function with callfunc, which does not exist.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck if you did not make any typos in the make of the function, and that the function really exists.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:callsub: argument is not a label ====&lt;br /&gt;
Source Syntax:&amp;lt;br&amp;gt;&lt;br /&gt;
Current: ShowError(&amp;quot;script:callsub: argument is not a label\n&amp;quot;);&amp;lt;br&amp;gt;&lt;br /&gt;
Until Rev. 10812: ShowError(&amp;quot;script: callsub: not label !\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The label you provided for your callsub does not exist.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck if you did not make any typos in the subroutine which you are trying to call. Make sure the label exists.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:cleararray: illegal scope ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:cleararray: illegal scope\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This error indicates that you tried to use cleararray on a variable which isn't an array.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck if the array you want to clear actually is an array, and that you typed the name of the array correctly.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:cleararray: not a variable ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:cleararray: not a variable\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The variable you tried to clear with cleararray, isn't a variable, or it isn't a legal variable name.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Confirm that the variable does exist, and that it obeys the official rules for names of a variable. For reference, check this link: [[Variables#Other_Important_Info Naming Variables]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 cleararray .1st_array[0],0,5;&lt;br /&gt;
Correct code:&lt;br /&gt;
 cleararray .First_array[0],0,5;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:conv_num: cannot convert to number, defaulting to 0 ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:conv_num: cannot convert to number, defaulting to 0\n&amp;quot;); &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried converting something which isn't a string nor a valid number, to a decimal integer. The mapserver replaced what you tried to convert, to 0. The mapserver is capable of automatically converting strings, octal numbers (&amp;quot;o377&amp;quot;) and hex numbers (&amp;quot;0xFF&amp;quot;).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Check if all your (unmeant/silent) conversions are alright, and if you did not try to convert for example a binary number (&amp;quot;0b10011101&amp;quot;) to a decimal integer.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 set @i, 0b10011101; // 0b10011101 equals to 157 as decimal number, 0x9D as hex, or o235 as octonal.&lt;br /&gt;
Possible correct codes:&lt;br /&gt;
 set @i, 0x9D; &lt;br /&gt;
 set @i, o235;&lt;br /&gt;
 set @i, 157;&lt;br /&gt;
 &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:conv_num: overflow detected, capping to ... ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:conv_num: overflow detected, capping to %ld\n&amp;quot;, num); &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This error occurs when you try to convert a number from a different system than decimal, and the result is bigger than what an integer can hold. This maximum is 2,147,483,647. When this happens, to prevent memory corruption or buffer overflow, the mapserver automatically caps the number at this maximum.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Calculate if the number which you try to convert to the decimal system, is less than the maximum allowed. Change when needed, to prevent unexpected results.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 set @result, 0xFFFF * 0xFFFF; // 65535 * 65535 = 4294836225.&lt;br /&gt;
 mes &amp;quot;0xFFFF * 0xFFFF = &amp;quot;+@result; // Displays: &amp;quot;0xFFFF * 0xFFFF = 2147483647&amp;quot;&lt;br /&gt;
Correct code:&lt;br /&gt;
 set @i1, 0xFFFF; // Converts to 65535&lt;br /&gt;
 set @i2, 0xFFFF; // Converts to 65535&lt;br /&gt;
 set @temp_low, @i1 * (@i2%1000); // 65535 * (65535%1000) = 65535 * 535 = 35061225 (Fits.)&lt;br /&gt;
 set @temp_high, @i1 * (@i2/1000); // 65535 * (65535/1000) = 65535 * 65 = 4259775 (Fits.)&lt;br /&gt;
 set @result_low, @temp_low%1000; // We only need the lower part: 35061225%1000 = 225&lt;br /&gt;
 set @result_high, @temp_high + (@temp_low/1000); // 4259775 + (35061225/1000) = 4259775 + 35061 = 4294836&lt;br /&gt;
 mes &amp;quot;0xFFFF * 0xFFFF = &amp;quot;+@result_high+@result_low; // Displays: &amp;quot;0xFFFF * 0xFFFF = 4294836225&amp;quot;&lt;br /&gt;
Short Correct code:&lt;br /&gt;
 set @result_low, (0xFFFF * (0xFFFF%1000))%1000;&lt;br /&gt;
 set @result_high, (0xFFFF * (0xFFFF/1000)) + ((0xFFFF * (0xFFFF%1000))%1000)/1000;&lt;br /&gt;
 mes &amp;quot;0xFFFF * 0xFFFF = &amp;quot;+@result_high+@result_low; // Displays: &amp;quot;0xFFFF * 0xFFFF = 4294836225&amp;quot;&lt;br /&gt;
Short Compact Correct code:&lt;br /&gt;
 set @result_low, (0xFFFF * (0xFFFF%1000))%1000;&lt;br /&gt;
 set @result_high, (0xFFFF * 0xFFFF + (0xFFFF%1000) * (0xFFFF%1000))/1000;&lt;br /&gt;
 mes &amp;quot;0xFFFF * 0xFFFF = &amp;quot;+@result_high+@result_low; // Displays: &amp;quot;0xFFFF * 0xFFFF = 4294836225&amp;quot;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:conv_num: underflow detected, capping to ... ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:conv_num: underflow detected, capping to %ld\n&amp;quot;, num); &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This error is telling you the opposite of the previous error. Due to converting numbers or calculations, your result has become lower than the lowest possible integer which your mapserver can store. As a safety precaution, it has set the value to -2,147,483,648&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Calculate if the number which you try to convert to the decimal system, is more than the minimum allowed. Change when needed, to prevent unexpected results.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:conv_str: cannot convert to string, defaulting to &amp;quot;&amp;quot; ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:conv_str: cannot convert to string, defaulting to \&amp;quot;\&amp;quot;\n&amp;quot;); &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried converting something to a string, but the mapserver was unable to convert this. Therefor, it has used the empty string &amp;quot;&amp;quot; instead.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure you entered something that can be converted to a string. Things need to be converted when for example displaying a number in a mes-dialogue.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 mes &amp;quot;You are the &amp;quot;+ 1st +&amp;quot;.&amp;quot;; // 1st is not a valid string, nor a valid number.&lt;br /&gt;
Correct code:&lt;br /&gt;
 mes &amp;quot;You are the first.&amp;quot;;&lt;br /&gt;
 mes &amp;quot;You are the &amp;quot;+1+&amp;quot;st.&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:copyarray: illegal scope ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:copyarray: illegal scope\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This error indicates that you tried to use copyarray on a variable which isn't an array.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck if the array you want to copy actually is an array, and that you typed the name of the array correctly. Of course, also check this for the target array.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:copyarray: not a variable ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:copyarray: not a variable\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The variable you tried to copy with copyarray, isn't a variable, or it isn't a legal variable name.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Confirm that the variable does exist, and that it obeys the official rules for names of a variable. For reference, check this link: [[Variables#Other_Important_Info Naming Variables]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 copyarray @2ndarray2[0],@1starray[2],2;&lt;br /&gt;
Correct code:&lt;br /&gt;
 copyarray @secondarray2[0],@firstarray[2],2;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:copyarray: type mismatch ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:copyarray: type mismatch\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried copying an integer array to a string array, or the other way around.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure that both either have the $-suffix, or do not have the string suffix.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 copyarray @MyArray2$[0],@MyArray1[2],2;&lt;br /&gt;
Correct code:&lt;br /&gt;
 copyarray @MyArray2[0],@MyArray1[2],2; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:deletearray: illegal scope ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:deletearray: illegal scope\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This error indicates that you tried to use deletearray on a variable which isn't an array.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck if the array you want to delete actually is an array, and that you typed the name of the array correctly.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:deletearray: not a variable ====&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The variable you tried to delete with deletearray, isn't a variable, or it isn't a legal variable name.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Confirm that the variable does exist, and that it obeys the official rules for names of a variable. For reference, check this link: [[Variables#Other_Important_Info Naming Variables]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 deletearray .1st_array[0],5;&lt;br /&gt;
Correct code:&lt;br /&gt;
 deletearray .First_array[0],5;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:getarg: index (idx=...) out of range (count=...) and no default value found ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:getarg: index (idx=%d) out of range (count=%d) and no default value found\n&amp;quot;, idx, count);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried to use getarg() on a non-existing parameter. When calling a function or a subroutine, you can give certain parameters to it. These parameters can be requested with getarg(). Getarg can be used in combination with optional parameters though. For this, you will have to specify a default value. Here is how to do that:&lt;br /&gt;
 set @temp, getarg(0); //Normal getarg. Will give the error if it does not exist.&lt;br /&gt;
 set @temp, getarg(5,10); // Special getarg. If getarg(5) does not exist, it will use the value 10, and will not give this error.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Check if the parameter you want to obtain with getarg, always exists. (Keep in mind, getarg starts with 0, not with 1.) If it should always exist, check your callfunc and callsub lines and anything related to it. However, if the parameter is optional, then use the second format, where you can provide a default value when the parameter has not been given.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 callfunc &amp;quot;F_MyFunction&amp;quot;,5,10;&lt;br /&gt;
 ...&lt;br /&gt;
 F_MyFunction:&lt;br /&gt;
   set @MF_start, getarg(0);&lt;br /&gt;
   set @MF_end, getarg(1);&lt;br /&gt;
   set @MF_increase, getarg(2);&lt;br /&gt;
Correct code:&lt;br /&gt;
 callfunc &amp;quot;F_MyFunction&amp;quot;,5,10;&lt;br /&gt;
 ...&lt;br /&gt;
 F_MyFunction:&lt;br /&gt;
   set @MF_start, getarg(0);&lt;br /&gt;
   set @MF_end, getarg(1);&lt;br /&gt;
   set @MF_increase, getarg(2,1);&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:getarg: no callfunc or callsub! ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:getarg: no callfunc or callsub!\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried using getarg without having called the function or subroutine. In layman's terms, this means: You used goto F_MyFunction;, instead of callfunc &amp;quot;F_MyFunction&amp;quot;; Or, you used getarg in a piece of normal code, and not in a subroutine or a function.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
First check if the getarg command is inside a real function or subroutine. If this isn't the case, remove it or make the piece of code a real function or subroutine. If the getarg is inside a real function or subroutine, and you are still getting the error, then this means that you have jumped to the function or subroutine in a weird way. Check if you used anything like goto &amp;lt;function or subname&amp;gt;; or if the code in advance of the function/sub isn't properly ended. This last thing can happen when you have some code above the sub or function, which doesn't have a close; or end; at the end.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:getarraysize: illegal scope ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:getarraysize: illegal scope\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This error indicates that you tried to use getarraysize on a variable which isn't an array.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck if the array you want to get the size of, actually is an array, and that you typed the name of the array correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:getarraysize: not a variable ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:getarraysize: not a variable\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The variable you tried to obtain the size of with getarraysize, isn't a variable, or it isn't a legal variable name.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Confirm that the variable does exist, and that it obeys the official rules for names of a variable. For reference, check this link: [[Variables#Other_Important_Info Naming Variables]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 set @temp, getarraysize(.1st_array);&lt;br /&gt;
Correct code:&lt;br /&gt;
 set @temp, getarraysize(.First_array);&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:getelementofarray: illegal scope ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:getelementofarray: illegal scope\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This error indicates that you tried to use getelementofarray on a variable which isn't an array.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck if the array you want to get an element of, actually is an array, and that you typed the name of the array correctly.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:getelementofarray: not a variable ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:getelementofarray: not a variable\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The variable you tried to get an element of with getelementofarray, isn't a variable, or it isn't a legal variable name.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Confirm that the variable does exist, and that it obeys the official rules for names of a variable. For reference, check this link: [[Variables#Other_Important_Info Naming Variables]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 set @temp, getelementofarray(.1st_array,5);&lt;br /&gt;
Correct code:&lt;br /&gt;
 set @temp, getelementofarray(.First_array,5);&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:getvariableofnpc: can't find npc ... ====&lt;br /&gt;
Source Syntax: &amp;lt;br&amp;gt;&lt;br /&gt;
Current: ShowError(&amp;quot;script:getvariableofnpc: can't find npc %s\n&amp;quot;, script_getstr(st,3));&amp;lt;br&amp;gt;&lt;br /&gt;
Until Rev. 10812: ShowError(&amp;quot;script: getvariableofnpc: can't find npc %s\n&amp;quot;, npcname);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried to request the variable of a NPC which doesn't exist.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Check if the NPC you want to get the variable of, indeed exists. Of course, also check if you did not make any typos in the name of the NPC.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:getvariableofnpc: invalid scope (not npc variable) ====&lt;br /&gt;
Source Syntax: &amp;lt;br&amp;gt;&lt;br /&gt;
Current: ShowError(&amp;quot;script:getvariableofnpc: invalid scope (not npc variable)\n&amp;quot;);&amp;lt;br&amp;gt;&lt;br /&gt;
Until Rev. 10812: ShowError(&amp;quot;script: getvariableofnpc: invalid scope %s (not npc variable)\n&amp;quot;, var_name);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried requesting the value of a variable, which isn't a permanent npc variable. (Meaning, only has the prefix '.' and no @.) This command can only be used to access permanent npc variables.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Check if the variable you are trying to request is an actual permanent npc variable. If this is not the cause of the error, then you will have to change the other NPC and make the variable in there a permanent NPC varable. Adjust the variable name of the line getvariableofnpc accordingly of course.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:getvariableofnpc: not a variable ====&lt;br /&gt;
Source Syntax: &amp;lt;br&amp;gt;&lt;br /&gt;
Current: ShowError(&amp;quot;script:getvariableofnpc: not a variable\n&amp;quot;);&amp;lt;br&amp;gt;&lt;br /&gt;
Until Rev. 10812: ShowError(&amp;quot;script: getvariableofnpc: first argument is not a variable name\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The variable you requested does not obey the rules of variable naming. That, or the slight possibility that it doesn't exist.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Check if you wrote the name correctly and if it obeys the rules of variable naming. For reference, check this link: [[Variables#Other_Important_Info Naming Variables]]&amp;lt;br&amp;gt;&lt;br /&gt;
Also check if you did not make the same mistake in the NPC where you want to get the variable of.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 set @temp, getvariableofnpc(.1stVar,&amp;quot;MyFirstNPC&amp;quot;);&lt;br /&gt;
Correct code:&lt;br /&gt;
 set @temp, getvariableofnpc(.FirstVar,&amp;quot;MyFirstNPC&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:goto: not a label ====&lt;br /&gt;
Source Syntax: &amp;lt;br&amp;gt;&lt;br /&gt;
Current: ShowError(&amp;quot;script:goto: not a label\n&amp;quot;);&amp;lt;br&amp;gt;&lt;br /&gt;
Until Rev. 10812: ShowError(&amp;quot;script:goto: not label!\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried to jump to a label which doesn't exist, or isn't defined as a label.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Check the name, to see if it is correct. Also check if the label exists. If this both is the case, and you still get the error, then make sure that the name is different from any variable name, function name, subroutine name and command name.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:guardian: invalid data type for argument #6 (from 1) ====&lt;br /&gt;
Source Syntax:&amp;lt;br&amp;gt;&lt;br /&gt;
Current: ShowError(&amp;quot;script:guardian: invalid data type for argument #6 (from 1)\n&amp;quot;);&amp;lt;br&amp;gt;&lt;br /&gt;
Until Rev. 10812: ShowError(&amp;quot;buildin_guardian: invalid data type for argument #8 (%d).&amp;quot;, data-&amp;gt;type);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Your sixth argument for the guardian command isn't of the correct type. You will have to use one of the following formats:&lt;br /&gt;
 guardian &amp;quot;&amp;lt;map name&amp;gt;&amp;quot;,&amp;lt;x&amp;gt;,&amp;lt;y&amp;gt;,&amp;quot;&amp;lt;name to show&amp;gt;&amp;quot;,&amp;lt;mob id&amp;gt;;&lt;br /&gt;
 guardian &amp;quot;&amp;lt;map name&amp;gt;&amp;quot;,&amp;lt;x&amp;gt;,&amp;lt;y&amp;gt;,&amp;quot;&amp;lt;name to show&amp;gt;&amp;quot;,&amp;lt;mob id&amp;gt;,&amp;quot;&amp;lt;event label&amp;gt;&amp;quot;;&lt;br /&gt;
 guardian &amp;quot;&amp;lt;map name&amp;gt;&amp;quot;,&amp;lt;x&amp;gt;,&amp;lt;y&amp;gt;,&amp;quot;&amp;lt;name to show&amp;gt;&amp;quot;,&amp;lt;mob id&amp;gt;,&amp;lt;guardian index&amp;gt;;&lt;br /&gt;
 guardian &amp;quot;&amp;lt;map name&amp;gt;&amp;quot;,&amp;lt;x&amp;gt;,&amp;lt;y&amp;gt;,&amp;quot;&amp;lt;name to show&amp;gt;&amp;quot;,&amp;lt;mob id&amp;gt;,&amp;quot;&amp;lt;event label&amp;gt;&amp;quot;,&amp;lt;guardian index&amp;gt;;&lt;br /&gt;
In essence, this means, that your event label and/or guardian index is not respectively a string and/or an integer. (The index needs to be an integer, the event label needs to be a string.)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Check if you are using the correct type for the specific argument you want to use. Make sure that the sixth argument really is a string or an integer.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:input: not a variable ====&lt;br /&gt;
Source Syntax: &amp;lt;br&amp;gt;&lt;br /&gt;
Current: ShowError(&amp;quot;script:input: not a variable\n&amp;quot;);&amp;lt;br&amp;gt;&lt;br /&gt;
Until Rev. 10812: ShowError(&amp;quot;script: buildin_input: given argument is not a variable!\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried to use input on a variable which isn't a variable. This means that you are naming your variable wrong, or that you typed the name of a command, label, function or subroutine.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Verify that you are obeying the rules for variable naming, and that the name you use isn't already taken by any command, label, function or subroutine.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:menu: argument #... (from 1) is not a label or label not found. ====&lt;br /&gt;
Source Syntax: &amp;lt;br&amp;gt;&lt;br /&gt;
Current: ShowError(&amp;quot;script:menu: argument #%d (from 1) is not a label or label not found.\n&amp;quot;, i);&amp;lt;br&amp;gt;&lt;br /&gt;
Until Rev. 10812: ShowError(&amp;quot;script:menu: argument #%d (from 1) is not a label or label not found (op=%s).\n&amp;quot;, i, script_op2name(data-&amp;gt;type));&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The target label you provided for a specific menu option, is not a correct label name, or does not exist. Please note that in a menu, the dash (-) is a valid replacement for a label.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Verify that the reported label does exist, and is correctly typed, and that it also obeys the rules for label naming.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:menu: illegal number of arguments (...). ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:menu: illegal number of arguments (%d).\n&amp;quot;, (script_lastdata(st) - 1));&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The amount of arguments in your menu is not even. This makes it an invalid menu, because every menu option needs to be accompanied by a label where it should go to.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Check if you have put your commas between every menu option and label, and check if every menu option is accompanied by a label.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 menu &amp;quot;Option 1&amp;quot;,Label_1,&amp;quot;Option 2&amp;quot;;&lt;br /&gt;
Correct code:&lt;br /&gt;
 menu &amp;quot;Option 1&amp;quot;,Label_1,&amp;quot;Option 2&amp;quot;,Label_2; &lt;br /&gt;
or&lt;br /&gt;
 menu &amp;quot;Option 1&amp;quot;,Label_1,&amp;quot;Option 2&amp;quot;,-;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:menu: unexpected data in label argument ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:menu: unexpected data in label argument\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The target label you provided for a specific menu option, is not a correct label name, or does not exist. Please note that in a menu, the dash (-) is a valid replacement for a label.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Verify that the reported label does exist, and is correctly typed, and that it also obeys the rules for label naming.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:op_1: argument is not a number (op=...) ====&lt;br /&gt;
Source Syntax: &amp;lt;br&amp;gt;&lt;br /&gt;
Current: ShowError(&amp;quot;script:op_1: argument is not a number (op=%s)\n&amp;quot;, script_op2name(op));&amp;lt;br&amp;gt;&lt;br /&gt;
Until Rev. 10812: ShowError(&amp;quot;script:op_1: invalid type of data op:%s data:%s\n&amp;quot;, script_op2name(op), script_op2name(data-&amp;gt;type));&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried to use an arithmetic operation (mathematical operation) that uses a single value, on something else than an integer.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure that what you provided as argument is indeed an integer.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 if(!&amp;quot;Hello&amp;quot;) close;&lt;br /&gt;
Correct code:&lt;br /&gt;
 if(!(MyInput$ == &amp;quot;Hello&amp;quot;)) close;&lt;br /&gt;
or&lt;br /&gt;
 if(!MyVariable) close;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:op_1: unexpected operator ... i1=... ====&lt;br /&gt;
Source Syntax: &amp;lt;br&amp;gt;&lt;br /&gt;
Current: ShowError(&amp;quot;script:op_1: unexpected operator %s i1=%d\n&amp;quot;, script_op2name(op), i1);&amp;lt;br&amp;gt;&lt;br /&gt;
Until Rev. 10812: ShowError(&amp;quot;script:op_1: unexpected operator op:%s\n&amp;quot;, script_op2name(op));&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried using a single variable mathematical operator which isn't valid. For the recap, these are the possible arithmetic operators that only use a single variable:&lt;br /&gt;
 set var, -var; // Make negative. (dash)&lt;br /&gt;
 set var, !var; // Integer inversion. (exclamation mark)&lt;br /&gt;
 set var, ~var; // Bitwise inversion. (tilde)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure that you have provided the right sign for this single argument operator.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:op_2: invalid data for operator ... ====&lt;br /&gt;
Source Syntax: &amp;lt;br&amp;gt;&lt;br /&gt;
Current: ShowError(&amp;quot;script:op_2: invalid data for operator %s\n&amp;quot;, script_op2name(op));&amp;lt;br&amp;gt;&lt;br /&gt;
Until Rev. 10812: ShowError(&amp;quot;script:op_2: invalid type of data op:%s left:%s right:%s\n&amp;quot;, script_op2name(op), script_op2name(left-&amp;gt;type), script_op2name(right-&amp;gt;type));&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You provided either an invalid type of argument (not string and not integer), or you used an operator which isn't ADD, and tried to use it on a string in combination with an integer.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
If you are using ADD (+), then make sure that you did provide either strings, integers or both, and not an invalid type of data. In any other case, make sure that you provided two strings or two integers.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:op_2num: division by zero detected op=... i1=... i2=... ====&lt;br /&gt;
Source Syntax: &amp;lt;br&amp;gt;&lt;br /&gt;
Current: ShowError(&amp;quot;script:op_2num: division by zero detected op=%s i1=%d i2=%d\n&amp;quot;, script_op2name(op), i1, i2);&amp;lt;br&amp;gt;&lt;br /&gt;
Until Rev. 10812: ShowError(&amp;quot;script:op_2num: division by zero detected op:%s\n&amp;quot;, script_op2name(op));&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You used the operator MOD (%) or DIV (/) where you divided the given number by 0. This is impossible to calculate, since any division by 0 is undefined, even in the real world math.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Change the formula in such a way, that it isn't dividing by zero. When using a variable divide-by-number, make sure that this variable can never be 0.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 set @result, my_var%0;&lt;br /&gt;
 set @result, my_var/0;&lt;br /&gt;
Correct code:&lt;br /&gt;
 set @result, my_var%5;&lt;br /&gt;
 set @result, my_var/2;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:op_2num: unexpected number operator ... i1=... i2=... ====&lt;br /&gt;
Source Syntax: &amp;lt;br&amp;gt;&lt;br /&gt;
Current: ShowError(&amp;quot;script:op_2num: unexpected number operator %s i1=%d i2=%d\n&amp;quot;, script_op2name(op), i1, i2);&amp;lt;br&amp;gt;&lt;br /&gt;
Until Rev. 10812: ShowError(&amp;quot;script:op_2num: unexpected number operator op:%s\n&amp;quot;, script_op2name(op));&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried using an operator which isn't supported by the Athena Scripting Engine. The following operators for calculations with 2 integers are allowed:&lt;br /&gt;
* a &amp;amp; b // Bitwise AND (C_AND)&lt;br /&gt;
* a | b // Bitwise OR (C_OR)&lt;br /&gt;
* a ^ b // Bitwise XOR (Exclusive OR or C_XOR)&lt;br /&gt;
* a &amp;amp;&amp;amp; b // Logical AND (C_LAND)&lt;br /&gt;
* a || b // Logical OR (C_LOR)&lt;br /&gt;
* a == b // Is equal to (C_EQ)&lt;br /&gt;
* a != b // Is unqual to (C_NE)&lt;br /&gt;
* a &amp;gt; b // Is greater than (C_GT)&lt;br /&gt;
* a &amp;gt;= b // Is greater than or equal to (C_GE)&lt;br /&gt;
* a &amp;lt; b // Is smaller than (C_LT)&lt;br /&gt;
* a &amp;lt;= b // Is smaller than or equal to (C_LE)&lt;br /&gt;
* a &amp;gt;&amp;gt; b // Bitshift right (C_R_SHIFT)&lt;br /&gt;
* a &amp;lt;&amp;lt; b // Bitshift left (C_L_SHIFT)&lt;br /&gt;
* a / b // Division (C_DIV)&lt;br /&gt;
* a % b // Modulus (C_MOD)&lt;br /&gt;
* a + b // Addition (C_ADD)&lt;br /&gt;
* a - b // Substraction (C_SUB)&lt;br /&gt;
* a * b // Multiplication (C_MUL)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Check which operator of the ones above you wanted to use, and make sure you use that one.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:op2_str: unexpected string operator ... ====&lt;br /&gt;
Source Syntax: &amp;lt;br&amp;gt;&lt;br /&gt;
Current: ShowError(&amp;quot;script:op2_str: unexpected string operator %s\n&amp;quot;, script_op2name(op));&amp;lt;br&amp;gt;&lt;br /&gt;
Until Rev. 10812: ShowError(&amp;quot;script:op2_str: unexpected string operator op:%s\n&amp;quot;, script_op2name(op));&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried using a string operator on two strings, which doesn't exist. The following Binary String Operators are allowed:&lt;br /&gt;
* a$ == b$ // Is equal to (C_EQ)&lt;br /&gt;
* a$ != b$ // Is not equal to (C_NE)&lt;br /&gt;
* a$ &amp;gt; b$ // Is greater than (C_GT)&lt;br /&gt;
* a$ &amp;gt;= b$ // Is greater than or equal to (C_GE)&lt;br /&gt;
* a$ &amp;lt; b$ // Is smaller than (C_LT)&lt;br /&gt;
* a$ &amp;lt;= b$ // Is smaller than or equal to (C_LE)&lt;br /&gt;
* a$ + b$ // Combine strings (C_ADD)&lt;br /&gt;
Please note: Binary in Binary String Operators does not mean bitwise, it simply means it uses two arguments.&lt;br /&gt;
Also note: Only the ADD operator returns a string. The other operators return an integer.&lt;br /&gt;
Third note, the operators with smaller than and bigger than in it, well, that isn't the actual way it works. You will have to dive into a manual on strcmp to read what it does exactly.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Check which operator of the ones above you wanted to use, and make sure you use that one.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:op_3: invalid data for the ternary operator test ====&lt;br /&gt;
Source Syntax: &amp;lt;br&amp;gt;&lt;br /&gt;
Current: ShowError(&amp;quot;script:op_3: invalid data for the ternary operator test\n&amp;quot;);&amp;lt;br&amp;gt;&lt;br /&gt;
Until Rev. 10812: ShowError(&amp;quot;script:op_3: invalid type of data op:%s data:%s\n&amp;quot;, script_op2name(op), script_op2name(data-&amp;gt;type));&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
There is one single Ternary Operator which you can use in the Athena Scripting Engine. It's the compressed if-else statement. This is the format:&lt;br /&gt;
 &amp;lt;condition&amp;gt; ? &amp;lt;expression when true&amp;gt; : &amp;lt;expression when false&amp;gt;&lt;br /&gt;
The condition is using no operators, Unary operators (1 argument), or any of the comparison Binary operators (2 arguments). Whatever operator you use the arguments provided for that operator, must be both a string or both an integer in the case of binary operators, or a string or an integer in any of the other operator types. When you fail to do this, for example, when comparing a string to an integer, or when you use something else besides a string or an integer, you will get this error.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure that whatever you put in the condition part of the code, is of the valid type integer or string. Also, when using more than one argument, make sure that for each operator, they match up in type.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 mes (MyString$ &amp;gt; MyInt) ? &amp;quot;You win&amp;quot; : &amp;quot;You lose&amp;quot;;&lt;br /&gt;
Correct code:&lt;br /&gt;
 mes (YourInt &amp;gt; MyInt) ? &amp;quot;You win&amp;quot; : &amp;quot;You lose&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:query_sql: not a variable ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:query_sql: not a variable\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried to pass a variable for storing results for your SQL query. The variable isn't a variable though.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck if the variables at the end of your query_sql statement are indeed variables. Check their spelling and if they aren't commands or labels or something likewise.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 query_sql(&amp;quot;SELECT `name` FROM `char` WHERE `char_id` = '&amp;quot;+.@char_id+&amp;quot;'&amp;quot;, .@$result);&lt;br /&gt;
Correct code:&lt;br /&gt;
 query_sql(&amp;quot;SELECT `name` FROM `char` WHERE `char_id` = '&amp;quot;+.@char_id+&amp;quot;'&amp;quot;, .@result$);&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:run_script_main: unexpected stack position stack.sp(...) != default(...) ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:run_script_main: unexpected stack position stack.sp(%d) != default(%d)\n&amp;quot;, stack-&amp;gt;sp, stack-&amp;gt;defsp);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This error means that your stack got corrupted. This is not something you can do anything about.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
First, restart your server, and see if the error happens again. If it does occur again, then you should contact a [[Staff|developer]], because it is likely that someone made an error in the script engine then.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:set: no player attached for player variable '...' ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:set: no player attached for player variable '%s'\n&amp;quot;, name); &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Server variables are NPC variables (.) and global variables ($). In your script you used one of the non-server variables, which need a player to be attached to the script. However, there is no player attached to the script.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck if the variable is supposed to be a non-server variable. If it is supposed to be a non-server variable, make sure that there is a player attached to the script.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:set: not a variable ====&lt;br /&gt;
Source Syntax: &amp;lt;br&amp;gt;&lt;br /&gt;
Current: ShowError(&amp;quot;script:set: not a variable\n&amp;quot;);&amp;lt;br&amp;gt;&lt;br /&gt;
Until Rev. 10812: ShowError(&amp;quot;script: buildin_set: not name\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried to use set on something which isn't a variable. That, or you failed to provide any variable, or a variable who's name is already used by a label, function, sub-function or script command.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck if you provided a variable to be set, as well as the variable having the correct naming requirements.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 set ,5;&lt;br /&gt;
Correct code:&lt;br /&gt;
 set @temp, 5;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:setarray: illegal scope ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:setarray: illegal scope\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This error indicates that you tried to use setarray on a variable which isn't an array.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck if the array you want to set actually is an array, and that you typed the name of the array correctly.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:setarray: not a variable ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:setarray: not a variable\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The variable you tried to set with setarray, isn't a variable, or it isn't a legal variable name.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Confirm that the variable does exist, and that it obeys the official rules for names of a variable. For reference, check this link: [[Variables#Other_Important_Info Naming Variables]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 setarray .1st_array[1],3,6,5;&lt;br /&gt;
Correct code:&lt;br /&gt;
 setarray .First_array[1],3,6,5;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:setd: no player attached for player variable '...' ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:setd: no player attached for player variable '%s'\n&amp;quot;, buffer); &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Server variables are NPC variables (.) and global variables ($). In your script you used one of the non-server variables, which need a player to be attached to the script. However, there is no player attached to the script.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck if the variable is supposed to be a non-server variable. If it is supposed to be a non-server variable, make sure that there is a player attached to the script.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:setmobdata: unknown data identifier ... ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:setmobdata: unknown data identifier %d\n&amp;quot;, type);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You wanted to change a part of a mob's data, however, that part does not exist. You can set up to 27 different parameters when it comes to mob data, of which the first 21 are explained here: [http://djyhnzo.freepgs.com/index.php?c=setmobdata setmobdata]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure that whatever you are trying to set, is something that exists. You should only use this line when you know what you are doing, so if you are unsure on what is wrong, simply erase the line.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:setnpcdisplay: expected a string or number ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:setnpcdisplay: expected a string or number\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You did not provide a correct new name or view id for the NPC.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The format of setnpcdisplay allows you to change the name, the view ID or both of the NPC. If you change the name, provide the name before the view ID, if you are changing that as well. Also, recheck that the new view ID is a number and the new name is a string, if these are being altered.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 setnpcdisplay(strnpcinfo(0), 113, &amp;quot;Announcer&amp;quot;);&lt;br /&gt;
Correct code:&lt;br /&gt;
 setnpcdisplay(strnpcinfo(0), &amp;quot;Announcer&amp;quot;, 113);&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:unitattack: unsupported source unit type ... ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:unitattack: unsupported source unit type %d\n&amp;quot;, unit_bl-&amp;gt;type);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You can only use the unitattack command on players, monsters or pets. You tried using it on a different type of unit.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck the unit id which you provided, if it is the UID of a player, monster or pet. These three types have a terminal UID, which gets erased when the monster dies, the pet walks away, or when the player logs out. To make sure that your error isn't caused by this as well, put some safeguards in place, like checking if the player is still online.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:warpportal: npc is needed ====&lt;br /&gt;
Source Syntax: &amp;lt;br&amp;gt;&lt;br /&gt;
Current: ShowError(&amp;quot;script:warpportal: npc is needed\n&amp;quot;);&amp;lt;br&amp;gt;&lt;br /&gt;
Until Rev. 10812: ShowError(&amp;quot;script:warpportal: npc is needed&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Warpportal is a command that can be used from inside a script to spawn a warp portal. This works different from the script type warp portal, which is permanent. One of the requirements for warpportal is that it needs to be executed from within a normal NPC. In your case, this is exactly what went wrong.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure that your warpportal line is within a normal NPC, and not defined as a stand-alone warpportal, nor that it is inside a function, subroutine, itemscript or monsterscript.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script_rid2sd: fatal error ! player not attached! ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script_rid2sd: fatal error ! player not attached!\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
One of the commands you were using in your script, requires the assistance of a player. A wide variety of commands as well as certain variables, require the player to be attached to the script. This is what went wrong in your script. For example, you tried to access or set a player variable with no player attached to the script, or a command like addtimer which requires the attachment of a player.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
In the case of a variable, make sure that either a player is attached, or in the cases that this is impossible, that you are using a NPC or global variable.&amp;lt;br&amp;gt;&lt;br /&gt;
In the case of commands, also make sure that the player is attached.&amp;lt;br&amp;gt;&lt;br /&gt;
If by default, a player should be attached, then the most likely option is that the player logged off. So, make some safeguards against this, by using for example the isloggedin command, to check if the player is still logged in.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script_save_mapreg: Unable to lock-open file [...] ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script_save_mapreg: Unable to lock-open file [%s]\n&amp;quot;,mapreg_txt);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Your mapserver tried to save the global variables to its file (save/mapreg.txt). Unfortunately, it was unable to do this, because the file is already opened by another program in the lock-mode.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck if no other program (like a text-editor) is using the file, and make sure that when no other program is using it, that the file has been closed properly.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== startnpctimer: invalid argument type #1 (needs be int or string)). ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;startnpctimer: invalid argument type #1 (needs be int or string)).\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Startnpctimer has several formats. The different kinds of formats allow you to either attach it to another NPC, or to let it start at a certain value. The value or the NPC name you provided is incorrect, the mapserver does not recognize it as a string or integer.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck if you are giving the correct argument to the command, make sure it is an integer or a string. In the case of using a variable, make sure that the variable contains correct data.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== stopnpctimer: invalid argument type #1 (needs be int or string)). ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;stopnpctimer: invalid argument type #1 (needs be int or string)).\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Stopnpctimer has several formats. The different kinds of formats allow you to either attach it to another NPC, or to let it start at a certain value. The value or the NPC name you provided is incorrect, the mapserver does not recognize it as a string or integer.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck if you are giving the correct argument to the command, make sure it is an integer or a string. In the case of using a variable, make sure that the variable contains correct data.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== unget_com can back only 1 data ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;unget_com can back only 1 data\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
As most code that is inside the scripting engine's main part, this error seems unlikely to be caused by your scripts. What exactly causes it to trigger is unknown to me.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Your best chance is to get support in the Scripting Support Forum, or to contact one of the [[developers]].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== unknown command : ... @ ... ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;unknown command : %d @ %d\n&amp;quot;,c,pos);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This error indicates a source problem. It means, that the script engine generated a byte instruction out of some part of your script, which is undefined in the runtime part of the engine.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Report it to core developers, together with your script, to get the source issue fixed.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== wrong item ID : countitem(...) ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;wrong item ID : countitem(%i)\n&amp;quot;, nameid);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You provided an invalid item id for countitem. This error is triggered when you provide an item id lower than 500.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Check if you didn't enter a faulty item id, and correct it when needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 if(countitem(400) &amp;lt; 1) close;&lt;br /&gt;
Correct code:&lt;br /&gt;
 if(countitem(500) &amp;lt; 1) close;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== wrong item ID : countitem2(...) ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;wrong item ID : countitem2(%i)\n&amp;quot;, nameid);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You provided an invalid item id for countitem. This error is triggered when you provide an item id lower than 500.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Check if you didn't enter a faulty item id, and correct it when needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 if(countitem2(400,1,0,0,0,0,0,0) &amp;lt; 1) close;&lt;br /&gt;
Correct code:&lt;br /&gt;
 if(countitem2(500,1,0,0,0,0,0,0) &amp;lt; 1) close;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== wrong item ID : equipitem(...) ====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;wrong item ID : equipitem(%i)\n&amp;quot;,nameid);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried to equip an item with equipitem, which doesn't exist.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Check if you entered the correct item id, and also check if it exists in item_db.conf or item_db2.conf.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Fatal Errors ===&lt;br /&gt;
All fatal errors are listed in this section.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==== npc_addeventtimer: out of memory ! ====&lt;br /&gt;
Source Syntax: ShowFatalError(&amp;quot;npc_addeventtimer: out of memory !\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Your script tried to start another eventtimer. Unfortunately your server's computer has run out of memory, so it cannot create this new timer.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Try freeing up more memory. However, if the problem still occurs, then the real cause might be in faulty scripting. Check the script if it loops a lot with timers located inside the loops. Try to minimize the amount of loops or even better, avoid them when using timer script commands.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== npc_event_export: label name error ! ====&lt;br /&gt;
Source Syntax: ShowFatalError(&amp;quot;npc_event_export: label name error !\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This error occurs when you have a npc event label with an invalid size of the name. NPC event labels always start with On.&lt;br /&gt;
The size of the name of the event label is each character after On and before the ':'. When this amount of characters is 0 (in the case of &amp;quot;On:&amp;quot;) or bigger than the constant NameLength, which is 23 or 24 (in the case of &amp;quot;OnAbcdefghijklmnopqrstuvwxyz:&amp;quot;), your mapserver will be unable to create the npc event label, and therefor crash.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Rename the event labels that are bugged. Make sure that they actually have a name between the On and &amp;quot;:&amp;quot; part, and that this name does not exceed 23 characters.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== npc_event_export: out of memory ! ====&lt;br /&gt;
Source Syntax: ShowFatalError(&amp;quot;npc_event_export: out of memory !\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This error occurs when the server does not have enough free memory to allocate a new npc event label. (These are the labels that start with On.)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Try to free up more memory, or add new memory to your system. If this does not solve the problem, then you will have to consider to use less npc event labels. This can be accomplished by either erasing NPCs that contain them, or by optimizing your npc event labels.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== npc_timerevent_import: out of memory ! ====&lt;br /&gt;
Source Syntax: ShowFatalError(&amp;quot;npc_timerevent_import: out of memory !\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This error occurs when the server does not have enough free memory left to allocate space for an OnTimer: label.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Free up more memory, or remove OnTimer labels that you do not use.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Parsing Errors ===&lt;br /&gt;
All parsing errors are listed in this section.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==== expect ';' or '{' at function syntax ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;expect ';' or '{' at function syntax&amp;quot;,p); &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt; Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
An in-script function was used or declared in an invalid manner.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt; Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried to write or use an in-script function. The normal format for this is one of the following two:&lt;br /&gt;
 function test; // Calls upon in-script function test.&lt;br /&gt;
 function	test	{ // Declaration of a function including needed code.&lt;br /&gt;
    // Function code goes here.&lt;br /&gt;
 }&lt;br /&gt;
In your case, the script parser encountered something else than the allowed { or ; after the function's name. Recheck your in-script function, and make sure it either has a ; or a { at the end of the line.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== need '(' ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;need '('&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt; Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
In your script, there is a function that you are trying to call. This function requires it's arguments to be between round brackets. Your script is lacking at least the left one ('('), and most likely both.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt; Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Search inside your script for the function call displayed by the error. Fix it by making sure there are parentheses around the arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt; Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 ...&lt;br /&gt;
 set .var, SF_DummyFunction 5, 7;&lt;br /&gt;
 ...&lt;br /&gt;
Correct code is:&lt;br /&gt;
 ...&lt;br /&gt;
 set .var, SF_DummyFunction(5, 7);&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== not found '{' ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;not found '{'&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The header of your script or function is missing a '&amp;lt;b&amp;gt;{&amp;lt;/b&amp;gt;'. This left curly bracket specifies the start of the body of the script, and must be on the same line as your header.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
If you forgot to place a { at all, then place it at the end of the header line. If you placed the opening curly bracket at the next line, then move it until it is at the same line as the header.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 prontera,200,200,4&amp;lt;tab&amp;gt;script&amp;lt;tab&amp;gt;Dummy&amp;lt;tab&amp;gt;46,&lt;br /&gt;
 {&lt;br /&gt;
    mes &amp;quot;hi&amp;quot;;&lt;br /&gt;
    close;&lt;br /&gt;
 }&lt;br /&gt;
It should be:&lt;br /&gt;
 prontera,200,200,4&amp;lt;tab&amp;gt;script&amp;lt;tab&amp;gt;Dummy&amp;lt;tab&amp;gt;46,{&lt;br /&gt;
    mes &amp;quot;hi&amp;quot;;&lt;br /&gt;
    close;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_callfunc: callsub has no arguments, please review it's definition ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_callfunc: callsub has no arguments, please review it's definition&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
In the words of one of the devs: &amp;quot;Someone fucked up the script engine.&amp;quot;&lt;br /&gt;
This means, that if you get this error, which is highly unlikely, that you probably did nothing wrong.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
When you encounter this problem though, please report it to the core developers. Tell them what you did that caused it (i.e. show the script, tell them what you did with the script, just loading or using it or whatever, and of course, when the bug happens).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_callfunc: DEBUG last curly is not an argument list ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_callfunc: DEBUG last curly is not an argument list&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The parsing of function parameter lists is bugged in the script engine. (In essence, you should never get this error.)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
There is no known solution to this. What is advised by the Developers themselves is to report this to the devs. When doing this, also provide your script that is causing this error.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_callfunc: expected ')' to close argument list ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_callfunc: expected ')' to close argument list&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This error occurs when you are calling a function or something likewise, which uses round brackets around the arguments, but you forgot to enter the closing rounding bracket.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Simply go to the specified bugged function call, and count if the amount of left round brackets match the amount of right round brackets. Change them when needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong usage:&lt;br /&gt;
 ...&lt;br /&gt;
 set @temp, SF_DummyFunction(5, 7;&lt;br /&gt;
 ...&lt;br /&gt;
As you can see, 1 (, but no ). Correct line would be:&lt;br /&gt;
 set @temp, SF_DummyFunction(5, 7);&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_callfunc: not enough arguments, expected ',' ====&lt;br /&gt;
Source Syntax: disp_error_message2(&amp;quot;parse_callfunc: not enough arguments, expected ','&amp;quot;, p, script_config.warn_func_mismatch_paramnum);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
When calling upon a predefined function, you need to meet the exact amount of arguments. In this case, you did not have enough arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure the bugged function has the right amount of arguments. Look at it's template, and see if the amount of arguments match.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_curly_close: unexpected string ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_curly_close: unexpected string&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We are not 100% sure, but this might happen if you place a normal string after you put the closing curly of the NPC. Again, not 100% sure, but the developers say that this is one of those rare cases that shouldn't occur. However, when it does occur, please use the scripting support forum if you cannot figure out how to fix it.&lt;br /&gt;
Another possibility as a cause, is that you have too many right curly brackets ('}').&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The probable solution is to erase the string or right curly bracket that the mapserver shows you. Or, recount your left and right curly brackets, and make sure they are all in the right spot.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_expr: unexpected char ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_expr: unexpected char&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This error occurs when the server detects a character in your script that shouldn't be there. This can happen when you have misplaced one of the following characters: ')', ';', ':', '[', ']' or '}'.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Either move or remove the wrong placed character, or fix the text/arguments that are forgotten in front of these characters.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Example of what might cause this error:&lt;br /&gt;
 ...&lt;br /&gt;
 set .@[0], 5;&lt;br /&gt;
 ...&lt;br /&gt;
What the line can be:&lt;br /&gt;
 set .@temp[0], 5;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_line: expect command, missing function name or calling undeclared function ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_line: expect command, missing function name or calling undeclared function&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This is probably happening when you are trying to call to a function that simply does not exist.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure the function you are trying to reach, actually exists. If it exists, make sure you did not make any typos. And if it didn't exist, create the function, or remove the line.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_line: need ')' ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_line: need ')'&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This error is most commonly seen when your if, for or while statement lacks a closing round bracket.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Check your for, if or while statement, and make sure the amount of opening round brackets match the amount of closing round brackets. Also, with if and while, make sure that the entire condition that you want to check, is closed in by at least one ( and one ). Extra brackets are not a sin, too few are.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 if(i &amp;gt; 10 end;&lt;br /&gt;
This should be:&lt;br /&gt;
 if(i &amp;gt; 10) end;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_line: need ';' ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_line: need ';'&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
One of the most common errors. There are actually two versions of this one. One that only occurs within the first line of a for-statement, the other one being, simply forgetting a ';' at the end of the line.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
In case of a for-statement going bad, please make sure it upholds this format: for(&amp;lt;initiation&amp;gt;;&amp;lt;condition&amp;gt;;&amp;lt;iteration&amp;gt;).&lt;br /&gt;
In case of anything else, then the error is 99 out of 100 times, not on the line the script parser tells you. It is often a forgotten ; in the line above. Make sure this is the case, and add it there.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 set @temp, 5&lt;br /&gt;
 close;&lt;br /&gt;
Correct code should be:&lt;br /&gt;
 set @temp, 5;&lt;br /&gt;
 close;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_simpleexpr: unexpected character ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_simpleexpr: unexpected character&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The script engine was expecting a word (the name of a variable, label, function or something like that) and found something else.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure that you have typed the right word, and did not use invalid characters.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Probably example of wrong code:&lt;br /&gt;
 mes &amp;quot;2 + 2 equals &amp;quot;+ ( + 2) +&amp;quot;.&amp;quot;;&lt;br /&gt;
 mes &amp;quot;I know math!&amp;quot;;&lt;br /&gt;
Correct code:&lt;br /&gt;
 mes &amp;quot;2 + 2 equals &amp;quot;+ (2 + 2) +&amp;quot;.&amp;quot;;&lt;br /&gt;
 mes &amp;quot;I know math!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_simpleexpr: unexpected eof @ string ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_simpleexpr: unexpected eof @ string&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Your string is not properly closed. In fact, there is nothing behind the string. This can be caused when you are editing your file, and save your progress while you were typing a string, and then ran this script.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Close the string like it should be closed (with a &amp;quot;), or remove the line all together if it shouldn't be there. Also close up the script all together, because eof means End of File. So even if you just fix this bug, your NPC is still bugged.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 ...&lt;br /&gt;
 mes &amp;quot;Bye&lt;br /&gt;
 &amp;lt;file ends&amp;gt;&lt;br /&gt;
Right code:&lt;br /&gt;
 ...&lt;br /&gt;
 mes &amp;quot;Bye&amp;quot;;&lt;br /&gt;
 close;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_simpleexpr: unexpected expr end ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_simpleexpr: unexpected expr end&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This can happen in a variety of cases. They call come down to not closing a string, command or condition correct.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure that your string or command is properly closed. If this does not apply, make sure that your condition is set up correctly.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 set @total, 5 + ;&lt;br /&gt;
Correct code:&lt;br /&gt;
 set @total, 5;&lt;br /&gt;
or&lt;br /&gt;
 set @total, 5 + 1;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_simpleexpr: unexpected newline @ string ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_simpleexpr: unexpected newline @ string&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You either forgot to close your string, or pressed return, and typed the rest on a new line. Unfortunately, a string needs to be closed on the same line.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Properly close the string, or divide it in multiple parts using: &amp;quot;string part 1&amp;quot; + &amp;quot;string part 2&amp;quot; etc.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 mes &amp;quot;Hello there.&lt;br /&gt;
      My name is Nienke.&amp;quot;;&lt;br /&gt;
Corrected code:&lt;br /&gt;
 mes &amp;quot;Hello there. My name is Nienke.&amp;quot;;&lt;br /&gt;
or&lt;br /&gt;
 mes &amp;quot;Hello there.&amp;quot; +&lt;br /&gt;
     &amp;quot;My name is Nienke.&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_simpleexpr: unmatch ')' ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_simpleexpr: unmatch ')'&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The amount of opening round brackets does not match the amount of closing round brackets. Again, this can happen in a wide variety of cases.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Count the amount of brackets that you have. Make sure each opening bracket has a closing bracket.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 set @total, 5 * (6 + (5 * 5);&lt;br /&gt;
Correct code:&lt;br /&gt;
 set @total, 5 * (6 + (5 * 5));&lt;br /&gt;
or&lt;br /&gt;
 set @total, 5 * (6 + 5 * 5);&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_simpleexpr: unmatch ']' ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_simpleexpr: unmatch ']'&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This error occurs when you forgot to close off the element part of an array.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
To fix this, you need to ask yourself first: Did I want an array at this point? If not, remove the opening square bracket. If you did, make sure the amount of opening square brackets match the amount of closing square brackets.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 set @temp[0, 5;&lt;br /&gt;
Correct code:&lt;br /&gt;
 set @temp[0], 5;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_subexpr: need ':' ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_subexpr: need ':'&amp;quot;, p-1);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This errors occurs, when you use a compact if statement, and forgot the : to separate the true and false statements. A compact if statement looks like this:&lt;br /&gt;
 &amp;lt;condition&amp;gt; ? &amp;lt;expression when true&amp;gt; : &amp;lt;expression when false&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Confirm you wanted to use the compact if statement. If this is the case, find where you forgot to add the ':'. If it isn't the case, make sure that the question mark triggering this statement is not there, or erase the entire line.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 mes &amp;quot;You are part of team &amp;quot; + ( (a == 1) ? &amp;quot;Blue&amp;quot;&amp;quot;Red&amp;quot; );&lt;br /&gt;
Correct code:&lt;br /&gt;
 mes &amp;quot;You are part of team &amp;quot; + ( (a == 1) ? &amp;quot;Blue&amp;quot; : &amp;quot;Red&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_syntax: 'case' label not integer ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_syntax: 'case' label not integer&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The format for a case label is: &amp;quot;case #:&amp;quot;, where # must be an integer value. If this is not the case, the mapserver will throw this error at you. The Athena Scripting Language does '''NOT''' support &amp;quot;case &amp;lt;string&amp;gt;:&amp;quot; and possibly not even &amp;quot;case &amp;lt;character&amp;gt;:&amp;quot;.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Change whatever you had between the case and ':' to a real integer value instead. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 switch(@a$) {&lt;br /&gt;
    case &amp;quot;Hi&amp;quot;:&lt;br /&gt;
Correct code:&lt;br /&gt;
 switch(@a) {&lt;br /&gt;
    case 1:&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_syntax: dup 'case' ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_syntax: dup 'case'&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Inside the same switch, one 'case label' exists more than one time. This error is like the normal duplicate label error. Two of the same named labels exists in the same piece of code, in this case, the switch.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Remove the duplicated case label, and when needed, merge their both codes.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 case 1:&lt;br /&gt;
    set @a, 5;&lt;br /&gt;
    break;&lt;br /&gt;
 case 1:&lt;br /&gt;
    set @b, 5;&lt;br /&gt;
    break;&lt;br /&gt;
Correct code:&lt;br /&gt;
 case 1:&lt;br /&gt;
    set @a, 5;&lt;br /&gt;
    set @b, 5;&lt;br /&gt;
    break;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_syntax: dup 'default' ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_syntax: dup 'default'&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Same cause as the error right above this one. There is a duplicated label named default within the same switch.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Remove the second default label, and when needed, merge the code.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 default:&lt;br /&gt;
    set @a, 5;&lt;br /&gt;
    break;&lt;br /&gt;
 default:&lt;br /&gt;
    set @b, 5;&lt;br /&gt;
    break;&lt;br /&gt;
Correct code:&lt;br /&gt;
 default:&lt;br /&gt;
    set @a, 5;&lt;br /&gt;
    set @b, 5;&lt;br /&gt;
    break;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_syntax: expect ':' ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_syntax: expect ':'&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The case label, inside the switch command, is missing the ':'. This is exactly the same as with normal variables.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Simply add the colon after the case label. Or, when the case label is not needed, simply remove it.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 case 1&lt;br /&gt;
    set @a, 5;&lt;br /&gt;
    break;&lt;br /&gt;
Correct code:&lt;br /&gt;
 case 1:&lt;br /&gt;
    set @a, 5;&lt;br /&gt;
    break;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_syntax: expect space ' ' ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_syntax: expect space ' '&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Another case label error. The format for a case label is: &amp;quot;case #:&amp;quot;, where # is an integer value. The format dictates that there needs to be a space between the word &amp;quot;case&amp;quot; and the integer value. This space is missing in your script.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Add the space between &amp;quot;case&amp;quot; and the number.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 case1:&lt;br /&gt;
    set @a, 5;&lt;br /&gt;
    break;&lt;br /&gt;
Correct code:&lt;br /&gt;
 case 1:&lt;br /&gt;
    set @a, 5;&lt;br /&gt;
    break;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_syntax: need '(' ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_syntax: need '('&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Your for-line is not following the default format. The format is: for(&amp;lt;initiation&amp;gt;;&amp;lt;condition&amp;gt;;&amp;lt;iteration);. You are missing the '('.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Remove the for-statement all together, if it is not supposed to be there, or add the missing left round bracket.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 for set @a,5; @a &amp;lt; 10; set @a, @a + 1) {&lt;br /&gt;
Correct code:&lt;br /&gt;
 for(set @a,5; @a &amp;lt; 10; set @a, @a + 1) {&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_syntax: need ':' ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_syntax: need ':'&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Missing the ':' behind the switch label named &amp;quot;default&amp;quot;.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Add the missing colon directly after default. (Or remove the default label all together.)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 default&lt;br /&gt;
    break;&lt;br /&gt;
Correct code:&lt;br /&gt;
 default:&lt;br /&gt;
    break;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_syntax: need ';' ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_syntax: need ';'&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
One of the most common errors. There are actually two versions of this one. One that only occurs within the first line of a for-statement, the other one being, simply forgetting a ';' at the end of the line.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
In case of a for-statement going bad, please make sure it upholds this format: for(&amp;lt;initiation&amp;gt;;&amp;lt;condition&amp;gt;;&amp;lt;iteration&amp;gt;).&lt;br /&gt;
In case of anything else, then the error is 99 out of 100 times, not on the line the script parser tells you. It is often a forgotten ; in the line above. Make sure this is the case, and add it there.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 set @temp, 5&lt;br /&gt;
 close;&lt;br /&gt;
Correct code should be:&lt;br /&gt;
 set @temp, 5;&lt;br /&gt;
 close;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_syntax: need 'while' ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_syntax: need 'while'&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Your Do-command is missing the while-command after the closing '}'. Format for this command is: do { &amp;lt;statements&amp;gt; } while (&amp;lt;condition);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Add the missing while-command and when needed, the condition.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 do {&lt;br /&gt;
    set @a, @a + 1;&lt;br /&gt;
 }&lt;br /&gt;
Correct code:&lt;br /&gt;
 do {&lt;br /&gt;
    set @a, @a + 1;&lt;br /&gt;
 } while (@a &amp;lt; 100);&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_syntax: unexpected 'continue' ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_syntax: unexpected 'continue'&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Continue can be only used within looping commands, like for, do .. while and while. It simply means, ignore the rest, start a new round. Your continue-command however, is placed outside one of these looping commands.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Move continue; to inside the looping command you wanted it to use for. If this is not what you wanted, then erase the line.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 for(set @i, 0; @i &amp;lt; 10; set @i, @i + 1) {&lt;br /&gt;
   if(@My_Numbers[@i] != $Winning_Numbers[@i]) {&lt;br /&gt;
      set @i, @i + 1;&lt;br /&gt;
      set Points, Points - 1;&lt;br /&gt;
   }&lt;br /&gt;
   set Points, Points + 1;&lt;br /&gt;
 }&lt;br /&gt;
 continue;&lt;br /&gt;
Correct code:&lt;br /&gt;
 for(set @i, 0; @i &amp;lt; 10; set @i, @i + 1) {&lt;br /&gt;
   if(@My_Numbers[@i] != $Winning_Numbers[@i]) continue;&lt;br /&gt;
   set Points, Points + 1;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_syntax: unexpected 'default' ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_syntax: unexpected 'default'&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This happens when you place the &amp;quot;default:&amp;quot; label outside of a switch.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Erase the default label or move it inside the switch you wanted to use it for.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The example in the error right above this one can be applied for this one as well.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_syntax: unexpected 'break' ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_syntax: unexpected 'break'&amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The break; command is only supposed to be used in looping functions or functions that use curly brackets (like if or switch). It will make you jump outside of the statement. In this case, this break; is not located in such a function.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Remove the break; or replace it by an end; if you want to end the script.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 -&amp;lt;tab&amp;gt;script&amp;lt;tab&amp;gt;Dummy&amp;lt;tab&amp;gt;-1,{&lt;br /&gt;
    OnInit:&lt;br /&gt;
       set $Blah, 14;&lt;br /&gt;
       break;&lt;br /&gt;
    ....&lt;br /&gt;
Correct code:&lt;br /&gt;
 -&amp;lt;tab&amp;gt;script&amp;lt;tab&amp;gt;Dummy&amp;lt;tab&amp;gt;-1,{&lt;br /&gt;
    OnInit:&lt;br /&gt;
       set $Blah, 14;&lt;br /&gt;
       end;&lt;br /&gt;
    ....&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_syntax: unexpected 'case' ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_syntax: unexpected 'case' &amp;quot;,p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This happens when you place the &amp;quot;case #:&amp;quot; label outside of a switch.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Erase the case label or move it inside the switch you wanted to use it for.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The example in the third error above this one can be applied for this one as well.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== parse_syntax:function: function name is missing or invalid ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;parse_syntax:function: function name is missing or invalid&amp;quot;, p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The name you are using in the function line is not valid, or is there not at all.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Use a correct name for the function. The same rules abide as for labels and variable names.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 function 1stFunction;&lt;br /&gt;
 function;&lt;br /&gt;
Correct code for both:&lt;br /&gt;
 function SF_Function01;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== script:add_word: invalid word. A word consists of underscores and/or alphanumeric characters, and valid variable prefixes/postfixes. ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;script:add_word: invalid word. A word consists of underscores and/or alphanumeric characters, and valid variable prefixes/postfixes.&amp;quot;, p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This happens when a word does not meet the standard format. Like the error says: A word consists of underscores and/or alphanumeric characters, and valid variable prefixes/postfixes.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Change the name to meet the requirements.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== set_label: dup label ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;set_label: dup label &amp;quot;,script_pos);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This label already exists. It is not allowed to have the same label more than once, within the same NPC, itemscript, monsterscript, function or sub.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Remove or rename one of the two labels to fix this. Also change the code depending on the label that is going to be changed or removed.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 ...&lt;br /&gt;
 goto Hello;&lt;br /&gt;
 ...&lt;br /&gt;
 Hello:&lt;br /&gt;
    mes &amp;quot;Hello&amp;quot;;&lt;br /&gt;
    close;&lt;br /&gt;
 Hello:&lt;br /&gt;
    mes &amp;quot;Hi&amp;quot;;&lt;br /&gt;
    close;&lt;br /&gt;
Correct code:&lt;br /&gt;
 ...&lt;br /&gt;
 goto Hello;&lt;br /&gt;
 ...&lt;br /&gt;
 Hello:&lt;br /&gt;
    mes &amp;quot;Hello&amp;quot;;&lt;br /&gt;
    close;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== set_label: invalid label name ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;set_label: invalid label name&amp;quot;,script_pos);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You are trying to use the name of a reserved variable or constant as a label name. This is not allowed.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Change the label name into something else.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 goto BaseLevel;&lt;br /&gt;
 ...&lt;br /&gt;
 BaseLevel:&lt;br /&gt;
Correct code:&lt;br /&gt;
 goto L_BaseLevel;&lt;br /&gt;
 ...&lt;br /&gt;
 L_BaseLevel:&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== unexpected end of script ====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;unexpected end of script&amp;quot;,p); &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The script parser encountered an unexpected end of the script without having a matching amount of paired curly brackets and without encountering the end tag.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Recheck your script and make sure that you have the closing curly bracket at the end of your script. Also count your curly brackets. Make sure that there is a matching } for each { that you have.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Obsolete Errors ===&lt;br /&gt;
This section will cover all errors that used to exist in the past, but are not represented anymore in today's revision. (So, there is not even a replacement, they were completely erased.)&lt;br /&gt;
==== Up to Revision 11859 ====&lt;br /&gt;
----&lt;br /&gt;
===== getequipid: sd == NULL =====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;getequipid: sd == NULL\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried to use getequipid, without having a player attached to the script.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure that the command is only used when a player is attached to the script. If needed, when using timed events for example, check whether the player is still online or not.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
===== script:get_val error, cannot access player variable '...', defaulting to &amp;quot;&amp;quot; =====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:get_val: cannot access player variable '%s', defaulting to \&amp;quot;\&amp;quot;\n&amp;quot;, name); &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried accessing a player type variable (Temporal or permanent player variable, account variable or global account variable) without having a player attached to the script. Because this variable was of the type String, the mapserver converted it to an empty string &amp;quot;&amp;quot;.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure that you actually have a player attached to your script when trying to access player-type variables.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===== script:get_val error, cannot access player variable '...', defaulting to 0 =====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script:get_val: cannot access player variable '%s', defaulting to 0\n&amp;quot;, name); &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried accessing a player type variable (Temporal or permanent player variable, account variable or global account variable) without having a player attached to the script. Because this variable was of the type Integer, the mapserver converted it to 0.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure that you actually have a player attached to your script when trying to access player-type variables.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== Up to Revision 11778 ====&lt;br /&gt;
----&lt;br /&gt;
===== buildin_fakenpcname: Invalid look value ... =====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;buildin_fakenpcname: Invalid look value %d\n&amp;quot;,look);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
With the fakenpcname command, you can not only change the name into a new name. You can also adjust the look. This is what you attempted to do, but failed, because you provided an invalid look value.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Change the look value (third argument) in such a way that it fits in the boundaries. The minimum value is -32768 and the maximum value is 32767.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 fakenpcname &amp;quot;My NPC&amp;quot;,&amp;quot;Your NPC&amp;quot;,600000;&lt;br /&gt;
Correct code:&lt;br /&gt;
 fakenpcname &amp;quot;My NPC&amp;quot;,&amp;quot;Your NPC&amp;quot;,32767;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== Up to Revision 11501 ====&lt;br /&gt;
----&lt;br /&gt;
===== script:skip_space: end of file while parsing block comment. expected */ =====&lt;br /&gt;
Source Syntax: disp_error_message(&amp;quot;script:skip_space: end of file while parsing block comment. expected &amp;quot;CL_BOLD&amp;quot;*/&amp;quot;CL_NORM, p);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
A comment block was opened but never closed. The server encountered the end of the file before finding the closing tag for the comment block. A comment block starts with /* and everything after it, including on new lines, will be regarded as comments, until it encounters */.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Add the */ at the end of your comment block, to fix this error.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 /* Tralalalala&lt;br /&gt;
    lalalalala&lt;br /&gt;
    Oops, end of the file.&lt;br /&gt;
Correct code:&lt;br /&gt;
 /* Tralalalala&lt;br /&gt;
    lalalalala&lt;br /&gt;
    Oops, end of the file. */&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== Up to Revision 10842 ====&lt;br /&gt;
----&lt;br /&gt;
===== get_val error, cannot access player variable '...' =====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;get_val error, cannot access player variable '%s'\n&amp;quot;, name);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You tried accessing a player type variable (Temporal or permanent player variable, account variable or global account variable) without having a player attached to the script.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure that you actually have a player attached to your script when trying to access player-type variables.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===== script:menu: argument #... (from 1) is not a string or compatible. =====&lt;br /&gt;
Source Syntax: &amp;lt;br&amp;gt;&lt;br /&gt;
Until Rev. 10842: ShowError(&amp;quot;script:menu: argument #%d (from 1) is not a string or compatible.\n&amp;quot;, (i - 1));&amp;lt;br&amp;gt;&lt;br /&gt;
Until Rev. 10812: ShowError(&amp;quot;script:menu: argument #%d (from 1) is not a string or compatible (op=%s).\n&amp;quot;, (i - 1), script_op2name(data-&amp;gt;type));&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This error should occur when the given argument is not a string nor an integer. (Will be fixed in revision ...)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Check if what you provided as a menu option is a real string or an integer. Correct it if needed.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== Up to Revision 10812 ====&lt;br /&gt;
----&lt;br /&gt;
===== script: getelementofarray (operator[]): param1 not name ! =====&lt;br /&gt;
Source Syntax: ShowError(&amp;quot;script: getelementofarray (operator[]): param1 not name !\n&amp;quot;);&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Cause&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The variable name which you provided (the first argument of getelementofarray) is not a valid variable name.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Solution&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure that the variable name is using the correct syntax. For a full set of rules on variable naming, check the [[Variables|appropriate article]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wrong code:&lt;br /&gt;
 set @result, getelementofarray(1starray,3);&lt;br /&gt;
Correct code:&lt;br /&gt;
 set @result, getelementofarray(firstarray,3);&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category:Debugging]]&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Installation_(Debian)</id>
		<title>Installation (Debian)</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Installation_(Debian)"/>
				<updated>2015-07-08T12:54:08Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: Updated SQL tables information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide covers how to install [[Hercules]] on [[wikipedia:Debian|Debian]] and other [[wikipedia:List_of_Linux_distributions#Debian-based|versions of Linux]] that use apt-get.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* [[wikipedia:Debian|Debian]] or an [[wikipedia:List_of_Linux_distributions##Debian-based]] that has the apt-get command&lt;br /&gt;
* root access or access to an account that has [[wikipedia:Sudo|sudo privileges]]&lt;br /&gt;
* an Internet connection to download install packages&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
All of these commands will be typed at the [[wikipedia:Command-line_interface|command-line interface]].&lt;br /&gt;
=== Install Prerequisites ===&lt;br /&gt;
# Login to your server via [[wikipedia:Secure_Shell|SSH]], or if you are already logged into a [[wikipedia:Graphical_user_interface|GUI]] press Ctrl+Alt+T to open a terminal window.&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get upgrade&lt;br /&gt;
apt-get dist-update  // To update to the latest version of Debian&lt;br /&gt;
# Type the following command (this will install GCC, Make, MySQL Server, MySQL header files,  PCRE header files, git, and Zlib header files) &lt;br /&gt;
#: &amp;lt;pre&amp;gt;apt-get install git make gcc mysql-server libmysqlclient-dev zlib1g-dev libpcre3-dev screen&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a non-root Linux user ===&lt;br /&gt;
By the [[wikipedia:Principle_of_least_privilege|principle of least privilege]], it is recommended you do '''NOT''' run Hercules as root. &lt;br /&gt;
# Type the following command to create a non-root Linux account:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;useradd hercuser&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Be sure not to forget setting new password for new user&lt;br /&gt;
#: &amp;lt;pre&amp;gt;passwd hercuser&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install [[Hercules]] ==&lt;br /&gt;
&lt;br /&gt;
=== Login as your non-root Linux user ===&lt;br /&gt;
The rest of the setup is done as hercuser (the Linux user you created earlier)&lt;br /&gt;
# Logout from root SSH (or minimize the window).&lt;br /&gt;
# Login to your server via SSH as the hercuser Linux user.&lt;br /&gt;
&lt;br /&gt;
=== Git Clone ===&lt;br /&gt;
&amp;lt;pre&amp;gt;git clone https://github.com/HerculesWS/Hercules.git ~/Hercules&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://dev.mysql.com/doc/refman/5.5/en/batch-commands.html Import] MySQL Tables ===&lt;br /&gt;
# Change directory to the '''sql-files''' folder.&lt;br /&gt;
#: &amp;lt;pre&amp;gt;cd sql-files/&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Execute these commands: &lt;br /&gt;
#: ''When prompted, enter your MySQL root password.''&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; main.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodblog &amp;lt; logs.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
# If your Control Panel software or website requires it, you may also import the item, monster and monster skill databases (not necessary for the correct operation of Hercules)&lt;br /&gt;
(pre-renewal)&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; item_db.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_db.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_skill_db.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
(renewal)&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; item_db_re.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_db_re.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_skill_db_re.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
(common to renewal and pre-renewal)&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; item_db2.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_db2.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_skill_db2.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: if you want to use different SQL DBs for login/char/map servers this is the list of databases each server use:&lt;br /&gt;
#login-server: global_acc_reg_num_db, global_acc_reg_str_db, ipbanlist, login, loginlog&lt;br /&gt;
#map-server: autotrade_data, autotrade_merchants, mapreg, npc_market_data&lt;br /&gt;
#char-server: everything else&lt;br /&gt;
Note that the sql_updates table is needed by all three servers.&lt;br /&gt;
&lt;br /&gt;
=== [[:Category:Configuration|Configure Hercules]]===&lt;br /&gt;
&lt;br /&gt;
=== Compile Source Code ===&lt;br /&gt;
 cd Hercules&lt;br /&gt;
 ./configure&lt;br /&gt;
 make sql&lt;br /&gt;
&lt;br /&gt;
*If you have added plugins for use with Hercules please use the below syntax instead of the above:&lt;br /&gt;
 cd Hercules&lt;br /&gt;
 ./configure&lt;br /&gt;
 make sql plugins&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== How to Recompile =====&lt;br /&gt;
In the future (after you update or edit any file in /src) to recompile, add ''make clean'' before make sql: &lt;br /&gt;
 cd Hercules&lt;br /&gt;
 ./configure&lt;br /&gt;
 '''make clean'''&lt;br /&gt;
 make sql plugins&lt;br /&gt;
&lt;br /&gt;
== Start your Hercules Server ==&lt;br /&gt;
 //change access mode of athena-start file so that you can execute it.&lt;br /&gt;
 //Use (dos2unix athena-start) if you are getting ^M errors ie. newline errors &lt;br /&gt;
 chmod a+x athena-start&lt;br /&gt;
&lt;br /&gt;
 //To Start&lt;br /&gt;
 ./athena-start start&lt;br /&gt;
 //To Stop&lt;br /&gt;
 ./athena-start stop&lt;br /&gt;
 //To Restart&lt;br /&gt;
 ./athena-start restart&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation Guides|Debian Linux]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/System_Requirements</id>
		<title>System Requirements</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/System_Requirements"/>
				<updated>2015-06-29T23:29:04Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: /* Linux */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Basic Requirements ==&lt;br /&gt;
&lt;br /&gt;
[[Hercules]] works off of the [[wikipedia:Client–server_model|client-server model]]. The player, usually using a [[Hexing|hexed]] kRO [[Renewal|RE]] client, first connects to the [[Login Server]]. When the client enters their login information, it is given the list of available char-servers, which the player chooses from. After the server has been chosen, the client connects to the selected [[Character Server]], which displays the characters on that player's account. After selecting a character, the client is directed to the [[Map Server]], which maintains maps and the character positions on the server and relays this information to the client.&lt;br /&gt;
&lt;br /&gt;
Hercules is designed to run on a machine that is designated as a Server, either Dedicated or VPS. It can run on a workstation, but using that workstation for other tasks (including playing on the same machine that is running the server) will reduce performance.&lt;br /&gt;
&lt;br /&gt;
== Hardware Requirements ==&lt;br /&gt;
Hercules requires the following resources from the machine in order to function without problems or the common &amp;quot;Lag&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
* 1.5 GHz or faster CPU, either Intel or AMD is acceptable. Some members have reported that they have gotten Hercules to run on other processors.&lt;br /&gt;
* 128 MB of RAM, MINIMUM. The map server in an idle state consumes about 76MB of RAM, depending on how many maps and [[NPC|NPCs]] are loaded (41mb when no NPCs are in use).&lt;br /&gt;
* A video card powerful enough to run the Operating System of your choice (or no video card at all). Hercules is a console based software, which means that all that is required to run it is a console or command access.&lt;br /&gt;
* Fast internet or network connection. This is very hard to predict. A lot of questions arise that ask 'how much bandwidth does Hercules need?'. There is no answer to that. It is all depending on how many characters are connected, from where, and what they do while connected to the server.&lt;br /&gt;
* 250MB of Hard Drive space or better, up-to gigabytes depending on how big the database may get.&lt;br /&gt;
&lt;br /&gt;
== Software Requirements ==&lt;br /&gt;
Hercules, depending on what you plan to do with it and what platform you run it on, will require, at a minimum, the following:&lt;br /&gt;
&lt;br /&gt;
* GCC compatible compiler&lt;br /&gt;
* GNU Make&lt;br /&gt;
* zlib&lt;br /&gt;
* MySQL server and libraries&lt;br /&gt;
* Git&lt;br /&gt;
* pcre (optional)&lt;br /&gt;
&lt;br /&gt;
== Supported Operating Systems ==&lt;br /&gt;
The following operating systems have been tested and are known to work:&lt;br /&gt;
=== [[wikipedia:Linux|Linux]] ===&lt;br /&gt;
* Debian Based: [http://www.debian.org/ Debian], [http://www.knoppix.net/ Knoppix], [http://www.ubuntu.com/ Ubuntu Server &amp;amp; Desktop]&lt;br /&gt;
* RPM Based: [http://www.centos.org/ CentOS], [http://fedoraproject.org/ Fedora Core], [http://www2.mandriva.com/ Mandriva], [http://www.redhat.com/rhel/ Red Hat Linux], [http://www.novell.com/linux/ SUSE Linux]&lt;br /&gt;
* Others: [https://www.gentoo.org Gentoo], [http://www.slackware.com/ Slackware]&lt;br /&gt;
&lt;br /&gt;
=== [[wikipedia:Unix|Unix]] ===&lt;br /&gt;
* BSD Based: [http://www.freebsd.org/ FreeBSD], [http://www.openbsd.org/ OpenBSD]&lt;br /&gt;
=== [[wikipedia:Microsoft_Windows|Windows]] ===&lt;br /&gt;
* [[wikipedia:Windows_Server|Server Versions]]: Windows Server 2008, Windows Server 2008 R2, Windows Server 2012&lt;br /&gt;
* Home Versions: Windows Vista, Windows 7, Windows 8, Windows 8.1&lt;br /&gt;
&lt;br /&gt;
[[Category:Basics]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/System_Requirements</id>
		<title>System Requirements</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/System_Requirements"/>
				<updated>2015-06-29T23:28:48Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: /* Supported Operating Systems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Basic Requirements ==&lt;br /&gt;
&lt;br /&gt;
[[Hercules]] works off of the [[wikipedia:Client–server_model|client-server model]]. The player, usually using a [[Hexing|hexed]] kRO [[Renewal|RE]] client, first connects to the [[Login Server]]. When the client enters their login information, it is given the list of available char-servers, which the player chooses from. After the server has been chosen, the client connects to the selected [[Character Server]], which displays the characters on that player's account. After selecting a character, the client is directed to the [[Map Server]], which maintains maps and the character positions on the server and relays this information to the client.&lt;br /&gt;
&lt;br /&gt;
Hercules is designed to run on a machine that is designated as a Server, either Dedicated or VPS. It can run on a workstation, but using that workstation for other tasks (including playing on the same machine that is running the server) will reduce performance.&lt;br /&gt;
&lt;br /&gt;
== Hardware Requirements ==&lt;br /&gt;
Hercules requires the following resources from the machine in order to function without problems or the common &amp;quot;Lag&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
* 1.5 GHz or faster CPU, either Intel or AMD is acceptable. Some members have reported that they have gotten Hercules to run on other processors.&lt;br /&gt;
* 128 MB of RAM, MINIMUM. The map server in an idle state consumes about 76MB of RAM, depending on how many maps and [[NPC|NPCs]] are loaded (41mb when no NPCs are in use).&lt;br /&gt;
* A video card powerful enough to run the Operating System of your choice (or no video card at all). Hercules is a console based software, which means that all that is required to run it is a console or command access.&lt;br /&gt;
* Fast internet or network connection. This is very hard to predict. A lot of questions arise that ask 'how much bandwidth does Hercules need?'. There is no answer to that. It is all depending on how many characters are connected, from where, and what they do while connected to the server.&lt;br /&gt;
* 250MB of Hard Drive space or better, up-to gigabytes depending on how big the database may get.&lt;br /&gt;
&lt;br /&gt;
== Software Requirements ==&lt;br /&gt;
Hercules, depending on what you plan to do with it and what platform you run it on, will require, at a minimum, the following:&lt;br /&gt;
&lt;br /&gt;
* GCC compatible compiler&lt;br /&gt;
* GNU Make&lt;br /&gt;
* zlib&lt;br /&gt;
* MySQL server and libraries&lt;br /&gt;
* Git&lt;br /&gt;
* pcre (optional)&lt;br /&gt;
&lt;br /&gt;
== Supported Operating Systems ==&lt;br /&gt;
The following operating systems have been tested and are known to work:&lt;br /&gt;
=== [[wikipedia:Linux|Linux]] ===&lt;br /&gt;
* Debian Based: [http://www.debian.org/ Debian], [http://www.knoppix.net/ Knoppix], [http://www.ubuntu.com/ Ubuntu Server &amp;amp; Desktop]&lt;br /&gt;
* RPM Based: [http://www.centos.org/ CentOS], [http://fedoraproject.org/ Fedora Core], [http://www2.mandriva.com/ Mandriva], [http://www.redhat.com/rhel/ Red Hat Linux], [http://www.novell.com/linux/ SUSE Linux]&lt;br /&gt;
* Others: [https://www.gentoo.org] Gentoo], [http://www.slackware.com/ Slackware]&lt;br /&gt;
&lt;br /&gt;
=== [[wikipedia:Unix|Unix]] ===&lt;br /&gt;
* BSD Based: [http://www.freebsd.org/ FreeBSD], [http://www.openbsd.org/ OpenBSD]&lt;br /&gt;
=== [[wikipedia:Microsoft_Windows|Windows]] ===&lt;br /&gt;
* [[wikipedia:Windows_Server|Server Versions]]: Windows Server 2008, Windows Server 2008 R2, Windows Server 2012&lt;br /&gt;
* Home Versions: Windows Vista, Windows 7, Windows 8, Windows 8.1&lt;br /&gt;
&lt;br /&gt;
[[Category:Basics]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/System_Requirements</id>
		<title>System Requirements</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/System_Requirements"/>
				<updated>2015-06-29T23:26:17Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: /* Software Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Basic Requirements ==&lt;br /&gt;
&lt;br /&gt;
[[Hercules]] works off of the [[wikipedia:Client–server_model|client-server model]]. The player, usually using a [[Hexing|hexed]] kRO [[Renewal|RE]] client, first connects to the [[Login Server]]. When the client enters their login information, it is given the list of available char-servers, which the player chooses from. After the server has been chosen, the client connects to the selected [[Character Server]], which displays the characters on that player's account. After selecting a character, the client is directed to the [[Map Server]], which maintains maps and the character positions on the server and relays this information to the client.&lt;br /&gt;
&lt;br /&gt;
Hercules is designed to run on a machine that is designated as a Server, either Dedicated or VPS. It can run on a workstation, but using that workstation for other tasks (including playing on the same machine that is running the server) will reduce performance.&lt;br /&gt;
&lt;br /&gt;
== Hardware Requirements ==&lt;br /&gt;
Hercules requires the following resources from the machine in order to function without problems or the common &amp;quot;Lag&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
* 1.5 GHz or faster CPU, either Intel or AMD is acceptable. Some members have reported that they have gotten Hercules to run on other processors.&lt;br /&gt;
* 128 MB of RAM, MINIMUM. The map server in an idle state consumes about 76MB of RAM, depending on how many maps and [[NPC|NPCs]] are loaded (41mb when no NPCs are in use).&lt;br /&gt;
* A video card powerful enough to run the Operating System of your choice (or no video card at all). Hercules is a console based software, which means that all that is required to run it is a console or command access.&lt;br /&gt;
* Fast internet or network connection. This is very hard to predict. A lot of questions arise that ask 'how much bandwidth does Hercules need?'. There is no answer to that. It is all depending on how many characters are connected, from where, and what they do while connected to the server.&lt;br /&gt;
* 250MB of Hard Drive space or better, up-to gigabytes depending on how big the database may get.&lt;br /&gt;
&lt;br /&gt;
== Software Requirements ==&lt;br /&gt;
Hercules, depending on what you plan to do with it and what platform you run it on, will require, at a minimum, the following:&lt;br /&gt;
&lt;br /&gt;
* GCC compatible compiler&lt;br /&gt;
* GNU Make&lt;br /&gt;
* zlib&lt;br /&gt;
* MySQL server and libraries&lt;br /&gt;
* Git&lt;br /&gt;
* pcre (optional)&lt;br /&gt;
&lt;br /&gt;
== Supported Operating Systems ==&lt;br /&gt;
The following operating systems have been tested and are known to work:&lt;br /&gt;
=== [[wikipedia:Linux|Linux]] ===&lt;br /&gt;
* Debian Based: [http://www.debian.org/ Debian], [http://www.knoppix.net/ Knoppix], [http://www.ubuntu.com/ Ubuntu Server &amp;amp; Desktop]&lt;br /&gt;
* RPM Based: [http://www.centos.org/ CentOS], [http://fedoraproject.org/ Fedora Core], [http://www2.mandriva.com/ Mandriva], [http://www.redhat.com/rhel/ Red Hat Linux], [http://www.novell.com/linux/ SUSE Linux]&lt;br /&gt;
* Slackware Based: [http://www.slackware.com/ Slackware]&lt;br /&gt;
=== [[wikipedia:Unix|Unix]] ===&lt;br /&gt;
* BSD Based: [http://www.freebsd.org/ FreeBSD], [http://www.openbsd.org/ OpenBSD]&lt;br /&gt;
=== [[wikipedia:Microsoft_Windows|Windows]] ===&lt;br /&gt;
* [[wikipedia:Windows_Server|Server Versions]]: Windows Server 2000, Windows Server 2003, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012&lt;br /&gt;
* Home Versions: Windows 98, Windows ME, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 8.1&lt;br /&gt;
&lt;br /&gt;
64-bit operating systems of all those listed will take some time and effort to get working.&lt;br /&gt;
&lt;br /&gt;
[[Category:Basics]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/System_Requirements</id>
		<title>System Requirements</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/System_Requirements"/>
				<updated>2015-06-29T23:25:21Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: /* Hardware Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Basic Requirements ==&lt;br /&gt;
&lt;br /&gt;
[[Hercules]] works off of the [[wikipedia:Client–server_model|client-server model]]. The player, usually using a [[Hexing|hexed]] kRO [[Renewal|RE]] client, first connects to the [[Login Server]]. When the client enters their login information, it is given the list of available char-servers, which the player chooses from. After the server has been chosen, the client connects to the selected [[Character Server]], which displays the characters on that player's account. After selecting a character, the client is directed to the [[Map Server]], which maintains maps and the character positions on the server and relays this information to the client.&lt;br /&gt;
&lt;br /&gt;
Hercules is designed to run on a machine that is designated as a Server, either Dedicated or VPS. It can run on a workstation, but using that workstation for other tasks (including playing on the same machine that is running the server) will reduce performance.&lt;br /&gt;
&lt;br /&gt;
== Hardware Requirements ==&lt;br /&gt;
Hercules requires the following resources from the machine in order to function without problems or the common &amp;quot;Lag&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
* 1.5 GHz or faster CPU, either Intel or AMD is acceptable. Some members have reported that they have gotten Hercules to run on other processors.&lt;br /&gt;
* 128 MB of RAM, MINIMUM. The map server in an idle state consumes about 76MB of RAM, depending on how many maps and [[NPC|NPCs]] are loaded (41mb when no NPCs are in use).&lt;br /&gt;
* A video card powerful enough to run the Operating System of your choice (or no video card at all). Hercules is a console based software, which means that all that is required to run it is a console or command access.&lt;br /&gt;
* Fast internet or network connection. This is very hard to predict. A lot of questions arise that ask 'how much bandwidth does Hercules need?'. There is no answer to that. It is all depending on how many characters are connected, from where, and what they do while connected to the server.&lt;br /&gt;
* 250MB of Hard Drive space or better, up-to gigabytes depending on how big the database may get.&lt;br /&gt;
&lt;br /&gt;
== Software Requirements ==&lt;br /&gt;
Hercules, depending on what you plan to do with it and what platform you run it on, will require, at a minimum, the following:&lt;br /&gt;
&lt;br /&gt;
* GCC compatible compiler&lt;br /&gt;
* zlib&lt;br /&gt;
* MySQL server and libraries&lt;br /&gt;
* Git (if using self-compiled packages)&lt;br /&gt;
&lt;br /&gt;
== Supported Operating Systems ==&lt;br /&gt;
The following operating systems have been tested and are known to work:&lt;br /&gt;
=== [[wikipedia:Linux|Linux]] ===&lt;br /&gt;
* Debian Based: [http://www.debian.org/ Debian], [http://www.knoppix.net/ Knoppix], [http://www.ubuntu.com/ Ubuntu Server &amp;amp; Desktop]&lt;br /&gt;
* RPM Based: [http://www.centos.org/ CentOS], [http://fedoraproject.org/ Fedora Core], [http://www2.mandriva.com/ Mandriva], [http://www.redhat.com/rhel/ Red Hat Linux], [http://www.novell.com/linux/ SUSE Linux]&lt;br /&gt;
* Slackware Based: [http://www.slackware.com/ Slackware]&lt;br /&gt;
=== [[wikipedia:Unix|Unix]] ===&lt;br /&gt;
* BSD Based: [http://www.freebsd.org/ FreeBSD], [http://www.openbsd.org/ OpenBSD]&lt;br /&gt;
=== [[wikipedia:Microsoft_Windows|Windows]] ===&lt;br /&gt;
* [[wikipedia:Windows_Server|Server Versions]]: Windows Server 2000, Windows Server 2003, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012&lt;br /&gt;
* Home Versions: Windows 98, Windows ME, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 8.1&lt;br /&gt;
&lt;br /&gt;
64-bit operating systems of all those listed will take some time and effort to get working.&lt;br /&gt;
&lt;br /&gt;
[[Category:Basics]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/GDB</id>
		<title>GDB</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/GDB"/>
				<updated>2015-02-25T18:14:46Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: /* Using gdb with Hercules */ Additional info about debug builds&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GDB stands for GNU Debugger. It is a program for *nix related systems that allows you to view stacktrace and coredumps of your servers if it crashes.&lt;br /&gt;
&lt;br /&gt;
= Getting GDB =&lt;br /&gt;
Typically GDB comes installed on most *nix distro's. It comes installed on FreeBSD 7.1-RELEASE or newer if the ports collection is installed. Typically, it will be located in /usr/bin/gdb, but if it is not, you can either compile it from source or install it using your package manager for your distribution.&lt;br /&gt;
&lt;br /&gt;
== Debian Based (apt-get, aptitude or synaptic) ==&lt;br /&gt;
On Debian based systems, you can use apt-get or aptitude, or the synaptic package manager to install gdb. If you prefer the terminal, you can issue ONE of the following to install gdb:&lt;br /&gt;
&lt;br /&gt;
 [sudo] aptitude install gdb&lt;br /&gt;
 [sudo] apt-get install gdb&lt;br /&gt;
&lt;br /&gt;
If you have access to gdm and the synaptic package manager, you can simply search for 'gdb' and mark for complete installation.&lt;br /&gt;
&lt;br /&gt;
== YUM based (Redhat/CentOS) ==&lt;br /&gt;
On YUM based systems, you can simply issue the following to install gdb via RPM packages:&lt;br /&gt;
&lt;br /&gt;
 yum install gdb&lt;br /&gt;
&lt;br /&gt;
== *BSD based ==&lt;br /&gt;
Typically GDM will come with an install of FreeBSD, but if it's not, it is best to make it from source, skip ahead.&lt;br /&gt;
&lt;br /&gt;
== Compiling from source ==&lt;br /&gt;
Use your favourite download manager (wget, etc) to get the .tar.gz of the latest stable version of gdb from gdb's website. (http://www.gnu.org/software/gdb/)&lt;br /&gt;
&lt;br /&gt;
Extract the .tar.gz using the following command:&lt;br /&gt;
&lt;br /&gt;
 tar -zxf gdb-x.xx.tar.gz&lt;br /&gt;
&lt;br /&gt;
You need a GCC compatible compiler, so if you don't have one, get one now. there is a 99% chance that your distribution comes with a gcc compiler.&lt;br /&gt;
&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
Should install it for use. If you're on a *BSD based system, you may have to issue the following command to be able to use it.&lt;br /&gt;
&lt;br /&gt;
 % rehash&lt;br /&gt;
&lt;br /&gt;
= Using gdb with Hercules =&lt;br /&gt;
&lt;br /&gt;
Go to Your Hercules Folder and type the following command&lt;br /&gt;
&lt;br /&gt;
 ulimit -u unlimited&lt;br /&gt;
&lt;br /&gt;
Restart the server then,&lt;br /&gt;
Find out which program(map/char/login server) crashed and its core file (should be named the same as the server file with an additional &amp;quot;.core&amp;quot; extension).. then on the console, type:&lt;br /&gt;
&lt;br /&gt;
 gdb xxx-server xxx-server.core&lt;br /&gt;
&lt;br /&gt;
'''[xxx = map/char/login (The one which is crashing)]'''&lt;br /&gt;
&lt;br /&gt;
You should get some limited output of the problem, or if the servers do not have a trace, you will get the following error:&lt;br /&gt;
&lt;br /&gt;
 No stack.&lt;br /&gt;
&lt;br /&gt;
If it says Dump file was not found, then type the following command(The file is saved with other name)&lt;br /&gt;
&lt;br /&gt;
 gdb xxx-server core&lt;br /&gt;
&lt;br /&gt;
'''[xxx = map/char/login (The one which is crashing)]'''&lt;br /&gt;
&lt;br /&gt;
If a valid dump was found, you should get a prompt &lt;br /&gt;
&lt;br /&gt;
 gdb&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At that prompt, type:&lt;br /&gt;
&lt;br /&gt;
 gdb&amp;gt; bt full&lt;br /&gt;
&lt;br /&gt;
And that will give you a full output of the problem area and a line number in which you should look for the crash. This just told you where the crash is located and what line you should look at to fix it. If you feel that is an Hercules development problem, feel free to submit a bug with that full report and one of the core developers can look into it.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' in order to obtain detailed information from gdb, Hercules needs to be compiled with special flags. Normal builds are optimized for performance and don't include debug information. To build in debug mode, it is necessary to pass --enable-debug=gdb and --disable-lto to the configure script as follows:&lt;br /&gt;
&lt;br /&gt;
 ./configure --enable-debug=gdb --disable-lto&lt;br /&gt;
 make clean&lt;br /&gt;
 make sql&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
* [http://www.gnu.org/software/gdb/download/ Download page for GDB]&lt;br /&gt;
[[Category:Debugging]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Installation_(CentOS)</id>
		<title>Installation (CentOS)</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Installation_(CentOS)"/>
				<updated>2014-11-10T04:33:48Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: Removed some references to 'trunk', since the default directory name is now 'Hercules'. Removed note about --disable-64bit, since it is currently auto-detected.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide covers how to install [[Hercules]] on [[wikipedia:CentOS|CentOS]] and other [[wikipedia:List_of_Linux_distributions#RPM-based|versions of Linux]] that use [[wikipedia:Yellowdog_Updater,_Modified|yum]].&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* [[wikipedia:CentOS|CentOS]] or an [[wikipedia:List_of_Linux_distributions#RPM-based|RPM-based Linux]] that has the '''[[wikipedia:Yellowdog_Updater,_Modified|yum]]''' command&lt;br /&gt;
* root access or access to an account that has [[wikipedia:Sudo|sudo privileges]]&lt;br /&gt;
* an Internet connection to download install packages&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
All of these commands will be typed at the [[wikipedia:Command-line_interface|command-line interface]].&lt;br /&gt;
=== Install Prerequisites ===&lt;br /&gt;
# Login to your server via [[wikipedia:Secure_Shell|SSH]], or if you are already logged into a [[wikipedia:Graphical_user_interface|GUI]] press Ctrl+Alt+T to open a terminal window.&lt;br /&gt;
# Type the following command (this will install GCC, Make, MySQL, MySQL header files, MySQL Server, PCRE header files, Git, and Zlib header files) &lt;br /&gt;
#: &amp;lt;pre&amp;gt;yum install gcc make mysql mysql-devel mysql-server pcre-devel git zlib-devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
# (Optional) type the following command to install some additional packages: &lt;br /&gt;
#: &amp;lt;pre&amp;gt;yum -y install dos2unix gdb nano screen unzip wget zip&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a non-root Linux user ===&lt;br /&gt;
By the [[wikipedia:Principle_of_least_privilege|principle of least privilege]], it is recommended you do '''NOT''' run Hercules as root. &lt;br /&gt;
# Type the following command to create a non-root Linux account:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;useradd --create-home --shell /bin/bash hercules1234&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;code&amp;gt;--create-home&amp;lt;/code&amp;gt; = create the user's home directory&lt;br /&gt;
#: &amp;lt;code&amp;gt;--shell&amp;lt;/code&amp;gt; = sets their login shell to [[wikipedia:Bash_(Unix_shell)|Bash]]&lt;br /&gt;
#: '''&amp;lt;code&amp;gt;hercules1234&amp;lt;/code&amp;gt;''' = the login name of the new Linux account&lt;br /&gt;
#: ''&amp;lt;code&amp;gt;1234&amp;lt;/code&amp;gt;'' = pick your own random numbers to make the username more unique&lt;br /&gt;
# Set a password for the new user (run this command and follow the prompts):&lt;br /&gt;
#: &amp;lt;pre&amp;gt;passwd hercules1234&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure MySQL ===&lt;br /&gt;
&lt;br /&gt;
==== Set a root password ====&lt;br /&gt;
The default MySQL Server install creates a MySQL user 'root'@'localhost' with NO password. It is recommended you create a password for the root user. &lt;br /&gt;
# Run this command and follow the prompts: &lt;br /&gt;
#: Firest Start MySQL:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;/etc/init.d/mysqld start &amp;lt;/pre&amp;gt;&lt;br /&gt;
#: Then configure MySQL by:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql_secure_installation&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Login to your MySQL Server as root: &lt;br /&gt;
#: ''When prompted, enter your root MySQL password.''&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql --user=root -p&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Now your prompt should look like this (the MySQL command prompt): &lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Create SQL database for Hercules ====&lt;br /&gt;
# At the MySQL prompt, type this to [http://dev.mysql.com/doc/refman/5.5/en/create-database.html create a database] (replace &amp;lt;code&amp;gt;hercules1234&amp;lt;/code&amp;gt; with the Linux username you created earlier): &lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql&amp;gt; CREATE DATABASE hercules1234_rag;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Create a separate database for logs: &lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql&amp;gt; CREATE DATABASE hercules1234_log;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Setup a MySQL user for Hercules ====&lt;br /&gt;
# At the MySQL prompt, type something like this to create a new MySQL user: &lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql&amp;gt; CREATE USER 'hercules1234'@'localhost' IDENTIFIED BY 'secretpassword';&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;code&amp;gt;hercules1234&amp;lt;/code&amp;gt; = the name of the MySQL user (we named it the same as the Linux user to make it easier to identify)&lt;br /&gt;
#: &amp;lt;code&amp;gt;localhost&amp;lt;/code&amp;gt; = the hostname or IP it will connect from&lt;br /&gt;
#: '''&amp;lt;code&amp;gt;secretpassword&amp;lt;/code&amp;gt;''' = the password for this MySQL user&lt;br /&gt;
# [http://dev.mysql.com/doc/refman/5.5/en/grant.html Grant privileges] to the 'hercules' MySQL user:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql&amp;gt; GRANT SELECT,INSERT,UPDATE,DELETE ON `hercules1234\_rag`.* TO 'hercules1234'@'localhost';&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql&amp;gt; GRANT SELECT,INSERT ON `hercules1234\_log`.* TO 'hercules1234'@'localhost';&amp;lt;/pre&amp;gt; (note the [http://dev.mysql.com/doc/refman/5.5/en/string-literals.html#character-escape-sequences escaped underscore])&lt;br /&gt;
&lt;br /&gt;
== Install [[Hercules]] ==&lt;br /&gt;
&lt;br /&gt;
=== Login as your non-root Linux user ===&lt;br /&gt;
The rest of the setup is done as hercules1234 (the Linux user you created in step 2.2)&lt;br /&gt;
# Logout from root SSH (or minimize the window).&lt;br /&gt;
# Login to your server via SSH as the hercules1234 Linux user.&lt;br /&gt;
&lt;br /&gt;
=== Git Clone ===&lt;br /&gt;
{{:Git Clone/Unix}}&lt;br /&gt;
&lt;br /&gt;
=== [http://dev.mysql.com/doc/refman/5.5/en/batch-commands.html Import] MySQL Tables ===&lt;br /&gt;
# Change directory to the '''sql-files''' folder.&lt;br /&gt;
#: &amp;lt;pre&amp;gt;cd sql-files/&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Execute these commands: &lt;br /&gt;
#: ''When prompted, enter your MySQL root password.''&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercules1234_rag &amp;lt; main.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercules1234_rag &amp;lt; item_db.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercules1234_rag &amp;lt; item_db2.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercules1234_rag &amp;lt; mob_db.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercules1234_rag &amp;lt; mob_db2.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercules1234_rag &amp;lt; mob_skill_db.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercules1234_rag &amp;lt; mob_skill_db2.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercules1234_log &amp;lt; logs.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
# If you are using Renewal you also have to import the following&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercules1234_rag &amp;lt; item_db_re.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercules1234_rag &amp;lt; item_db2_re.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercules1234_rag &amp;lt; mob_db_re.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercules1234_rag &amp;lt; mob_skill_db_re.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: if you want to use different SQL DBs for login/char/map servers this is the list of databases each server use:&lt;br /&gt;
#login-server: global_reg_value, ipbanlist, login, loginlog&lt;br /&gt;
#map-server: mapreg, item_db, item_db2, mob_db, mob_db2,mob_skill_db&lt;br /&gt;
#char-server: everything else + global_reg_value once again&lt;br /&gt;
Note that global_reg_value tables are needed by both login-server and char-server (though it may be different tables)&lt;br /&gt;
&lt;br /&gt;
=== [[:Category:Configuration|Configure Hercules]]===&lt;br /&gt;
&lt;br /&gt;
=== Compile Source Code ===&lt;br /&gt;
 cd Hercules&lt;br /&gt;
 ./configure&lt;br /&gt;
 make sql&lt;br /&gt;
&lt;br /&gt;
===== How to Recompile =====&lt;br /&gt;
In the future (after you update or edit any file in /src) to recompile, add ''make clean'' before make sql: &lt;br /&gt;
 cd Hercules&lt;br /&gt;
 ./configure&lt;br /&gt;
 '''make clean'''&lt;br /&gt;
 make sql&lt;br /&gt;
&lt;br /&gt;
== Start your Hercules Server ==&lt;br /&gt;
 //change access mode of athena-start file so that you can execute it.&lt;br /&gt;
 //Use (dos2unix athena-start) if yo uare getting ^M errors ie. newline errors &lt;br /&gt;
 chmod a+x athena-start&lt;br /&gt;
&lt;br /&gt;
 //To Start&lt;br /&gt;
 ./athena-start start&lt;br /&gt;
 //To Stop&lt;br /&gt;
 ./athena-start stop&lt;br /&gt;
 //To Restart&lt;br /&gt;
 ./athena-start restart&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation Guides|CentOS]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Installation_(Debian)</id>
		<title>Installation (Debian)</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Installation_(Debian)"/>
				<updated>2014-11-10T04:30:39Z</updated>
		
		<summary type="html">&lt;p&gt;Haru: Removed some references to 'trunk', since the default directory name is now 'Hercules'. Removed note about --disable-64bit, since it is currently auto-detected.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide covers how to install [[Hercules]] on [[wikipedia:Debian|Debian]] and other [[wikipedia:List_of_Linux_distributions#Debian-based|versions of Linux]] that use apt-get.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* [[wikipedia:Debian|Debian]] or an [[wikipedia:List_of_Linux_distributions##Debian-based]] that has the apt-get command&lt;br /&gt;
* root access or access to an account that has [[wikipedia:Sudo|sudo privileges]]&lt;br /&gt;
* an Internet connection to download install packages&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
All of these commands will be typed at the [[wikipedia:Command-line_interface|command-line interface]].&lt;br /&gt;
=== Install Prerequisites ===&lt;br /&gt;
# Login to your server via [[wikipedia:Secure_Shell|SSH]], or if you are already logged into a [[wikipedia:Graphical_user_interface|GUI]] press Ctrl+Alt+T to open a terminal window.&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get upgrade&lt;br /&gt;
apt-get dist-update  // To update to the latest version of Debian&lt;br /&gt;
# Type the following command (this will install GCC, Make, MySQL Server, MySQL header files,  PCRE header files, git, and Zlib header files) &lt;br /&gt;
#: &amp;lt;pre&amp;gt;apt-get install git make gcc mysql-server libmysqlclient-dev zlib1g-dev libpcre3-dev screen&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a non-root Linux user ===&lt;br /&gt;
By the [[wikipedia:Principle_of_least_privilege|principle of least privilege]], it is recommended you do '''NOT''' run Hercules as root. &lt;br /&gt;
# Type the following command to create a non-root Linux account:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;useradd hercuser&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Be sure not to forget setting new password for new user&lt;br /&gt;
#: &amp;lt;pre&amp;gt;passwd hercuser&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install [[Hercules]] ==&lt;br /&gt;
&lt;br /&gt;
=== Login as your non-root Linux user ===&lt;br /&gt;
The rest of the setup is done as hercuser (the Linux user you created earlier)&lt;br /&gt;
# Logout from root SSH (or minimize the window).&lt;br /&gt;
# Login to your server via SSH as the hercuser Linux user.&lt;br /&gt;
&lt;br /&gt;
=== Git Clone ===&lt;br /&gt;
&amp;lt;pre&amp;gt;git clone https://github.com/HerculesWS/Hercules.git ~/Hercules&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://dev.mysql.com/doc/refman/5.5/en/batch-commands.html Import] MySQL Tables ===&lt;br /&gt;
# Change directory to the '''sql-files''' folder.&lt;br /&gt;
#: &amp;lt;pre&amp;gt;cd sql-files/&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Execute these commands: &lt;br /&gt;
#: ''When prompted, enter your MySQL root password.''&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; main.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; item_db.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; item_db2.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_db.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_db2.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_skill_db.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_skill_db2.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodblog &amp;lt; logs.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
# If you are using Renewal you also have to import the following&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; item_db_re.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; item_db2_re.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_db_re.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mysql -u root -prootpassword hercuser_rodb &amp;lt; mob_skill_db_re.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: if you want to use different SQL DBs for login/char/map servers this is the list of databases each server use:&lt;br /&gt;
#login-server: global_reg_value, ipbanlist, login, loginlog&lt;br /&gt;
#map-server: mapreg, item_db, item_db2, mob_db, mob_db2,mob_skill_db&lt;br /&gt;
#char-server: everything else + global_reg_value once again&lt;br /&gt;
Note that global_reg_value tables are needed by both login-server and char-server (though it may be different tables)&lt;br /&gt;
&lt;br /&gt;
=== [[:Category:Configuration|Configure Hercules]]===&lt;br /&gt;
&lt;br /&gt;
=== Compile Source Code ===&lt;br /&gt;
 cd Hercules&lt;br /&gt;
 ./configure&lt;br /&gt;
 make sql&lt;br /&gt;
&lt;br /&gt;
*If you have added plugins for use with Hercules please use the below syntax instead of the above:&lt;br /&gt;
 cd Hercules&lt;br /&gt;
 ./configure&lt;br /&gt;
 make sql plugins&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== How to Recompile =====&lt;br /&gt;
In the future (after you update or edit any file in /src) to recompile, add ''make clean'' before make sql: &lt;br /&gt;
 cd Hercules&lt;br /&gt;
 ./configure&lt;br /&gt;
 '''make clean'''&lt;br /&gt;
 make sql plugins&lt;br /&gt;
&lt;br /&gt;
== Start your Hercules Server ==&lt;br /&gt;
 //change access mode of athena-start file so that you can execute it.&lt;br /&gt;
 //Use (dos2unix athena-start) if you are getting ^M errors ie. newline errors &lt;br /&gt;
 chmod a+x athena-start&lt;br /&gt;
&lt;br /&gt;
 //To Start&lt;br /&gt;
 ./athena-start start&lt;br /&gt;
 //To Stop&lt;br /&gt;
 ./athena-start stop&lt;br /&gt;
 //To Restart&lt;br /&gt;
 ./athena-start restart&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation Guides|Debian Linux]]&lt;/div&gt;</summary>
		<author><name>Haru</name></author>	</entry>

	</feed>