<?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/index.php?action=history&amp;feed=atom&amp;title=Adding_new_skills</id>
		<title>Adding new skills - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.herc.ws/w/index.php?action=history&amp;feed=atom&amp;title=Adding_new_skills"/>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/w/index.php?title=Adding_new_skills&amp;action=history"/>
		<updated>2026-05-01T16:10:37Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.21.11</generator>

	<entry>
		<id>https://wiki.herc.ws/w/index.php?title=Adding_new_skills&amp;diff=812&amp;oldid=prev</id>
		<title>Sevenzz23 at 11:31, 25 December 2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/w/index.php?title=Adding_new_skills&amp;diff=812&amp;oldid=prev"/>
				<updated>2013-12-25T11:31:26Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 11:31, 25 December 2013&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 53:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 53:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The reason we will be placing the ''case'' for Earth Bolt here is because:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The reason we will be placing the ''case'' for Earth Bolt here is because:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;		&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;skill_attack&lt;/del&gt;(BF_MAGIC,src,src,bl,&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;skillid&lt;/del&gt;,&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;skilllv&lt;/del&gt;,tick,flag);&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;		&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;skill-&amp;gt;attack&lt;/ins&gt;(BF_MAGIC,src,src,bl,&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;skill_id&lt;/ins&gt;,&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;skill_lv&lt;/ins&gt;,tick,flag);&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The BF_MAGIC quality means that the skill is magic based, and should be calculated under the magic battle calculations.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The BF_MAGIC quality means that the skill is magic based, and should be calculated under the magic battle calculations.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 161:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 161:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This part of the database isn't necessary if it can't be learned by a class. However, if you want a class to learn a skill, you have to make an entry in skill_tree.txt. An example below:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This part of the database isn't necessary if it can't be learned by a class. However, if you want a class to learn a skill, you have to make an entry in skill_tree.txt. An example below:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;2,8443,&lt;/del&gt;10&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;,19,&lt;/del&gt;5&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;,20,&lt;/del&gt;5&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;,0,0,0,0,0,0&lt;/del&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;MG_EARTHBOLT: {&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;			MaxLevel: &lt;/ins&gt;10&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;			MG_FIREBOLT: &lt;/ins&gt;5&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;			MG_LIGHTNINGBOLT: &lt;/ins&gt;5&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;		}&lt;/ins&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This defines that:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This defines that:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;code&amp;gt;Earth Bolt can be learned by Mage, has a maximum level of 10 (for this class), and requires skill &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;19 (Firebolt) &lt;/del&gt;at level 5, and skill &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;20 (Lightning Bolt) &lt;/del&gt;at level 5.&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;code&amp;gt;Earth Bolt can be learned by Mage, has a maximum level of 10 (for this class), and requires skill &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;MG_FIREBOLT &lt;/ins&gt;at level 5, and skill &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;MG_LIGHTNINGBOLT &lt;/ins&gt;at level 5.&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sevenzz23</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/w/index.php?title=Adding_new_skills&amp;diff=192&amp;oldid=prev</id>
		<title>Nameless2you: Created page with &quot;== Introduction ==  A large area where players have difficulty is adding new skills to the source and client. To implement new skills, it's required that you use an XRay clien...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/w/index.php?title=Adding_new_skills&amp;diff=192&amp;oldid=prev"/>
				<updated>2013-01-14T05:02:42Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Introduction ==  A large area where players have difficulty is adding new skills to the source and client. To implement new skills, it&amp;#039;s required that you use an XRay clien...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
A large area where players have difficulty is adding new skills to the source and client. To implement new skills, it's required that you use an XRay client (if you don't want to use XRay, you will have to replace existing, un-used skills and edit their previous descriptions).&lt;br /&gt;
&lt;br /&gt;
Below will be documentation on how to implement these new skills&lt;br /&gt;
&lt;br /&gt;
== The skill ==&lt;br /&gt;
&lt;br /&gt;
The skill I will be working on is a simple one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Earth Bolt&lt;br /&gt;
Max Level: 10&lt;br /&gt;
Type: Active&lt;br /&gt;
SP Cost: 20 + 5*SkillLV&lt;br /&gt;
Target: 1 Enemy&lt;br /&gt;
Cast Time: 2 sec&lt;br /&gt;
Cool Down: 1 sec&lt;br /&gt;
Duration: Instant&lt;br /&gt;
Deals SkillLV bolts of Earth magic damage to one enemy, at 150% MATK per hit.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Basically, this skill should target 1 enemy, and deal 10 hits of 150% MATK, Earth elemental property and should be magic damage based.&lt;br /&gt;
&lt;br /&gt;
== Open /src/map/skill.h ==&lt;br /&gt;
&lt;br /&gt;
Scroll down until you find&lt;br /&gt;
&amp;lt;pre&amp;gt;	EL_STONE_HAMMER,&lt;br /&gt;
	EL_ROCK_CRUSHER,&lt;br /&gt;
	EL_ROCK_CRUSHER_ATK,&lt;br /&gt;
	EL_STONE_RAIN,&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After here is where we add any additional skills. It's better to give the skills a custom ID to begin with. So, let's add our &amp;quot;Earth Bolt&amp;quot; skill.&lt;br /&gt;
