summaryrefslogtreecommitdiff
path: root/npc/config/magic.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-07-02 02:45:38 -0300
committerJesusaves <cpntb1@ymail.com>2018-07-02 02:45:38 -0300
commitfb8d19363797c0f2d4fdeb32fb5537602c1d3bf2 (patch)
treec98b8513806194298441ad5f05859ac2e185daf9 /npc/config/magic.txt
parent63512370c198b52c75e77765ae6874ad3564d304 (diff)
downloadserverdata-fb8d19363797c0f2d4fdeb32fb5537602c1d3bf2.tar.gz
serverdata-fb8d19363797c0f2d4fdeb32fb5537602c1d3bf2.tar.bz2
serverdata-fb8d19363797c0f2d4fdeb32fb5537602c1d3bf2.tar.xz
serverdata-fb8d19363797c0f2d4fdeb32fb5537602c1d3bf2.zip
Change SummonedMobNumber (flexibilize). Do not go below 1 mob per skill level.
Diffstat (limited to 'npc/config/magic.txt')
-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!");