summaryrefslogtreecommitdiff
path: root/npc/magic/config.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/magic/config.txt')
-rw-r--r--npc/magic/config.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/npc/magic/config.txt b/npc/magic/config.txt
index 2cede16a..a179982c 100644
--- a/npc/magic/config.txt
+++ b/npc/magic/config.txt
@@ -160,13 +160,14 @@ function script SK_summon {
.@amt=getarg(1);
.@mex=getarg(2, 1);
.@sum=getarg(3, true);
+ .@lvl=getskilllv(SKILL_MAGIC);
if ($@GM_OVERRIDE || debug) debugmes "Skill "+@skillId+" Lv "+@skillLv;
- if (ispcdead())
+ if (ispcdead() || !.@lvl || !@skillLv)
return;
if (rand2(10) < abizit()) {
// Summon Magic (with magic level bonus)
- SummonMagic(@skillId, .@mob, .@amt, MAGIC_LVL+@skillLv-1, @skillLv, .@sum);
+ SummonMagic(@skillId, .@mob, .@amt, .@lvl+@skillLv-1, @skillLv, .@sum);
} else if (rand2(10) < abizit()) {
// Re-roll
dispbottom l("You cannot complete the casting correctly!");