summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-04-28 18:46:36 -0300
committerJesusaves <cpntb1@ymail.com>2020-04-28 18:46:36 -0300
commit0a808cdee32b7c8c29e2dbce2c109ae6c0d92e2d (patch)
tree85ef624597e892f567890dc6339ab6df11278a02 /npc
parentb4f6c1b5d1cca04ebb130f6394007c6acb81e986 (diff)
downloadserverdata-0a808cdee32b7c8c29e2dbce2c109ae6c0d92e2d.tar.gz
serverdata-0a808cdee32b7c8c29e2dbce2c109ae6c0d92e2d.tar.bz2
serverdata-0a808cdee32b7c8c29e2dbce2c109ae6c0d92e2d.tar.xz
serverdata-0a808cdee32b7c8c29e2dbce2c109ae6c0d92e2d.zip
I'll deal with this later
Diffstat (limited to 'npc')
-rw-r--r--npc/014-4/kamelot.txt1
-rw-r--r--npc/042-1/door.txt7
-rw-r--r--npc/042-2/_import.txt1
-rw-r--r--npc/042-2/_warps.txt1
-rw-r--r--npc/042-2/boss.txt71
5 files changed, 80 insertions, 1 deletions
diff --git a/npc/014-4/kamelot.txt b/npc/014-4/kamelot.txt
index 90b1bb50a..7a5e4d014 100644
--- a/npc/014-4/kamelot.txt
+++ b/npc/014-4/kamelot.txt
@@ -18,6 +18,7 @@
// 8 - Sewer Gate open
// 16 - Magic Seal Broken
// 32 - Boss cutscene seen (presumably, victory)
+ // 64 - Boss defeated
// $KAMELOT_KEY [ guild_id ] = (bitmask) Keys and Lockpicks
// 1 - Treasure A (Boss Room key)
// 2 - Treasure B
diff --git a/npc/042-1/door.txt b/npc/042-1/door.txt
index a24e96eb4..c3fe14602 100644
--- a/npc/042-1/door.txt
+++ b/npc/042-1/door.txt
@@ -12,6 +12,13 @@ OnTouch:
.@g=getcharid(2);
if ($KAMELOT_KEYMASK[.@g] & 16) {
warp "042-2@"+.@g, 44, 59;
+
+ // Maybe event must be fired
+ if (!($KAMELOT_QUEST[.@g] & 4)) {
+ .@label$=instance_npcname("#KDoor0422", $@KAMELOT_ID[.@g])+"::OnArrival";
+ deltimer .@label$;
+ addtimer 15000, .@label$;
+ }
} else {
dispbottom l("This door is locked.");
doevent instance_npcname(.name$)+"::OnKillMob"; // Double-check
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;
+
+}
+
+