diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-09-24 10:06:09 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-09-24 10:06:09 -0300 |
commit | 57a8319e2c6ab32087a1e3806c587aab709855df (patch) | |
tree | 9d8ded384560d6ef2965d4f6e9f07742afbe6675 /npc | |
parent | 2a64f8c25598a7f2e374eefb5a9bf93680b72708 (diff) | |
download | serverdata-57a8319e2c6ab32087a1e3806c587aab709855df.tar.gz serverdata-57a8319e2c6ab32087a1e3806c587aab709855df.tar.bz2 serverdata-57a8319e2c6ab32087a1e3806c587aab709855df.tar.xz serverdata-57a8319e2c6ab32087a1e3806c587aab709855df.zip |
Bugfixes (Already meaning to, since last night)
Diffstat (limited to 'npc')
-rw-r--r-- | npc/006-5/groata.txt | 28 | ||||
-rw-r--r-- | npc/functions/event.txt | 26 | ||||
-rw-r--r-- | npc/functions/math.txt | 10 |
3 files changed, 37 insertions, 27 deletions
diff --git a/npc/006-5/groata.txt b/npc/006-5/groata.txt index ed459b74c..ca149f74f 100644 --- a/npc/006-5/groata.txt +++ b/npc/006-5/groata.txt @@ -27,7 +27,7 @@ function script GroataGrotto { array_push(.@mb, Jhon); // Monsters - if (is_between(0, .@lv, 30)) { + if (is_between2(0, .@lv, 30)) { array_push(.@mb, Piou); array_push(.@mb, Piousse); array_push(.@mb, Squirrel); @@ -45,7 +45,7 @@ function script GroataGrotto { array_push(.@mb, Scorpion); array_push(.@mb, SmallFrog); } - if (is_between(10, .@lv, 40)) { + if (is_between2(10, .@lv, 40)) { array_push(.@mb, BigFrog); array_push(.@mb, Lavern); array_push(.@mb, LittleRedSlime); @@ -64,7 +64,7 @@ function script GroataGrotto { array_push(.@mb, AzulSlime); array_push(.@mb, DesertLogHead); } - if (is_between(20, .@lv, 50)) { + if (is_between2(20, .@lv, 50)) { array_push(.@mb, RedSlime); array_push(.@mb, PoisonSpikyMushroom); array_push(.@mb, DesertBandit); @@ -79,7 +79,7 @@ function script GroataGrotto { array_push(.@mb, Assassin); array_push(.@mb, Skeleton); } - if (is_between(30, .@lv, 60)) { + if (is_between2(30, .@lv, 60)) { array_push(.@mb, CaveSnake); array_push(.@mb, GreenSlime); array_push(.@mb, CopperSlime); @@ -97,7 +97,7 @@ function script GroataGrotto { array_push(.@mb, OldSnake); array_push(.@mb, GrassSnake); } - if (is_between(40, .@lv, 70)) { + if (is_between2(40, .@lv, 70)) { array_push(.@mb, GiantMaggot); array_push(.@mb, IcedFluffy); array_push(.@mb, Snake); @@ -108,12 +108,12 @@ function script GroataGrotto { array_push(.@mb, PiouKnight); array_push(.@mb, Shrewboo); } - if (is_between(40, .@lv, 80)) { + if (is_between2(40, .@lv, 80)) { array_push(.@mb, Wolvern); array_push(.@mb, FireSkull); array_push(.@mb, DarkLizard); } - if (is_between(50, .@lv, 90)) { + if (is_between2(50, .@lv, 90)) { array_push(.@mb, ArmoredSkeleton); array_push(.@mb, BlackScorpion); array_push(.@mb, ElectroWorm); @@ -127,7 +127,7 @@ function script GroataGrotto { array_push(.@mb, ForestMushroom); array_push(.@mb, GoldenScorpion); } - if (is_between(60, .@lv, 100)) { + if (is_between2(60, .@lv, 100)) { array_push(.@mb, Yeti); array_push(.@mb, FallenGuard1); array_push(.@mb, GreenSlimeMother); @@ -142,7 +142,7 @@ function script GroataGrotto { array_push(.@mb, Archant); array_push(.@mb, Scar); } - if (is_between(70, .@lv, 110)) { + if (is_between2(70, .@lv, 110)) { array_push(.@mb, AzulSlimeMother); array_push(.@mb, SeaSlimeMother); array_push(.@mb, LavaSlimeMother); @@ -153,7 +153,7 @@ function script GroataGrotto { array_push(.@mb, Michel); array_push(.@mb, Troll); } - if (is_between(80, .@lv, 120)) { + if (is_between2(80, .@lv, 120)) { array_push(.@mb, EliteDuck); array_push(.@mb, AzulSkullSlime); array_push(.@mb, Moonshroom); @@ -166,7 +166,7 @@ function script GroataGrotto { array_push(.@mb, Centaur); array_push(.@mb, GoboBear); } - if (is_between(90, .@lv, 130)) { + if (is_between2(90, .@lv, 130)) { array_push(.@mb, CopperSkullSlime); array_push(.@mb, LavaSkullSlime); array_push(.@mb, BlackSkullSlime); @@ -175,7 +175,7 @@ function script GroataGrotto { array_push(.@mb, VanityPixie); array_push(.@mb, HolyPixie); } - if (is_between(100, .@lv, 140)) { + if (is_between2(100, .@lv, 140)) { array_push(.@mb, ShadowPixie); array_push(.@mb, NulityPixie); array_push(.@mb, Reaper); @@ -183,7 +183,7 @@ function script GroataGrotto { array_push(.@mb, Snail); array_push(.@mb, WhirlyBird); } - if (is_between(110, .@lv, 150)) { + if (is_between2(110, .@lv, 150)) { array_push(.@mb, PinkieSuseran); array_push(.@mb, Mandragora); array_push(.@mb, PinkieMaximus); @@ -227,7 +227,7 @@ function script GroataGrotto { // TODO: Boss Logic if needed // One boss each 10 grottos or something? - if (is_between(10, $@GROTTO, 15)) { + if (is_between2(10, $@GROTTO, 15)) { .@m=areamonster("006-5", 20, 20, getmapinfo(MAPINFO_SIZE_X,"006-5"), getmapinfo(MAPINFO_SIZE_Y,"006-5"), "Groata?", MonsterSergeant, 1); set_aggro(.@m); } diff --git a/npc/functions/event.txt b/npc/functions/event.txt index f3b094b03..6c72ef205 100644 --- a/npc/functions/event.txt +++ b/npc/functions/event.txt @@ -125,7 +125,7 @@ OnWarpTo: array_push(.@mb, PrismChest); // Monsters - if (is_between(0, .@lv, 30)) { + if (is_between2(0, .@lv, 30)) { array_push(.@mb, Piou); array_push(.@mb, Piousse); array_push(.@mb, Squirrel); @@ -143,7 +143,7 @@ OnWarpTo: array_push(.@mb, Scorpion); array_push(.@mb, SmallFrog); } - if (is_between(10, .@lv, 40)) { + if (is_between2(10, .@lv, 40)) { array_push(.@mb, BigFrog); array_push(.@mb, Lavern); array_push(.@mb, LittleRedSlime); @@ -162,7 +162,7 @@ OnWarpTo: array_push(.@mb, AzulSlime); array_push(.@mb, DesertLogHead); } - if (is_between(20, .@lv, 50)) { + if (is_between2(20, .@lv, 50)) { array_push(.@mb, RedSlime); array_push(.@mb, PoisonSpikyMushroom); array_push(.@mb, DesertBandit); @@ -177,7 +177,7 @@ OnWarpTo: array_push(.@mb, Assassin); array_push(.@mb, Skeleton); } - if (is_between(30, .@lv, 60)) { + if (is_between2(30, .@lv, 60)) { array_push(.@mb, CaveSnake); array_push(.@mb, GreenSlime); array_push(.@mb, CopperSlime); @@ -195,7 +195,7 @@ OnWarpTo: array_push(.@mb, OldSnake); array_push(.@mb, GrassSnake); } - if (is_between(40, .@lv, 70)) { + if (is_between2(40, .@lv, 70)) { array_push(.@mb, GiantMaggot); array_push(.@mb, IcedFluffy); array_push(.@mb, Snake); @@ -206,12 +206,12 @@ OnWarpTo: array_push(.@mb, PiouKnight); array_push(.@mb, Shrewboo); } - if (is_between(40, .@lv, 80)) { + if (is_between2(40, .@lv, 80)) { array_push(.@mb, Wolvern); array_push(.@mb, FireSkull); array_push(.@mb, DarkLizard); } - if (is_between(50, .@lv, 90)) { + if (is_between2(50, .@lv, 90)) { array_push(.@mb, ArmoredSkeleton); array_push(.@mb, BlackScorpion); array_push(.@mb, ElectroWorm); @@ -225,7 +225,7 @@ OnWarpTo: array_push(.@mb, ForestMushroom); array_push(.@mb, GoldenScorpion); } - if (is_between(60, .@lv, 100)) { + if (is_between2(60, .@lv, 100)) { array_push(.@mb, Yeti); array_push(.@mb, FallenGuard1); array_push(.@mb, GreenSlimeMother); @@ -240,7 +240,7 @@ OnWarpTo: array_push(.@mb, Archant); array_push(.@mb, Scar); } - if (is_between(70, .@lv, 110)) { + if (is_between2(70, .@lv, 110)) { array_push(.@mb, AzulSlimeMother); array_push(.@mb, SeaSlimeMother); array_push(.@mb, LavaSlimeMother); @@ -251,7 +251,7 @@ OnWarpTo: array_push(.@mb, Michel); array_push(.@mb, Troll); } - if (is_between(80, .@lv, 120)) { + if (is_between2(80, .@lv, 120)) { array_push(.@mb, EliteDuck); array_push(.@mb, AzulSkullSlime); array_push(.@mb, Moonshroom); @@ -264,7 +264,7 @@ OnWarpTo: array_push(.@mb, Centaur); array_push(.@mb, GoboBear); } - if (is_between(90, .@lv, 130)) { + if (is_between2(90, .@lv, 130)) { array_push(.@mb, CopperSkullSlime); array_push(.@mb, LavaSkullSlime); array_push(.@mb, BlackSkullSlime); @@ -273,7 +273,7 @@ OnWarpTo: array_push(.@mb, VanityPixie); array_push(.@mb, HolyPixie); } - if (is_between(100, .@lv, 140)) { + if (is_between2(100, .@lv, 140)) { array_push(.@mb, ShadowPixie); array_push(.@mb, NulityPixie); array_push(.@mb, Reaper); @@ -281,7 +281,7 @@ OnWarpTo: array_push(.@mb, Snail); array_push(.@mb, WhirlyBird); } - if (is_between(110, .@lv, 150)) { + if (is_between2(110, .@lv, 150)) { array_push(.@mb, PinkieSuseran); array_push(.@mb, Mandragora); array_push(.@mb, PinkieMaximus); diff --git a/npc/functions/math.txt b/npc/functions/math.txt index fc27bec40..22cf88159 100644 --- a/npc/functions/math.txt +++ b/npc/functions/math.txt @@ -79,6 +79,16 @@ function script is_between { } +// result is: lower < target <= higher +// is_between ( lower, target, higher) +function script is_between2 { + .@min=getarg(0); + .@val=getarg(1); + .@max=getarg(2); + return (.@min < .@val && .@val <= .@max); +} + + // forces the equation: lower <= target <= higher. // Note it still works if higher and target values are swapped. // limit ( lower, target, higher) |