summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/config/magic.txt14
-rw-r--r--npc/magic/kalmurk.txt14
-rw-r--r--npc/magic/zarkor.txt16
3 files changed, 29 insertions, 15 deletions
diff --git a/npc/config/magic.txt b/npc/config/magic.txt
index ca59dbc82..3ffcbbf72 100644
--- a/npc/config/magic.txt
+++ b/npc/config/magic.txt
@@ -50,13 +50,12 @@ function script MagicCheck {
return 1;
}
-// SkillID, Mana, MobID{, MP per level, MobPerSkillLevel=2{, Level Override}}
+// SkillID, MobID{, MobPerSkillLevel=2{, Level Override}}
function script SummonMagic {
.@sk=getarg(0);
- .@mp=getarg(1);
- .@id=getarg(2);
- .@adj=getarg(4,2);
- .@lv=getarg(5,getskilllv(.@sk));
+ .@id=getarg(1);
+ .@adj=getarg(2,2);
+ .@lv=getarg(3,getskilllv(.@sk));
if (.@adj < 1) {
debugmes "\033[31mInvalid MobPerSkillLevel for SummonMagic (.@adj): "+.@adj+"\033[0m";
@@ -64,11 +63,6 @@ function script SummonMagic {
end;
}
- // PRE EXECUTION
- if (!MagicCheck(.@sk, .@mp, .@amp))
- end;
-
-
// EXECUTION
// Apply costs
heal 0, 0-.@mp;
diff --git a/npc/magic/kalmurk.txt b/npc/magic/kalmurk.txt
index 11d1859df..8bd9f7f45 100644
--- a/npc/magic/kalmurk.txt
+++ b/npc/magic/kalmurk.txt
@@ -30,9 +30,19 @@ OnCall:
end;
}
+ // Setup
+ .@sk=TMW2_KALMURK;
+ .@mp=200;
+ .@amp=50;
+
+ // Check if you have mana to cast
+ // MagicCheck(SkillID, Mana{, MP per level})
+ if (!MagicCheck(.@sk, .@mp, .@amp))
+ end;
+
// Summon Magic
- // SummonMagic( SkillID, Mana, MobID{, MP per level, MobPerSkillLevel=2},{Lvl Override} )
- SummonMagic(TMW2_KALMURK, 200, Maggot, 50, 2, (MAGIC_LVL-1));
+ SummonMagic(.@sk, CaveMaggot, 2);
+
delitem MaggotSlime, 2;
// Get a single mana experience point (this is NOT used by Soul Menhir)
diff --git a/npc/magic/zarkor.txt b/npc/magic/zarkor.txt
index 18718c811..301e74565 100644
--- a/npc/magic/zarkor.txt
+++ b/npc/magic/zarkor.txt
@@ -31,11 +31,21 @@ OnCall:
end;
}
+ // Setup
+ .@sk=TMW2_ZARKOR;
+ .@mp=400;
+ .@amp=75;
+
+ // Check if you have mana to cast
+ // MagicCheck(SkillID, Mana{, MP per level})
+ if (!MagicCheck(.@sk, .@mp, .@amp))
+ end;
+
// Summon Magic
- SummonMagic(TMW2_ZARKOR, 400, CaveMaggot, 75, 2);
+ SummonMagic(.@sk, CaveMaggot, 2);
- // Get a single mana experience point (this is NOT used by Soul Menhir)
- GetManaExp(TMW2_ZARKOR, 1);
+ // Get a single mana experience point (this is NOT used by Mana Stone)
+ GetManaExp(.@sk, 1);
/*
// set cooldown