summaryrefslogtreecommitdiff
path: root/npc/042-10
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-05-01 07:03:26 -0300
committerJesusaves <cpntb1@ymail.com>2020-05-01 07:03:26 -0300
commitf41c1f0c52644c7b896158d4b5fab432b1c8c67d (patch)
tree81fbfe380bfc93936a49815ab65fa5f057c471d1 /npc/042-10
parente0d6dedc39027b68e798a96f63bd686e214ffca5 (diff)
downloadserverdata-f41c1f0c52644c7b896158d4b5fab432b1c8c67d.tar.gz
serverdata-f41c1f0c52644c7b896158d4b5fab432b1c8c67d.tar.bz2
serverdata-f41c1f0c52644c7b896158d4b5fab432b1c8c67d.tar.xz
serverdata-f41c1f0c52644c7b896158d4b5fab432b1c8c67d.zip
This should allow the gate to be unlocked if you have the key
Diffstat (limited to 'npc/042-10')
-rw-r--r--npc/042-10/ctrl.txt93
1 files changed, 77 insertions, 16 deletions
diff --git a/npc/042-10/ctrl.txt b/npc/042-10/ctrl.txt
index 2915c0b4a..dc249b518 100644
--- a/npc/042-10/ctrl.txt
+++ b/npc/042-10/ctrl.txt
@@ -81,7 +81,6 @@ L_NoAccessBlock:
////////////////////////////////////////////////////////////////////
// TODO: Catazuli spots
-// TODO: Door Mechanism
// TODO: Spawn monsters
042-10,128,85,0 script #Katazuli01 NPC_SUMMONING_CIRC,0,0,{
@@ -111,16 +110,18 @@ OnTouch:
}
////////////////////////////////////////////////////////////////////
-// TODO: Catazuli spots
-// TODO: Door Mechanism
-// TODO: Spawn monsters
-// KamelotSwitch( SWITCH ID )
+// KamelotSwitch( "_SWITCH ID" )
function script KamelotSwitch {
- .@id=getarg(0);
+ // Extract ID
+ .@n$=getarg(0, "_0");
+ explode(.@ni$, .@n$, "_");
+ .@id=atoi(.@ni$[1]);
+ if (.@id <= 0) Exception("Unparseable switch: "+.@n$, RB_DEFAULT|RB_ISFATAL);
+
.@g=getcharid(2);
if (!($KAMELOT_KEYMASK[.@g] & $KAMELOT_KEY[.@g])) end; // Don't care
.@st=($KAMELOT_PASSMASK[.@g] & .@id);
- mes l("Status: %s", (.@st ? l("Active") : l("Inactive") ));
+ mes l("Status: %s", (.@st ? col(l("Active"),2) : col(l("Inactive"),1) ));
if (!countitem(KamelotKey))
close;
mes "Change switch status?";
@@ -136,13 +137,13 @@ function script KamelotSwitch {
// Check password and delete key
if ($KAMELOT_PASSMASK[.@g] == $KAMELOT_PASSCODE[.@g]) {
delitem KamelotKey, 1;
- $KAMELOT_QUEST=$KAMELOT_QUEST|32;
+ $KAMELOT_QUEST[.@g]=$KAMELOT_QUEST[.@g]|32;
mesc l("Your hear a clink, and the key breaks."), 2;
// Player Reward for completing this stage
getitem GuildCoin, 1;
getexp $KAMELOT_MX[.@g]*50, $KAMELOT_MX[.@g]*10;
// Guild Reward for completing this stage
- .@ggp=1200+$KAMELOT_MX[.@g]*5;
+ .@ggp=1200+$KAMELOT_MX[.@g]*10;
.@gxp=$KAMELOT_MX[.@g]*25;
$GUILD_BANK[.@g]+=.@ggp;
guildgetexp(.@gxp); // 25xp per player average level (max 2500/3750)
@@ -160,27 +161,87 @@ function script KamelotSwitch {
return;
}
-042-10,128,85,0 script #K4210Note01 NPC_NO_SPRITE,{
+// Switches hints
+// TODO: NPC_PAPER_NOTE sprite
+042-10,97,126,0 script #K4210Note01 NPC_SWORDS_SIGN,{
.@g=getcharid(2);
if (!($KAMELOT_KEYMASK[.@g] & $KAMELOT_KEY[.@g])) end; // Don't care
if ($KAMELOT_PASSCODE[.@g] & 1)
- dispbottom l("Active");
+ dispbottom l("There is power on the north");
else
- dispbottom l("Inactive");
+ dispbottom l("The north sleeps.");
end;
OnInit:
- .distance=2;
+ .distance=4;
+ end;
+}
+042-10,139,98,0 script #K4210Note02 NPC_SWORDS_SIGN,{
+ .@g=getcharid(2);
+ if (!($KAMELOT_KEYMASK[.@g] & $KAMELOT_KEY[.@g])) end; // Don't care
+ if ($KAMELOT_PASSCODE[.@g] & 2)
+ dispbottom l("There is power on the south");
+ else
+ dispbottom l("The south sleeps.");
+ end;
+
+OnInit:
+ .distance=4;
end;
}
+042-10,127,45,0 script #K4210Note04 NPC_SWORDS_SIGN,{
+ .@g=getcharid(2);
+ if (!($KAMELOT_KEYMASK[.@g] & $KAMELOT_KEY[.@g])) end; // Don't care
+ if ($KAMELOT_PASSCODE[.@g] & 1)
+ dispbottom l("There is power on the west");
+ else
+ dispbottom l("The west sleeps.");
+ end;
-042-10,128,85,0 script #K4210Switch01 NPC_SWITCH_OFFLINE,{
- KamelotSwitch(1);
+OnInit:
+ .distance=4;
+ end;
+}
+042-10,33,133,0 script #K4210Note08 NPC_SWORDS_SIGN,{
+ .@g=getcharid(2);
+ if (!($KAMELOT_KEYMASK[.@g] & $KAMELOT_KEY[.@g])) end; // Don't care
+ if ($KAMELOT_PASSCODE[.@g] & 8)
+ dispbottom l("There is power on the east");
+ else
+ dispbottom l("The east sleeps.");
+ end;
+
+OnInit:
+ .distance=4;
+ end;
+}
+042-10,38,39,0 script #K4210Note16 NPC_SWORDS_SIGN,{
+ .@g=getcharid(2);
+ if (!($KAMELOT_KEYMASK[.@g] & $KAMELOT_KEY[.@g])) end; // Don't care
+ if ($KAMELOT_PASSCODE[.@g] & 16)
+ dispbottom l("There is power on the maze");
+ else
+ dispbottom l("The maze sleeps.");
+ end;
+
+OnInit:
+ .distance=4;
+ end;
+}
+
+// The "_" is used on explode
+042-10,89,28,0 script #K4210Switch_1 NPC_SWITCH_OFFLINE,{
+ KamelotSwitch(strnpcinfo(0, "_0"));
close;
OnInit:
.distance=2;
- .id=1;
end;
}
+// Other switches
+042-10,80,115,0 duplicate(#K4210Switch_1) #K4210Switch_2 NPC_HIDDEN,0,0 // S
+042-10,63,76,0 duplicate(#K4210Switch_1) #K4210Switch_4 NPC_HIDDEN,0,0 // W
+042-10,100,79,0 duplicate(#K4210Switch_1) #K4210Switch_8 NPC_HIDDEN,0,0 // E
+042-10,82,64,0 duplicate(#K4210Switch_1) #K4210Switch_16 NPC_HIDDEN,0,0 // C
+