&lt;br /&gt;
After those, add&lt;br /&gt;
&amp;lt;pre&amp;gt;	MG_EARTHBOLT = 8443,&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
MG_ definitively means &amp;quot;Mage&amp;quot;, you'll work out the acronyms as you scroll through the skills.&lt;br /&gt;
We have defined the basis of the skill. As you can see, the skill id is set to '8443' since Earth Elemental's Stone Rain is set to 8442 (and is the last player accessible skill).&lt;br /&gt;
&lt;br /&gt;
== Open /src/map/skill.c ==&lt;br /&gt;
&lt;br /&gt;
This file is where we define the actual skill implementations. For single-target skills, all processing of that skill will go in ''skill_castend_damage_id'' (for damaging skills) or ''skill_castend_nodamage_id'' (for non-damage skills).&lt;br /&gt;
&lt;br /&gt;
=== Magic based skills ===&lt;br /&gt;
&lt;br /&gt;
Because Earth Bolt is '''damage''' based, find the ''skill_castend_damage_id'' function and find:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;	case AB_RENOVATIO:&lt;br /&gt;
	case AB_HIGHNESSHEAL:&lt;br /&gt;
	case AB_DUPLELIGHT_MAGIC:&lt;br /&gt;
	case WM_METALICSOUND:&lt;br /&gt;
	case MH_ERASER_CUTTER:&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reason we will be placing the ''case'' for Earth Bolt here is because:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;		skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BF_MAGIC quality means that the skill is magic based, and should be calculated under the magic battle calculations.&lt;br /&gt;
So, after &amp;lt;code&amp;gt;case NJ_HUUJIN&amp;lt;/code&amp;gt; add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;	case MG_EARTHBOLT:&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Weapon based skills ===&lt;br /&gt;
&lt;br /&gt;
In the event of wanting to add a skill that's based on Weapon, rather than Magic, find:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;	case WM_GREAT_ECHO:&lt;br /&gt;
	case GN_SLINGITEM_RANGEMELEEATK:&lt;br /&gt;
	case KO_JYUMONJIKIRI:&lt;br /&gt;
	case KO_SETSUDAN:&lt;br /&gt;
	case KO_KAIHOU:&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And add the case after those.&lt;br /&gt;
If we wanted Earth Bolt to be weapon based, it would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;	case WM_GREAT_ECHO:&lt;br /&gt;
	case GN_SLINGITEM_RANGEMELEEATK:&lt;br /&gt;
	case KO_JYUMONJIKIRI:&lt;br /&gt;
	case KO_SETSUDAN:&lt;br /&gt;
	case KO_KAIHOU:&lt;br /&gt;
	case MG_EARTHBOLT:&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, we will stick to the Magic function instead.&lt;br /&gt;
&lt;br /&gt;
== Open /src/map/battle.c ==&lt;br /&gt;
&lt;br /&gt;
In this function, all main damage calculations are performed. And in seperate functions, the % modifiers for the skills are stored. Therefore, for our 150% damage, we add the extra 50% (since 100% is the default) in the appropriate function.&lt;br /&gt;
&lt;br /&gt;
=== Weapon based attacks ===&lt;br /&gt;
&lt;br /&gt;
For '''Weapon''' based attacks, the modifiers are found in ''battle_calc_weapon_attack''.&lt;br /&gt;
Simply find:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;	case NPC_VAMPIRE_GIFT:&lt;br /&gt;
		skillratio += ((skill_lv-1)%5+1)*100;&lt;br /&gt;
		break;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And add your damage modifier there.&lt;br /&gt;
For example, if Earth Bolt was Weapon based, we would add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;	case MG_EARTHBOLT:&lt;br /&gt;
		skillratio += 50;&lt;br /&gt;
		break;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ''+= 50'' simply means &amp;quot;Add 50% onto the 100%&amp;quot; for 150% ATK damage.&lt;br /&gt;
