From 0a808cdee32b7c8c29e2dbce2c109ae6c0d92e2d Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 28 Apr 2020 18:46:36 -0300 Subject: I'll deal with this later --- npc/042-2/_import.txt | 1 + npc/042-2/_warps.txt | 1 - npc/042-2/boss.txt | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 npc/042-2/boss.txt (limited to 'npc/042-2') diff --git a/npc/042-2/_import.txt b/npc/042-2/_import.txt index b40dc76b0..0f05b25bd 100644 --- a/npc/042-2/_import.txt +++ b/npc/042-2/_import.txt @@ -1,3 +1,4 @@ // Map 042-2: Camelot - Basement // This file is generated automatically. All manually added changes will be removed when running the Converter. "npc/042-2/_warps.txt", +"npc/042-2/boss.txt", diff --git a/npc/042-2/_warps.txt b/npc/042-2/_warps.txt index e945b8ec6..95f0f25a0 100644 --- a/npc/042-2/_warps.txt +++ b/npc/042-2/_warps.txt @@ -1,4 +1,3 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. // Map 042-2: Camelot - Basement warps 042-2,44,60,0 warp #042-2_44_60 0,0,042-1,51,24 -042-2,41,22,0 warp #042-2_41_22 0,0,042-3,58,139 diff --git a/npc/042-2/boss.txt b/npc/042-2/boss.txt new file mode 100644 index 000000000..6698d31cb --- /dev/null +++ b/npc/042-2/boss.txt @@ -0,0 +1,71 @@ +// TMW 2 Script +// Author: +// Jesusalva +// Micksha +// Description: +// Basement Boss Fight + +042-2,41,22,0 script #KDoor0422 NPC_HIDDEN,0,0,{ + end; + +OnTouch: + .@label$=instance_npcname(.name$)+"::OnKillBoss"; + .@g=getcharid(2); + if (($KAMELOT_QUEST[.@g] & 4) && !mobcount(getmap(), .@label$)) { + warp "042-2@"+.@g, 58, 139; + } else { + dispbottom l("Powerful magic repels you!"); + percentheal -5, -5; + slide 38, 28; + } + end; + +OnArrival: + .@g=getcharid(2); + if (.@g < 1) + percentheal -100, -100; + if (getmap() != "042-2@"+.@g) + end; + //if ($@KAMELOT_WAVE == 0) + // goto OnKillMob; + // TODO: Fire dialog + // TODO: Stun yourself for cutscene + // ... + end; + + +OnKillMob: + if (!playerattached()) end; + .@g=getcharid(2); + if (.@g < 1) percentheal -100, -100; + getexp $KAMELOT_MX[.@g]*5, $KAMELOT_MX[.@g]*2; + end; + +OnKillBoss: + .@g=getcharid(2); + dispbottom l("This is all in KAMELOT for now."); + $KAMELOT_QUEST[.@g]=$KAMELOT_QUEST[.@g]|4; // FIXME + // Player Reward for completing this stage + getitem GuildCoin, min(1, $KAMELOT_MX[.@g]/20); + getexp $KAMELOT_MX[.@g]*50, $KAMELOT_MX[.@g]*10; + // Guild Reward for completing this stage + .@ggp=300+$KAMELOT_MX[.@g]*5; + .@gxp=$KAMELOT_MX[.@g]*10; + $GUILD_BANK[.@g]+=.@ggp; + guildgetexp(.@gxp); // 5xp per player average level (max 500/750) + // Announce + mapannounce getmap(), strcharinfo(0)+" has defeated Krukan!", 0; + // Guild Master Notification + .@gm$=getguildmaster(.@g); + if (!getcharid(3, .@gm$)) end; + .@gma=getcharid(3, .@gm$); + .@gmb=getcharid(0, .@gm$); + if (!isloggedin(.@gma, .@gmb)) end; + message .@gm$, strcharinfo(0)+" defeated Krukan: Guild GP +"+.@ggp+" Guild XP +"+.@gxp; + + // TODO: maptimer to give EXP to helpers/survivors + end; + +} + + -- cgit v1.2.3-70-g09d2