From 3024c0f7b83599e4e321e4516baa00f8828909e2 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 28 Apr 2020 14:49:41 -0300 Subject: Move file along --- npc/042-1/_import.txt | 1 + npc/042-1/door.txt | 44 ++++++++++++++++++++++++++++++++++++++++++++ npc/042-2/_import.txt | 1 - npc/042-2/door.txt | 44 -------------------------------------------- 4 files changed, 45 insertions(+), 45 deletions(-) create mode 100644 npc/042-1/door.txt delete mode 100644 npc/042-2/door.txt (limited to 'npc') diff --git a/npc/042-1/_import.txt b/npc/042-1/_import.txt index 8c370b795..491ca4354 100644 --- a/npc/042-1/_import.txt +++ b/npc/042-1/_import.txt @@ -1,3 +1,4 @@ // Map 042-1: Camelot - Weapon Room // This file is generated automatically. All manually added changes will be removed when running the Converter. "npc/042-1/_warps.txt", +"npc/042-1/door.txt", 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; + + +} + diff --git a/npc/042-2/_import.txt b/npc/042-2/_import.txt index 0c54c05af..b40dc76b0 100644 --- a/npc/042-2/_import.txt +++ b/npc/042-2/_import.txt @@ -1,4 +1,3 @@ // 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/door.txt", diff --git a/npc/042-2/door.txt b/npc/042-2/door.txt deleted file mode 100644 index 86dd9da6c..000000000 --- a/npc/042-2/door.txt +++ /dev/null @@ -1,44 +0,0 @@ -// TMW 2 Script -// Author: -// Jesusalva -// Micksha -// Description: -// Controls Weapons Room basement door - -042-1,51,23,0 script #KWRDoor 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; - - -} - -- cgit v1.2.3-60-g2f50