summaryrefslogtreecommitdiff
path: root/npc/042-2/boss.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-04-29 02:28:45 -0300
committerJesusaves <cpntb1@ymail.com>2020-04-29 02:28:45 -0300
commitc079edf4b4fcdc64700ade996d9e88f6da26de70 (patch)
tree46756bd2680591e2b3b0fd2eded26e8b532d869f /npc/042-2/boss.txt
parent3cb0c75f14291646fe5b770c1b01dcb858cdac47 (diff)
downloadserverdata-c079edf4b4fcdc64700ade996d9e88f6da26de70.tar.gz
serverdata-c079edf4b4fcdc64700ade996d9e88f6da26de70.tar.bz2
serverdata-c079edf4b4fcdc64700ade996d9e88f6da26de70.tar.xz
serverdata-c079edf4b4fcdc64700ade996d9e88f6da26de70.zip
Provide minimum functionality
Diffstat (limited to 'npc/042-2/boss.txt')
-rw-r--r--npc/042-2/boss.txt60
1 files changed, 60 insertions, 0 deletions
diff --git a/npc/042-2/boss.txt b/npc/042-2/boss.txt
index 6698d31cb..49219e9c5 100644
--- a/npc/042-2/boss.txt
+++ b/npc/042-2/boss.txt
@@ -6,6 +6,7 @@
// Basement Boss Fight
042-2,41,22,0 script #KDoor0422 NPC_HIDDEN,0,0,{
+ function kdoor0422Spawn;
end;
OnTouch:
@@ -26,6 +27,10 @@ OnArrival:
percentheal -100, -100;
if (getmap() != "042-2@"+.@g)
end;
+ if ($@KAMELOT_WAVE[.@g] != 3)
+ end;
+ $@KAMELOT_WAVE[.@g]+=1;
+ initnpctimer;
//if ($@KAMELOT_WAVE == 0)
// goto OnKillMob;
// TODO: Fire dialog
@@ -33,6 +38,16 @@ OnArrival:
// ...
end;
+OnTimer1000:
+ .@m$=instance_mapname("042-2");
+ .@n$=instance_npcname(.name$);
+ mapannounce .@m$, "??? : Where's Micksha? WHRE IS ARTHUR MICKSHA", 0;
+ // 2 is meaningless, as we're not using their acc ids, but sounded faster
+ getguildmember(.@g, 2);
+ .@gcount=$@guildmembercount;
+ kdoor0422Spawn(.@gcount*2, 20, 24, 59, 59);
+ end;
+
OnKillMob:
if (!playerattached()) end;
@@ -66,6 +81,51 @@ OnKillBoss:
// TODO: maptimer to give EXP to helpers/survivors
end;
+function kdoor0422Spawn {
+ .@label$=instance_npcname(.name$)+"::OnKillMob";
+ .@gcount=getarg(0);
+ .@x1=getarg(1);
+ .@y1=getarg(2);
+ .@x2=getarg(3);
+ .@y2=getarg(4);
+ .@g=getcharid(2);
+ if (.@g < 1) percentheal -100, -100;
+ .@avg=$KAMELOT_MX[.@g];
+ .@m$=getmap();
+ freeloop(true);
+ for (.@i=0; .@i < .@gcount; .@i++) {
+ .@mobId=any(CursedSoldier, CursedArcher); // 50-50 ratio
+ .@mob=areamonster(.@m$, 21, 24, 59, 99, strmobinfo(1, .@mobId), .@mobId, 1, .@label$);
+ // Reconfigure the monster
+ setunitdata(.@mob, UDT_LEVEL, .@avg);
+ setunitdata(.@mob, UDT_STR, 1+.@avg/4);
+ setunitdata(.@mob, UDT_AGI, 1+.@avg/4);
+ setunitdata(.@mob, UDT_VIT, 1+.@avg/4);
+ setunitdata(.@mob, UDT_INT, 1+.@avg/4);
+ setunitdata(.@mob, UDT_DEX, 1+.@avg/4);
+ setunitdata(.@mob, UDT_LUK, 1+.@avg/4);
+ setunitdata(.@mob, UDT_ADELAY, 1672);
+ setunitdata(.@mob, UDT_ATKRANGE, (.@mobId == CursedArcher ? any(6,7) : any(1,2)));
+ // Battle Status
+ setunitdata(.@mob, UDT_MAXHP, .@avg*33);
+ setunitdata(.@mob, UDT_HP, .@avg*33);
+ setunitdata(.@mob, UDT_ATKMIN, .@avg*45/10);
+ setunitdata(.@mob, UDT_ATKMAX, .@avg*65/10);
+ setunitdata(.@mob, UDT_DEF, 1+.@avg*9/10);
+ setunitdata(.@mob, UDT_MDEF, 1+.@avg*5/10);
+ setunitdata(.@mob, UDT_HIT, .@avg*4); // Advised: x3
+ setunitdata(.@mob, UDT_FLEE, .@avg*35/10); // Advised: x4
+ // Critical calculation
+ .@min=2;
+ .@max=max(.@min, min(25, .@avg/5));
+ setunitdata(.@mob, UDT_CRIT, rand2(.@min, .@max));
+ // Loop through
+ }
+ freeloop(false);
+ return;
+}
+
+// Script end
}