summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-02-28 15:22:25 -0300
committerJesusaves <cpntb1@ymail.com>2021-02-28 15:22:25 -0300
commitb3479d740ae5203f06cdf308cc9be5ce2edabc1a (patch)
tree2b58653be38e1f46799346da25779e5340494195
parent65883f4781a6d75d440ffc95830ea0e617fa1f76 (diff)
downloadserverdata-b3479d740ae5203f06cdf308cc9be5ce2edabc1a.tar.gz
serverdata-b3479d740ae5203f06cdf308cc9be5ce2edabc1a.tar.bz2
serverdata-b3479d740ae5203f06cdf308cc9be5ce2edabc1a.tar.xz
serverdata-b3479d740ae5203f06cdf308cc9be5ce2edabc1a.zip
Record the flip state of the other two switches.
I do not want accidental warnings for deleting inexisting cells
-rw-r--r--npc/026-1/_config.txt2
-rw-r--r--npc/026-1/ctrl.c16
2 files changed, 16 insertions, 2 deletions
diff --git a/npc/026-1/_config.txt b/npc/026-1/_config.txt
index e463d1fd3..f583eb2c7 100644
--- a/npc/026-1/_config.txt
+++ b/npc/026-1/_config.txt
@@ -31,6 +31,7 @@ OnInit:
026-1,24,28,0 script #026-1_24_28 NPC_SWITCH_ONLINE,{
if (getnpcclass() == NPC_SWITCH_OFFLINE)
end;
+ callfunc "0261_Flip30";
doevent "#026-1_30_32::OnDisable";
setnpcdisplay "#026-1_24_28", NPC_SWITCH_OFFLINE;
end;
@@ -41,6 +42,7 @@ OnInit:
026-1,62,28,0 script #026-1_62_28 NPC_SWITCH_ONLINE,{
if (getnpcclass() == NPC_SWITCH_OFFLINE)
end;
+ callfunc "0261_Flip25";
doevent "#026-1_25_32::OnDisable";
setnpcdisplay "#026-1_62_28", NPC_SWITCH_OFFLINE;
end;
diff --git a/npc/026-1/ctrl.c b/npc/026-1/ctrl.c
index d80516bfa..17b9be77c 100644
--- a/npc/026-1/ctrl.c
+++ b/npc/026-1/ctrl.c
@@ -35,8 +35,10 @@ OnMinute15:
OnMinute45:
if (!$@DATA_0261[12])
delcells "026-1_58_76"; setcells "026-1", 58, 76, 62, 76, 1, "026-1_58_76";
- delcells "026-1_25_32"; setcells "026-1", 25, 32, 25, 32, 1, "026-1_25_32";
- delcells "026-1_30_32"; setcells "026-1", 30, 32, 30, 32, 1, "026-1_30_32";
+ if ($@DATA_0261[13])
+ delcells "026-1_25_32"; setcells "026-1", 25, 32, 25, 32, 1, "026-1_25_32";
+ if ($@DATA_0261[14])
+ delcells "026-1_30_32"; setcells "026-1", 30, 32, 30, 32, 1, "026-1_30_32";
setnpcdisplay "#026-1_24_28", NPC_SWITCH_ONLINE;
setnpcdisplay "#026-1_26_28", NPC_SWITCH_ONLINE;
setnpcdisplay "#026-1_62_28", NPC_SWITCH_ONLINE;
@@ -54,6 +56,16 @@ function script 0261_GateChange {
return;
}
+function script 0261_Flip25 {
+ $@DATA_0261[13] = true;
+ return;
+}
+
+function script 0261_Flip30 {
+ $@DATA_0261[14] = true;
+ return;
+}
+
function script 0261_CheckReset {
if ($@DATA_0261[0] == 1 &&
$@DATA_0261[1] == 1 &&