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.txt18
1 files changed, 13 insertions, 5 deletions
diff --git a/npc/magic/config.txt b/npc/magic/config.txt
index 00817e7f..85693d64 100644
--- a/npc/magic/config.txt
+++ b/npc/magic/config.txt
@@ -91,12 +91,13 @@ function script GetManaExp {
}
-// SkillID, MobID{, SkillLevelPerMob=2{, Level Override}}
+// SkillID, MobID{, SkillLevelPerMob=2{, Level Override{, Summon=True}}}
function script SummonMagic {
.@sk=getarg(0);
.@id=getarg(1);
.@adj=getarg(2,2);
.@lv=getarg(3,getskilllv(.@sk));
+ .@sm=getarg(4, true);
if (.@adj < 1) {
debugmes "\033[31mInvalid MobPerSkillLevel for SummonMagic (.@adj): "+.@adj+"\033[0m";
@@ -104,6 +105,9 @@ function script SummonMagic {
end;
}
+ if (!.@sm)
+ getmapxy(.@m$, .@x, .@y, 0);
+
// Cause effect
// Summoned monsters live from 45 to 60 seconds, and each skill levels grants 10s extra life
// The 35~50 is not a defect, remember skill starts at level 1...
@@ -113,7 +117,10 @@ function script SummonMagic {
// Abizit makes lifetime vary (like AdjustSpellpower)
.@lifetime = .@lifetime * (50 + abizit() * rand2(5,6)) / 100;
// Unfortunately this version does not returns the summoned monster GID
- summon("Summoned Monster", .@id, .@lifetime);
+ if (.@sm)
+ summon("Summoned Monster", .@id, .@lifetime);
+ else
+ monster(.@m$, .@x, .@y, "Invoked Monster", .@id, 1);
/*
.@mids=summon("Summoned Monster", .@id, .@lifetime);
.@bhp=getunitdata(.@mids, UDT_MAXHP);
@@ -198,20 +205,21 @@ function script rectharm {
}
-// SK_summon(ID, amount, mexp)
+// SK_summon(ID, amount, mexp{, summon=True})
function script SK_summon {
.@mob=getarg(0);
.@amt=getarg(1);
.@mex=getarg(2, 1);
+ .@sum=getarg(3, true);
if ($@GM_OVERRIDE || debug) debugmes "Skill "+@skillId+" Lv "+@skillLv;
if (rand2(10) < abizit()) {
// Summon Magic (with magic level bonus)
- SummonMagic(@skillId, .@mob, .@amt, MAGIC_LVL+@skillLv-1, @skillLv);
+ SummonMagic(@skillId, .@mob, .@amt, MAGIC_LVL+@skillLv-1, @skillLv, .@sum);
} else if (rand2(10) < abizit()) {
// Re-roll
dispbottom l("You cannot complete the casting correctly!");
- SummonMagic(@skillId, .@mob, 1, 1, 1);
+ SummonMagic(@skillId, .@mob, 1, 1, 1, .@sum);
} else if (abizit() <= rand2(3)) {
// Spell overwhelms you, causing it to be spawned as aggro vs you. (33%)
dispbottom l("The spell takes a mind of its own backfires!");