<?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=Asheraf</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=Asheraf"/>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Special:Contributions/Asheraf"/>
		<updated>2026-05-02T00:30:53Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.21.11</generator>

	<entry>
		<id>https://wiki.herc.ws/wiki/Custom_Mobs</id>
		<title>Custom Mobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Custom_Mobs"/>
				<updated>2016-07-02T23:52:02Z</updated>
		
		<summary type="html">&lt;p&gt;Asheraf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Intro =&lt;br /&gt;
You can have up to 10,000 mob IDs. This guide was written without testing on Git; use at your own discretion.&lt;br /&gt;
Well, its pretty easy if you do it correctly and go step by step without rushing.&lt;br /&gt;
&lt;br /&gt;
= Gettings Started =&lt;br /&gt;
== Database Structure ==&lt;br /&gt;
Let's take a look at the structure of the entries in mob_db.conf:&lt;br /&gt;
&lt;br /&gt;
Note: If you're adding custom mobs, it's better to add them to mob_db2.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	// =================== Mandatory fields ===============================&lt;br /&gt;
	Id: ID                                (int)&lt;br /&gt;
	SpriteName: &amp;quot;SPRITE_NAME&amp;quot;             (string)&lt;br /&gt;
	Name: &amp;quot;Mob name&amp;quot;                      (string)&lt;br /&gt;
	// =================== Optional fields ================================&lt;br /&gt;
	Lv: level                             (int, defaults to 1)&lt;br /&gt;
	Hp: health                            (int, defaults to 1)&lt;br /&gt;
	Sp: mana                              (int, defaults to 0)&lt;br /&gt;
	Exp: basic experience                 (int, defaults to 0)&lt;br /&gt;
	JExp: job experience                  (int, defaults to 0)&lt;br /&gt;
	AttackRange: attack range             (int, defaults to 1)&lt;br /&gt;
	Attack: [attack1, attack2]            (int, defaults to 0)&lt;br /&gt;
	Def: defence                          (int, defaults to 0)&lt;br /&gt;
	Mdef: magic defence                   (int, defaults to 0)&lt;br /&gt;
	Stats: {&lt;br /&gt;
		Str: strength                 (int, defaults to 0)&lt;br /&gt;
		Agi: agility                  (int, defaults to 0)&lt;br /&gt;
		Vit: vitality                 (int, defaults to 0)&lt;br /&gt;
		Int: intelligence             (int, defaults to 0)&lt;br /&gt;
		Dex: dexterity                (int, defaults to 0)&lt;br /&gt;
		Luk: luck                     (int, defaults to 0)&lt;br /&gt;
	}&lt;br /&gt;
	ViewRange: view range                 (int, defaults to 1)&lt;br /&gt;
	ChaseRange: chase range               (int, defaults to 1)&lt;br /&gt;
	Size: size                            (int, defaults to 1)&lt;br /&gt;
	Race: race                            (int, defaults to 0)&lt;br /&gt;
	Element: (type, level)&lt;br /&gt;
	Mode: {&lt;br /&gt;
		CanMove: true/false           (bool)&lt;br /&gt;
		Looter: true/false            (bool)&lt;br /&gt;
		Aggressive: true/false        (bool)&lt;br /&gt;
		Assist: true/false            (bool)&lt;br /&gt;
		CastSensorIdle:true/false     (bool)&lt;br /&gt;
		Boss: true/false              (bool)&lt;br /&gt;
		Plant: true/false             (bool)&lt;br /&gt;
		CanAttack: true/false         (bool)&lt;br /&gt;
		Detector: true/false          (bool)&lt;br /&gt;
		CastSensorChase: true/false   (bool)&lt;br /&gt;
		ChangeChase: true/false       (bool)&lt;br /&gt;
		Angry: true/false             (bool)&lt;br /&gt;
		ChangeTargetMelee: true/false (bool)&lt;br /&gt;
		ChangeTargetChase: true/false (bool)&lt;br /&gt;
		TargetWeak: true/false        (bool)&lt;br /&gt;
	}&lt;br /&gt;
	MoveSpeed: move speed                 (int, defaults to 0)&lt;br /&gt;
	AttackDelay: attack delay             (int, defaults to 4000)&lt;br /&gt;
	AttackMotion: attack motion           (int, defaults to 2000)&lt;br /&gt;
	DamageMotion: damage motion           (int, defaults to 0)&lt;br /&gt;
	MvpExp: mvp experience                (int, defaults to 0)&lt;br /&gt;
	MvpDrops: {&lt;br /&gt;
		AegisName: chance             (string: int)&lt;br /&gt;
		...&lt;br /&gt;
	}&lt;br /&gt;
	Drops: {&lt;br /&gt;
		AegisName: chance         (string: int)&lt;br /&gt;
		...&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
},&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Fields !! Description&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Id&amp;lt;/u&amp;gt;''' || ID of the mob&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;SpriteName&amp;lt;/u&amp;gt;''' || This first name is the DB name. When you use @spawn/@summon and you know the name of the mob, but not the ID, type this name instead. Try making the normal name the same as this so you wont get confused.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Name&amp;lt;/u&amp;gt;''' || This is the name the server shows.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Lv&amp;lt;/u&amp;gt;''' || Level of the mob&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Hp&amp;lt;/u&amp;gt;''' || HP of the mob&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Sp&amp;lt;/u&amp;gt;''' || SP of the mob&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Exp&amp;lt;/u&amp;gt;''' || Exp granted by the mob&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;JExp&amp;lt;/u&amp;gt;''' || Job exp granted by the mob&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;AttackRange&amp;lt;/u&amp;gt;''' || Range of the mob attack. If set to 1 or 2, it will melee. 3 or more than 3 will set it to ranged&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Attack1&amp;lt;/u&amp;gt;''' ||  Affects ATK of the mob&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Attack2&amp;lt;/u&amp;gt;''' || Affects MATK of the mob&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Def&amp;lt;/u&amp;gt;''' || Defense of the mob (Tip: 100 def = Invulnerability below 8K attack. Watch out, only melee/ranged attacks, but generally direct hits attacks are drastically reduced. Setting this high enough may make monks pretty cheap to level because of of Psychic Wave/Occult Impact/Investigate.)&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;MDef&amp;lt;/u&amp;gt;''' || Magic Defense of the mob (Hint: 100 mdef = golden thief bug effect below 9K magic attack. It's for all magic-using skills.)&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Stats&amp;lt;/u&amp;gt;''' || All Stats of mobs belongs to this block.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Stats !! Description&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Str&amp;lt;/u&amp;gt;''' || Strength of the mob. This also affects its ATK.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Agi&amp;lt;/u&amp;gt;''' || Agility of the mob. This also affects the mob flee rate.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Vit&amp;lt;/u&amp;gt;''' || Vitality of the mob. This affects the duration of stun status.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Int&amp;lt;/u&amp;gt;''' || Intelligence of the mob. This also affects its MATK.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Dex&amp;lt;/u&amp;gt;''' || Dexterity of the mob. This also affects the mob hit rate.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Luk&amp;lt;/u&amp;gt;''' || Luck of the mob. This also defines the mob perfect dodge/lucky flee/perfect flee/lucky dodge rate.&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;ViewRange&amp;lt;/u&amp;gt;''' || Maximum Skill Range&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;ChaseRange&amp;lt;/u&amp;gt;''' || Sight limit for mobs. If set to 1000 or beyond, mobs will follow you all over the map.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Size&amp;lt;/u&amp;gt;''' || 0 if its Small, 1 if its Medium, 2 if its Large&lt;br /&gt;
or Small=Size_Small, Medium=Size_Medium, Large=Size_Large&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Race&amp;lt;/u&amp;gt;''' || 0=formless, 1=undead, 2=animal, 3=plant, 4=insect, 5=fish, 6=demon, 7=demihuman, 8=angel, 9=dragon.&lt;br /&gt;
or formless=RC_Formless, undead=RC_Undead, animal=RC_Brute, plant=RC_Plant, fish=RC_Fish, demihuman=RC_DemiHuman, angel=RC_Angel, dragon=RC_Dragon.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Element&amp;lt;/u&amp;gt;''' || This is a two-digit number representing the rank (level) and element of the mob.&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Element(Type)&amp;lt;/u&amp;gt;''' || Element Type of mob as mentioned below.&amp;lt;br /&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center;&amp;quot;&lt;br /&gt;
 |&lt;br /&gt;
 |Neutral&lt;br /&gt;
 |Water&lt;br /&gt;
 |Earth&lt;br /&gt;
 |Fire&lt;br /&gt;
 |Wind&lt;br /&gt;
 |Poison&lt;br /&gt;
 |Holy&lt;br /&gt;
 |Shadow&lt;br /&gt;
 |Ghost&lt;br /&gt;
 |Undead&lt;br /&gt;
 |-&lt;br /&gt;
 | Type&lt;br /&gt;
 |0&lt;br /&gt;
 |1&lt;br /&gt;
 |2&lt;br /&gt;
 |3&lt;br /&gt;
 |4&lt;br /&gt;
 |5&lt;br /&gt;
 |6&lt;br /&gt;
 |7&lt;br /&gt;
 |8&lt;br /&gt;
 |9&lt;br /&gt;
 |}&lt;br /&gt;
