<?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=Wolfeh</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=Wolfeh"/>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Special:Contributions/Wolfeh"/>
		<updated>2026-05-01T04:11:27Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.21.11</generator>

	<entry>
		<id>https://wiki.herc.ws/wiki/Data_Folder_Structure</id>
		<title>Data Folder Structure</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Data_Folder_Structure"/>
				<updated>2016-10-04T03:24:58Z</updated>
		
		<summary type="html">&lt;p&gt;Wolfeh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
This page currently explains the data folder structure as recognized by the client. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Take note of this''':&lt;br /&gt;
¿© (여) is female, ³² (남) is male.&lt;br /&gt;
&lt;br /&gt;
== Data Structure ==&lt;br /&gt;
'''data'''&amp;lt;br&amp;gt;Holds various text files, for items, the bard and dancer scream and frost joker skill messages, error messages, map files (.rsw,.gnd,.gat), etc.&lt;br /&gt;
:* '''ai'''&amp;lt;br&amp;gt;The '''ai''' in here means &amp;quot;Artificial Intelligence&amp;quot;. As the name implies, this contains all the functions for the AIs (Mercenaries and Homunculus).&lt;br /&gt;
:* '''book'''&amp;lt;br&amp;gt;Where the contents of books are.&lt;br /&gt;
:* '''imf'''&amp;lt;br&amp;gt;Contains files that control the thumbnail views of characters in the Character Selection Screen.&lt;br /&gt;
:* '''lua files'''&amp;lt;br&amp;gt;Interface coding.(Old Clients)&lt;br /&gt;
:* '''luafiles514'''&amp;lt;br&amp;gt;Just another set of LUA files which are much more updated.&lt;br /&gt;
:** '''lua files'''&amp;lt;br&amp;gt;Interface coding.(New Clients)&lt;br /&gt;
:* '''model'''&amp;lt;br&amp;gt;Various map model's. Examples of model's are statues, foliage, street lights, ect. Folder also contains various sub folders which are too many to list.&lt;br /&gt;
:* '''palette'''&amp;lt;br&amp;gt;Folder body and hair for palettes.&lt;br /&gt;
:** '''¸ö (몸)'''&amp;lt;br&amp;gt;Folder for cloth palettes.&lt;br /&gt;
:** '''¸Ó¸® (머리)'''&amp;lt;br&amp;gt;Folder for hair palettes.&lt;br /&gt;
:* '''sprite'''&amp;lt;br&amp;gt;Base folder for sprites. Has a sprite for a shadow (goes underneath the character?), a numbers sprite for countdowns (or counting for something).&lt;br /&gt;
:** '''¸ó½ºÅÍ (몬스터)'''&amp;lt;br&amp;gt;Folder for monster sprites.&lt;br /&gt;
:** '''¾ÆÀÌÅÛ (아이템)'''&amp;lt;br&amp;gt;Folder for drop sprites, for items and skills.&lt;br /&gt;
:** '''¾Ç¼¼»ç¸® (악세사리)'''&amp;lt;br&amp;gt;Item sprites.&lt;br /&gt;
:** '''¹æÆÐ (방패)'''&amp;lt;br&amp;gt;Folder for shield sprites.&lt;br /&gt;
:** '''ÀÎ°£Á· (인간족)'''&amp;lt;br&amp;gt;Hair and job sprites base folder.&lt;br /&gt;
:*** '''¸öÅë (몸통)'''&amp;lt;br&amp;gt;Job sprites folder.&lt;br /&gt;
:*** '''¸Ó¸®Åë (머리통)'''&amp;lt;br&amp;gt;Hair folder.&lt;br /&gt;
:** '''ÀÌÆÑÆ® (이팩트)'''&amp;lt;br&amp;gt;Status effects and other effects. Examples are curse, sleep, the time o attack that pops up in PVP.&lt;br /&gt;
:** '''book'''&amp;lt;br&amp;gt;Book sprites. Examples are the open book with pages turning, shown when a book can be read.&lt;br /&gt;
:** '''homun'''&amp;lt;br&amp;gt;Homunculus sprites.&lt;br /&gt;
:** '''npc'''&amp;lt;br&amp;gt;NPC sprites.&lt;br /&gt;
:* '''texture'''&amp;lt;br&amp;gt;Folder for various .bmp images, from items to interface and other things like that. The logo is also stored here, the logo is shown in screenshots, on the lower right hand side. Various map textures in main and sub folders, too many to list.&lt;br /&gt;
:** '''effect'''&amp;lt;br&amp;gt;Folder for skill effects. Effects have to be .tga format.&lt;br /&gt;
:** '''À¯ÀúÀÎÅÍÆäÀÌ½º (유저인터페이스)'''&amp;lt;br&amp;gt;Similar to its main folder, texture. Has the world map, login background, and loading screens as well.&lt;br /&gt;
:*** '''basic_interface'''&amp;lt;br&amp;gt;Interface images, buttons and other graphics having to do with menus.&lt;br /&gt;
:*** '''battle_field'''&amp;lt;br&amp;gt;Help buttons.&lt;br /&gt;
:*** '''cardbmp'''&amp;lt;br&amp;gt;Card images for when you click view in-game or right click the card. Image has to be .bmp format.&lt;br /&gt;
:*** '''collection'''&amp;lt;br&amp;gt;Images for items, the image will show up to the left of the description for the item. Has to be .bmp format.&lt;br /&gt;
:*** '''illust'''&amp;lt;br&amp;gt;Images for NPCs, pets, and quest images. Examples are kafra, or the flag in the novice grounds. They have to have the transparent pink background, and be .bmp.&lt;br /&gt;
:*** '''item'''&amp;lt;br&amp;gt;Images for the items when seen in the inventory. Images have to have the transparent pink background and be .bmp.&lt;br /&gt;
:*** '''login_interface'''&amp;lt;br&amp;gt;As the name suggests, the login interface. Images for character selection, and the login screen. Also has some warning images. .bmp format and needs transparency.&lt;br /&gt;
:*** '''map'''&amp;lt;br&amp;gt;Map images, the map is displayed in the upper right hand corner.&lt;br /&gt;
:* '''wav'''&amp;lt;br&amp;gt;All the game sounds for monsters, and attacks.&lt;br /&gt;
:** '''effect'''&amp;lt;br&amp;gt;All the game sounds for skills.&lt;br /&gt;
[[Category:Client Configuration]]&lt;br /&gt;
[[Category:Data]]&lt;br /&gt;
[[Category:Customization]]&lt;/div&gt;</summary>
		<author><name>Wolfeh</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Custom_NPC</id>
		<title>Custom NPC</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Custom_NPC"/>
				<updated>2016-10-04T03:22:16Z</updated>
		
		<summary type="html">&lt;p&gt;Wolfeh: /* constants.conf */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Client-side=&lt;br /&gt;
==Adding Sprite==&lt;br /&gt;
Download the .spr and .act file for the NPC and place them in data/sprite/npc.&lt;br /&gt;
==NPCidentity.lub==&lt;br /&gt;
Add your NPC to NPCidentity.lub. Most recommend adding new NPC's with ID's starting at 1500, so that there is room for new official sprites without them overlapping your custom ones. The name of the sprite does not have to be capitalized. If the name of the sprite is lowercase, you can add them to all files as lowercase, such as in the example below, the sprite can be JT_NPCNAME or JT_npcname. The last line of this file does not need a comma at the end of the line, but any lines which are not the last line require a comma.&lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
 JT_NPCNAME = 10500&lt;br /&gt;
&lt;br /&gt;
==jobname.lub==&lt;br /&gt;
Exact same rules apply to this file. Can be lowercase or uppercase, last line does not have to have a comma. Slightly different format is all that differs from NPCidentity.lub.&lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
 [jobtbl.JT_NPCNAME] = &amp;quot;NPCNAME&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
=Server Side=&lt;br /&gt;
==constants.conf==&lt;br /&gt;
Located in your db folder. Find the NPC list and add your NPC to the bottom.&lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
 NPCNAME:                  10500&lt;br /&gt;
&lt;br /&gt;
==npc.h==&lt;br /&gt;
npc.h is located in src/map. Open it in notepad or another text editor.&lt;br /&gt;
&lt;br /&gt;
Find:&lt;br /&gt;
 #define MAX_NPC_CLASS2_END 10203&lt;br /&gt;
&lt;br /&gt;
Change to:&lt;br /&gt;
 #define MAX_NPC_CLASS2_END 10800&lt;br /&gt;
&lt;br /&gt;
You can make the max larger if you feel it is necessary, but this should give you plenty of room. Save and [[Compiling|recompile]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Data]]&lt;br /&gt;
[[Category:Customization]]&lt;/div&gt;</summary>
		<author><name>Wolfeh</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Custom_NPC</id>
		<title>Custom NPC</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Custom_NPC"/>
				<updated>2016-10-04T03:20:29Z</updated>
		
		<summary type="html">&lt;p&gt;Wolfeh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Client-side=&lt;br /&gt;
==Adding Sprite==&lt;br /&gt;
Download the .spr and .act file for the NPC and place them in data/sprite/npc.&lt;br /&gt;
==NPCidentity.lub==&lt;br /&gt;
Add your NPC to NPCidentity.lub. Most recommend adding new NPC's with ID's starting at 1500, so that there is room for new official sprites without them overlapping your custom ones. The name of the sprite does not have to be capitalized. If the name of the sprite is lowercase, you can add them to all files as lowercase, such as in the example below, the sprite can be JT_NPCNAME or JT_npcname. The last line of this file does not need a comma at the end of the line, but any lines which are not the last line require a comma.&lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
 JT_NPCNAME = 10500&lt;br /&gt;
&lt;br /&gt;
==jobname.lub==&lt;br /&gt;
Exact same rules apply to this file. Can be lowercase or uppercase, last line does not have to have a comma. Slightly different format is all that differs from NPCidentity.lub.&lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
 [jobtbl.JT_NPCNAME] = &amp;quot;NPCNAME&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
=Server Side=&lt;br /&gt;
==constants.conf==&lt;br /&gt;
Located in your db folder. Find the NPC list and add your NPC to the bottom.&lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
 nurse:                  10500&lt;br /&gt;
==npc.h==&lt;br /&gt;
npc.h is located in src/map. Open it in notepad or another text editor.&lt;br /&gt;
&lt;br /&gt;
Find:&lt;br /&gt;
 #define MAX_NPC_CLASS2_END 10203&lt;br /&gt;
&lt;br /&gt;
Change to:&lt;br /&gt;
 #define MAX_NPC_CLASS2_END 10800&lt;br /&gt;
&lt;br /&gt;
You can make the max larger if you feel it is necessary, but this should give you plenty of room. Save and [[Compiling|recompile]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Data]]&lt;br /&gt;
[[Category:Customization]]&lt;/div&gt;</summary>
		<author><name>Wolfeh</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Custom_NPC</id>
		<title>Custom NPC</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Custom_NPC"/>
				<updated>2016-10-04T03:20:07Z</updated>
		
		<summary type="html">&lt;p&gt;Wolfeh: Created page with &amp;quot;=Client-side= ==Adding Sprite== Download the .spr and .act file for the NPC and place them in data/sprite/npc. ==NPCidentity.lub== Add your NPC to NPCidentity.lub. Most recomm...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Client-side=&lt;br /&gt;
==Adding Sprite==&lt;br /&gt;
Download the .spr and .act file for the NPC and place them in data/sprite/npc.&lt;br /&gt;
==NPCidentity.lub==&lt;br /&gt;
Add your NPC to NPCidentity.lub. Most recommend adding new NPC's with ID's starting at 1500, so that there is room for new official sprites without them overlapping your custom ones. The name of the sprite does not have to be capitalized. If the name of the sprite is lowercase, you can add them to all files as lowercase, such as in the example below, the sprite can be JT_NPCNAME or JT_npcname. The last line of this file does not need a comma at the end of the line, but any lines which are not the last line require a comma.&lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
 JT_NPCNAME = 10500&lt;br /&gt;
&lt;br /&gt;
==jobname.lub==&lt;br /&gt;
Exact same rules apply to this file. Can be lowercase or uppercase, last line does not have to have a comma. Slightly different format is all that differs from NPCidentity.lub.&lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
 [jobtbl.JT_NPCNAME] = &amp;quot;NPCNAME&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
=Server Side=&lt;br /&gt;
==constants.conf==&lt;br /&gt;
Located in your db folder. Find the NPC list and add your NPC to the bottom.&lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
 nurse:                  10500&lt;br /&gt;
==npc.h==&lt;br /&gt;
npc.h is located in src/map. Open it in notepad or another text editor.&lt;br /&gt;
&lt;br /&gt;
Find:&lt;br /&gt;
 #define MAX_NPC_CLASS2_END 10203&lt;br /&gt;
&lt;br /&gt;
Change to:&lt;br /&gt;
 #define MAX_NPC_CLASS2_END 10800&lt;br /&gt;
&lt;br /&gt;
You can make the max larger if you feel it is necessary, but this should give you plenty of room. Save and [[Compiling|recompile]].&lt;/div&gt;</summary>
		<author><name>Wolfeh</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-17T22:17:46Z</updated>
		
		<summary type="html">&lt;p&gt;Wolfeh: Removed any references to NPC ID's. These are no longer recommended and may lose support.&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; 1_M_MERCHANT,{&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; 1_M_MERCHANT,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; 1_M_MERCHANT,{&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; 1_M_MERCHANT,{&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; 1_M_MERCHANT&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; 1_M_MERCHANT&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; 1_M_MERCHANT&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 NPC view constant (actual name of the npc sprite, 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	4_WHIKEBAIN,{&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	4_F_AGENTKAFRA&lt;br /&gt;
 hu_fild05,186,210,4	duplicate(test)	Test NPC	4_F_AGENTKAFRA&lt;br /&gt;
 yuno_fild07,221,179,4	duplicate(test)	Test NPC	4_F_AGENTKAFRA&lt;br /&gt;
 tha_scene01,139,194,1	duplicate(test)	Test NPC	4_F_AGENTKAFRA&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>Wolfeh</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-09-06T04:09:44Z</updated>
		
		<summary type="html">&lt;p&gt;Wolfeh: /* Files Configured Correctly, sprite does not show up in-game */ Capitalization~&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: {                        (defaults to all job)&lt;br /&gt;
 	          All: true/false               (boolean, defaults to false)&lt;br /&gt;
 	          Novice: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Swordsman: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Magician: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Archer: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Acolyte: true/false           (boolean, defaults to false)		&lt;br /&gt;
 	          Merchant: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Thief: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Knight: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Priest: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Wizard: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Blacksmith: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Hunter: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Assassin: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Crusader: true/false          (boolean, defaults to false)		&lt;br /&gt;
 	          Monk: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Sage: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Rogue: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Alchemist: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Bard: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Taekwon: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Star_Gladiator: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Soul_Linker: true/false       (boolean, defaults to false)&lt;br /&gt;
 	          Gunslinger: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Ninja: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Gangsi: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Death_Knight: true/false      (boolean, defaults to false)&lt;br /&gt;
 	          Dark_Collector: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Kagerou: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Rebellion: true/false         (boolean, defaults to false)&lt;br /&gt;
 	}&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;
 	ForceSerial: true/false       (boolean, defaults to false)&lt;br /&gt;
 	BuyingStore: true/false       (boolean, defaults to false)&lt;br /&gt;
 	Delay: Delay to use item      (int, defaults to 0)&lt;br /&gt;
 	KeepAfterUse: true/false      (boolean, defaults to false)&lt;br /&gt;
 	Trade: {                      (defaults to no restrictions)&lt;br /&gt;
 		override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		nodrop: true/false            (boolean, defaults to false)&lt;br /&gt;
 		notrade: true/false           (boolean, defaults to false)&lt;br /&gt;
 		nostorage: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nocart: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noselltonpc: true/false       (boolean, defaults to false)&lt;br /&gt;
 		nomail: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noauction: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nogstorage: true/false        (boolean, defaults to false)&lt;br /&gt;
 		partneroverride: true/false   (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Nouse: {                      (defaults to no restrictions)&lt;br /&gt;
 	override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		sitting: true/false           (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Stack: [amount, type]         (int, defaults to 0)&lt;br /&gt;
 	Sprite: SpriteID              (int, defaults to 0)&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;
* '''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://herc.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 (And so on)&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. You can look at existing items for an idea of how to format a description.&lt;br /&gt;
==idnum2itemresnametable.txt==&lt;br /&gt;
This file sets the inventory and drop-sprite for 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;
==accname.lub==&lt;br /&gt;
accname.lub can be found with the other lua files under RO folder/data/luafiles514/luafiles/datainfo. If you do not have these folders or this file, [http://herc.ws/board/topic/398-client-translation-project/ see this topic] and download the latest translated data folder. It points to the item's sprite file. It is as follows:&lt;br /&gt;
  [ACCESSORY_IDs.ACCESSORY_ITEM_NAME] = &amp;quot;Item_Name&amp;quot;,&lt;br /&gt;
==accessoryid.lub==&lt;br /&gt;
This is where the view ID for your item can be found. It can be located in the same folder as accname.lub. It is as follows:&lt;br /&gt;
  ACCESSORY_ITEM_NAME = ViewID#,&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;
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 and the image/drop sprite files are all named Black_Sword.* . Also I want to display a Sword when not identified.&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;
The unidentifiedResourceName is the Sword item's sprite name, so the client will show it as a sword when not identified. The ClassNum is also 2, for a one-handed sword. If you want to use another sprite for your unidentifiedResourceName, simply search (ctrl+f) for the item's name in iteminfo.lub and copy the identifiedResourceName value for that item and apply it to your custom item's unidentifiedResourceName value.&lt;br /&gt;
&lt;br /&gt;
= Allocating Items on Client Side =&lt;br /&gt;
Most custom items will have 6 files (if yours does not, see [[Custom_Items#Less_Than_6_Files|Less Than 6 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;
==Sprite Locations==&lt;br /&gt;
We place the six files in the following folders&lt;br /&gt;
&lt;br /&gt;
* Copy Helmet_drop.spr to [RO Folder]\data\sprite\¾ÆÀÌÅÛ\Helmet.spr &lt;br /&gt;
* Copy Helmet_drop.act to [RO Folder]\data\sprite\¾ÆÀÌÅÛ\Helmet.act &lt;br /&gt;
* Copy Helmet_item.bmp to [RO Folder]\data\texture\À¯ÀúÀÎÅÍÆäÀÌ½º\item\Helmet.bmp &lt;br /&gt;
* Copy Helmet_collection.bmp to [RO Folder]\data\texture\À¯ÀúÀÎÅÍÆäÀÌ½º\collection\Helmet.bmp  &lt;br /&gt;
* Copy Helmet.spr to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\¿©\¿©_Helmet.spr (Female) '''AND''' ¿©_Helmet.act &lt;br /&gt;
* Copy Helmet.spr to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\³²\³²_Helmet.spr (Male) '''AND''' ³²_Helmet.act &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;
==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;
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 and movement animations.&lt;br /&gt;
&lt;br /&gt;
3) Item bmp - 24x24 size 256 bit bmp file. Magenta (FF00FF hexadecimal value) background.&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;
==How to differentiate between sprite files?==&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;
==Less Than 6 Files==&lt;br /&gt;
In rare cases or for garment and accessory items, you may have less than 6 files to place. For a garment or accessory, you do not need a .spr and .act because these items are not visible on a character, therefore they do not require a .spr or .act file. For weapons, headgears, and shields, you should have 6 files. If you do not, you will have to create the missing files yourself. Especially for old sprites, the spriter may have just made the sprites and made no collection image, item image, or drop sprite. See [[Spriting]] on how to create these yourself.&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;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
==File Not Found &amp;quot;Cannot find File : path\to\file\filename.extension&amp;quot;==&lt;br /&gt;
As the error states, the client cannot find the file required to display the sprite, act, collection, or item image for the item. Make sure you put your file in the right place and that it is named correctly.&lt;br /&gt;
==Unknown Item==&lt;br /&gt;
If your item's name is unknown item and it has an apple icon, refer to [[Custom_Items#Defining_Item_clientside_.28Renewal_Clients_.3C.3D_2012-04-10a_.26_Main_Clients_.3C.3D_2012-07-10a.29|Defining Items Clientside]] and make sure you added the item to each and every file, or just iteminfo.lua for a newer client.&lt;br /&gt;
&lt;br /&gt;
==Files Configured Correctly, Sprite Still Does Not Show up In-game==&lt;br /&gt;
If you do not have your sprites and files compressed into a GRF, you will need to make sure your client is diffed to read your data folder first.&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Data]]&lt;br /&gt;
[[Category:Customization]]&lt;/div&gt;</summary>
		<author><name>Wolfeh</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-09-06T04:04:23Z</updated>
		
		<summary type="html">&lt;p&gt;Wolfeh: /* Defining Items clientside (For New Clients) */ Must. Add. Punctuation. Grammar cleanup. Also added how to find sprite names to use as unidentifiedResourceName's&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: {                        (defaults to all job)&lt;br /&gt;
 	          All: true/false               (boolean, defaults to false)&lt;br /&gt;
 	          Novice: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Swordsman: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Magician: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Archer: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Acolyte: true/false           (boolean, defaults to false)		&lt;br /&gt;
 	          Merchant: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Thief: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Knight: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Priest: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Wizard: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Blacksmith: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Hunter: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Assassin: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Crusader: true/false          (boolean, defaults to false)		&lt;br /&gt;
 	          Monk: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Sage: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Rogue: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Alchemist: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Bard: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Taekwon: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Star_Gladiator: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Soul_Linker: true/false       (boolean, defaults to false)&lt;br /&gt;
 	          Gunslinger: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Ninja: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Gangsi: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Death_Knight: true/false      (boolean, defaults to false)&lt;br /&gt;
 	          Dark_Collector: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Kagerou: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Rebellion: true/false         (boolean, defaults to false)&lt;br /&gt;
 	}&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;
 	ForceSerial: true/false       (boolean, defaults to false)&lt;br /&gt;
 	BuyingStore: true/false       (boolean, defaults to false)&lt;br /&gt;
 	Delay: Delay to use item      (int, defaults to 0)&lt;br /&gt;
 	KeepAfterUse: true/false      (boolean, defaults to false)&lt;br /&gt;
 	Trade: {                      (defaults to no restrictions)&lt;br /&gt;
 		override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		nodrop: true/false            (boolean, defaults to false)&lt;br /&gt;
 		notrade: true/false           (boolean, defaults to false)&lt;br /&gt;
 		nostorage: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nocart: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noselltonpc: true/false       (boolean, defaults to false)&lt;br /&gt;
 		nomail: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noauction: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nogstorage: true/false        (boolean, defaults to false)&lt;br /&gt;
 		partneroverride: true/false   (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Nouse: {                      (defaults to no restrictions)&lt;br /&gt;
 	override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		sitting: true/false           (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Stack: [amount, type]         (int, defaults to 0)&lt;br /&gt;
 	Sprite: SpriteID              (int, defaults to 0)&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;
* '''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://herc.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 (And so on)&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. You can look at existing items for an idea of how to format a description.&lt;br /&gt;
==idnum2itemresnametable.txt==&lt;br /&gt;
This file sets the inventory and drop-sprite for 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;
==accname.lub==&lt;br /&gt;
accname.lub can be found with the other lua files under RO folder/data/luafiles514/luafiles/datainfo. If you do not have these folders or this file, [http://herc.ws/board/topic/398-client-translation-project/ see this topic] and download the latest translated data folder. It points to the item's sprite file. It is as follows:&lt;br /&gt;
  [ACCESSORY_IDs.ACCESSORY_ITEM_NAME] = &amp;quot;Item_Name&amp;quot;,&lt;br /&gt;
==accessoryid.lub==&lt;br /&gt;
This is where the view ID for your item can be found. It can be located in the same folder as accname.lub. It is as follows:&lt;br /&gt;
  ACCESSORY_ITEM_NAME = ViewID#,&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;
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 and the image/drop sprite files are all named Black_Sword.* . Also I want to display a Sword when not identified.&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;
The unidentifiedResourceName is the Sword item's sprite name, so the client will show it as a sword when not identified. The ClassNum is also 2, for a one-handed sword. If you want to use another sprite for your unidentifiedResourceName, simply search (ctrl+f) for the item's name in iteminfo.lub and copy the identifiedResourceName value for that item and apply it to your custom item's unidentifiedResourceName value.&lt;br /&gt;
&lt;br /&gt;
= Allocating Items on Client Side =&lt;br /&gt;
Most custom items will have 6 files (if yours does not, see [[Custom_Items#Less_Than_6_Files|Less Than 6 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;
==Sprite Locations==&lt;br /&gt;
We place the six files in the following folders&lt;br /&gt;
&lt;br /&gt;
* Copy Helmet_drop.spr to [RO Folder]\data\sprite\¾ÆÀÌÅÛ\Helmet.spr &lt;br /&gt;
* Copy Helmet_drop.act to [RO Folder]\data\sprite\¾ÆÀÌÅÛ\Helmet.act &lt;br /&gt;
* Copy Helmet_item.bmp to [RO Folder]\data\texture\À¯ÀúÀÎÅÍÆäÀÌ½º\item\Helmet.bmp &lt;br /&gt;
* Copy Helmet_collection.bmp to [RO Folder]\data\texture\À¯ÀúÀÎÅÍÆäÀÌ½º\collection\Helmet.bmp  &lt;br /&gt;
* Copy Helmet.spr to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\¿©\¿©_Helmet.spr (Female) '''AND''' ¿©_Helmet.act &lt;br /&gt;
* Copy Helmet.spr to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\³²\³²_Helmet.spr (Male) '''AND''' ³²_Helmet.act &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;
==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;
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 and movement animations.&lt;br /&gt;
&lt;br /&gt;
3) Item bmp - 24x24 size 256 bit bmp file. Magenta (FF00FF hexadecimal value) background.&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;
==How to differentiate between sprite files?==&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;
==Less Than 6 Files==&lt;br /&gt;
In rare cases or for garment and accessory items, you may have less than 6 files to place. For a garment or accessory, you do not need a .spr and .act because these items are not visible on a character, therefore they do not require a .spr or .act file. For weapons, headgears, and shields, you should have 6 files. If you do not, you will have to create the missing files yourself. Especially for old sprites, the spriter may have just made the sprites and made no collection image, item image, or drop sprite. See [[Spriting]] on how to create these yourself.&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;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
==File Not Found &amp;quot;Cannot find File : path\to\file\filename.extension&amp;quot;==&lt;br /&gt;
As the error states, the client cannot find the file required to display the sprite, act, collection, or item image for the item. Make sure you put your file in the right place and that it is named correctly.&lt;br /&gt;
==Unknown Item==&lt;br /&gt;
If your item's name is unknown item and it has an apple icon, refer to [[Custom_Items#Defining_Item_clientside_.28Renewal_Clients_.3C.3D_2012-04-10a_.26_Main_Clients_.3C.3D_2012-07-10a.29|Defining Items Clientside]] and make sure you added the item to each and every file, or just iteminfo.lua for a newer client.&lt;br /&gt;
&lt;br /&gt;
==Files Configured Correctly, sprite does not show up in-game==&lt;br /&gt;
If you do not have your sprites and files compressed into a GRF, you will need to make sure your client is diffed to read your data folder first.&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Data]]&lt;br /&gt;
[[Category:Customization]]&lt;/div&gt;</summary>
		<author><name>Wolfeh</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-09-06T03:53:52Z</updated>
		
		<summary type="html">&lt;p&gt;Wolfeh: /* accessoryid.lub */&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: {                        (defaults to all job)&lt;br /&gt;
 	          All: true/false               (boolean, defaults to false)&lt;br /&gt;
 	          Novice: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Swordsman: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Magician: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Archer: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Acolyte: true/false           (boolean, defaults to false)		&lt;br /&gt;
 	          Merchant: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Thief: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Knight: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Priest: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Wizard: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Blacksmith: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Hunter: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Assassin: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Crusader: true/false          (boolean, defaults to false)		&lt;br /&gt;
 	          Monk: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Sage: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Rogue: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Alchemist: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Bard: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Taekwon: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Star_Gladiator: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Soul_Linker: true/false       (boolean, defaults to false)&lt;br /&gt;
 	          Gunslinger: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Ninja: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Gangsi: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Death_Knight: true/false      (boolean, defaults to false)&lt;br /&gt;
 	          Dark_Collector: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Kagerou: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Rebellion: true/false         (boolean, defaults to false)&lt;br /&gt;
 	}&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;
 	ForceSerial: true/false       (boolean, defaults to false)&lt;br /&gt;
 	BuyingStore: true/false       (boolean, defaults to false)&lt;br /&gt;
 	Delay: Delay to use item      (int, defaults to 0)&lt;br /&gt;
 	KeepAfterUse: true/false      (boolean, defaults to false)&lt;br /&gt;
 	Trade: {                      (defaults to no restrictions)&lt;br /&gt;
 		override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		nodrop: true/false            (boolean, defaults to false)&lt;br /&gt;
 		notrade: true/false           (boolean, defaults to false)&lt;br /&gt;
 		nostorage: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nocart: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noselltonpc: true/false       (boolean, defaults to false)&lt;br /&gt;
 		nomail: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noauction: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nogstorage: true/false        (boolean, defaults to false)&lt;br /&gt;
 		partneroverride: true/false   (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Nouse: {                      (defaults to no restrictions)&lt;br /&gt;
 	override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		sitting: true/false           (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Stack: [amount, type]         (int, defaults to 0)&lt;br /&gt;
 	Sprite: SpriteID              (int, defaults to 0)&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;
* '''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://herc.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 (And so on)&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. You can look at existing items for an idea of how to format a description.&lt;br /&gt;
==idnum2itemresnametable.txt==&lt;br /&gt;
This file sets the inventory and drop-sprite for 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;
==accname.lub==&lt;br /&gt;
accname.lub can be found with the other lua files under RO folder/data/luafiles514/luafiles/datainfo. If you do not have these folders or this file, [http://herc.ws/board/topic/398-client-translation-project/ see this topic] and download the latest translated data folder. It points to the item's sprite file. It is as follows:&lt;br /&gt;
  [ACCESSORY_IDs.ACCESSORY_ITEM_NAME] = &amp;quot;Item_Name&amp;quot;,&lt;br /&gt;
==accessoryid.lub==&lt;br /&gt;
This is where the view ID for your item can be found. It can be located in the same folder as accname.lub. It is as follows:&lt;br /&gt;
  ACCESSORY_ITEM_NAME = ViewID#,&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;
Most custom items will have 6 files (if yours does not, see [[Custom_Items#Less_Than_6_Files|Less Than 6 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;
==Sprite Locations==&lt;br /&gt;
We place the six files in the following folders&lt;br /&gt;
&lt;br /&gt;
* Copy Helmet_drop.spr to [RO Folder]\data\sprite\¾ÆÀÌÅÛ\Helmet.spr &lt;br /&gt;
* Copy Helmet_drop.act to [RO Folder]\data\sprite\¾ÆÀÌÅÛ\Helmet.act &lt;br /&gt;
* Copy Helmet_item.bmp to [RO Folder]\data\texture\À¯ÀúÀÎÅÍÆäÀÌ½º\item\Helmet.bmp &lt;br /&gt;
* Copy Helmet_collection.bmp to [RO Folder]\data\texture\À¯ÀúÀÎÅÍÆäÀÌ½º\collection\Helmet.bmp  &lt;br /&gt;
* Copy Helmet.spr to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\¿©\¿©_Helmet.spr (Female) '''AND''' ¿©_Helmet.act &lt;br /&gt;
* Copy Helmet.spr to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\³²\³²_Helmet.spr (Male) '''AND''' ³²_Helmet.act &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;
==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;
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 and movement animations.&lt;br /&gt;
&lt;br /&gt;
3) Item bmp - 24x24 size 256 bit bmp file. Magenta (FF00FF hexadecimal value) background.&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;
==How to differentiate between sprite files?==&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;
==Less Than 6 Files==&lt;br /&gt;
In rare cases or for garment and accessory items, you may have less than 6 files to place. For a garment or accessory, you do not need a .spr and .act because these items are not visible on a character, therefore they do not require a .spr or .act file. For weapons, headgears, and shields, you should have 6 files. If you do not, you will have to create the missing files yourself. Especially for old sprites, the spriter may have just made the sprites and made no collection image, item image, or drop sprite. See [[Spriting]] on how to create these yourself.&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;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
==File Not Found &amp;quot;Cannot find File : path\to\file\filename.extension&amp;quot;==&lt;br /&gt;
As the error states, the client cannot find the file required to display the sprite, act, collection, or item image for the item. Make sure you put your file in the right place and that it is named correctly.&lt;br /&gt;
==Unknown Item==&lt;br /&gt;
If your item's name is unknown item and it has an apple icon, refer to [[Custom_Items#Defining_Item_clientside_.28Renewal_Clients_.3C.3D_2012-04-10a_.26_Main_Clients_.3C.3D_2012-07-10a.29|Defining Items Clientside]] and make sure you added the item to each and every file, or just iteminfo.lua for a newer client.&lt;br /&gt;
&lt;br /&gt;
==Files Configured Correctly, sprite does not show up in-game==&lt;br /&gt;
If you do not have your sprites and files compressed into a GRF, you will need to make sure your client is diffed to read your data folder first.&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Data]]&lt;br /&gt;
[[Category:Customization]]&lt;/div&gt;</summary>
		<author><name>Wolfeh</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-09-06T03:53:32Z</updated>
		
		<summary type="html">&lt;p&gt;Wolfeh: /* Defining Item clientside (Renewal Clients &amp;lt;= 2012-04-10a &amp;amp; Main Clients &amp;lt;= 2012-07-10a) */ Added bit accname and accessoryid.&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: {                        (defaults to all job)&lt;br /&gt;
 	          All: true/false               (boolean, defaults to false)&lt;br /&gt;
 	          Novice: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Swordsman: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Magician: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Archer: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Acolyte: true/false           (boolean, defaults to false)		&lt;br /&gt;
 	          Merchant: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Thief: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Knight: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Priest: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Wizard: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Blacksmith: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Hunter: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Assassin: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Crusader: true/false          (boolean, defaults to false)		&lt;br /&gt;
 	          Monk: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Sage: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Rogue: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Alchemist: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Bard: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Taekwon: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Star_Gladiator: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Soul_Linker: true/false       (boolean, defaults to false)&lt;br /&gt;
 	          Gunslinger: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Ninja: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Gangsi: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Death_Knight: true/false      (boolean, defaults to false)&lt;br /&gt;
 	          Dark_Collector: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Kagerou: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Rebellion: true/false         (boolean, defaults to false)&lt;br /&gt;
 	}&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;
 	ForceSerial: true/false       (boolean, defaults to false)&lt;br /&gt;
 	BuyingStore: true/false       (boolean, defaults to false)&lt;br /&gt;
 	Delay: Delay to use item      (int, defaults to 0)&lt;br /&gt;
 	KeepAfterUse: true/false      (boolean, defaults to false)&lt;br /&gt;
 	Trade: {                      (defaults to no restrictions)&lt;br /&gt;
 		override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		nodrop: true/false            (boolean, defaults to false)&lt;br /&gt;
 		notrade: true/false           (boolean, defaults to false)&lt;br /&gt;
 		nostorage: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nocart: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noselltonpc: true/false       (boolean, defaults to false)&lt;br /&gt;
 		nomail: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noauction: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nogstorage: true/false        (boolean, defaults to false)&lt;br /&gt;
 		partneroverride: true/false   (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Nouse: {                      (defaults to no restrictions)&lt;br /&gt;
 	override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		sitting: true/false           (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Stack: [amount, type]         (int, defaults to 0)&lt;br /&gt;
 	Sprite: SpriteID              (int, defaults to 0)&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;
* '''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://herc.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 (And so on)&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. You can look at existing items for an idea of how to format a description.&lt;br /&gt;
==idnum2itemresnametable.txt==&lt;br /&gt;
This file sets the inventory and drop-sprite for 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;
==accname.lub==&lt;br /&gt;
accname.lub can be found with the other lua files under RO folder/data/luafiles514/luafiles/datainfo. If you do not have these folders or this file, [http://herc.ws/board/topic/398-client-translation-project/ see this topic] and download the latest translated data folder. It points to the item's sprite file. It is as follows:&lt;br /&gt;
  [ACCESSORY_IDs.ACCESSORY_ITEM_NAME] = &amp;quot;Item_Name&amp;quot;,&lt;br /&gt;
==accessoryid.lub==&lt;br /&gt;
This is where the viewid for your item can be found. It can be located in the same folder as accname.lub. It is as follows:&lt;br /&gt;
  ACCESSORY_ITEM_NAME = ViewID#,&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;
Most custom items will have 6 files (if yours does not, see [[Custom_Items#Less_Than_6_Files|Less Than 6 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;
==Sprite Locations==&lt;br /&gt;
We place the six files in the following folders&lt;br /&gt;
&lt;br /&gt;
* Copy Helmet_drop.spr to [RO Folder]\data\sprite\¾ÆÀÌÅÛ\Helmet.spr &lt;br /&gt;
* Copy Helmet_drop.act to [RO Folder]\data\sprite\¾ÆÀÌÅÛ\Helmet.act &lt;br /&gt;
* Copy Helmet_item.bmp to [RO Folder]\data\texture\À¯ÀúÀÎÅÍÆäÀÌ½º\item\Helmet.bmp &lt;br /&gt;
* Copy Helmet_collection.bmp to [RO Folder]\data\texture\À¯ÀúÀÎÅÍÆäÀÌ½º\collection\Helmet.bmp  &lt;br /&gt;
* Copy Helmet.spr to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\¿©\¿©_Helmet.spr (Female) '''AND''' ¿©_Helmet.act &lt;br /&gt;
* Copy Helmet.spr to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\³²\³²_Helmet.spr (Male) '''AND''' ³²_Helmet.act &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;
==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;
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 and movement animations.&lt;br /&gt;
&lt;br /&gt;
3) Item bmp - 24x24 size 256 bit bmp file. Magenta (FF00FF hexadecimal value) background.&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;
==How to differentiate between sprite files?==&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;
==Less Than 6 Files==&lt;br /&gt;
In rare cases or for garment and accessory items, you may have less than 6 files to place. For a garment or accessory, you do not need a .spr and .act because these items are not visible on a character, therefore they do not require a .spr or .act file. For weapons, headgears, and shields, you should have 6 files. If you do not, you will have to create the missing files yourself. Especially for old sprites, the spriter may have just made the sprites and made no collection image, item image, or drop sprite. See [[Spriting]] on how to create these yourself.&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;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
==File Not Found &amp;quot;Cannot find File : path\to\file\filename.extension&amp;quot;==&lt;br /&gt;
As the error states, the client cannot find the file required to display the sprite, act, collection, or item image for the item. Make sure you put your file in the right place and that it is named correctly.&lt;br /&gt;
==Unknown Item==&lt;br /&gt;
If your item's name is unknown item and it has an apple icon, refer to [[Custom_Items#Defining_Item_clientside_.28Renewal_Clients_.3C.3D_2012-04-10a_.26_Main_Clients_.3C.3D_2012-07-10a.29|Defining Items Clientside]] and make sure you added the item to each and every file, or just iteminfo.lua for a newer client.&lt;br /&gt;
&lt;br /&gt;
==Files Configured Correctly, sprite does not show up in-game==&lt;br /&gt;
If you do not have your sprites and files compressed into a GRF, you will need to make sure your client is diffed to read your data folder first.&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Data]]&lt;br /&gt;
[[Category:Customization]]&lt;/div&gt;</summary>
		<author><name>Wolfeh</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-09-06T03:50:49Z</updated>
		
		<summary type="html">&lt;p&gt;Wolfeh: Removed xray bit. That project is long dead and we also no longer need to compile and decompile files thanks to newer diffs that load luas.&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: {                        (defaults to all job)&lt;br /&gt;
 	          All: true/false               (boolean, defaults to false)&lt;br /&gt;
 	          Novice: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Swordsman: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Magician: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Archer: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Acolyte: true/false           (boolean, defaults to false)		&lt;br /&gt;
 	          Merchant: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Thief: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Knight: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Priest: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Wizard: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Blacksmith: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Hunter: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Assassin: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Crusader: true/false          (boolean, defaults to false)		&lt;br /&gt;
 	          Monk: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Sage: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Rogue: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Alchemist: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Bard: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Taekwon: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Star_Gladiator: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Soul_Linker: true/false       (boolean, defaults to false)&lt;br /&gt;
 	          Gunslinger: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Ninja: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Gangsi: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Death_Knight: true/false      (boolean, defaults to false)&lt;br /&gt;
 	          Dark_Collector: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Kagerou: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Rebellion: true/false         (boolean, defaults to false)&lt;br /&gt;
 	}&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;
 	ForceSerial: true/false       (boolean, defaults to false)&lt;br /&gt;
 	BuyingStore: true/false       (boolean, defaults to false)&lt;br /&gt;
 	Delay: Delay to use item      (int, defaults to 0)&lt;br /&gt;
 	KeepAfterUse: true/false      (boolean, defaults to false)&lt;br /&gt;
 	Trade: {                      (defaults to no restrictions)&lt;br /&gt;
 		override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		nodrop: true/false            (boolean, defaults to false)&lt;br /&gt;
 		notrade: true/false           (boolean, defaults to false)&lt;br /&gt;
 		nostorage: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nocart: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noselltonpc: true/false       (boolean, defaults to false)&lt;br /&gt;
 		nomail: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noauction: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nogstorage: true/false        (boolean, defaults to false)&lt;br /&gt;
 		partneroverride: true/false   (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Nouse: {                      (defaults to no restrictions)&lt;br /&gt;
 	override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		sitting: true/false           (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Stack: [amount, type]         (int, defaults to 0)&lt;br /&gt;
 	Sprite: SpriteID              (int, defaults to 0)&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;
* '''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://herc.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;
Most custom items will have 6 files (if yours does not, see [[Custom_Items#Less_Than_6_Files|Less Than 6 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;
==Sprite Locations==&lt;br /&gt;
We place the six files in the following folders&lt;br /&gt;
&lt;br /&gt;
* Copy Helmet_drop.spr to [RO Folder]\data\sprite\¾ÆÀÌÅÛ\Helmet.spr &lt;br /&gt;
* Copy Helmet_drop.act to [RO Folder]\data\sprite\¾ÆÀÌÅÛ\Helmet.act &lt;br /&gt;
* Copy Helmet_item.bmp to [RO Folder]\data\texture\À¯ÀúÀÎÅÍÆäÀÌ½º\item\Helmet.bmp &lt;br /&gt;
* Copy Helmet_collection.bmp to [RO Folder]\data\texture\À¯ÀúÀÎÅÍÆäÀÌ½º\collection\Helmet.bmp  &lt;br /&gt;
* Copy Helmet.spr to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\¿©\¿©_Helmet.spr (Female) '''AND''' ¿©_Helmet.act &lt;br /&gt;
* Copy Helmet.spr to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\³²\³²_Helmet.spr (Male) '''AND''' ³²_Helmet.act &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;
==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;
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 and movement animations.&lt;br /&gt;
&lt;br /&gt;
3) Item bmp - 24x24 size 256 bit bmp file. Magenta (FF00FF hexadecimal value) background.&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;
==How to differentiate between sprite files?==&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;
==Less Than 6 Files==&lt;br /&gt;
In rare cases or for garment and accessory items, you may have less than 6 files to place. For a garment or accessory, you do not need a .spr and .act because these items are not visible on a character, therefore they do not require a .spr or .act file. For weapons, headgears, and shields, you should have 6 files. If you do not, you will have to create the missing files yourself. Especially for old sprites, the spriter may have just made the sprites and made no collection image, item image, or drop sprite. See [[Spriting]] on how to create these yourself.&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;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
==File Not Found &amp;quot;Cannot find File : path\to\file\filename.extension&amp;quot;==&lt;br /&gt;
As the error states, the client cannot find the file required to display the sprite, act, collection, or item image for the item. Make sure you put your file in the right place and that it is named correctly.&lt;br /&gt;
==Unknown Item==&lt;br /&gt;
If your item's name is unknown item and it has an apple icon, refer to [[Custom_Items#Defining_Item_clientside_.28Renewal_Clients_.3C.3D_2012-04-10a_.26_Main_Clients_.3C.3D_2012-07-10a.29|Defining Items Clientside]] and make sure you added the item to each and every file, or just iteminfo.lua for a newer client.&lt;br /&gt;
&lt;br /&gt;
==Files Configured Correctly, sprite does not show up in-game==&lt;br /&gt;
If you do not have your sprites and files compressed into a GRF, you will need to make sure your client is diffed to read your data folder first.&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Data]]&lt;br /&gt;
[[Category:Customization]]&lt;/div&gt;</summary>
		<author><name>Wolfeh</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-09-06T03:13:23Z</updated>
		
		<summary type="html">&lt;p&gt;Wolfeh: /* Less Than 6 Files */&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: {                        (defaults to all job)&lt;br /&gt;
 	          All: true/false               (boolean, defaults to false)&lt;br /&gt;
 	          Novice: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Swordsman: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Magician: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Archer: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Acolyte: true/false           (boolean, defaults to false)		&lt;br /&gt;
 	          Merchant: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Thief: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Knight: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Priest: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Wizard: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Blacksmith: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Hunter: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Assassin: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Crusader: true/false          (boolean, defaults to false)		&lt;br /&gt;
 	          Monk: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Sage: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Rogue: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Alchemist: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Bard: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Taekwon: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Star_Gladiator: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Soul_Linker: true/false       (boolean, defaults to false)&lt;br /&gt;
 	          Gunslinger: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Ninja: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Gangsi: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Death_Knight: true/false      (boolean, defaults to false)&lt;br /&gt;
 	          Dark_Collector: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Kagerou: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Rebellion: true/false         (boolean, defaults to false)&lt;br /&gt;
 	}&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;
 	ForceSerial: true/false       (boolean, defaults to false)&lt;br /&gt;
 	BuyingStore: true/false       (boolean, defaults to false)&lt;br /&gt;
 	Delay: Delay to use item      (int, defaults to 0)&lt;br /&gt;
 	KeepAfterUse: true/false      (boolean, defaults to false)&lt;br /&gt;
 	Trade: {                      (defaults to no restrictions)&lt;br /&gt;
 		override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		nodrop: true/false            (boolean, defaults to false)&lt;br /&gt;
 		notrade: true/false           (boolean, defaults to false)&lt;br /&gt;
 		nostorage: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nocart: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noselltonpc: true/false       (boolean, defaults to false)&lt;br /&gt;
 		nomail: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noauction: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nogstorage: true/false        (boolean, defaults to false)&lt;br /&gt;
 		partneroverride: true/false   (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Nouse: {                      (defaults to no restrictions)&lt;br /&gt;
 	override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		sitting: true/false           (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Stack: [amount, type]         (int, defaults to 0)&lt;br /&gt;
 	Sprite: SpriteID              (int, defaults to 0)&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;
* '''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://herc.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;
Most custom items will have 6 files (if yours does not, see [[Custom_Items#Less_Than_6_Files|Less Than 6 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;
==Sprite Locations==&lt;br /&gt;
We place the six files in the following folders&lt;br /&gt;
&lt;br /&gt;
* Copy Helmet_drop.spr to [RO Folder]\data\sprite\¾ÆÀÌÅÛ\Helmet.spr &lt;br /&gt;
* Copy Helmet_drop.act to [RO Folder]\data\sprite\¾ÆÀÌÅÛ\Helmet.act &lt;br /&gt;
* Copy Helmet_item.bmp to [RO Folder]\data\texture\À¯ÀúÀÎÅÍÆäÀÌ½º\item\Helmet.bmp &lt;br /&gt;
* Copy Helmet_collection.bmp to [RO Folder]\data\texture\À¯ÀúÀÎÅÍÆäÀÌ½º\collection\Helmet.bmp  &lt;br /&gt;
* Copy Helmet.spr to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\¿©\¿©_Helmet.spr (Female) '''AND''' ¿©_Helmet.act &lt;br /&gt;
* Copy Helmet.spr to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\³²\³²_Helmet.spr (Male) '''AND''' ³²_Helmet.act &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;
==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;
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 and movement animations.&lt;br /&gt;
&lt;br /&gt;
3) Item bmp - 24x24 size 256 bit bmp file. Magenta (FF00FF hexadecimal value) background.&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;
==How to differentiate between sprite files?==&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;
==Less Than 6 Files==&lt;br /&gt;
In rare cases or for garment and accessory items, you may have less than 6 files to place. For a garment or accessory, you do not need a .spr and .act because these items are not visible on a character, therefore they do not require a .spr or .act file. For weapons, headgears, and shields, you should have 6 files. If you do not, you will have to create the missing files yourself. Especially for old sprites, the spriter may have just made the sprites and made no collection image, item image, or drop sprite. See [[Spriting]] on how to create these yourself.&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;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
==File Not Found &amp;quot;Cannot find File : path\to\file\filename.extension&amp;quot;==&lt;br /&gt;
As the error states, the client cannot find the file required to display the sprite, act, collection, or item image for the item. Make sure you put your file in the right place and that it is named correctly.&lt;br /&gt;
==Unknown Item==&lt;br /&gt;
If your item's name is unknown item and it has an apple icon, refer to [[Custom_Items#Defining_Item_clientside_.28Renewal_Clients_.3C.3D_2012-04-10a_.26_Main_Clients_.3C.3D_2012-07-10a.29|Defining Items Clientside]] and make sure you added the item to each and every file, or just iteminfo.lua for a newer client.&lt;br /&gt;
&lt;br /&gt;
==Files Configured Correctly, sprite does not show up in-game==&lt;br /&gt;
If you do not have your sprites and files compressed into a GRF, you will need to make sure your client is diffed to read your data folder first.&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Data]]&lt;br /&gt;
[[Category:Customization]]&lt;/div&gt;</summary>
		<author><name>Wolfeh</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-09-06T03:12:58Z</updated>
		
		<summary type="html">&lt;p&gt;Wolfeh: /* Allocating Items on Client Side */&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: {                        (defaults to all job)&lt;br /&gt;
 	          All: true/false               (boolean, defaults to false)&lt;br /&gt;
 	          Novice: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Swordsman: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Magician: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Archer: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Acolyte: true/false           (boolean, defaults to false)		&lt;br /&gt;
 	          Merchant: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Thief: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Knight: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Priest: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Wizard: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Blacksmith: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Hunter: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Assassin: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Crusader: true/false          (boolean, defaults to false)		&lt;br /&gt;
 	          Monk: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Sage: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Rogue: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Alchemist: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Bard: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Taekwon: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Star_Gladiator: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Soul_Linker: true/false       (boolean, defaults to false)&lt;br /&gt;
 	          Gunslinger: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Ninja: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Gangsi: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Death_Knight: true/false      (boolean, defaults to false)&lt;br /&gt;
 	          Dark_Collector: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Kagerou: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Rebellion: true/false         (boolean, defaults to false)&lt;br /&gt;
 	}&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;
 	ForceSerial: true/false       (boolean, defaults to false)&lt;br /&gt;
 	BuyingStore: true/false       (boolean, defaults to false)&lt;br /&gt;
 	Delay: Delay to use item      (int, defaults to 0)&lt;br /&gt;
 	KeepAfterUse: true/false      (boolean, defaults to false)&lt;br /&gt;
 	Trade: {                      (defaults to no restrictions)&lt;br /&gt;
 		override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		nodrop: true/false            (boolean, defaults to false)&lt;br /&gt;
 		notrade: true/false           (boolean, defaults to false)&lt;br /&gt;
 		nostorage: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nocart: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noselltonpc: true/false       (boolean, defaults to false)&lt;br /&gt;
 		nomail: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noauction: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nogstorage: true/false        (boolean, defaults to false)&lt;br /&gt;
 		partneroverride: true/false   (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Nouse: {                      (defaults to no restrictions)&lt;br /&gt;
 	override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		sitting: true/false           (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Stack: [amount, type]         (int, defaults to 0)&lt;br /&gt;
 	Sprite: SpriteID              (int, defaults to 0)&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;
* '''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://herc.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;
Most custom items will have 6 files (if yours does not, see [[Custom_Items#Less_Than_6_Files|Less Than 6 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;
==Sprite Locations==&lt;br /&gt;
We place the six files in the following folders&lt;br /&gt;
&lt;br /&gt;
* Copy Helmet_drop.spr to [RO Folder]\data\sprite\¾ÆÀÌÅÛ\Helmet.spr &lt;br /&gt;
* Copy Helmet_drop.act to [RO Folder]\data\sprite\¾ÆÀÌÅÛ\Helmet.act &lt;br /&gt;
* Copy Helmet_item.bmp to [RO Folder]\data\texture\À¯ÀúÀÎÅÍÆäÀÌ½º\item\Helmet.bmp &lt;br /&gt;
* Copy Helmet_collection.bmp to [RO Folder]\data\texture\À¯ÀúÀÎÅÍÆäÀÌ½º\collection\Helmet.bmp  &lt;br /&gt;
* Copy Helmet.spr to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\¿©\¿©_Helmet.spr (Female) '''AND''' ¿©_Helmet.act &lt;br /&gt;
* Copy Helmet.spr to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\³²\³²_Helmet.spr (Male) '''AND''' ³²_Helmet.act &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;
==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;
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 and movement animations.&lt;br /&gt;
&lt;br /&gt;
3) Item bmp - 24x24 size 256 bit bmp file. Magenta (FF00FF hexadecimal value) background.&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;
==How to differentiate between sprite files?==&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;
==Less Than 6 Files==&lt;br /&gt;
In rare cases or for garment and accessory items, you may have less than 6 files to place. For a garment or accessory, you do not need a spr and act because these items are not visible on a character, therefore they do not require a .spr or .act file. For weapons, headgears, and shields, you should have 6 files. If you do not, you will have to create the missing files yourself. Especially for old sprites, the spriter may have just made the sprites and made no collection image, item image, or drop sprite. See [[Spriting]] on how to create these yourself.&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;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
==File Not Found &amp;quot;Cannot find File : path\to\file\filename.extension&amp;quot;==&lt;br /&gt;
As the error states, the client cannot find the file required to display the sprite, act, collection, or item image for the item. Make sure you put your file in the right place and that it is named correctly.&lt;br /&gt;
==Unknown Item==&lt;br /&gt;
If your item's name is unknown item and it has an apple icon, refer to [[Custom_Items#Defining_Item_clientside_.28Renewal_Clients_.3C.3D_2012-04-10a_.26_Main_Clients_.3C.3D_2012-07-10a.29|Defining Items Clientside]] and make sure you added the item to each and every file, or just iteminfo.lua for a newer client.&lt;br /&gt;
&lt;br /&gt;
==Files Configured Correctly, sprite does not show up in-game==&lt;br /&gt;
If you do not have your sprites and files compressed into a GRF, you will need to make sure your client is diffed to read your data folder first.&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Data]]&lt;br /&gt;
[[Category:Customization]]&lt;/div&gt;</summary>
		<author><name>Wolfeh</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-09-06T03:12:28Z</updated>
		
		<summary type="html">&lt;p&gt;Wolfeh: /* Allocating Items on Client Side */ Removed bit about item having 4 files, there should almost always be 6 files except for garments, accessories, and typically old sprites. Included a section for if there is less than that. Cleaned up extensively.&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: {                        (defaults to all job)&lt;br /&gt;
 	          All: true/false               (boolean, defaults to false)&lt;br /&gt;
 	          Novice: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Swordsman: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Magician: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Archer: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Acolyte: true/false           (boolean, defaults to false)		&lt;br /&gt;
 	          Merchant: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Thief: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Knight: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Priest: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Wizard: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Blacksmith: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Hunter: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Assassin: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Crusader: true/false          (boolean, defaults to false)		&lt;br /&gt;
 	          Monk: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Sage: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Rogue: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Alchemist: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Bard: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Taekwon: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Star_Gladiator: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Soul_Linker: true/false       (boolean, defaults to false)&lt;br /&gt;
 	          Gunslinger: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Ninja: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Gangsi: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Death_Knight: true/false      (boolean, defaults to false)&lt;br /&gt;
 	          Dark_Collector: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Kagerou: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Rebellion: true/false         (boolean, defaults to false)&lt;br /&gt;
 	}&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;
 	ForceSerial: true/false       (boolean, defaults to false)&lt;br /&gt;
 	BuyingStore: true/false       (boolean, defaults to false)&lt;br /&gt;
 	Delay: Delay to use item      (int, defaults to 0)&lt;br /&gt;
 	KeepAfterUse: true/false      (boolean, defaults to false)&lt;br /&gt;
 	Trade: {                      (defaults to no restrictions)&lt;br /&gt;
 		override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		nodrop: true/false            (boolean, defaults to false)&lt;br /&gt;
 		notrade: true/false           (boolean, defaults to false)&lt;br /&gt;
 		nostorage: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nocart: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noselltonpc: true/false       (boolean, defaults to false)&lt;br /&gt;
 		nomail: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noauction: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nogstorage: true/false        (boolean, defaults to false)&lt;br /&gt;
 		partneroverride: true/false   (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Nouse: {                      (defaults to no restrictions)&lt;br /&gt;
 	override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		sitting: true/false           (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Stack: [amount, type]         (int, defaults to 0)&lt;br /&gt;
 	Sprite: SpriteID              (int, defaults to 0)&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;
* '''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://herc.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;
Most custom items will have 6 files (if yours does not, see [[Allocating_Items_on_Client_Side#Less_Than_6_Files|Less Than 6 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;
==Sprite Locations==&lt;br /&gt;
We place the six files in the following folders&lt;br /&gt;
&lt;br /&gt;
* Copy Helmet_drop.spr to [RO Folder]\data\sprite\¾ÆÀÌÅÛ\Helmet.spr &lt;br /&gt;
* Copy Helmet_drop.act to [RO Folder]\data\sprite\¾ÆÀÌÅÛ\Helmet.act &lt;br /&gt;
* Copy Helmet_item.bmp to [RO Folder]\data\texture\À¯ÀúÀÎÅÍÆäÀÌ½º\item\Helmet.bmp &lt;br /&gt;
* Copy Helmet_collection.bmp to [RO Folder]\data\texture\À¯ÀúÀÎÅÍÆäÀÌ½º\collection\Helmet.bmp  &lt;br /&gt;
* Copy Helmet.spr to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\¿©\¿©_Helmet.spr (Female) '''AND''' ¿©_Helmet.act &lt;br /&gt;
* Copy Helmet.spr to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\³²\³²_Helmet.spr (Male) '''AND''' ³²_Helmet.act &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;
==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;
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 and movement animations.&lt;br /&gt;
&lt;br /&gt;
3) Item bmp - 24x24 size 256 bit bmp file. Magenta (FF00FF hexadecimal value) background.&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;
==How to differentiate between sprite files?==&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;
==Less Than 6 Files==&lt;br /&gt;
In rare cases or for garment and accessory items, you may have less than 6 files to place. For a garment or accessory, you do not need a spr and act because these items are not visible on a character, therefore they do not require a .spr or .act file. For weapons, headgears, and shields, you should have 6 files. If you do not, you will have to create the missing files yourself. Especially for old sprites, the spriter may have just made the sprites and made no collection image, item image, or drop sprite. See [[Spriting]] on how to create these yourself.&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;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
==File Not Found &amp;quot;Cannot find File : path\to\file\filename.extension&amp;quot;==&lt;br /&gt;
As the error states, the client cannot find the file required to display the sprite, act, collection, or item image for the item. Make sure you put your file in the right place and that it is named correctly.&lt;br /&gt;
==Unknown Item==&lt;br /&gt;
If your item's name is unknown item and it has an apple icon, refer to [[Custom_Items#Defining_Item_clientside_.28Renewal_Clients_.3C.3D_2012-04-10a_.26_Main_Clients_.3C.3D_2012-07-10a.29|Defining Items Clientside]] and make sure you added the item to each and every file, or just iteminfo.lua for a newer client.&lt;br /&gt;
&lt;br /&gt;
==Files Configured Correctly, sprite does not show up in-game==&lt;br /&gt;
If you do not have your sprites and files compressed into a GRF, you will need to make sure your client is diffed to read your data folder first.&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Data]]&lt;br /&gt;
[[Category:Customization]]&lt;/div&gt;</summary>
		<author><name>Wolfeh</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-09-06T02:39:22Z</updated>
		
		<summary type="html">&lt;p&gt;Wolfeh: /* Weapon Sprite Solution (For New Clients) */ Removed underscore. This was an old (and I mean -old-) troubleshooting method that was thought to work. It really doesn't. It's just an extra character for the client to read.&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: {                        (defaults to all job)&lt;br /&gt;
 	          All: true/false               (boolean, defaults to false)&lt;br /&gt;
 	          Novice: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Swordsman: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Magician: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Archer: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Acolyte: true/false           (boolean, defaults to false)		&lt;br /&gt;
 	          Merchant: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Thief: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Knight: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Priest: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Wizard: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Blacksmith: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Hunter: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Assassin: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Crusader: true/false          (boolean, defaults to false)		&lt;br /&gt;
 	          Monk: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Sage: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Rogue: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Alchemist: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Bard: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Taekwon: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Star_Gladiator: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Soul_Linker: true/false       (boolean, defaults to false)&lt;br /&gt;
 	          Gunslinger: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Ninja: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Gangsi: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Death_Knight: true/false      (boolean, defaults to false)&lt;br /&gt;
 	          Dark_Collector: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Kagerou: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Rebellion: true/false         (boolean, defaults to false)&lt;br /&gt;
 	}&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;
 	ForceSerial: true/false       (boolean, defaults to false)&lt;br /&gt;
 	BuyingStore: true/false       (boolean, defaults to false)&lt;br /&gt;
 	Delay: Delay to use item      (int, defaults to 0)&lt;br /&gt;
 	KeepAfterUse: true/false      (boolean, defaults to false)&lt;br /&gt;
 	Trade: {                      (defaults to no restrictions)&lt;br /&gt;
 		override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		nodrop: true/false            (boolean, defaults to false)&lt;br /&gt;
 		notrade: true/false           (boolean, defaults to false)&lt;br /&gt;
 		nostorage: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nocart: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noselltonpc: true/false       (boolean, defaults to false)&lt;br /&gt;
 		nomail: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noauction: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nogstorage: true/false        (boolean, defaults to false)&lt;br /&gt;
 		partneroverride: true/false   (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Nouse: {                      (defaults to no restrictions)&lt;br /&gt;
 	override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		sitting: true/false           (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Stack: [amount, type]         (int, defaults to 0)&lt;br /&gt;
 	Sprite: SpriteID              (int, defaults to 0)&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;
* '''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://herc.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;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
==File Not Found &amp;quot;Cannot find File : path\to\file\filename.extension&amp;quot;==&lt;br /&gt;
As the error states, the client cannot find the file required to display the sprite, act, collection, or item image for the item. Make sure you put your file in the right place and that it is named correctly.&lt;br /&gt;
==Unknown Item==&lt;br /&gt;
If your item's name is unknown item and it has an apple icon, refer to [[Custom_Items#Defining_Item_clientside_.28Renewal_Clients_.3C.3D_2012-04-10a_.26_Main_Clients_.3C.3D_2012-07-10a.29|Defining Items Clientside]] and make sure you added the item to each and every file, or just iteminfo.lua for a newer client.&lt;br /&gt;
&lt;br /&gt;
==Files Configured Correctly, sprite does not show up in-game==&lt;br /&gt;
If you do not have your sprites and files compressed into a GRF, you will need to make sure your client is diffed to read your data folder first.&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Data]]&lt;br /&gt;
[[Category:Customization]]&lt;/div&gt;</summary>
		<author><name>Wolfeh</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-09-06T02:37:30Z</updated>
		
		<summary type="html">&lt;p&gt;Wolfeh: /* Unknown Item */ Fixed it.&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: {                        (defaults to all job)&lt;br /&gt;
 	          All: true/false               (boolean, defaults to false)&lt;br /&gt;
 	          Novice: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Swordsman: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Magician: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Archer: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Acolyte: true/false           (boolean, defaults to false)		&lt;br /&gt;
 	          Merchant: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Thief: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Knight: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Priest: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Wizard: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Blacksmith: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Hunter: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Assassin: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Crusader: true/false          (boolean, defaults to false)		&lt;br /&gt;
 	          Monk: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Sage: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Rogue: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Alchemist: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Bard: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Taekwon: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Star_Gladiator: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Soul_Linker: true/false       (boolean, defaults to false)&lt;br /&gt;
 	          Gunslinger: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Ninja: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Gangsi: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Death_Knight: true/false      (boolean, defaults to false)&lt;br /&gt;
 	          Dark_Collector: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Kagerou: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Rebellion: true/false         (boolean, defaults to false)&lt;br /&gt;
 	}&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;
 	ForceSerial: true/false       (boolean, defaults to false)&lt;br /&gt;
 	BuyingStore: true/false       (boolean, defaults to false)&lt;br /&gt;
 	Delay: Delay to use item      (int, defaults to 0)&lt;br /&gt;
 	KeepAfterUse: true/false      (boolean, defaults to false)&lt;br /&gt;
 	Trade: {                      (defaults to no restrictions)&lt;br /&gt;
 		override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		nodrop: true/false            (boolean, defaults to false)&lt;br /&gt;
 		notrade: true/false           (boolean, defaults to false)&lt;br /&gt;
 		nostorage: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nocart: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noselltonpc: true/false       (boolean, defaults to false)&lt;br /&gt;
 		nomail: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noauction: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nogstorage: true/false        (boolean, defaults to false)&lt;br /&gt;
 		partneroverride: true/false   (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Nouse: {                      (defaults to no restrictions)&lt;br /&gt;
 	override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		sitting: true/false           (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Stack: [amount, type]         (int, defaults to 0)&lt;br /&gt;
 	Sprite: SpriteID              (int, defaults to 0)&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;
* '''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://herc.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;
=Troubleshooting=&lt;br /&gt;
==File Not Found &amp;quot;Cannot find File : path\to\file\filename.extension&amp;quot;==&lt;br /&gt;
As the error states, the client cannot find the file required to display the sprite, act, collection, or item image for the item. Make sure you put your file in the right place and that it is named correctly.&lt;br /&gt;
==Unknown Item==&lt;br /&gt;
If your item's name is unknown item and it has an apple icon, refer to [[Custom_Items#Defining_Item_clientside_.28Renewal_Clients_.3C.3D_2012-04-10a_.26_Main_Clients_.3C.3D_2012-07-10a.29|Defining Items Clientside]] and make sure you added the item to each and every file, or just iteminfo.lua for a newer client.&lt;br /&gt;
&lt;br /&gt;
==Files Configured Correctly, sprite does not show up in-game==&lt;br /&gt;
If you do not have your sprites and files compressed into a GRF, you will need to make sure your client is diffed to read your data folder first.&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Data]]&lt;br /&gt;
[[Category:Customization]]&lt;/div&gt;</summary>
		<author><name>Wolfeh</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-09-06T02:35:30Z</updated>
		
		<summary type="html">&lt;p&gt;Wolfeh: /* Unknown Item */ Trying to get formatting to work. .-.&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: {                        (defaults to all job)&lt;br /&gt;
 	          All: true/false               (boolean, defaults to false)&lt;br /&gt;
 	          Novice: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Swordsman: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Magician: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Archer: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Acolyte: true/false           (boolean, defaults to false)		&lt;br /&gt;
 	          Merchant: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Thief: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Knight: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Priest: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Wizard: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Blacksmith: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Hunter: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Assassin: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Crusader: true/false          (boolean, defaults to false)		&lt;br /&gt;
 	          Monk: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Sage: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Rogue: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Alchemist: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Bard: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Taekwon: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Star_Gladiator: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Soul_Linker: true/false       (boolean, defaults to false)&lt;br /&gt;
 	          Gunslinger: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Ninja: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Gangsi: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Death_Knight: true/false      (boolean, defaults to false)&lt;br /&gt;
 	          Dark_Collector: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Kagerou: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Rebellion: true/false         (boolean, defaults to false)&lt;br /&gt;
 	}&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;
 	ForceSerial: true/false       (boolean, defaults to false)&lt;br /&gt;
 	BuyingStore: true/false       (boolean, defaults to false)&lt;br /&gt;
 	Delay: Delay to use item      (int, defaults to 0)&lt;br /&gt;
 	KeepAfterUse: true/false      (boolean, defaults to false)&lt;br /&gt;
 	Trade: {                      (defaults to no restrictions)&lt;br /&gt;
 		override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		nodrop: true/false            (boolean, defaults to false)&lt;br /&gt;
 		notrade: true/false           (boolean, defaults to false)&lt;br /&gt;
 		nostorage: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nocart: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noselltonpc: true/false       (boolean, defaults to false)&lt;br /&gt;
 		nomail: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noauction: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nogstorage: true/false        (boolean, defaults to false)&lt;br /&gt;
 		partneroverride: true/false   (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Nouse: {                      (defaults to no restrictions)&lt;br /&gt;
 	override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		sitting: true/false           (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Stack: [amount, type]         (int, defaults to 0)&lt;br /&gt;
 	Sprite: SpriteID              (int, defaults to 0)&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;
* '''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://herc.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;
=Troubleshooting=&lt;br /&gt;
==File Not Found &amp;quot;Cannot find File : path\to\file\filename.extension&amp;quot;==&lt;br /&gt;
As the error states, the client cannot find the file required to display the sprite, act, collection, or item image for the item. Make sure you put your file in the right place and that it is named correctly.&lt;br /&gt;
==Unknown Item==&lt;br /&gt;
If your item's name is unknown item and it has an apple icon, refer to [[Custom_Items#Defining_Items_Clientside|Defining Items Clientside]] and make sure you added the item to each and every file, or just iteminfo.lua for a newer client.&lt;br /&gt;
&lt;br /&gt;
==Files Configured Correctly, sprite does not show up in-game==&lt;br /&gt;
If you do not have your sprites and files compressed into a GRF, you will need to make sure your client is diffed to read your data folder first.&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Data]]&lt;br /&gt;
[[Category:Customization]]&lt;/div&gt;</summary>
		<author><name>Wolfeh</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-09-06T02:35:07Z</updated>
		
		<summary type="html">&lt;p&gt;Wolfeh: /* Unknown Item */&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: {                        (defaults to all job)&lt;br /&gt;
 	          All: true/false               (boolean, defaults to false)&lt;br /&gt;
 	          Novice: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Swordsman: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Magician: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Archer: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Acolyte: true/false           (boolean, defaults to false)		&lt;br /&gt;
 	          Merchant: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Thief: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Knight: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Priest: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Wizard: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Blacksmith: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Hunter: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Assassin: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Crusader: true/false          (boolean, defaults to false)		&lt;br /&gt;
 	          Monk: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Sage: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Rogue: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Alchemist: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Bard: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Taekwon: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Star_Gladiator: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Soul_Linker: true/false       (boolean, defaults to false)&lt;br /&gt;
 	          Gunslinger: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Ninja: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Gangsi: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Death_Knight: true/false      (boolean, defaults to false)&lt;br /&gt;
 	          Dark_Collector: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Kagerou: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Rebellion: true/false         (boolean, defaults to false)&lt;br /&gt;
 	}&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;
 	ForceSerial: true/false       (boolean, defaults to false)&lt;br /&gt;
 	BuyingStore: true/false       (boolean, defaults to false)&lt;br /&gt;
 	Delay: Delay to use item      (int, defaults to 0)&lt;br /&gt;
 	KeepAfterUse: true/false      (boolean, defaults to false)&lt;br /&gt;
 	Trade: {                      (defaults to no restrictions)&lt;br /&gt;
 		override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		nodrop: true/false            (boolean, defaults to false)&lt;br /&gt;
 		notrade: true/false           (boolean, defaults to false)&lt;br /&gt;
 		nostorage: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nocart: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noselltonpc: true/false       (boolean, defaults to false)&lt;br /&gt;
 		nomail: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noauction: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nogstorage: true/false        (boolean, defaults to false)&lt;br /&gt;
 		partneroverride: true/false   (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Nouse: {                      (defaults to no restrictions)&lt;br /&gt;
 	override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		sitting: true/false           (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Stack: [amount, type]         (int, defaults to 0)&lt;br /&gt;
 	Sprite: SpriteID              (int, defaults to 0)&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;
* '''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://herc.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;
=Troubleshooting=&lt;br /&gt;
==File Not Found &amp;quot;Cannot find File : path\to\file\filename.extension&amp;quot;==&lt;br /&gt;
As the error states, the client cannot find the file required to display the sprite, act, collection, or item image for the item. Make sure you put your file in the right place and that it is named correctly.&lt;br /&gt;
==Unknown Item==&lt;br /&gt;
If your item's name is unknown item and it has an apple icon, refer to [[#Defining_Items_Clientside|Defining Items Clientside]] and make sure you added the item to each and every file, or just iteminfo.lua for a newer client.&lt;br /&gt;
&lt;br /&gt;
==Files Configured Correctly, sprite does not show up in-game==&lt;br /&gt;
If you do not have your sprites and files compressed into a GRF, you will need to make sure your client is diffed to read your data folder first.&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Data]]&lt;br /&gt;
[[Category:Customization]]&lt;/div&gt;</summary>
		<author><name>Wolfeh</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-09-06T02:33:40Z</updated>
		
		<summary type="html">&lt;p&gt;Wolfeh: Added a troubleshooting section.&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: {                        (defaults to all job)&lt;br /&gt;
 	          All: true/false               (boolean, defaults to false)&lt;br /&gt;
 	          Novice: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Swordsman: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Magician: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Archer: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Acolyte: true/false           (boolean, defaults to false)		&lt;br /&gt;
 	          Merchant: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Thief: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Knight: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Priest: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Wizard: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Blacksmith: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Hunter: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Assassin: true/false          (boolean, defaults to false)&lt;br /&gt;
 	          Crusader: true/false          (boolean, defaults to false)		&lt;br /&gt;
 	          Monk: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Sage: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Rogue: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Alchemist: true/false         (boolean, defaults to false)&lt;br /&gt;
 	          Bard: true/false              (boolean, defaults to false)&lt;br /&gt;
 	          Taekwon: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Star_Gladiator: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Soul_Linker: true/false       (boolean, defaults to false)&lt;br /&gt;
 	          Gunslinger: true/false        (boolean, defaults to false)&lt;br /&gt;
 	          Ninja: true/false             (boolean, defaults to false)&lt;br /&gt;
 	          Gangsi: true/false            (boolean, defaults to false)&lt;br /&gt;
 	          Death_Knight: true/false      (boolean, defaults to false)&lt;br /&gt;
 	          Dark_Collector: true/false    (boolean, defaults to false)&lt;br /&gt;
 	          Kagerou: true/false           (boolean, defaults to false)&lt;br /&gt;
 	          Rebellion: true/false         (boolean, defaults to false)&lt;br /&gt;
 	}&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;
 	ForceSerial: true/false       (boolean, defaults to false)&lt;br /&gt;
 	BuyingStore: true/false       (boolean, defaults to false)&lt;br /&gt;
 	Delay: Delay to use item      (int, defaults to 0)&lt;br /&gt;
 	KeepAfterUse: true/false      (boolean, defaults to false)&lt;br /&gt;
 	Trade: {                      (defaults to no restrictions)&lt;br /&gt;
 		override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		nodrop: true/false            (boolean, defaults to false)&lt;br /&gt;
 		notrade: true/false           (boolean, defaults to false)&lt;br /&gt;
 		nostorage: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nocart: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noselltonpc: true/false       (boolean, defaults to false)&lt;br /&gt;
 		nomail: true/false            (boolean, defaults to false)&lt;br /&gt;
 		noauction: true/false         (boolean, defaults to false)&lt;br /&gt;
 		nogstorage: true/false        (boolean, defaults to false)&lt;br /&gt;
 		partneroverride: true/false   (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Nouse: {                      (defaults to no restrictions)&lt;br /&gt;
 	override: GroupID             (int, defaults to 100)&lt;br /&gt;
 		sitting: true/false           (boolean, defaults to false)&lt;br /&gt;
 	}&lt;br /&gt;
 	Stack: [amount, type]         (int, defaults to 0)&lt;br /&gt;
 	Sprite: SpriteID              (int, defaults to 0)&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;
* '''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://herc.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;
=Troubleshooting=&lt;br /&gt;
==File Not Found &amp;quot;Cannot find File : path\to\file\filename.extension&amp;quot;==&lt;br /&gt;
As the error states, the client cannot find the file required to display the sprite, act, collection, or item image for the item. Make sure you put your file in the right place and that it is named correctly.&lt;br /&gt;
==Unknown Item==&lt;br /&gt;
If your item's name is unknown item and it has an apple icon, refer to [[#Defining Items Clientside|Defining Items Clientside]] and make sure you added the item to each and every file, or just iteminfo.lua for a newer client.&lt;br /&gt;
==Files Configured Correctly, sprite does not show up in-game==&lt;br /&gt;
If you do not have your sprites and files compressed into a GRF, you will need to make sure your client is diffed to read your data folder first.&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Data]]&lt;br /&gt;
[[Category:Customization]]&lt;/div&gt;</summary>
		<author><name>Wolfeh</name></author>	</entry>

	</feed>