summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-06-08 18:19:12 -0300
committerJesusaves <cpntb1@ymail.com>2020-06-08 18:19:12 -0300
commit9e8f7879e6eef1c41d6020b48f1177e113f74df3 (patch)
tree98e9cc7fd68cd56a4117b03261001a661536a431
parentde07b21f96f0ee0fac25fb06f0f25ab904c6ed29 (diff)
downloadserverdata-9e8f7879e6eef1c41d6020b48f1177e113f74df3.tar.gz
serverdata-9e8f7879e6eef1c41d6020b48f1177e113f74df3.tar.bz2
serverdata-9e8f7879e6eef1c41d6020b48f1177e113f74df3.tar.xz
serverdata-9e8f7879e6eef1c41d6020b48f1177e113f74df3.zip
Dragokin: Use new system
-rw-r--r--db/re/skill_db.conf1
-rw-r--r--npc/functions/hub.txt3
-rw-r--r--npc/magic/dragokin.txt31
3 files changed, 8 insertions, 27 deletions
diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf
index 057a0b2c5..825419e3d 100644
--- a/db/re/skill_db.conf
+++ b/db/re/skill_db.conf
@@ -38891,6 +38891,7 @@ skill_db: (
Name: "TMW2_DRAGOKIN"
Description: "Dragokin"
MaxLevel: 5
+ CoolDown: 16000
SkillType: {
Self: true
}
diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt
index 93c71f4b7..a37160e6f 100644
--- a/npc/functions/hub.txt
+++ b/npc/functions/hub.txt
@@ -310,6 +310,9 @@ function script HUB_SkillInvoke {
case TMW2_DEMURE:
SK_Demure();
break;
+ case TMW2_DRAGOKIN:
+ SK_Dragokin();
+ break;
// Summons which never fail
case TMW2_ZARKOR:
SummonMagic(@skillId, CaveMaggot, 2, @skillLv);
diff --git a/npc/magic/dragokin.txt b/npc/magic/dragokin.txt
index cfcc2ef44..544859cce 100644
--- a/npc/magic/dragokin.txt
+++ b/npc/magic/dragokin.txt
@@ -7,22 +7,13 @@
//
// Cooldown is cast duration
-- script sk#dragokin 32767,{
- end;
-
-OnCall:
+function script SK_Dragokin {
// Other requeriments: 5x Dragon Scale or Demure Axe
if (!(countitem(DragonScales) >= 4 || countitem(DemureAxe))) {
dispbottom l("You need 4x @@ 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=50;
@@ -41,21 +32,7 @@ OnCall:
@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;
+ // Summon the dragons and give Mana EXP
+ SK_summon(GreenDragon, 5, 5);
+ return;
}