or &amp;quot;Ele_Name&amp;quot; (Neutral, Water, Earth, Fire, Wind, Poison, Holy, Shadow, Ghost, Undead.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Element(Level)&amp;lt;/u&amp;gt;''' || Element level of mob from (1-4).&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Mode&amp;lt;/u&amp;gt;''' || This defines the mob behaves.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;MoveSpeed&amp;lt;/u&amp;gt;''' || Walking speed of the mob. 1 is the fastest, 1000 is the lowest. 100 is the normal walking speed.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;AttackDelay&amp;lt;/u&amp;gt;''' || ADelay= Attack Delay, also known as ASPD. This one will change the aspd of the mob. The lower the faster, but don't make it too low or it will lag when mobbed by several of these.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;AttackMotion&amp;lt;/u&amp;gt;''' || Attack animation motion. Lower this value and the mob's attack will be displayed in higher fps (making it shorter, too) (Thanks to Wallex for this)&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;DamageMotion&amp;lt;/u&amp;gt;''' || Damage animation motion, same as aMotion but used to display the &amp;quot;I am hit&amp;quot; animation. Coincidentally, this same value is used to determine how long it is before the mob/player can move again. Endure is dMotion = 0, obviously.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;MvpExp&amp;lt;/u&amp;gt;''' || The MVP exp the mob gives when it is defeated (to the player who got the MVP reward) (This exp is a percentage of the exp the monster gives.)&lt;br /&gt;
|-&lt;br /&gt;
The following fields are for drops and drop rates. Remember that these are in percentages; i.e. 100 = 100%&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;MvpDrops&amp;lt;/u&amp;gt;''' || The MvP Drops goes here, format is:&lt;br /&gt;
&amp;lt;pre&amp;gt;AegisName: Chance&amp;lt;/pre&amp;gt;&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;Poring_Card: 1000&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Drops&amp;lt;/u&amp;gt;''' || The Normal Drops goes here, format is:&lt;br /&gt;
&amp;lt;pre&amp;gt;AegisName: Chance&amp;lt;/pre&amp;gt;&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;Poring_Card: 1000&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Making it visible ==&lt;br /&gt;
=== Server Side ===&lt;br /&gt;
If you've got a sprite and you're happy with it, then you can skip this part. If you would like to make your mob look like another mob, or even a player, then you need to take a look at {{git|db/mob_avail.txt|full}}&lt;br /&gt;
&lt;br /&gt;
For normal mobs, you can use the data that's already in the file as an example to work on:&lt;br /&gt;
 // mob_id,sprite_id,equip #&lt;br /&gt;
 // iRO Halloween Event 2008&lt;br /&gt;
 //3000,1015,0&lt;br /&gt;
 //3001,1036,0&lt;br /&gt;
 //3002,1298,0&lt;br /&gt;
 &lt;br /&gt;
 // iRO Halloween Event 2009&lt;br /&gt;
 //3014,1179,0&lt;br /&gt;
 //3015,1272,0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
However, if you would like to make your mob look like a character, you need to add more options:&amp;lt;br /&amp;gt;&lt;br /&gt;
// Valaris&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| MobID || SpriteID || Sex || Hair || Hair_Color || Weapon || Shield || Head_Top || Head_Middle || Head_Bottom || Option || Dye_Color&lt;br /&gt;
|-&lt;br /&gt;
| 1900, || 4013, || 1, || 1, || 1, || 1254, || 0, || 67, || 12, || 54, || 16, || 1&lt;br /&gt;
|}&lt;br /&gt;
You will need to use the Item ID for your mob's weapon and shield instead of the View ID of the item. Doing so may have undesirable effects.&lt;br /&gt;
&lt;br /&gt;
A more in-depth look at each value:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;MobID&amp;lt;/u&amp;gt;''': This is your mob ID.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;SpriteID&amp;lt;/u&amp;gt;''': The Job number you want it to look like. They are:&lt;br /&gt;
&amp;lt;pre&amp;gt;Job_Novice 0&lt;br /&gt;
Job_Swordman 1&lt;br /&gt;
Job_Mage 2&lt;br /&gt;
Job_Archer 3&lt;br /&gt;
Job_Acolyte 4&lt;br /&gt;
Job_Merchant 5&lt;br /&gt;
Job_Thief 6&lt;br /&gt;
Job_Knight 7&lt;br /&gt;
Job_Priest 8&lt;br /&gt;
Job_Wizard 9&lt;br /&gt;
Job_Blacksmith 10&lt;br /&gt;
etc&amp;lt;/pre&amp;gt;&lt;br /&gt;
They can also be found on {{git|db/const.txt}} file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;Sex&amp;lt;/u&amp;gt;''': 0 for female, 1 for male&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;Hair&amp;lt;/u&amp;gt;''': The mob hair style, goes from 1 to 23&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;Hair_Color&amp;lt;/u&amp;gt;''': The mob hair color. Goes from 0 to 8 or 10, but it depends on the server's palette files.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;Weapon&amp;lt;/u&amp;gt;''':The ID of the Weapon you want. See [[Custom_weapons|Custom Weapons]] for it. Also read at the end of the pre if you cant find the headgear you want. &lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;Shield&amp;lt;/u&amp;gt;''': Same as above&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;Head_Top&amp;lt;/u&amp;gt;''': Same as above&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;Head_Middle&amp;lt;/u&amp;gt;''': Same as above&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;Head_Bottom&amp;lt;/u&amp;gt;''': Same as above&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;Option&amp;lt;/u&amp;gt;''': this option parameter will make the mob change its status, as well as give them carts, pecopecos, and falcons. In other words, this will change the visual effects of your mobs. The options are these*:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 1 Sight             32 Peco Peco riding   2048 Orc Head&lt;br /&gt;
 2 Hide              64 GM Perfect Hide    4096 Wedding Sprites&lt;br /&gt;
 4 Cloak            128 Level 2 Cart       8192 Ruwach&lt;br /&gt;
 8 Level 1 Cart     256 Level 3 Cart&lt;br /&gt;
16 Falcon           512 Level 4 Cart&lt;br /&gt;
                   1024 Level 5 Cart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;Dye_Color&amp;lt;/u&amp;gt;''': Same as hair color. It goes from 0 to 77&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Client Side ===&lt;br /&gt;
For your mob to exist in the client, you need to add it to a few [[Lua]] files.&lt;br /&gt;
==== datainfo/npcidentity.lua ====&lt;br /&gt;
Example at the end of the file:&amp;lt;br /&amp;gt;&lt;br /&gt;
 	[&amp;quot;JT_4_F_TAEKWON&amp;quot;] = 644,&lt;br /&gt;
 	[&amp;quot;JT_4_F_SWORDMAN&amp;quot;] = 645,&lt;br /&gt;
 	-- Custom Mobs&lt;br /&gt;
 	[&amp;quot;JT_JACOB&amp;quot;] = 2500,&lt;br /&gt;
 	[&amp;quot;JT_AQUARING&amp;quot;] = 2600&lt;br /&gt;
 }&lt;br /&gt;
The number after the = sign denotes the mob's database ID number. Other sprites in this file have their view ID e.g. [[Adding_a_Script#Client_Side|NPC sprite number]].&lt;br /&gt;
&lt;br /&gt;
==== datainfo/jobname.lua ====&lt;br /&gt;
Example at the end of the file:&amp;lt;br /&amp;gt;&lt;br /&gt;
 	[jobtbl.JT_GIBBET] = &amp;quot;GIBBET&amp;quot;,&lt;br /&gt;
 	[jobtbl.JT_DULLAHAN] = &amp;quot;DULLAHAN&amp;quot;,&lt;br /&gt;
 	[jobtbl.JT_LOLI_RURI] = &amp;quot;LOLI_RURI&amp;quot;,&lt;br /&gt;
 	[jobtbl.JT_DISGUISE] = &amp;quot;DISGUISE&amp;quot;,&lt;br /&gt;
 	-- Custom Mobs&lt;br /&gt;
 	[jobtbl.JT_JACOB] = &amp;quot;jacobmob&amp;quot;,&lt;br /&gt;
 	[jobtbl.JT_AQUARING] = &amp;quot;aquaring&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
