summaryrefslogtreecommitdiff
path: root/npc/config
diff options
context:
space:
mode:
Diffstat (limited to 'npc/config')
-rw-r--r--npc/config/magic.txt12
1 files changed, 9 insertions, 3 deletions
diff --git a/npc/config/magic.txt b/npc/config/magic.txt
index 9ad6d0b9a..1617bfeff 100644
--- a/npc/config/magic.txt
+++ b/npc/config/magic.txt
@@ -6,12 +6,18 @@
// Used for our pseudo-magic.
// These are only helpers, you can add more restrictions and effects freely.
-// SkillID, Mana, MobID{, MP per level, Script}
+// SkillID, Mana, MobID{, MP per level, MobPerSkillLevel=2}
function script SummonMagic {
.@sk=getarg(0);
.@mp=getarg(1);
.@id=getarg(2);
- .@scr$=getarg(4,"Cassia::OnSkip");
+ .@adj=getarg(4,2);
+
+ if (.@adj < 1) {
+ debugmes "\033[31mInvalid MobPerSkillLevel for SummonMagic (.@adj): "+.@adj+"\033[0m";
+ dispbottom l("Invalid parameter specified, blame saulc.");
+ end;
+ }
// PRE EXECUTION
// Check Skill
@@ -36,7 +42,7 @@ function script SummonMagic {
// 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...
- for (.@i = 0; .@i < (getskilllv(.@sk)+1)/2; .@i++)
+ for (.@i = 0; .@i < (getskilllv(.@sk)+(.@adj-1))/.@adj; .@i++)
summon("Summoned Monster", .@id, rand(35000,50000)+getskilllv(.@sk)*10000);
dispbottom l("All monsters summoned!");