From abd28dc68f6f75093e2b551e22e021b49239f92a Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 21 Oct 2019 13:25:26 -0300 Subject: Let's try a different approach with Kalmurk --- npc/config/magic.txt | 18 ++++++++++++++++++ npc/functions/hub.txt | 3 +++ npc/magic/kalmurk.txt | 4 ++++ npc/magic/zarkor.txt | 1 + 4 files changed, 26 insertions(+) diff --git a/npc/config/magic.txt b/npc/config/magic.txt index b21a5e6e9..5d2b898be 100644 --- a/npc/config/magic.txt +++ b/npc/config/magic.txt @@ -115,3 +115,21 @@ function script ShowAbizit { return; } +// SK_summon(ID, amount, mexp) +function script SK_summon { + .@mob=getarg(0); + .@amt=getarg(1); + .@mex=getarg(2); + + if (rand2(1,6) < abizit()+1) { + // Summon Magic (with magic level bonus) + SummonMagic(@skillId, .@mob, .@amt, MAGIC_LVL+.@amt-1, @skillLv); + } else { + dispbottom l("The spell fails!"); + } + + // Get a single mana experience point (this is NOT used by Mana Stone) + GetManaExp(@sk, .@mex); + return; +} + diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt index aa5265b32..a306fe883 100644 --- a/npc/functions/hub.txt +++ b/npc/functions/hub.txt @@ -196,6 +196,9 @@ function script HUB_SkillInvoke { case TMW2_ZARKOR: SK_zarkor(); break; + case TMW2_KALMURK: + SK_summon(Maggot, MAGIC_LVL+getskilllv(@sk)-1, 2); + break; } // Debug diff --git a/npc/magic/kalmurk.txt b/npc/magic/kalmurk.txt index 10ba98d7c..50aca887a 100644 --- a/npc/magic/kalmurk.txt +++ b/npc/magic/kalmurk.txt @@ -16,6 +16,10 @@ OnFriendlyDeath: */ OnCall: + // Deprecated + dispbottom l("The usage of @sk-commands was deprecated"); + end; + // Other requeriments if (countitem(MaggotSlime) < 2) { dispbottom l("You need 2x @@ to cast this skill.", getitemlink(MaggotSlime)); diff --git a/npc/magic/zarkor.txt b/npc/magic/zarkor.txt index b205fcf92..9763189bb 100644 --- a/npc/magic/zarkor.txt +++ b/npc/magic/zarkor.txt @@ -29,6 +29,7 @@ OnFriendlyDeath: OnCall: // Deprecated + dispbottom l("The usage of @sk-commands was deprecated"); end; // Other requeriments -- cgit v1.2.3-60-g2f50