From e508300f9b7f0d320f3ea00e9e84c92f28e4a59d Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 30 Apr 2020 15:54:51 -0300 Subject: Updates and bugfixes --- npc/042-5/ctrl.txt | 59 ++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 48 insertions(+), 11 deletions(-) (limited to 'npc/042-5') diff --git a/npc/042-5/ctrl.txt b/npc/042-5/ctrl.txt index f334dfba6..7f3f88e5b 100644 --- a/npc/042-5/ctrl.txt +++ b/npc/042-5/ctrl.txt @@ -24,23 +24,23 @@ OnInstanceInit: } debugmes "Spawning monsters for guild %d", .@g; .@mx=getguildavg(.@g); - monster0425(1, 20, 20, 115, 100, .@mx); + monster0425(1, 20, 20, 80, 100, .@mx); monster0425(4, 20, 51, 51, 71, .@mx); - monster0425(5, 85, 56, 115, 100, .@mx); - monster0425(2, 79, 40, 97, 52, .@mx); - monster0425(5, 51, 20, 80, 50, .@mx); + //monster0425(5, 75, 56, 80, 100, .@mx); + //monster0425(2, 75, 40, 80, 52, .@mx); + //monster0425(5, 51, 20, 80, 50, .@mx); // Neutral monsters - areamonster(.map$, 20, 20, 115, 100, strmobinfo(1, Blub), Blub, 5); - areamonster(.map$, 20, 20, 115, 100, strmobinfo(1, ManaGhost), ManaGhost, max(1, .@mx/10)); + areamonster(.map$, 20, 20, 80, 100, strmobinfo(1, Blub), Blub, 5); + areamonster(.map$, 20, 20, 80, 100, strmobinfo(1, ManaGhost), ManaGhost, max(1, .@mx/10)); // Bonus monsters if (!rand2(2)) - areamonster(.map$, 20, 20, 115, 100, strmobinfo(1, MagicBif), MagicBif, 1); + areamonster(.map$, 20, 20, 80, 100, strmobinfo(1, MagicBif), MagicBif, 1); if (!rand2(2)) - areamonster(.map$, 20, 20, 115, 100, strmobinfo(1, SilverChest), SilverChest, 1); + areamonster(.map$, 20, 20, 80, 100, strmobinfo(1, SilverChest), SilverChest, 1); if (!rand2(2)) - areamonster(.map$, 20, 20, 115, 100, strmobinfo(1, BronzeChest), BronzeChest, 1); + areamonster(.map$, 20, 20, 80, 100, strmobinfo(1, BronzeChest), BronzeChest, 1); // Next time I promise a Whirly Bird >.> end; @@ -64,7 +64,7 @@ OnRespawn: debugmes "[ERROR] [KAMELOT] Unable to respawn for Kamelot %s", .map$; .@g=0; } - monster0425(1, 20, 20, 115, 100, $KAMELOT_MX[.@g]); + monster0425(1, 20, 20, 80, 120, $KAMELOT_MX[.@g]); end; function monster0425 { @@ -181,7 +181,44 @@ function script KamelotTreasure { return; } - +///////////////////////////////////////////////////////////////////////////// +// KamelotBoss(Map, x, y, power, NPC) +function script KamelotBoss { + .@label$=instance_npcname(getarg(4))+"::OnKillMob"; + .@gcount=1; + .@x1=getarg(1); + .@y1=getarg(2); + .@avg=getarg(3); + .@m$=instance_mapname(getarg(0)); + //debugmes "Total %d, map %s (power %d)", .@gcount, .@m$, .@avg; + .@mobId=any(CursedSoldier, CursedArcher); // 50-50 ratio + .@name$=any("Lancelot", "Galahard"); + .@mob=monster(.@m$, .@x1, .@y1, .@name$, .@mobId, 1, .@label$); + // Reconfigure the monster + setunitdata(.@mob, UDT_LEVEL, .@avg+20); + setunitdata(.@mob, UDT_STR, 1+.@avg*7/10); + setunitdata(.@mob, UDT_AGI, 1+.@avg*5/10); + setunitdata(.@mob, UDT_VIT, 1+.@avg*7/10); + setunitdata(.@mob, UDT_INT, 1+.@avg*6/10); + setunitdata(.@mob, UDT_DEX, 1+.@avg*6/10); + setunitdata(.@mob, UDT_LUK, 1+.@avg*7/10); + setunitdata(.@mob, UDT_ADELAY, 1072); + setunitdata(.@mob, UDT_ATKRANGE, (.@mobId == CursedArcher ? any(7,8) : any(2,2,3))); + // Battle Status + setunitdata(.@mob, UDT_MAXHP, .@avg*450); + setunitdata(.@mob, UDT_HP, .@avg*450); + setunitdata(.@mob, UDT_ATKMIN, .@avg*60/10); + setunitdata(.@mob, UDT_ATKMAX, .@avg*70/10); + setunitdata(.@mob, UDT_DEF, 1+.@avg*14/10); + setunitdata(.@mob, UDT_MDEF, 1+.@avg*9/10); + setunitdata(.@mob, UDT_HIT, .@avg*16); // Advised: x3 + setunitdata(.@mob, UDT_FLEE, .@avg*45/10); // Advised: x4 + // Critical calculation + .@min=30; + .@max=max(.@min, min(70, .@avg/2)); + setunitdata(.@mob, UDT_CRIT, rand2(.@min, .@max)); + return; +} -- cgit v1.2.3-60-g2f50