summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/re/skill_db.conf12
-rw-r--r--db/re/skill_tree.conf1
-rw-r--r--npc/magic/dragokin.txt61
-rw-r--r--npc/scripts.conf1
4 files changed, 75 insertions, 0 deletions
diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf
index bf299e035..e322ed6a3 100644
--- a/db/re/skill_db.conf
+++ b/db/re/skill_db.conf
@@ -38490,6 +38490,18 @@ skill_db: (
}
},
{
+ Id: 20028
+ Name: "TMW2_DRAGOKIN"
+ Description: "Dragokin"
+ MaxLevel: 5
+ SkillType: {
+ Self: true
+ }
+ SkillInfo: {
+ Quest: true
+ }
+},
+{
Id: 20031
Name: "TMW2_FAKESKILL"
Description: "Fake Skill Resync"
diff --git a/db/re/skill_tree.conf b/db/re/skill_tree.conf
index e77f885b2..afd8da0d7 100644
--- a/db/re/skill_tree.conf
+++ b/db/re/skill_tree.conf
@@ -46,6 +46,7 @@ Human: {
TMW2_KALMURK: 4
TMW2_MKPOT: 20
TMW2_DEMURE: 15
+ TMW2_DRAGOKIN: 5
// Unrelated
ALL_INCCARRY: 0
diff --git a/npc/magic/dragokin.txt b/npc/magic/dragokin.txt
new file mode 100644
index 000000000..531babc4f
--- /dev/null
+++ b/npc/magic/dragokin.txt
@@ -0,0 +1,61 @@
+// TMW2 script
+// Author: Jesusalva <admin@tmw2.org>
+//
+// Magic Script: TMW2_DRAGOKIN
+//
+// Summons a Green Dragon because they are cool :3
+//
+// Cooldown is cast duration
+
+- script sk#dragokin 32767,{
+ end;
+
+OnCall:
+ // Other requeriments: 5x Dragon Scale or Demure Axe
+ if (!(countitem(DragonScales) >= 5 || countitem(DemureAxe))) {
+ dispbottom l("You need 5x @@ to cast this skill.", getitemlink(DragonScales));
+ end;
+ }
+
+ // Check cooldown
+ if (@dragokin_at > gettimetick(2)) {
+ dispbottom l("Skill is in cooldown for @@.", FuzzyTime(@dragokin_at));
+ end;
+ }
+
+ // Setup
+ @sk=TMW2_DRAGOKIN;
+ @mp=500;
+ @amp=40;
+
+ // Check if you have mana to cast
+ // MagicCheck(SkillID, Mana{, MP per level})
+ if (!MagicCheck(@sk, @mp, @amp))
+ end;
+
+ // Destroy reagents
+ if (!countitem(DemureAxe))
+ delitem DragonScale, 5;
+
+ // set cooldown
+ @dragokin_at=gettimetick(2);
+ @dragokin_at=@dragokin_at+16;
+
+ // As usual, magic profeciency affects
+ if (rand(1,6) < abizit()+1) {
+ // Summon Magic
+ // SummonMagic(SkillID, MobID{, SkillLevelPerMob=2{, Level Override}})
+ SummonMagic(@sk, GreenDragon, 5, MAGIC_LVL+getskilllv(@sk)-1);
+ } else {
+ dispbottom l("The spell fails!");
+ }
+
+ // Get five mana experience point (this is NOT used by Mana Stone)
+ GetManaExp(@sk, 5);
+
+ end;
+
+OnInit:
+ bindatcmd "sk-dragokin", "sk#dragokin::OnCall", 0, 100, 0;
+ end;
+}
diff --git a/npc/scripts.conf b/npc/scripts.conf
index 892e15718..fbe0fb172 100644
--- a/npc/scripts.conf
+++ b/npc/scripts.conf
@@ -95,6 +95,7 @@
// Magic Commands
"npc/magic/demure.txt",
+"npc/magic/dragokin.txt",
"npc/magic/kalmurk.txt",
"npc/magic/mkpot.txt",
"npc/magic/parum.txt",