In this file, the value after the = sign is the name of the actual sprite in your data folder/[[GRF]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Your mob in other files ==&lt;br /&gt;
=== Dead Branch ===&lt;br /&gt;
Adding your mob to {{git|db/pre-re/mob_branch.txt}} or {{git|db/re/mob_branch.txt}} will allow Dead Branches to summon it.&lt;br /&gt;
&lt;br /&gt;
=== Bloody Branch ===&lt;br /&gt;
Adding your mob to {{git|db/pre-re/mob_boss.txt}} or {{git|db/re/mob_boss.txt}} will allow Bloody Branches to summon it.&lt;br /&gt;
&lt;br /&gt;
=== Poring Box ===&lt;br /&gt;
Adding your mob to {{git|db/pre-re/mob_poring.txt}} or {{git|db/re/mob_poring.txt}} will make your mob spawnable via the Poring Box.&lt;br /&gt;
&lt;br /&gt;
=== Monster Racial Groups ===&lt;br /&gt;
Adding your mob to {{git|db/pre-re/mob_race2_db.txt}} or {{git|db/re/mob_race2_db.txt}} will add your mob to a [[Racial_Group|Racial Group]]. Guardians, Goblins and other mobs are members of particular Racial Groups.&lt;br /&gt;
&lt;br /&gt;
=== Red Pouch of Surprise ===&lt;br /&gt;
Adding your mob to {{git|db/mob_pouch.txt}} will make your mob spawnable via the Red Pouch of Surprise.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Spawn Points ==&lt;br /&gt;
Let's look at the syntax of a mob spawn point:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;map name&amp;gt;,&amp;lt;x1&amp;gt;,&amp;lt;y1&amp;gt;,&amp;lt;x2&amp;gt;,&amp;lt;y2&amp;gt;%TAB%monster%TAB%&amp;lt;monster name&amp;gt;%TAB%&amp;lt;mob id&amp;gt;,&amp;lt;amount&amp;gt;,&amp;lt;delay1&amp;gt;,&amp;lt;delay2&amp;gt;,&amp;lt;event&amp;gt;{,&amp;lt;mob size&amp;gt;,&amp;lt;mob ai&amp;gt;}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only the things between &amp;lt;&amp;gt; are changed. Do not remove or change monster after the coordinates, because that's what tells the server that this line is a monster spawn script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;map name&amp;lt;/u&amp;gt;''': Name of the map. Use /where along with the following coordinates&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;x1&amp;lt;/u&amp;gt;''': X axis coordinates. It start from the left side of the map, and the higher it gets, the more it gets closer to the right side of the map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;y1&amp;lt;/u&amp;gt;''': Y axis coordinates. It start from the bottom, and the higher it gets, the more it gets closer to the top of the map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;x2&amp;lt;/u&amp;gt;''': X axis coordinates. It start from the left side of the map, and the higher it gets, the more it gets closer to the right side of the map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;y2&amp;lt;/u&amp;gt;''': Y axis coordinates. It start from the bottom, and the higher it gets, the more it gets closer to the top of the map.&lt;br /&gt;
&amp;lt;br&amp;gt;These 4 coordinates will make a spawn area where the mob will spawn, however it won't limit its movement, so lets say you put 120,150 on the first pair, and 130,160 pair- That's a 10x10 cell area where the mob will spawn randomly.&lt;br /&gt;
&amp;lt;br&amp;gt;If you want the mob to spawn at a random point, use 0 for all the coordinates.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;monster name&amp;lt;/u&amp;gt;''': The name of the mob you want to be shown (using --ja-- in place of a name will display the &amp;quot;Japanese Name&amp;quot; from your database).&lt;br /&gt;
&amp;lt;br&amp;gt;You can specify a custom level to use for the mob different from the one of the database by adjoining the level after the name with a comma. eg: &amp;quot;Poring,50&amp;quot; for a name will spawn a monster with name Poring and level 50.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;mob id&amp;lt;/u&amp;gt;''': The ID of your mob.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;amount&amp;lt;/u&amp;gt;''': How many mobs you want to be spawned.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;delay1&amp;lt;/u&amp;gt;''': Minimum amount of time before a monster respawns.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;delay2&amp;lt;/u&amp;gt;''': Maximum amount of time before a monster respawns.&lt;br /&gt;
&amp;lt;br&amp;gt;delay1 and delay2 are used to define the time it takes for a monster to respawn; in milliseconds. Normal mobs usually have 0 (Instant Respawn), while MVPs have 7200000 (2 hours). If delay2 is greater than delay 1, the mob won't respawn until the map server restarts.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;event&amp;lt;/u&amp;gt;''': Script event to be executed when the mob is killed. The event must be in the form &amp;quot;NPCName::OnEventName&amp;quot; to execute, and the event name label should start with &amp;quot;On&amp;quot;. As with all events, if the NPC is an on-touch NPC, the player who triggers the script must be within 'trigger' range for the event to work.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;size&amp;lt;/u&amp;gt;''': Optional. Size can be 0 (medium), 1 (small), or 2 (big).&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;ai&amp;lt;/u&amp;gt;''': Optional. AI can be 0 (default), 1 (attack/friendly), 2 (sphere), 3 (flora), or 4 (zanzou).&lt;br /&gt;
&lt;br /&gt;
== Adding Skills ==&lt;br /&gt;
&lt;br /&gt;
Lets look at the syntax of a mob skill:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MOB_ID, a unused dummy character sequence (for information only), STATE, SKILL_ID, SKILL_LV,&lt;br /&gt;
rate (10000 = 100%), casttime, delay, cancelable, a target, a condition type, a condition value,&lt;br /&gt;
a value 1, a value 2, a value 3, a value 4, a value 5, emotion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;'''''&lt;br /&gt;
NOTE: I had to cut the mob_avail structure so it could fit.&lt;br /&gt;
It's a whole line, not 3 lines.&lt;br /&gt;
'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;MOD_ID&amp;lt;/u&amp;gt;''': your mob ID.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;an unused.. etc etc&amp;lt;/u&amp;gt;''': you can put any text here you want, its just for information and to know what does this do.* tip tip*You will see inside this file things like Poring@TF_POISON. Well, you could use this too. It would tell you: mob_name@DB_Skill_Name. *tip tip*&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;state&amp;lt;/u&amp;gt;''': this is the state that the mob must accomplish before being able to use this skill. The states are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
any, idle (in standby), walk (in movement), attack, dead (on killed), loot, chase (following target),&lt;br /&gt;
counterattack.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;SKILL_ID&amp;lt;/u&amp;gt;''': The ID of the skill goes here. To look for one, go to your db folder and open the skill_db.txt file. You will see a lot of lines like this one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;2,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //SM_SWORD#Œ•C—û#&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the syntax is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
id,range,hit,inf,pl,nk,max,list_num,castcancel,cast_defence_rate,inf2,maxcount,skill_type,blow_count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
so, the ID of the SM_SWORD, which is the Swordman's Sword Mastery by the way, is 2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;'''2''',0,0,0,0,0,10,0,no,0,0,0,weapon,0 //SM_SWORD#Œ•C—û#&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;SKILL_LV&amp;lt;/u&amp;gt;''': You can put the skill level as high as you want. Though, 100 is usually as far as most skills go.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;rate&amp;lt;/u&amp;gt;''': How frequent will the mob use the skill.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;casttime&amp;lt;/u&amp;gt;''': Skill's cast time.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;delay&amp;lt;/u&amp;gt;''': How much time must pass before the skill can be used again, in milliseconds.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;cancelable&amp;lt;/u&amp;gt;''': if the skill cast can be interrupted. Set it either '''yes''' or '''no'''.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;a target&amp;lt;/u&amp;gt;''': the target of the skill. It can be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
target (player), self (the mob itself), friend (slaves)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;a condition type&amp;lt;/u&amp;gt;''':a condition that also must be fulfilled before the mob is able to use this skill. There are two kinds of conditions:&lt;br /&gt;
&lt;br /&gt;
1. Mob Condition:&lt;br /&gt;
&amp;lt;pre&amp;gt;//conditions: (condition type) (value which specifies a condition value)&lt;br /&gt;
// always            unconditional&lt;br /&gt;
// myhpltmaxrate     when the mob's hp drops to a certain %&lt;br /&gt;
// mystatuson        If the mob has any abnormalities in status (condition value),&lt;br /&gt;
// mystatusoff       If the mob has ended any abnormalities in status (condition value),&lt;br /&gt;
// friendhpltmaxrate when the mobs' friend's hp drops to a certain %&lt;br /&gt;
// friendstatuson    If the friend has any abnormalities in status (condition value),&lt;br /&gt;
// friendstatusoff   If the friend has ended any abnormalities in status (condition value),&lt;br /&gt;
// attackpcgt        Attack PC becomes more than the  number of specification&lt;br /&gt;
// attackpcge        Attack PC becomes equal or more than the number of specification.&lt;br /&gt;
// slavelt           when the number of slaves is lower than the original number of specification.&lt;br /&gt;
// slavele           when the number of slaves is lower or equal than the original number of specification.&lt;br /&gt;
// closedattacked    when melee attacked (close range attack)&lt;br /&gt;
// longrangeattacked when long ranged attacked (like bows and far range weapons)&lt;br /&gt;
// skillused         when a skill is used on the mob&lt;br /&gt;
// casttargeted      when a target is in cast range.&lt;br /&gt;
// rudeattacked      when a target is rude attacked&lt;br /&gt;
// hiding            when a target is hidden *not implemented yet*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Target Conditions&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// The character's state which can be specified to be a condition value&lt;br /&gt;
// by the statuson/statusoff system&lt;br /&gt;
//&lt;br /&gt;
// anybad      any type of state change&lt;br /&gt;
// stone       condition of being in stone state&lt;br /&gt;
// freeze      condition of being in frozen state&lt;br /&gt;
// stan        condition of being in stunned state&lt;br /&gt;
// sleep       condition of being in sleep state&lt;br /&gt;
// poison      condition of being in poisoned state&lt;br /&gt;
// curse       condition of being in cursed state&lt;br /&gt;
// silence     condition of being in silenced state&lt;br /&gt;
// confusion   condition of being in confusion state&lt;br /&gt;
// blind       condition of being in blind state&lt;br /&gt;
// hiding      condition of being in hidden state&lt;br /&gt;
// sight       condition of being in unhidden state&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use only ONE of these conditions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;value1,value2,value3,value4,value5&amp;lt;/u&amp;gt;''': Basically they're only the same but, when you want your mob using the same condition to trigger the skill, but in different times, in case of the myhpltmaxrate when the hp is being decreased, you can set them in a decreasing order, like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;80,60,40,20,10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;emotion&amp;lt;/u&amp;gt;''': Lets your mob use an emotion, at random times. The emotion IDs are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
e_gasp 0&lt;br /&gt;
e_what 1&lt;br /&gt;
e_ho 2&lt;br /&gt;
e_lv 3&lt;br /&gt;
e_swt 4&lt;br /&gt;
e_ic 5&lt;br /&gt;
etc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more info, go to your {{git|db/const.txt}} file.&lt;br /&gt;
&lt;br /&gt;
== Making it talk! ==&lt;br /&gt;
Another add, suggested by chronocrosser_x and Fenrir Soarblade:&lt;br /&gt;
&lt;br /&gt;
Well, I believe you have seen some mobs on your server talking when certain things happens. I never saw them again talking, dont know why but they used to talk. I believe they still do it.&lt;br /&gt;
&lt;br /&gt;
Ok, go to your Data folder. If you look in the files, you should find a file called monstertalktable. If there isnt, we will create one with Wordpad =3!. If there is, open it with Wordpad, not Notepad.&lt;br /&gt;
&lt;br /&gt;
Once there, we will copy and paste this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;euc-kr&amp;quot; ?&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
&amp;lt;enemy_monster_talk_table&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
&amp;lt;mob_db_name_here&amp;gt; &lt;br /&gt;
  &amp;lt;discovery&amp;gt;&amp;lt;/discovery&amp;gt;&lt;br /&gt;
  &amp;lt;attack&amp;gt;&amp;lt;/attack&amp;gt;&lt;br /&gt;
  &amp;lt;hp50&amp;gt;&amp;lt;/hp50&amp;gt;&lt;br /&gt;
  &amp;lt;hp25&amp;gt;&amp;lt;/hp25&amp;gt;&lt;br /&gt;
  &amp;lt;kill&amp;gt;&amp;lt;/kill&amp;gt;&lt;br /&gt;
  &amp;lt;dead&amp;gt;&amp;lt;/dead&amp;gt;&lt;br /&gt;
&amp;lt;/mob_db_name_here&amp;gt; &lt;br /&gt;
&amp;lt;/enemy_monster_talk_table&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Well, lets see step by step =3!:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;&amp;lt;enemy_monster_talk_table&amp;gt;&amp;lt;/u&amp;gt;''': This is the start of the monster talk table. Leave it as it is =3!&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;&amp;lt;mob_db_name_here&amp;gt;&amp;lt;/u&amp;gt;''': The mob_db.txt first name you see, after the ID, goes here =3! Its used to identify the mob&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;&amp;lt;discovery&amp;gt;%TAB%Text Here%TAB%&amp;lt;/discovery&amp;gt;&amp;lt;/u&amp;gt;''': This is an event, same as the one below. When a monster see you, this one will be displayed =3!&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;&amp;lt;attack&amp;gt;%TAB%Text Here%TAB%&amp;lt;/attack&amp;gt;&amp;lt;/u&amp;gt;''': When a monster attacks you, this one will be displayed O_O!&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;&amp;lt;hp50&amp;gt;%TAB%Text Here%TAB%&amp;lt;/hp50&amp;gt;&amp;lt;/u&amp;gt;''': When a monster's hp is at 50%, this one will be displayed o..o!&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;&amp;lt;hp25&amp;gt;%TAB%Text Here%TAB%&amp;lt;/hp25&amp;gt;&amp;lt;/u&amp;gt;''': When a monster's hp is at 25%, this one will be displayed x,x&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;&amp;lt;kill&amp;gt;%TAB%Text Here%TAB%&amp;lt;/kill&amp;gt;&amp;lt;/u&amp;gt;''': When a monster kills a character/player, this one will be displayed T~T!&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;&amp;lt;dead&amp;gt;%TAB%Text Here%TAB%&amp;lt;/dead&amp;gt;&amp;lt;/u&amp;gt;''': When a monster dies by player hand, this one will be displayed ^__^!&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;&amp;lt;/mob_db_name_here&amp;gt;&amp;lt;/u&amp;gt;''': The same name of the mob_db.txt, the one after the ID.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;&amp;lt;/enemy_monster_talk_table&amp;gt;&amp;lt;/u&amp;gt;''': Keep it like this.&lt;br /&gt;
&lt;br /&gt;
I never messed with this, but i think its ok =3! Also for those spaces other than the messages spaces, use TAB, not the Space Bar for it ._.!&lt;br /&gt;
&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Data]]&lt;br /&gt;
[[Category:Customization]]&lt;/div&gt;</summary>
		<author><name>Asheraf</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Quest_Log_System</id>
		<title>Quest Log System</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Quest_Log_System"/>
				<updated>2016-07-01T16:16:46Z</updated>
		
		<summary type="html">&lt;p&gt;Asheraf: Update quest db structure example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Quest Log System ==&lt;br /&gt;
&lt;br /&gt;
==== Basic Structure of NPC ====&lt;br /&gt;
&lt;br /&gt;
First of all you must have a knowledge on basic scripting, if not please kindly Click [[Basic_Scripting|Here!]].&lt;br /&gt;
&lt;br /&gt;
==== Quest Window ====&lt;br /&gt;
&lt;br /&gt;
The Quest Window or Quest Journal (Opened via Alt+U) allows the player to view all quests their character has started but not yet completed (Except for instance dungeon quests and Battlegrounds instances, which always remain once started).&lt;br /&gt;
To place a quest in the Inactive tab, right click once on it and the name will turn gray. It will then appear on the Inactive tab instead of Active. Right clicking the name again will bring it back to the Active tab. Moving the quest back and forth has no effect on whether you can continue it or not.&lt;br /&gt;
Not every quest has a quest window component. Those quests who have quest window walkthroughs can be found in this category as well as by having their infobox in gold. Additionally, the Quest Window guides are not comprehensive, and do not specify the exact coordinates of the next NPC or location the player must visit. It is highly recommended to continue using the wiki guides along with the in-game walkthroughs.&lt;br /&gt;
&lt;br /&gt;
[[File:QWindow.jpg|center|caption]]&lt;br /&gt;
&lt;br /&gt;
== Quest Database - Adding Quest ==&lt;br /&gt;
&lt;br /&gt;
=== Structure ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	Id: Quest ID&lt;br /&gt;
	Name: &amp;quot;Quest Name&amp;quot;&lt;br /&gt;
	TimeLimit: seconds&lt;br /&gt;
	Targets: (&lt;br /&gt;
	{&lt;br /&gt;
		MobId: Mob_ID&lt;br /&gt;
		Count: number&lt;br /&gt;
	},&lt;br /&gt;
	)&lt;br /&gt;
	Drops: (&lt;br /&gt;
	{&lt;br /&gt;
		ItemId: item_to_drop&lt;br /&gt;
		Rate: Drop_Rate&lt;br /&gt;
		MobId: Mob_ID_to_match&lt;br /&gt;
	},&lt;br /&gt;
	)&lt;br /&gt;
},&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Quest ID - ID of the quest, must increment and should not be duplicated.&amp;lt;br&amp;gt;&lt;br /&gt;
Name - The title of the Quest you made.&amp;lt;br&amp;gt;&lt;br /&gt;
Time Limit - Time limit for the quest to be finish in seconds.&amp;lt;br&amp;gt;&lt;br /&gt;
Targets - Monsters killing list contain mob ids and count.&amp;lt;br&amp;gt;&lt;br /&gt;
Drops - Item id to drop.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
For this example I will make a quest that will require to kill 10 Poring's.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	Id: 65000&lt;br /&gt;
	Name: &amp;quot;Quest - Poring Hunt&amp;quot;&lt;br /&gt;
	Targets: (&lt;br /&gt;
	{&lt;br /&gt;
		MobId: 1002&lt;br /&gt;
		Count: 10&lt;br /&gt;
	},&lt;br /&gt;
	)&lt;br /&gt;
},&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Client Side Editing ====&lt;br /&gt;
&lt;br /&gt;
You have to edit your questid2display.txt&lt;br /&gt;
&lt;br /&gt;
==== Structure ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
QUESTID#Quest Name#FILENAME#LOG_FILENAME#&lt;br /&gt;
Summary description#&lt;br /&gt;
Objective description#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
65000#Quest - Poring Hunt#SG_FEEL#QUE_NOIMAGE#&lt;br /&gt;
Find the monster named Poring and kill 10#&lt;br /&gt;
Hunting 10 Poring#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
== Quest Log Commands ==&lt;br /&gt;
&lt;br /&gt;
=== Set Quest ===&lt;br /&gt;
&amp;lt;pre&amp;gt;*setquest &amp;lt;ID&amp;gt;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Place quest of &amp;lt;ID&amp;gt; in the users quest log, the state of which is &amp;quot;active&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;prontera,xx,xx,4	script	SetQuest	51,{&lt;br /&gt;
setquest 65000;	// This will add the Quest ID 65000 to your Quest Window.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sample will add the quest &amp;quot;Quest - Poring Hunt&amp;quot; which I stated on the Adding Quest.&lt;br /&gt;
'''Note''': The example is just a simple NPC that will add Quest ID 65000 every time you click it, You can add conditions so that it can only be taken once. &lt;br /&gt;
&lt;br /&gt;
=== Complete Quest ===&lt;br /&gt;
&amp;lt;pre&amp;gt;*completequest &amp;lt;ID&amp;gt;{,&amp;lt;ID2&amp;gt;};&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change the state for the given quest &amp;lt;ID&amp;gt; to &amp;quot;complete&amp;quot; and remove from &lt;br /&gt;
the users quest log.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
If a second quest id of greater value is specified, all quests between the two&lt;br /&gt;
will be completed.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;prontera,xx,xx,4	script	CompleteQuest	51,{&lt;br /&gt;
completequest 65000;	// This will change the state of the quest to &amp;quot;complete&amp;quot;&lt;br /&gt;
set zeny,zeny + 100;   //just add line like this if you want to give zeny reward if a player finish the quest.&lt;br /&gt;
getitem 501,1;         //just add line like this if you want to give item reward if a player finish the quest.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Erase Quest ===&lt;br /&gt;
&amp;lt;pre&amp;gt;*erasequest &amp;lt;ID&amp;gt;{,&amp;lt;ID2&amp;gt;};&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remove the quest of the given &amp;lt;ID&amp;gt; from the user's quest log.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
If a second quest id of greater value is specified, all quests between the two&lt;br /&gt;
will be erased.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;prontera,xx,xx,4	script	EraseQuest	51,{&lt;br /&gt;
erasequest 65000;	// This will remove the quest to your Quest Window.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Change Quest ===&lt;br /&gt;
&amp;lt;pre&amp;gt;*changequest &amp;lt;ID&amp;gt;,&amp;lt;ID2&amp;gt;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remove quest of the given &amp;lt;ID&amp;gt; from the user's quest log.&lt;br /&gt;
Add quest of the &amp;lt;ID2&amp;gt; to the the quest log, and the state is &amp;quot;active&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;prontera,xx,xx,4	script	ChangeQuest	51,{&lt;br /&gt;
changequest 65000,65001; // This will remove the quest ID 65000 and change it to 65001 with the state &amp;quot;active&amp;quot;.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Check Quest Progress ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;*questprogress(&amp;lt;ID&amp;gt;{,PLAYTIME|HUNTING})&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If no additional argument supplied, return the state of the quest: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0 = Quest not started (not in quest log)&lt;br /&gt;
1  = Quest has been given&lt;br /&gt;
2  = Quest completed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;*questactive(&amp;lt;ID&amp;gt;)&amp;lt;/pre&amp;gt;&lt;br /&gt;
Check whether the given quest is in its active state.&lt;br /&gt;
Returns true if the quest is active, false otherwise (quest not started, inactive or completed)&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;prontera,xx,xx,4	script	CheckQuest	51,{&lt;br /&gt;
&lt;br /&gt;
if(!questactive(65000)) { //Quest is Inactive&lt;br /&gt;
mes &amp;quot;[Jelly]&amp;quot;;&lt;br /&gt;
mes &amp;quot;Quest is Inactive&amp;quot;;&lt;br /&gt;
close;&lt;br /&gt;
} else if(!questprogress(65000)) { //Quest Not started yet &lt;br /&gt;
mes &amp;quot;[Jelly]&amp;quot;;&lt;br /&gt;
mes &amp;quot;Quest Not Started&amp;quot;;&lt;br /&gt;
close;&lt;br /&gt;
} else if(questactive(65000)) { //Quest is Active&lt;br /&gt;
mes &amp;quot;[Jelly]&amp;quot;;&lt;br /&gt;
mes &amp;quot;Quest is Active!&amp;quot;;&lt;br /&gt;
close;&lt;br /&gt;
} else if(questprogress(65000) == 2) {	// Quest finished.&lt;br /&gt;
mes &amp;quot;[Jelly]&amp;quot;;&lt;br /&gt;
mes &amp;quot;Quest Finished!&amp;quot;;&lt;br /&gt;
completequest 65000;&lt;br /&gt;
close;&lt;br /&gt;
} &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If parameter &amp;quot;PLAYTIME&amp;quot; is supplied:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0 = Quest not started (not in quest log)&lt;br /&gt;
1  = the time limit has not yet been reached&lt;br /&gt;
2  = the time limit has been reached&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If parameter &amp;quot;HUNTING&amp;quot; is supplied:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0 = Quest not started (not in quest log)&lt;br /&gt;
1 = Player hasn't killed all of the target monsters&lt;br /&gt;
2 = Player has killed all of the target monsters&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example | Hunting ===&lt;br /&gt;
&amp;lt;pre&amp;gt;prontera,xx,xx,4	script	CheckQuest	51,{&lt;br /&gt;
&lt;br /&gt;
if (!questprogress(65000,HUNTING)) {&lt;br /&gt;
mes &amp;quot;[Jelly]&amp;quot;;&lt;br /&gt;
mes &amp;quot;Quest not Started&amp;quot;,&lt;br /&gt;
close;&lt;br /&gt;
} else if (questprogress(65000,HUNTING) == 1) {&lt;br /&gt;
mes &amp;quot;[Jelly]&amp;quot;;&lt;br /&gt;
mes &amp;quot;You haven't killed all of the target monsters.&amp;quot;;&lt;br /&gt;
close;&lt;br /&gt;
} else if (questprogress(65000,HUNTING) == 2) {&lt;br /&gt;
completequest 65000;&lt;br /&gt;
set zeny,zeny+100;      //Zeny Reward&lt;br /&gt;
getitem 501,1;          // Item Reward&lt;br /&gt;
mes &amp;quot;[Jelly]&amp;quot;;&lt;br /&gt;
mes &amp;quot;Quest Finished&amp;quot;;&lt;br /&gt;
close;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Show Event ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
*showevent &amp;lt;state&amp;gt;, &amp;lt;color&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
Show a colored mark in the mini-map like &amp;quot;viewpoint&amp;quot; and an emotion on top &lt;br /&gt;
of a NPC. This is used to indicate that a NPC has a quest or an event to &lt;br /&gt;
certain player/s. &lt;br /&gt;
&lt;br /&gt;
state can be:&lt;br /&gt;
	0 = disable ( Used to disable and remove the mark and the emotion from &lt;br /&gt;
		the NPC. )&lt;br /&gt;
	1 = exclamation emotion ( Used to show an important quest event to &lt;br /&gt;
		certain player. )&lt;br /&gt;
	2 = interrogation emotion ( Used to show an non-important quest event &lt;br /&gt;
		to certain player. )&lt;br /&gt;
Other value may cause client crashes.&lt;br /&gt;
&lt;br /&gt;
color can be:&lt;br /&gt;
	0 = yellow &amp;quot;Quest&amp;quot;&lt;br /&gt;
	1 = orange &amp;quot;Job&amp;quot;&lt;br /&gt;
	2 = green &amp;quot;Event&amp;quot;&lt;br /&gt;
	3 = an MVP flag&lt;br /&gt;
Other values show a transparent mark in the mini-map.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Increasing Max Quest DB ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
trunk/src/map/quest.h &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Find this line and increase the value.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define MAX_QUEST_DB (60355+1) // Highest quest ID + 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Recompile, Cheers!&lt;br /&gt;
&lt;br /&gt;
(If you don't know how to recompile click [[Compiling|Here!]])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Script Command]]&lt;/div&gt;</summary>
		<author><name>Asheraf</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Quest_Log_System</id>
		<title>Quest Log System</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Quest_Log_System"/>
				<updated>2016-07-01T16:14:48Z</updated>
		
		<summary type="html">&lt;p&gt;Asheraf: Update quest db structure.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Quest Log System ==&lt;br /&gt;
&lt;br /&gt;
==== Basic Structure of NPC ====&lt;br /&gt;
&lt;br /&gt;
First of all you must have a knowledge on basic scripting, if not please kindly Click [[Basic_Scripting|Here!]].&lt;br /&gt;
&lt;br /&gt;
==== Quest Window ====&lt;br /&gt;
&lt;br /&gt;
The Quest Window or Quest Journal (Opened via Alt+U) allows the player to view all quests their character has started but not yet completed (Except for instance dungeon quests and Battlegrounds instances, which always remain once started).&lt;br /&gt;
To place a quest in the Inactive tab, right click once on it and the name will turn gray. It will then appear on the Inactive tab instead of Active. Right clicking the name again will bring it back to the Active tab. Moving the quest back and forth has no effect on whether you can continue it or not.&lt;br /&gt;
Not every quest has a quest window component. Those quests who have quest window walkthroughs can be found in this category as well as by having their infobox in gold. Additionally, the Quest Window guides are not comprehensive, and do not specify the exact coordinates of the next NPC or location the player must visit. It is highly recommended to continue using the wiki guides along with the in-game walkthroughs.&lt;br /&gt;
&lt;br /&gt;
[[File:QWindow.jpg|center|caption]]&lt;br /&gt;
&lt;br /&gt;
== Quest Database - Adding Quest ==&lt;br /&gt;
&lt;br /&gt;
=== Structure ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	Id: Quest ID&lt;br /&gt;
	Name: &amp;quot;Quest Name&amp;quot;&lt;br /&gt;
	TimeLimit: seconds&lt;br /&gt;
	Targets: (&lt;br /&gt;
	{&lt;br /&gt;
		MobId: Mob_ID&lt;br /&gt;
		Count: number&lt;br /&gt;
	},&lt;br /&gt;
	)&lt;br /&gt;
	Drops: (&lt;br /&gt;
	{&lt;br /&gt;
		ItemId: item_to_drop&lt;br /&gt;
		Rate: Drop_Rate&lt;br /&gt;
		MobId: Mob_ID_to_match&lt;br /&gt;
	},&lt;br /&gt;
	)&lt;br /&gt;
},&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Quest ID - ID of the quest, must increment and should not be duplicated.&amp;lt;br&amp;gt;&lt;br /&gt;
Name - The title of the Quest you made.&amp;lt;br&amp;gt;&lt;br /&gt;
Time Limit - Time limit for the quest to be finish in seconds.&amp;lt;br&amp;gt;&lt;br /&gt;
Targets - Monsters killing list contain mob ids and count.&amp;lt;br&amp;gt;&lt;br /&gt;
Drops - Item id to drop.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
For this example I will make a quest that will require to kill 10 Poring's.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;65000,0,1002,10,0,0,0,0,&amp;quot;Quest - Poring Hunt&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Client Side Editing ====&lt;br /&gt;
&lt;br /&gt;
You have to edit your questid2display.txt&lt;br /&gt;
&lt;br /&gt;
==== Structure ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
QUESTID#Quest Name#FILENAME#LOG_FILENAME#&lt;br /&gt;
Summary description#&lt;br /&gt;
Objective description#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
65000#Quest - Poring Hunt#SG_FEEL#QUE_NOIMAGE#&lt;br /&gt;
Find the monster named Poring and kill 10#&lt;br /&gt;
Hunting 10 Poring#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
== Quest Log Commands ==&lt;br /&gt;
&lt;br /&gt;
=== Set Quest ===&lt;br /&gt;
&amp;lt;pre&amp;gt;*setquest &amp;lt;ID&amp;gt;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Place quest of &amp;lt;ID&amp;gt; in the users quest log, the state of which is &amp;quot;active&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;prontera,xx,xx,4	script	SetQuest	51,{&lt;br /&gt;
setquest 65000;	// This will add the Quest ID 65000 to your Quest Window.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sample will add the quest &amp;quot;Quest - Poring Hunt&amp;quot; which I stated on the Adding Quest.&lt;br /&gt;
'''Note''': The example is just a simple NPC that will add Quest ID 65000 every time you click it, You can add conditions so that it can only be taken once. &lt;br /&gt;
&lt;br /&gt;
=== Complete Quest ===&lt;br /&gt;
&amp;lt;pre&amp;gt;*completequest &amp;lt;ID&amp;gt;{,&amp;lt;ID2&amp;gt;};&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change the state for the given quest &amp;lt;ID&amp;gt; to &amp;quot;complete&amp;quot; and remove from &lt;br /&gt;
the users quest log.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
If a second quest id of greater value is specified, all quests between the two&lt;br /&gt;
will be completed.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;prontera,xx,xx,4	script	CompleteQuest	51,{&lt;br /&gt;
completequest 65000;	// This will change the state of the quest to &amp;quot;complete&amp;quot;&lt;br /&gt;
set zeny,zeny + 100;   //just add line like this if you want to give zeny reward if a player finish the quest.&lt;br /&gt;
getitem 501,1;         //just add line like this if you want to give item reward if a player finish the quest.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Erase Quest ===&lt;br /&gt;
&amp;lt;pre&amp;gt;*erasequest &amp;lt;ID&amp;gt;{,&amp;lt;ID2&amp;gt;};&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remove the quest of the given &amp;lt;ID&amp;gt; from the user's quest log.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
If a second quest id of greater value is specified, all quests between the two&lt;br /&gt;
will be erased.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;prontera,xx,xx,4	script	EraseQuest	51,{&lt;br /&gt;
erasequest 65000;	// This will remove the quest to your Quest Window.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Change Quest ===&lt;br /&gt;
&amp;lt;pre&amp;gt;*changequest &amp;lt;ID&amp;gt;,&amp;lt;ID2&amp;gt;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remove quest of the given &amp;lt;ID&amp;gt; from the user's quest log.&lt;br /&gt;
Add quest of the &amp;lt;ID2&amp;gt; to the the quest log, and the state is &amp;quot;active&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;prontera,xx,xx,4	script	ChangeQuest	51,{&lt;br /&gt;
changequest 65000,65001; // This will remove the quest ID 65000 and change it to 65001 with the state &amp;quot;active&amp;quot;.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Check Quest Progress ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;*questprogress(&amp;lt;ID&amp;gt;{,PLAYTIME|HUNTING})&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If no additional argument supplied, return the state of the quest: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0 = Quest not started (not in quest log)&lt;br /&gt;
1  = Quest has been given&lt;br /&gt;
2  = Quest completed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;*questactive(&amp;lt;ID&amp;gt;)&amp;lt;/pre&amp;gt;&lt;br /&gt;
Check whether the given quest is in its active state.&lt;br /&gt;
Returns true if the quest is active, false otherwise (quest not started, inactive or completed)&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;prontera,xx,xx,4	script	CheckQuest	51,{&lt;br /&gt;
&lt;br /&gt;
if(!questactive(65000)) { //Quest is Inactive&lt;br /&gt;
mes &amp;quot;[Jelly]&amp;quot;;&lt;br /&gt;
mes &amp;quot;Quest is Inactive&amp;quot;;&lt;br /&gt;
close;&lt;br /&gt;
} else if(!questprogress(65000)) { //Quest Not started yet &lt;br /&gt;
mes &amp;quot;[Jelly]&amp;quot;;&lt;br /&gt;
mes &amp;quot;Quest Not Started&amp;quot;;&lt;br /&gt;
close;&lt;br /&gt;
} else if(questactive(65000)) { //Quest is Active&lt;br /&gt;
mes &amp;quot;[Jelly]&amp;quot;;&lt;br /&gt;
mes &amp;quot;Quest is Active!&amp;quot;;&lt;br /&gt;
close;&lt;br /&gt;
} else if(questprogress(65000) == 2) {	// Quest finished.&lt;br /&gt;
mes &amp;quot;[Jelly]&amp;quot;;&lt;br /&gt;
mes &amp;quot;Quest Finished!&amp;quot;;&lt;br /&gt;
completequest 65000;&lt;br /&gt;
close;&lt;br /&gt;
} &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If parameter &amp;quot;PLAYTIME&amp;quot; is supplied:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0 = Quest not started (not in quest log)&lt;br /&gt;
1  = the time limit has not yet been reached&lt;br /&gt;
2  = the time limit has been reached&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If parameter &amp;quot;HUNTING&amp;quot; is supplied:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0 = Quest not started (not in quest log)&lt;br /&gt;
1 = Player hasn't killed all of the target monsters&lt;br /&gt;
2 = Player has killed all of the target monsters&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example | Hunting ===&lt;br /&gt;
&amp;lt;pre&amp;gt;prontera,xx,xx,4	script	CheckQuest	51,{&lt;br /&gt;
&lt;br /&gt;
if (!questprogress(65000,HUNTING)) {&lt;br /&gt;
mes &amp;quot;[Jelly]&amp;quot;;&lt;br /&gt;
mes &amp;quot;Quest not Started&amp;quot;,&lt;br /&gt;
close;&lt;br /&gt;
} else if (questprogress(65000,HUNTING) == 1) {&lt;br /&gt;
mes &amp;quot;[Jelly]&amp;quot;;&lt;br /&gt;
mes &amp;quot;You haven't killed all of the target monsters.&amp;quot;;&lt;br /&gt;
close;&lt;br /&gt;
} else if (questprogress(65000,HUNTING) == 2) {&lt;br /&gt;
completequest 65000;&lt;br /&gt;
set zeny,zeny+100;      //Zeny Reward&lt;br /&gt;
getitem 501,1;          // Item Reward&lt;br /&gt;
mes &amp;quot;[Jelly]&amp;quot;;&lt;br /&gt;
mes &amp;quot;Quest Finished&amp;quot;;&lt;br /&gt;
close;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Show Event ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
*showevent &amp;lt;state&amp;gt;, &amp;lt;color&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
Show a colored mark in the mini-map like &amp;quot;viewpoint&amp;quot; and an emotion on top &lt;br /&gt;
of a NPC. This is used to indicate that a NPC has a quest or an event to &lt;br /&gt;
certain player/s. &lt;br /&gt;
&lt;br /&gt;
state can be:&lt;br /&gt;
	0 = disable ( Used to disable and remove the mark and the emotion from &lt;br /&gt;
		the NPC. )&lt;br /&gt;
	1 = exclamation emotion ( Used to show an important quest event to &lt;br /&gt;
		certain player. )&lt;br /&gt;
	2 = interrogation emotion ( Used to show an non-important quest event &lt;br /&gt;
		to certain player. )&lt;br /&gt;
Other value may cause client crashes.&lt;br /&gt;
&lt;br /&gt;
color can be:&lt;br /&gt;
	0 = yellow &amp;quot;Quest&amp;quot;&lt;br /&gt;
	1 = orange &amp;quot;Job&amp;quot;&lt;br /&gt;
	2 = green &amp;quot;Event&amp;quot;&lt;br /&gt;
	3 = an MVP flag&lt;br /&gt;
Other values show a transparent mark in the mini-map.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Increasing Max Quest DB ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
trunk/src/map/quest.h &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Find this line and increase the value.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define MAX_QUEST_DB (60355+1) // Highest quest ID + 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Recompile, Cheers!&lt;br /&gt;
&lt;br /&gt;
(If you don't know how to recompile click [[Compiling|Here!]])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Script Command]]&lt;/div&gt;</summary>
		<author><name>Asheraf</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Category:Installation_Guides</id>
		<title>Category:Installation Guides</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Category:Installation_Guides"/>
				<updated>2016-05-05T22:59:57Z</updated>
		
		<summary type="html">&lt;p&gt;Asheraf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This category contains complete, detailed Hercules installation guides for various operating systems and software.&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
Temporary:&lt;br /&gt;
For instructions on how to install on Linux, please refer to the following forum post by Ind, http://herc.ws/board/topic/105-regarding-github/&lt;br /&gt;
&lt;br /&gt;
 Please note, if your Linux does not have &amp;quot;apt-get&amp;quot;, you may need to use &amp;quot;yum install&amp;quot; instead.&lt;/div&gt;</summary>
		<author><name>Asheraf</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Custom_Mobs</id>
		<title>Custom Mobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Custom_Mobs"/>
				<updated>2016-05-05T22:49:19Z</updated>
		
		<summary type="html">&lt;p&gt;Asheraf: mob db structure&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Intro =&lt;br /&gt;
You can have up to 10,000 mob IDs. This guide was written without testing on Git; use at your own discretion.&lt;br /&gt;
Well, its pretty easy if you do it correctly and go step by step without rushing.&lt;br /&gt;
&lt;br /&gt;
= Gettings Started =&lt;br /&gt;
== Database Structure ==&lt;br /&gt;
Let's take a look at the structure of the entries in mob_db.conf:&lt;br /&gt;
&lt;br /&gt;
Note: If you're adding custom mobs, it's better to add them to mob_db2.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	// =================== Mandatory fields ===============================&lt;br /&gt;
	Id: ID                                (int)&lt;br /&gt;
	SpriteName: &amp;quot;SPRITE_NAME&amp;quot;             (string)&lt;br /&gt;
	Name: &amp;quot;Mob name&amp;quot;                      (string)&lt;br /&gt;
	// =================== Optional fields ================================&lt;br /&gt;
	Lv: level                             (int, defaults to 1)&lt;br /&gt;
	Hp: health                            (int, defaults to 1)&lt;br /&gt;
	Sp: mana                              (int, defaults to 0)&lt;br /&gt;
	Exp: basic experience                 (int, defaults to 0)&lt;br /&gt;
	JExp: job experience                  (int, defaults to 0)&lt;br /&gt;
	AttackRange: attack range             (int, defaults to 1)&lt;br /&gt;
	Attack: [attack1, attack2]            (int, defaults to 0)&lt;br /&gt;
	Def: defence                          (int, defaults to 0)&lt;br /&gt;
	Mdef: magic defence                   (int, defaults to 0)&lt;br /&gt;
	Stats: {&lt;br /&gt;
		Str: strength                 (int, defaults to 0)&lt;br /&gt;
		Agi: agility                  (int, defaults to 0)&lt;br /&gt;
		Vit: vitality                 (int, defaults to 0)&lt;br /&gt;
		Int: intelligence             (int, defaults to 0)&lt;br /&gt;
		Dex: dexterity                (int, defaults to 0)&lt;br /&gt;
		Luk: luck                     (int, defaults to 0)&lt;br /&gt;
	}&lt;br /&gt;
	ViewRange: view range                 (int, defaults to 1)&lt;br /&gt;
	ChaseRange: chase range               (int, defaults to 1)&lt;br /&gt;
	Size: size                            (int, defaults to 1)&lt;br /&gt;
	Race: race                            (int, defaults to 0)&lt;br /&gt;
	Element: (type, level)&lt;br /&gt;
	Mode: {&lt;br /&gt;
		CanMove: true/false           (bool)&lt;br /&gt;
		Looter: true/false            (bool)&lt;br /&gt;
		Aggressive: true/false        (bool)&lt;br /&gt;
		Assist: true/false            (bool)&lt;br /&gt;
		CastSensorIdle:true/false     (bool)&lt;br /&gt;
		Boss: true/false              (bool)&lt;br /&gt;
		Plant: true/false             (bool)&lt;br /&gt;
		CanAttack: true/false         (bool)&lt;br /&gt;
		Detector: true/false          (bool)&lt;br /&gt;
		CastSensorChase: true/false   (bool)&lt;br /&gt;
		ChangeChase: true/false       (bool)&lt;br /&gt;
		Angry: true/false             (bool)&lt;br /&gt;
		ChangeTargetMelee: true/false (bool)&lt;br /&gt;
		ChangeTargetChase: true/false (bool)&lt;br /&gt;
		TargetWeak: true/false        (bool)&lt;br /&gt;
	}&lt;br /&gt;
	MoveSpeed: move speed                 (int, defaults to 0)&lt;br /&gt;
	AttackDelay: attack delay             (int, defaults to 4000)&lt;br /&gt;
	AttackMotion: attack motion           (int, defaults to 2000)&lt;br /&gt;
	DamageMotion: damage motion           (int, defaults to 0)&lt;br /&gt;
	MvpExp: mvp experience                (int, defaults to 0)&lt;br /&gt;
	MvpDrops: {&lt;br /&gt;
		AegisName: chance             (string: int)&lt;br /&gt;
		...&lt;br /&gt;
	}&lt;br /&gt;
	Drops: {&lt;br /&gt;
		AegisName: chance         (string: int)&lt;br /&gt;
		...&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
},&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Fields !! Description&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Id&amp;lt;/u&amp;gt;''' || ID of the mob&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;SpriteName&amp;lt;/u&amp;gt;''' || This first name is the DB name. When you use @spawn/@summon and you know the name of the mob, but not the ID, type this name instead. Try making the normal name the same as this so you wont get confused.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Name&amp;lt;/u&amp;gt;''' || This is the name the server shows.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Lv&amp;lt;/u&amp;gt;''' || Level of the mob&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Hp&amp;lt;/u&amp;gt;''' || HP of the mob&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Sp&amp;lt;/u&amp;gt;''' || SP of the mob&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Exp&amp;lt;/u&amp;gt;''' || Exp granted by the mob&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;JExp&amp;lt;/u&amp;gt;''' || Job exp granted by the mob&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;AttackRange&amp;lt;/u&amp;gt;''' || Range of the mob attack. If set to 1 or 2, it will melee. 3 or more than 3 will set it to ranged&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Attack1&amp;lt;/u&amp;gt;''' ||  Affects ATK of the mob&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Attack2&amp;lt;/u&amp;gt;''' || Affects MATK of the mob&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Def&amp;lt;/u&amp;gt;''' || Defense of the mob (Tip: 100 def = Invulnerability below 8K attack. Watch out, only melee/ranged attacks, but generally direct hits attacks are drastically reduced. Setting this high enough may make monks pretty cheap to level because of of Psychic Wave/Occult Impact/Investigate.)&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;MDef&amp;lt;/u&amp;gt;''' || Magic Defense of the mob (Hint: 100 mdef = golden thief bug effect below 9K magic attack. It's for all magic-using skills.)&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Stats&amp;lt;/u&amp;gt;''' || All Stats of mobs belongs to this block.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Stats !! Description&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Str&amp;lt;/u&amp;gt;''' || Strength of the mob. This also affects its ATK.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Agi&amp;lt;/u&amp;gt;''' || Agility of the mob. This also affects the mob flee rate.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Vit&amp;lt;/u&amp;gt;''' || Vitality of the mob. This affects the duration of stun status.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Int&amp;lt;/u&amp;gt;''' || Intelligence of the mob. This also affects its MATK.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Dex&amp;lt;/u&amp;gt;''' || Dexterity of the mob. This also affects the mob hit rate.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Luk&amp;lt;/u&amp;gt;''' || Luck of the mob. This also defines the mob perfect dodge/lucky flee/perfect flee/lucky dodge rate.&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;ViewRange&amp;lt;/u&amp;gt;''' || Maximum Skill Range&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;ChaseRange&amp;lt;/u&amp;gt;''' || Sight limit for mobs. If set to 1000 or beyond, mobs will follow you all over the map.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Size&amp;lt;/u&amp;gt;''' || 0 if its Small, 1 if its Medium, 2 if its Large&lt;br /&gt;
or Small=Size_Small, Medium=Size_Medium, Large=Size_Large&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Race&amp;lt;/u&amp;gt;''' || 0=formless, 1=undead, 2=animal, 3=plant, 4=insect, 5=fish, 6=demon, 7=demihuman, 8=angel, 9=dragon.&lt;br /&gt;
or formless=RC_Formless, undeas=RC_Undead, animal=RC_Brute, plant=RC_Plant, fish=RC_Fish, demihuman=RC_DemiHuman, angel=RC_Angel, dragon=RC_Dragon.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Element&amp;lt;/u&amp;gt;''' || This is a two-digit number representing the rank (level) and element of the mob.&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Element(Type)&amp;lt;/u&amp;gt;''' || Element Type of mob as mentioned below.&amp;lt;br /&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center;&amp;quot;&lt;br /&gt;
 |&lt;br /&gt;
 |Neutral&lt;br /&gt;
 |Water&lt;br /&gt;
 |Earth&lt;br /&gt;
 |Fire&lt;br /&gt;
 |Wind&lt;br /&gt;
 |Poison&lt;br /&gt;
 |Holy&lt;br /&gt;
 |Shadow&lt;br /&gt;
 |Ghost&lt;br /&gt;
 |Undead&lt;br /&gt;
 |-&lt;br /&gt;
 | Type&lt;br /&gt;
 |0&lt;br /&gt;
 |1&lt;br /&gt;
 |2&lt;br /&gt;
 |3&lt;br /&gt;
 |4&lt;br /&gt;
 |5&lt;br /&gt;
 |6&lt;br /&gt;
 |7&lt;br /&gt;
 |8&lt;br /&gt;
 |9&lt;br /&gt;
 |}&lt;br /&gt;
or &amp;quot;Ele_Name&amp;quot; (Neutral, Water, Earth, Fire, Wind, Poison, Holy, Shadow, Ghost, Undead.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Element(Level)&amp;lt;/u&amp;gt;''' || Element level of mob from (1-4).&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Mode&amp;lt;/u&amp;gt;''' || This defines the mob behaves.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;MoveSpeed&amp;lt;/u&amp;gt;''' || Walking speed of the mob. 1 is the fastest, 1000 is the lowest. 100 is the normal walking speed.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;AttackDelay&amp;lt;/u&amp;gt;''' || ADelay= Attack Delay, also known as ASPD. This one will change the aspd of the mob. The lower the faster, but don't make it too low or it will lag when mobbed by several of these.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;AttackMotion&amp;lt;/u&amp;gt;''' || Attack animation motion. Lower this value and the mob's attack will be displayed in higher fps (making it shorter, too) (Thanks to Wallex for this)&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;DamageMotion&amp;lt;/u&amp;gt;''' || Damage animation motion, same as aMotion but used to display the &amp;quot;I am hit&amp;quot; animation. Coincidentally, this same value is used to determine how long it is before the mob/player can move again. Endure is dMotion = 0, obviously.&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;MvpExp&amp;lt;/u&amp;gt;''' || The MVP exp the mob gives when it is defeated (to the player who got the MVP reward) (This exp is a percentage of the exp the monster gives.)&lt;br /&gt;
|-&lt;br /&gt;
The following fields are for drops and drop rates. Remember that these are in percentages; i.e. 100 = 100%&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;MvpDrops&amp;lt;/u&amp;gt;''' || The MvP Drops goes here, format is:&lt;br /&gt;
&amp;lt;pre&amp;gt;AegisName: Chance&amp;lt;/pre&amp;gt;&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;Poring_Card: 1000&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;u&amp;gt;Drops&amp;lt;/u&amp;gt;''' || The Normal Drops goes here, format is:&lt;br /&gt;
&amp;lt;pre&amp;gt;AegisName: Chance&amp;lt;/pre&amp;gt;&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;Poring_Card: 1000&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Making it visible ==&lt;br /&gt;
=== Server Side ===&lt;br /&gt;
If you've got a sprite and you're happy with it, then you can skip this part. If you would like to make your mob look like another mob, or even a player, then you need to take a look at {{git|db/mob_avail.txt|full}}&lt;br /&gt;
&lt;br /&gt;
For normal mobs, you can use the data that's already in the file as an example to work on:&lt;br /&gt;
 // mob_id,sprite_id,equip #&lt;br /&gt;
 // iRO Halloween Event 2008&lt;br /&gt;
 //3000,1015,0&lt;br /&gt;
 //3001,1036,0&lt;br /&gt;
 //3002,1298,0&lt;br /&gt;
 &lt;br /&gt;
 // iRO Halloween Event 2009&lt;br /&gt;
 //3014,1179,0&lt;br /&gt;
 //3015,1272,0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
However, if you would like to make your mob look like a character, you need to add more options:&amp;lt;br /&amp;gt;&lt;br /&gt;
// Valaris&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| MobID || SpriteID || Sex || Hair || Hair_Color || Weapon || Shield || Head_Top || Head_Middle || Head_Bottom || Option || Dye_Color&lt;br /&gt;
|-&lt;br /&gt;
| 1900, || 4013, || 1, || 1, || 1, || 1254, || 0, || 67, || 12, || 54, || 16, || 1&lt;br /&gt;
|}&lt;br /&gt;
You will need to use the Item ID for your mob's weapon and shield instead of the View ID of the item. Doing so may have undesirable effects.&lt;br /&gt;
&lt;br /&gt;
A more in-depth look at each value:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;MobID&amp;lt;/u&amp;gt;''': This is your mob ID.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;SpriteID&amp;lt;/u&amp;gt;''': The Job number you want it to look like. They are:&lt;br /&gt;
&amp;lt;pre&amp;gt;Job_Novice 0&lt;br /&gt;
Job_Swordman 1&lt;br /&gt;
Job_Mage 2&lt;br /&gt;
Job_Archer 3&lt;br /&gt;
Job_Acolyte 4&lt;br /&gt;
Job_Merchant 5&lt;br /&gt;
Job_Thief 6&lt;br /&gt;
Job_Knight 7&lt;br /&gt;
Job_Priest 8&lt;br /&gt;
Job_Wizard 9&lt;br /&gt;
Job_Blacksmith 10&lt;br /&gt;
etc&amp;lt;/pre&amp;gt;&lt;br /&gt;
They can also be found on {{git|db/const.txt}} file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;Sex&amp;lt;/u&amp;gt;''': 0 for female, 1 for male&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;Hair&amp;lt;/u&amp;gt;''': The mob hair style, goes from 1 to 23&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;Hair_Color&amp;lt;/u&amp;gt;''': The mob hair color. Goes from 0 to 8 or 10, but it depends on the server's palette files.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;Weapon&amp;lt;/u&amp;gt;''':The ID of the Weapon you want. See [[Custom_weapons|Custom Weapons]] for it. Also read at the end of the pre if you cant find the headgear you want. &lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;Shield&amp;lt;/u&amp;gt;''': Same as above&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;Head_Top&amp;lt;/u&amp;gt;''': Same as above&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;Head_Middle&amp;lt;/u&amp;gt;''': Same as above&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;Head_Bottom&amp;lt;/u&amp;gt;''': Same as above&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;Option&amp;lt;/u&amp;gt;''': this option parameter will make the mob change its status, as well as give them carts, pecopecos, and falcons. In other words, this will change the visual effects of your mobs. The options are these*:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 1 Sight             32 Peco Peco riding   2048 Orc Head&lt;br /&gt;
 2 Hide              64 GM Perfect Hide    4096 Wedding Sprites&lt;br /&gt;
 4 Cloak            128 Level 2 Cart       8192 Ruwach&lt;br /&gt;
 8 Level 1 Cart     256 Level 3 Cart&lt;br /&gt;
16 Falcon           512 Level 4 Cart&lt;br /&gt;
                   1024 Level 5 Cart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;Dye_Color&amp;lt;/u&amp;gt;''': Same as hair color. It goes from 0 to 77&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Client Side ===&lt;br /&gt;
For your mob to exist in the client, you need to add it to a few [[Lua]] files.&lt;br /&gt;
==== datainfo/npcidentity.lua ====&lt;br /&gt;
Example at the end of the file:&amp;lt;br /&amp;gt;&lt;br /&gt;
 	[&amp;quot;JT_4_F_TAEKWON&amp;quot;] = 644,&lt;br /&gt;
 	[&amp;quot;JT_4_F_SWORDMAN&amp;quot;] = 645,&lt;br /&gt;
 	-- Custom Mobs&lt;br /&gt;
 	[&amp;quot;JT_JACOB&amp;quot;] = 2500,&lt;br /&gt;
 	[&amp;quot;JT_AQUARING&amp;quot;] = 2600&lt;br /&gt;
 }&lt;br /&gt;
The number after the = sign denotes the mob's database ID number. Other sprites in this file have their view ID e.g. [[Adding_a_Script#Client_Side|NPC sprite number]].&lt;br /&gt;
&lt;br /&gt;
==== datainfo/jobname.lua ====&lt;br /&gt;
Example at the end of the file:&amp;lt;br /&amp;gt;&lt;br /&gt;
 	[jobtbl.JT_GIBBET] = &amp;quot;GIBBET&amp;quot;,&lt;br /&gt;
 	[jobtbl.JT_DULLAHAN] = &amp;quot;DULLAHAN&amp;quot;,&lt;br /&gt;
 	[jobtbl.JT_LOLI_RURI] = &amp;quot;LOLI_RURI&amp;quot;,&lt;br /&gt;
 	[jobtbl.JT_DISGUISE] = &amp;quot;DISGUISE&amp;quot;,&lt;br /&gt;
 	-- Custom Mobs&lt;br /&gt;
 	[jobtbl.JT_JACOB] = &amp;quot;jacobmob&amp;quot;,&lt;br /&gt;
 	[jobtbl.JT_AQUARING] = &amp;quot;aquaring&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
In this file, the value after the = sign is the name of the actual sprite in your data folder/[[GRF]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Your mob in other files ==&lt;br /&gt;
=== Dead Branch ===&lt;br /&gt;
Adding your mob to {{git|db/pre-re/mob_branch.txt}} or {{git|db/re/mob_branch.txt}} will allow Dead Branches to summon it.&lt;br /&gt;
&lt;br /&gt;
=== Bloody Branch ===&lt;br /&gt;
Adding your mob to {{git|db/pre-re/mob_boss.txt}} or {{git|db/re/mob_boss.txt}} will allow Bloody Branches to summon it.&lt;br /&gt;
&lt;br /&gt;
=== Poring Box ===&lt;br /&gt;
Adding your mob to {{git|db/pre-re/mob_poring.txt}} or {{git|db/re/mob_poring.txt}} will make your mob spawnable via the Poring Box.&lt;br /&gt;
&lt;br /&gt;
=== Monster Racial Groups ===&lt;br /&gt;
Adding your mob to {{git|db/pre-re/mob_race2_db.txt}} or {{git|db/re/mob_race2_db.txt}} will add your mob to a [[Racial_Group|Racial Group]]. Guardians, Goblins and other mobs are members of particular Racial Groups.&lt;br /&gt;
&lt;br /&gt;
=== Red Pouch of Surprise ===&lt;br /&gt;
Adding your mob to {{git|db/mob_pouch.txt}} will make your mob spawnable via the Red Pouch of Surprise.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Spawn Points ==&lt;br /&gt;
Let's look at the syntax of a mob spawn point:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;map name&amp;gt;,&amp;lt;x1&amp;gt;,&amp;lt;y1&amp;gt;,&amp;lt;x2&amp;gt;,&amp;lt;y2&amp;gt;%TAB%monster%TAB%&amp;lt;monster name&amp;gt;%TAB%&amp;lt;mob id&amp;gt;,&amp;lt;amount&amp;gt;,&amp;lt;delay1&amp;gt;,&amp;lt;delay2&amp;gt;,&amp;lt;event&amp;gt;{,&amp;lt;mob size&amp;gt;,&amp;lt;mob ai&amp;gt;}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only the things between &amp;lt;&amp;gt; are changed. Do not remove or change monster after the coordinates, because that's what tells the server that this line is a monster spawn script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;map name&amp;lt;/u&amp;gt;''': Name of the map. Use /where along with the following coordinates&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;x1&amp;lt;/u&amp;gt;''': X axis coordinates. It start from the left side of the map, and the higher it gets, the more it gets closer to the right side of the map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;y1&amp;lt;/u&amp;gt;''': Y axis coordinates. It start from the bottom, and the higher it gets, the more it gets closer to the top of the map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;x2&amp;lt;/u&amp;gt;''': X axis coordinates. It start from the left side of the map, and the higher it gets, the more it gets closer to the right side of the map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;y2&amp;lt;/u&amp;gt;''': Y axis coordinates. It start from the bottom, and the higher it gets, the more it gets closer to the top of the map.&lt;br /&gt;
&amp;lt;br&amp;gt;These 4 coordinates will make a spawn area where the mob will spawn, however it won't limit its movement, so lets say you put 120,150 on the first pair, and 130,160 pair- That's a 10x10 cell area where the mob will spawn randomly.&lt;br /&gt;
&amp;lt;br&amp;gt;If you want the mob to spawn at a random point, use 0 for all the coordinates.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;monster name&amp;lt;/u&amp;gt;''': The name of the mob you want to be shown (using --ja-- in place of a name will display the &amp;quot;Japanese Name&amp;quot; from your database).&lt;br /&gt;
&amp;lt;br&amp;gt;You can specify a custom level to use for the mob different from the one of the database by adjoining the level after the name with a comma. eg: &amp;quot;Poring,50&amp;quot; for a name will spawn a monster with name Poring and level 50.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;mob id&amp;lt;/u&amp;gt;''': The ID of your mob.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;amount&amp;lt;/u&amp;gt;''': How many mobs you want to be spawned.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;delay1&amp;lt;/u&amp;gt;''': Minimum amount of time before a monster respawns.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;delay2&amp;lt;/u&amp;gt;''': Maximum amount of time before a monster respawns.&lt;br /&gt;
&amp;lt;br&amp;gt;delay1 and delay2 are used to define the time it takes for a monster to respawn; in milliseconds. Normal mobs usually have 0 (Instant Respawn), while MVPs have 7200000 (2 hours). If delay2 is greater than delay 1, the mob won't respawn until the map server restarts.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;event&amp;lt;/u&amp;gt;''': Script event to be executed when the mob is killed. The event must be in the form &amp;quot;NPCName::OnEventName&amp;quot; to execute, and the event name label should start with &amp;quot;On&amp;quot;. As with all events, if the NPC is an on-touch NPC, the player who triggers the script must be within 'trigger' range for the event to work.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;size&amp;lt;/u&amp;gt;''': Optional. Size can be 0 (medium), 1 (small), or 2 (big).&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;ai&amp;lt;/u&amp;gt;''': Optional. AI can be 0 (default), 1 (attack/friendly), 2 (sphere), 3 (flora), or 4 (zanzou).&lt;br /&gt;
&lt;br /&gt;
== Adding Skills ==&lt;br /&gt;
&lt;br /&gt;
Lets look at the syntax of a mob skill:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MOB_ID, a unused dummy character sequence (for information only), STATE, SKILL_ID, SKILL_LV,&lt;br /&gt;
rate (10000 = 100%), casttime, delay, cancelable, a target, a condition type, a condition value,&lt;br /&gt;
a value 1, a value 2, a value 3, a value 4, a value 5, emotion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;'''''&lt;br /&gt;
NOTE: I had to cut the mob_avail structure so it could fit.&lt;br /&gt;
It's a whole line, not 3 lines.&lt;br /&gt;
'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;MOD_ID&amp;lt;/u&amp;gt;''': your mob ID.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;an unused.. etc etc&amp;lt;/u&amp;gt;''': you can put any text here you want, its just for information and to know what does this do.* tip tip*You will see inside this file things like Poring@TF_POISON. Well, you could use this too. It would tell you: mob_name@DB_Skill_Name. *tip tip*&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;state&amp;lt;/u&amp;gt;''': this is the state that the mob must accomplish before being able to use this skill. The states are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
any, idle (in standby), walk (in movement), attack, dead (on killed), loot, chase (following target),&lt;br /&gt;
counterattack.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;SKILL_ID&amp;lt;/u&amp;gt;''': The ID of the skill goes here. To look for one, go to your db folder and open the skill_db.txt file. You will see a lot of lines like this one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;2,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //SM_SWORD#Œ•C—û#&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the syntax is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
id,range,hit,inf,pl,nk,max,list_num,castcancel,cast_defence_rate,inf2,maxcount,skill_type,blow_count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
so, the ID of the SM_SWORD, which is the Swordman's Sword Mastery by the way, is 2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;'''2''',0,0,0,0,0,10,0,no,0,0,0,weapon,0 //SM_SWORD#Œ•C—û#&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;SKILL_LV&amp;lt;/u&amp;gt;''': You can put the skill level as high as you want. Though, 100 is usually as far as most skills go.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;rate&amp;lt;/u&amp;gt;''': How frequent will the mob use the skill.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;casttime&amp;lt;/u&amp;gt;''': Skill's cast time.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;delay&amp;lt;/u&amp;gt;''': How much time must pass before the skill can be used again, in milliseconds.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;cancelable&amp;lt;/u&amp;gt;''': if the skill cast can be interrupted. Set it either '''yes''' or '''no'''.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;a target&amp;lt;/u&amp;gt;''': the target of the skill. It can be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
target (player), self (the mob itself), friend (slaves)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;a condition type&amp;lt;/u&amp;gt;''':a condition that also must be fulfilled before the mob is able to use this skill. There are two kinds of conditions:&lt;br /&gt;
&lt;br /&gt;
1. Mob Condition:&lt;br /&gt;
&amp;lt;pre&amp;gt;//conditions: (condition type) (value which specifies a condition value)&lt;br /&gt;
// always            unconditional&lt;br /&gt;
// myhpltmaxrate     when the mob's hp drops to a certain %&lt;br /&gt;
// mystatuson        If the mob has any abnormalities in status (condition value),&lt;br /&gt;
// mystatusoff       If the mob has ended any abnormalities in status (condition value),&lt;br /&gt;
// friendhpltmaxrate when the mobs' friend's hp drops to a certain %&lt;br /&gt;
// friendstatuson    If the friend has any abnormalities in status (condition value),&lt;br /&gt;
// friendstatusoff   If the friend has ended any abnormalities in status (condition value),&lt;br /&gt;
// attackpcgt        Attack PC becomes more than the  number of specification&lt;br /&gt;
// attackpcge        Attack PC becomes equal or more than the number of specification.&lt;br /&gt;
// slavelt           when the number of slaves is lower than the original number of specification.&lt;br /&gt;
// slavele           when the number of slaves is lower or equal than the original number of specification.&lt;br /&gt;
// closedattacked    when melee attacked (close range attack)&lt;br /&gt;
// longrangeattacked when long ranged attacked (like bows and far range weapons)&lt;br /&gt;
// skillused         when a skill is used on the mob&lt;br /&gt;
// casttargeted      when a target is in cast range.&lt;br /&gt;
// rudeattacked      when a target is rude attacked&lt;br /&gt;
// hiding            when a target is hidden *not implemented yet*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Target Conditions&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// The character's state which can be specified to be a condition value&lt;br /&gt;
// by the statuson/statusoff system&lt;br /&gt;
//&lt;br /&gt;
// anybad      any type of state change&lt;br /&gt;
// stone       condition of being in stone state&lt;br /&gt;
// freeze      condition of being in frozen state&lt;br /&gt;
// stan        condition of being in stunned state&lt;br /&gt;
// sleep       condition of being in sleep state&lt;br /&gt;
// poison      condition of being in poisoned state&lt;br /&gt;
// curse       condition of being in cursed state&lt;br /&gt;
// silence     condition of being in silenced state&lt;br /&gt;
// confusion   condition of being in confusion state&lt;br /&gt;
// blind       condition of being in blind state&lt;br /&gt;
// hiding      condition of being in hidden state&lt;br /&gt;
// sight       condition of being in unhidden state&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use only ONE of these conditions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;value1,value2,value3,value4,value5&amp;lt;/u&amp;gt;''': Basically they're only the same but, when you want your mob using the same condition to trigger the skill, but in different times, in case of the myhpltmaxrate when the hp is being decreased, you can set them in a decreasing order, like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;80,60,40,20,10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;emotion&amp;lt;/u&amp;gt;''': Lets your mob use an emotion, at random times. The emotion IDs are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
e_gasp 0&lt;br /&gt;
e_what 1&lt;br /&gt;
e_ho 2&lt;br /&gt;
e_lv 3&lt;br /&gt;
e_swt 4&lt;br /&gt;
e_ic 5&lt;br /&gt;
etc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more info, go to your {{git|db/const.txt}} file.&lt;br /&gt;
&lt;br /&gt;
== Making it talk! ==&lt;br /&gt;
Another add, suggested by chronocrosser_x and Fenrir Soarblade:&lt;br /&gt;
&lt;br /&gt;
Well, I believe you have seen some mobs on your server talking when certain things happens. I never saw them again talking, dont know why but they used to talk. I believe they still do it.&lt;br /&gt;
&lt;br /&gt;
Ok, go to your Data folder. If you look in the files, you should find a file called monstertalktable. If there isnt, we will create one with Wordpad =3!. If there is, open it with Wordpad, not Notepad.&lt;br /&gt;
&lt;br /&gt;
Once there, we will copy and paste this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;euc-kr&amp;quot; ?&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
&amp;lt;enemy_monster_talk_table&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
&amp;lt;mob_db_name_here&amp;gt; &lt;br /&gt;
  &amp;lt;discovery&amp;gt;&amp;lt;/discovery&amp;gt;&lt;br /&gt;
  &amp;lt;attack&amp;gt;&amp;lt;/attack&amp;gt;&lt;br /&gt;
  &amp;lt;hp50&amp;gt;&amp;lt;/hp50&amp;gt;&lt;br /&gt;
  &amp;lt;hp25&amp;gt;&amp;lt;/hp25&amp;gt;&lt;br /&gt;
  &amp;lt;kill&amp;gt;&amp;lt;/kill&amp;gt;&lt;br /&gt;
  &amp;lt;dead&amp;gt;&amp;lt;/dead&amp;gt;&lt;br /&gt;
&amp;lt;/mob_db_name_here&amp;gt; &lt;br /&gt;
&amp;lt;/enemy_monster_talk_table&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Well, lets see step by step =3!:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;&amp;lt;enemy_monster_talk_table&amp;gt;&amp;lt;/u&amp;gt;''': This is the start of the monster talk table. Leave it as it is =3!&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;&amp;lt;mob_db_name_here&amp;gt;&amp;lt;/u&amp;gt;''': The mob_db.txt first name you see, after the ID, goes here =3! Its used to identify the mob&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;&amp;lt;discovery&amp;gt;%TAB%Text Here%TAB%&amp;lt;/discovery&amp;gt;&amp;lt;/u&amp;gt;''': This is an event, same as the one below. When a monster see you, this one will be displayed =3!&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;&amp;lt;attack&amp;gt;%TAB%Text Here%TAB%&amp;lt;/attack&amp;gt;&amp;lt;/u&amp;gt;''': When a monster attacks you, this one will be displayed O_O!&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;&amp;lt;hp50&amp;gt;%TAB%Text Here%TAB%&amp;lt;/hp50&amp;gt;&amp;lt;/u&amp;gt;''': When a monster's hp is at 50%, this one will be displayed o..o!&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;&amp;lt;hp25&amp;gt;%TAB%Text Here%TAB%&amp;lt;/hp25&amp;gt;&amp;lt;/u&amp;gt;''': When a monster's hp is at 25%, this one will be displayed x,x&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;&amp;lt;kill&amp;gt;%TAB%Text Here%TAB%&amp;lt;/kill&amp;gt;&amp;lt;/u&amp;gt;''': When a monster kills a character/player, this one will be displayed T~T!&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;&amp;lt;dead&amp;gt;%TAB%Text Here%TAB%&amp;lt;/dead&amp;gt;&amp;lt;/u&amp;gt;''': When a monster dies by player hand, this one will be displayed ^__^!&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;&amp;lt;/mob_db_name_here&amp;gt;&amp;lt;/u&amp;gt;''': The same name of the mob_db.txt, the one after the ID.&lt;br /&gt;
&amp;lt;br&amp;gt;'''&amp;lt;u&amp;gt;&amp;lt;/enemy_monster_talk_table&amp;gt;&amp;lt;/u&amp;gt;''': Keep it like this.&lt;br /&gt;
&lt;br /&gt;
I never messed with this, but i think its ok =3! Also for those spaces other than the messages spaces, use TAB, not the Space Bar for it ._.!&lt;br /&gt;
&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Data]]&lt;br /&gt;
[[Category:Customization]]&lt;/div&gt;</summary>
		<author><name>Asheraf</name></author>	</entry>

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

	<entry>
		<id>https://wiki.herc.ws/wiki/File:Compile_hercules.PNG</id>
		<title>File:Compile hercules.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/File:Compile_hercules.PNG"/>
				<updated>2016-05-05T21:25:40Z</updated>
		
		<summary type="html">&lt;p&gt;Asheraf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Asheraf</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-05-05T21:04:49Z</updated>
		
		<summary type="html">&lt;p&gt;Asheraf: &amp;gt;.&amp;lt;&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;
