summaryrefslogtreecommitdiff
path: root/npc/042-1/door.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/042-1/door.txt')
-rw-r--r--npc/042-1/door.txt44
1 files changed, 44 insertions, 0 deletions
diff --git a/npc/042-1/door.txt b/npc/042-1/door.txt
new file mode 100644
index 000000000..eed06b522
--- /dev/null
+++ b/npc/042-1/door.txt
@@ -0,0 +1,44 @@
+// TMW 2 Script
+// Author:
+// Jesusalva
+// Micksha
+// Description:
+// Controls Weapons Room basement door
+
+042-1,51,23,0 script #KDoor0421 NPC_HIDDEN,0,0,{
+ end;
+
+OnTouch:
+ .@g=getcharid(2);
+ if ($KAMELOT_KEYMASK[.@g] & 16) {
+ warp "042-3@"+.@g, 44, 59;
+ } else {
+ dispbottom l("This door is locked.");
+ }
+ end;
+
+OnKillBoss:
+ .@g=getcharid(2);
+ dispbottom l("You found a key.");
+ getitem TreasureKey, 1;
+ $KAMELOT_KEYMASK[.@g]=$KAMELOT_KEYMASK[.@g]|16;
+ // Reward for completing this stage
+ getitem GuildCoin, min(1, $KAMELOT_MX[.@g]/20);
+ .@ggp=300+$KAMELOT_MX[.@g]*4;
+ .@gxp=$KAMELOT_MX[.@g]*5;
+ $GUILD_BANK[.@g]+=500;
+ guildgetexp(.@gxp); // 5xp per player average level (max 500/750)
+ // Announce
+ mapannounce getmap(), strcharinfo(0)+" has found the key for the door!", 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)+" found the key: Guild GP +"+.@ggp+" Guild XP +"+.@gxp;
+ end;
+
+
+}
+