&lt;br /&gt;
=== Magic based attacks ===&lt;br /&gt;
&lt;br /&gt;
For '''Magic''' based attacks, the modifiers are found in ''battle_calc_magic_attack''.&lt;br /&gt;
Simply find:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;	case NPC_EARTHQUAKE:&lt;br /&gt;
		skillratio += 100 +100*skill_lv +100*(skill_lv/2);&lt;br /&gt;
		break;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And add the damage modifier below. Since Earth Bolt is magic based, we add it here.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;	case MG_EARTHBOLT:&lt;br /&gt;
		skillratio += 50;&lt;br /&gt;
		break;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This now means that Earth Bolt will deal Magic damage at 150% MATK.&lt;br /&gt;
&lt;br /&gt;
== Skill database support ==&lt;br /&gt;
&lt;br /&gt;
Technically speaking, the basis of the skill is now in place. Of course, if you want to implement more complex skills, there's a lot more to it. A seperate section will be created in the future for this. But for now, we need to implement the skill database entries.&lt;br /&gt;
The files below can be find within db/(pre/re)/.&lt;br /&gt;
Only one from both (pre/re) need to be updated, it's one you use in your server.&lt;br /&gt;
&lt;br /&gt;
=== skill_db.txt ===&lt;br /&gt;
&lt;br /&gt;
For our Earth Bolt, we can now enter this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;8443,5,8,1,2,0,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0,MG_EARTHBOLT,Earth Bolt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This defines that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Earth Bolt has a range of 5 cells, hits multiple times, is Earth element and targets 1 enemy. It can be interrupted, and is of magic type damage. The amount of hits increases by 1 every level, with a maximum level of 10.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== skill_cast_db.txt ===&lt;br /&gt;
&lt;br /&gt;
For our Earth Bolt, we can now enter this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;8443,2000,1000,0,0,0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This defines that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Earth Bolt has a 2 second cast time, and a 1 second delay time. There is no after-cast walk-delay&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== skill_require_db.txt ===&lt;br /&gt;
&lt;br /&gt;
For our Earth Bolt, we can now enter this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;8443,0,0,25:30:35:40:45:50:55:60:65:70,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This defines that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Earth Bolt requires 25 SP at level 1, 30 SP at level 2 .. 70 SP at level 10. Can be cast with any weapon, doesn't require a state and doesn't require any items to be consumed.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== skill_tree.txt ===&lt;br /&gt;
&lt;br /&gt;
This part of the database isn't necessary if it can't be learned by a class. However, if you want a class to learn a skill, you have to make an entry in skill_tree.txt. An example below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;2,8443,10,19,5,20,5,0,0,0,0,0,0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This defines that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Earth Bolt can be learned by Mage, has a maximum level of 10 (for this class), and requires skill 19 (Firebolt) at level 5, and skill 20 (Lightning Bolt) at level 5.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Technically, this is usually all the areas that you'd usually cover with skill database files. There are more, but that's for you to explore.&lt;br /&gt;
&lt;br /&gt;
== XRay support ==&lt;br /&gt;
&lt;br /&gt;
To support the skill in the actual client, assuming you're using XRay (required to add new IDs for skills), you can do the following:&lt;br /&gt;
&lt;br /&gt;
=== ability_tab.txt ===&lt;br /&gt;
&lt;br /&gt;
To add in the custom skill, find:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;NJ_ISSEN&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And below it, add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;MG_EARTHBOLT&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== leveluseskillspamount.txt ===&lt;br /&gt;
&lt;br /&gt;
To make the skill level-selectable, simply add an entry in leveluseskillspamount.txt in the data folder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;8443#&lt;br /&gt;
25#&lt;br /&gt;
30#&lt;br /&gt;
35#&lt;br /&gt;
40#&lt;br /&gt;
45#&lt;br /&gt;
50#&lt;br /&gt;
55#&lt;br /&gt;
60#&lt;br /&gt;
65#&lt;br /&gt;
70#&lt;br /&gt;
@&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will allow the skill to be level selectable.&lt;br /&gt;
&lt;br /&gt;
== Renewal/Non-Xray Support ==&lt;br /&gt;
The following implementations are according to Revision 228 from Lua Project(2012-05-23)+.&lt;br /&gt;
To support Renewal and post 10/13/2009 Clients (or the last Xray) we'd need to make use of .[[lua]] and .[[lub]] files.&lt;br /&gt;
&lt;br /&gt;
The implementation is different between then many client versions, but there's generally 2 implementations:&lt;br /&gt;
=== no skillinfoz folder ===&lt;br /&gt;
&lt;br /&gt;
in data/lua files/skillinfo/skilltreeview.lua find:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&amp;quot;MG_FIREWALL&amp;quot;, 18; Pos = 19, MaxLv = 10, NeedSkillList = {6, 12}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
change to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&amp;quot;MG_FIREWALL&amp;quot;, 18; Pos = 19, MaxLv = 10, NeedSkillList = {6, 12}},&lt;br /&gt;
{&amp;quot;MG_EARTHBOLT&amp;quot;,8443; Pos = 20, MaxLv = 10, NeedSkillList = {19,20}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== has skillinfoz folder ===&lt;br /&gt;
skillid.lua find:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ECLAGE_RECALL = 3035,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After Add:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MG_EARTHBOLT = 8443,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in data/lua files/skillinfo/skilldescript.lua find:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	[SKID.MG_THUNDERSTORM] = {&lt;br /&gt;
&lt;br /&gt;
		&amp;quot;Thunder Storm&amp;quot;,&lt;br /&gt;
		&amp;quot;Max Level:^777777 10 ^000000&amp;quot;,&lt;br /&gt;
		&amp;quot;Type:^777777 Offensive ^000000&amp;quot;,&lt;br /&gt;
		&amp;quot;SP Cost:^777777 24 + 5*SkillLV ^000000&amp;quot;,&lt;br /&gt;
		&amp;quot;Target:^777777 cell ^000000&amp;quot;,&lt;br /&gt;
		&amp;quot;Range:^777777 9 cells ^000000&amp;quot;,&lt;br /&gt;
		&amp;quot;Cast Time:^777777 1*SkillLV sec ^000000&amp;quot;,&lt;br /&gt;
		&amp;quot;Cool Down:^777777 2 sec ^000000&amp;quot;,&lt;br /&gt;
		&amp;quot;Duration:^777777 0.2*SkillLV sec ^000000&amp;quot;,&lt;br /&gt;
		&amp;quot;Effect:^777777 Hits every Enemy in a 5x5 area around the targeted cell with 1 Wind Element Bolt per level at a rate of 1 bolt every 0.2 seconds. Each bolt does 0.8*MATK Wind element damage. ^000000&amp;quot;,&lt;br /&gt;
		&amp;quot;[LV 1]^777777 1 Bolt ^000000&amp;quot;,&lt;br /&gt;
		&amp;quot;[LV 2]^777777 2 Bolts ^000000&amp;quot;,&lt;br /&gt;
		&amp;quot;[LV 3]^777777 3 Bolts ^000000&amp;quot;,&lt;br /&gt;
		&amp;quot;[LV 4]^777777 4 Bolts ^000000&amp;quot;,&lt;br /&gt;
		&amp;quot;[LV 5]^777777 5 Bolts ^000000&amp;quot;,&lt;br /&gt;
		&amp;quot;[LV 6]^777777 6 Bolts ^000000&amp;quot;,&lt;br /&gt;
		&amp;quot;[LV 7]^777777 7 Bolts ^000000&amp;quot;,&lt;br /&gt;
		&amp;quot;[LV 8]^777777 8 Bolts ^000000&amp;quot;,&lt;br /&gt;
		&amp;quot;[LV 9]^777777 9 Bolts ^000000&amp;quot;,&lt;br /&gt;
		&amp;quot;[LV 10]^777777 10 Bolts ^000000&amp;quot;,&lt;br /&gt;
	},&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After Add:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	[SKID.MG_EARTHBOLT] = {&lt;br /&gt;
		&amp;quot;Earth Bolt&amp;quot;,&lt;br /&gt;
		&amp;quot;Max Level:^777777 10 ^000000&amp;quot;&lt;br /&gt;
		&amp;quot;Type:^77777 Active ^000000&amp;quot;&lt;br /&gt;
		&amp;quot;SP Cost:^777777 20 + 5*SkillLV ^000000&amp;quot;&lt;br /&gt;
		&amp;quot;Target:^777777 1 Enemy ^000000&amp;quot;&lt;br /&gt;
		&amp;quot;Cast Time:^777777 2 sec ^000000&amp;quot;&lt;br /&gt;
		&amp;quot;Cool Down:^777777 1 sec ^000000&amp;quot;&lt;br /&gt;
		&amp;quot;Duration:^777777 Instant ^000000&amp;quot;&lt;br /&gt;
		&amp;quot;Effect: ^777777 Deals SkillLV bolts of Earth magic damage to one enemy, at 150% MATK per hit.^000000&amp;quot;,&lt;br /&gt;
	},&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
skilltreeview.lua change:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[JOBID.JT_MAGICIAN] = {&lt;br /&gt;
		[1] = SKID.MG_STONECURSE,&lt;br /&gt;
		[2] = SKID.MG_COLDBOLT,&lt;br /&gt;
		[3] = SKID.MG_LIGHTNINGBOLT,&lt;br /&gt;
		[4] = SKID.MG_NAPALMBEAT,&lt;br /&gt;
		[5] = SKID.MG_FIREBOLT,&lt;br /&gt;
		[6] = SKID.MG_SIGHT,&lt;br /&gt;
		[8] = SKID.MG_SRECOVERY,&lt;br /&gt;
		[9] = SKID.MG_FROSTDIVER,&lt;br /&gt;
		[10] = SKID.MG_THUNDERSTORM,&lt;br /&gt;
		[11] = SKID.MG_SOULSTRIKE,&lt;br /&gt;
		[12] = SKID.MG_FIREBALL,&lt;br /&gt;
		[13] = SKID.MG_ENERGYCOAT,&lt;br /&gt;
		[18] = SKID.MG_SAFETYWALL,&lt;br /&gt;
		[19] = SKID.MG_FIREWALL&lt;br /&gt;
	},	&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	[JOBID.JT_MAGICIAN] = {&lt;br /&gt;
		[1] = SKID.MG_STONECURSE,&lt;br /&gt;
		[2] = SKID.MG_COLDBOLT,&lt;br /&gt;
		[3] = SKID.MG_LIGHTNINGBOLT,&lt;br /&gt;
		[4] = SKID.MG_NAPALMBEAT,&lt;br /&gt;
		[5] = SKID.MG_FIREBOLT,&lt;br /&gt;
		[6] = SKID.MG_SIGHT,&lt;br /&gt;
		[8] = SKID.MG_SRECOVERY,&lt;br /&gt;
		[9] = SKID.MG_FROSTDIVER,&lt;br /&gt;
		[10] = SKID.MG_THUNDERSTORM,&lt;br /&gt;
		[11] = SKID.MG_SOULSTRIKE,&lt;br /&gt;
		[12] = SKID.MG_FIREBALL,&lt;br /&gt;
		[13] = SKID.MG_ENERGYCOAT,&lt;br /&gt;
		[18] = SKID.MG_SAFETYWALL,&lt;br /&gt;
		[19] = SKID.MG_FIREWALL,&lt;br /&gt;
		[20] = SKID.MG_EARTHBOLT&lt;br /&gt;
	},&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
skillinfolist.lua&lt;br /&gt;
Change:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	[SKID.ECL_SEQUOIADUST] = {&lt;br /&gt;
		&amp;quot;ECL_SEQUOIADUST&amp;quot;;&lt;br /&gt;
		SkillName = &amp;quot;Sequoia Dust&amp;quot;,&lt;br /&gt;
		MaxLv = 1,&lt;br /&gt;
		SpAmount = { 0 },&lt;br /&gt;
		bSeperateLv = false,&lt;br /&gt;
		AttackRange = { 7 },&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	[SKID.ECL_SEQUOIADUST] = {&lt;br /&gt;
		&amp;quot;ECL_SEQUOIADUST&amp;quot;;&lt;br /&gt;
		SkillName = &amp;quot;Sequoia Dust&amp;quot;,&lt;br /&gt;
		MaxLv = 1,&lt;br /&gt;
		SpAmount = { 0 },&lt;br /&gt;
		bSeperateLv = false,&lt;br /&gt;
		AttackRange = { 7 },&lt;br /&gt;
	},&lt;br /&gt;
	[SKID.MG_EARTHBOLT] = {&lt;br /&gt;
		&amp;quot;MG_EARTHBOLT&amp;quot;;&lt;br /&gt;
		SkillName = &amp;quot;Earth Bolt&amp;quot;,&lt;br /&gt;
		MaxLv = 10,&lt;br /&gt;
		SpAmount = { 25, 30, 35, 40, 45, 50, 55, 60, 65, 70 },&lt;br /&gt;
		_NeedSkillList = {&lt;br /&gt;
			{ SKID.MG_FIREBOLT, 5},&lt;br /&gt;
			{ SKID.MG_LIGHTNINGBOLT, 5}&lt;br /&gt;
		}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Finishing up ===&lt;br /&gt;
&lt;br /&gt;
You can add the rest of the information in skillnametable.txt, skilldesctable2.txt and you'll need to add the appropriate Sprite and BMP file for the skill. Use the name MG_EARTHBOLT as the name of the file, and for the entries in the two text files.&lt;br /&gt;
&lt;br /&gt;
[[Category:Source Snippets]]&lt;br /&gt;
[[Category:Customization]]&lt;/div&gt;</summary>
		<author><name>Nameless2you</name></author>	</entry>

	</feed>