[[Category:Database]]&lt;br /&gt;
[[Category:Data]]&lt;br /&gt;
[[Category:Customization]]&lt;/div&gt;</summary>
		<author><name>Asheraf</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-05-05T20:38:44Z</updated>
		
		<summary type="html">&lt;p&gt;Asheraf: edit&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;
&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;
[[Category:Database]]&lt;br /&gt;
[[Category:Data]]&lt;br /&gt;
[[Category:Customization]]&lt;/div&gt;</summary>
		<author><name>Asheraf</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-05-05T20:37:46Z</updated>
		
		<summary type="html">&lt;p&gt;Asheraf: update item db structure&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;
&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;
[[Category:Database]]&lt;br /&gt;
[[Category:Data]]&lt;br /&gt;
[[Category:Customization]]&lt;/div&gt;</summary>
		<author><name>Asheraf</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Sc_start</id>
		<title>Sc start</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Sc_start"/>
				<updated>2016-05-05T19:27:05Z</updated>
		
		<summary type="html">&lt;p&gt;Asheraf: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Script_Command]]&lt;br /&gt;
==Syntax==&lt;br /&gt;
* [[sc_start]]   &amp;lt;effect type&amp;gt;,&amp;lt;ticks&amp;gt;,&amp;lt;extra argument&amp;gt;{,&amp;lt;target ID number&amp;gt;};&lt;br /&gt;
* [[sc_start2]] &amp;lt;effect type&amp;gt;,&amp;lt;ticks&amp;gt;,&amp;lt;extra argument&amp;gt;,&amp;lt;percent chance&amp;gt;{,&amp;lt;target ID number&amp;gt;};&lt;br /&gt;
* [[sc_start4]] &amp;lt;effect type&amp;gt;,&amp;lt;ticks&amp;gt;,&amp;lt;value 1&amp;gt;,&amp;lt;value 2&amp;gt;,&amp;lt;value 3&amp;gt;,&amp;lt;value 4&amp;gt;{,&amp;lt;target ID number&amp;gt;};&lt;br /&gt;
* [[sc_end]]    &amp;lt;effect type&amp;gt;{,&amp;lt;target ID number&amp;gt;};&lt;br /&gt;
==Description==&lt;br /&gt;
These command bestow a status effect on the invoking character. This command is &lt;br /&gt;
used a lot in the item scripts.&lt;br /&gt;
&lt;br /&gt;
Effect type is a number of effect, {{git|db/constants.conf}} lists the common (mostly &lt;br /&gt;
negative) status effect types as constants, starting with 'SC_'. You can also &lt;br /&gt;
use this to give someone an effect of a player-cast spell.&lt;br /&gt;
&lt;br /&gt;
Extra argument's meaning differs depending on the effect type, for most effects &lt;br /&gt;
caused by a player skill the extra argument means the level of the skill that &lt;br /&gt;
would have been used to create that effect, for others it might have no meaning &lt;br /&gt;
whatsoever. You can actually bless someone with a 0 bless spell level this way, &lt;br /&gt;
which is fun, but weird.&lt;br /&gt;
&lt;br /&gt;
The target ID number, if given, will cause the status effect to appear on a &lt;br /&gt;
specified character, instead of the one attached to the running script. This has &lt;br /&gt;
not been properly tested.&lt;br /&gt;
&lt;br /&gt;
'[[sc_start2]]' is perfectly equivalent, but unlike '[[sc_start]]', a status change &lt;br /&gt;
effect will only occur with a specified percentage chance. 10000 given as the &lt;br /&gt;
chance is equivalent to a 100% chance, 0 is a zero.&lt;br /&gt;
&lt;br /&gt;
'[[sc_start4]]' is just like '[[sc_start]]', however it takes four parameters for the&lt;br /&gt;
status change instead of one. What these values are depends on the status&lt;br /&gt;
change in question. For example, elemental armor defense takes the following&lt;br /&gt;
four values:&lt;br /&gt;
- val1 is the first element, val2 is the resistance to the element val1.&lt;br /&gt;
- val3 is the second element, val4 is the resistance to said element.&lt;br /&gt;
eg: [[sc_start4]] SC_ARMOR_ELEMENT,60000,Ele_Fire,20,Ele_Water,-15;&lt;br /&gt;
&lt;br /&gt;
'[[sc_end]]' will remove a specified status effect. If SC_All is used (-1), it will&lt;br /&gt;
do a complete removal of all statuses (although permanent ones will re-apply).&lt;br /&gt;
&lt;br /&gt;
You can see the full list of status effects caused by skills in &lt;br /&gt;
{{git|src/map/status.h}} - they are currently not fully documented, but most of that &lt;br /&gt;
should be rather obvious.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // This would poison them for 10 minutes&lt;br /&gt;
    sc_start SC_POISON,600000,0;&lt;br /&gt;
&lt;br /&gt;
    // This will bless someone as if with Bless 10:&lt;br /&gt;
    sc_start 10,240000,10;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Asheraf</name></author>	</entry>

	</feed>