1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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;
}
|