summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/014-4/kamelot.txt5
-rw-r--r--npc/042-0/arthur.txt1
-rw-r--r--npc/042-1/_warps.txt1
-rw-r--r--npc/042-2/_import.txt1
-rw-r--r--npc/042-2/door.txt38
-rw-r--r--npc/042-3/_import.txt1
-rw-r--r--npc/042-3/jail.txt22
7 files changed, 67 insertions, 2 deletions
diff --git a/npc/014-4/kamelot.txt b/npc/014-4/kamelot.txt
index 426dafabc..851bd0838 100644
--- a/npc/014-4/kamelot.txt
+++ b/npc/014-4/kamelot.txt
@@ -8,6 +8,7 @@
// Variable structure:
// $@KAMELOT_ID [ guild_id ] = instance id
+// $KAMELOT_MX [ guild_id ] = player average level - difficulty record
// $KAMELOT_QUEST [ guild_id ] = quest status (bitmask)
// 0 - Not started
// 1 - Quest Assigned by Arthur (new players cannot enter anymore)
@@ -21,8 +22,9 @@
// 2 - Treasure B
// 4 - Treasure C
// 8 - Treasure D
+ // 16 - Weapon Room Key
// Do we ever need to store the data below?
- // 16 - Weapon Room Key X,Y door is 2Y below
+ // X,Y door is 2Y below
// 32 - Cell I 33,135
// 64 - Cell II 84,127
// 128 - Cell III 41,119
@@ -44,6 +46,7 @@
function script KamelotCleanup {
.@g=getarg(0);
//$@KAMELOT_ID[.@g]=0;
+ $KAMELOT_MX[.@g]=0;
$KAMELOT_QUEST[.@g]=0;
$KAMELOT_KEYMASK[.@g]=0;
return;
diff --git a/npc/042-0/arthur.txt b/npc/042-0/arthur.txt
index 29480d83c..30e00890e 100644
--- a/npc/042-0/arthur.txt
+++ b/npc/042-0/arthur.txt
@@ -71,6 +71,7 @@ L_Quest:
next;
// Be sure the quest only starts now, and destroy any eventual artifact
$KAMELOT_QUEST[.@g]=1;
+ $KAMELOT_MX[.@g]=getguildavg(.@g);
$KAMELOT_KEYMASK[.@g]=any(1,2,4,8);
if (!is_admin()) // FIXME: This should be unconditional
$KAMELOT_COOLDOWN[.@g] = gettimeparam(GETTIME_WEEKDAY);
diff --git a/npc/042-1/_warps.txt b/npc/042-1/_warps.txt
index 949f73611..4e77e91b8 100644
--- a/npc/042-1/_warps.txt
+++ b/npc/042-1/_warps.txt
@@ -1,4 +1,3 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
// Map 042-1: Camelot - Weapon Room warps
042-1,55,100,0 warp #042-1_55_100 0,0,042-0,69,25
-042-1,51,23,0 warp #042-1_51_23 0,0,042-2,44,59
diff --git a/npc/042-2/_import.txt b/npc/042-2/_import.txt
index b40dc76b0..0c54c05af 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/door.txt",
diff --git a/npc/042-2/door.txt b/npc/042-2/door.txt
new file mode 100644
index 000000000..d663a063b
--- /dev/null
+++ b/npc/042-2/door.txt
@@ -0,0 +1,38 @@
+// 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;
+ getitem GuildCoin, 1; // Reward for completing this stage
+ $GUILD_BANK[.@g]+=500;
+ .@gxp=$KAMELOT_MX[.@g]*5;
+ guildgetexp(.@gxp); // 5xp per player average level (max 500/750)
+ mapannounce getmap(), strcharinfo(0)+" has found the key for the door!", 0;
+ .@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 +500 Guild XP +"+.@gxp;
+ end;
+}
+
diff --git a/npc/042-3/_import.txt b/npc/042-3/_import.txt
index abbb39d5f..0aec19ef6 100644
--- a/npc/042-3/_import.txt
+++ b/npc/042-3/_import.txt
@@ -1,3 +1,4 @@
// Map 042-3: Camelot - Jail
// This file is generated automatically. All manually added changes will be removed when running the Converter.
"npc/042-3/_warps.txt",
+"npc/042-3/jail.txt",
diff --git a/npc/042-3/jail.txt b/npc/042-3/jail.txt
new file mode 100644
index 000000000..23baed06a
--- /dev/null
+++ b/npc/042-3/jail.txt
@@ -0,0 +1,22 @@
+// TMW 2 Script
+// Author:
+// Jesusalva
+// Micksha
+// Description:
+// Controls jails
+// Controls lockpicks
+
+042-3,0,0,0 script #KSlimeSpawn NPC_HIDDEN,{
+ end;
+
+OnKillSlime:
+ if (@lockpicks)
+ end;
+ if (rand2(10000) > 1000)
+ end;
+ @lockpicks=true;
+ getitem Lockpicks, 1;
+ getitem TreasureKey, 1;
+ end;
+}
+