diff options
-rw-r--r-- | npc/026-1/ctrl.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/npc/026-1/ctrl.c b/npc/026-1/ctrl.c index 9151701fe..7c12c761a 100644 --- a/npc/026-1/ctrl.c +++ b/npc/026-1/ctrl.c @@ -136,3 +136,38 @@ OnInit: end; } +// Flip flop +026-1,26,89,0 script #0261_FF@0 NPC_NO_SPRITE,{ + explode(.@ni$, .name$, "@"); + .@x=atoi(.@ni$[1]); + .@v$=sprintf("$@DATA_0261[%d]", .@x); + .@i=getd(.@v$); + if (.@i == 0) { + setd(.@v$, 1); + setcells "026-1", .x-1, .y, .x+1, .y, 2, "026-1_D"+.@x; + } else if (.@i == 1) { + setd(.@v$, 2); + delcells "026-1_D"+.@x; + setcells "026-1", .x-1, .y, .x+1, .y, 3, "026-1_D"+.@x; + } else { + setd(.@v$, 0); + delcells "026-1_D"+.@x; + } + end; +OnInit: + .distance=2; + end; +} + +026-1,32,89,0 duplicate(#0261_FF@0) #0261_FF@1 NPC_NO_SPRITE +026-1,26,86,0 duplicate(#0261_FF@0) #0261_FF@2 NPC_NO_SPRITE +026-1,32,86,0 duplicate(#0261_FF@0) #0261_FF@3 NPC_NO_SPRITE +026-1,71,76,0 duplicate(#0261_FF@0) #0261_FF@4 NPC_NO_SPRITE +026-1,71,81,0 duplicate(#0261_FF@0) #0261_FF@5 NPC_NO_SPRITE +026-1,78,76,0 duplicate(#0261_FF@0) #0261_FF@6 NPC_NO_SPRITE +026-1,78,81,0 duplicate(#0261_FF@0) #0261_FF@7 NPC_NO_SPRITE +026-1,85,76,0 duplicate(#0261_FF@0) #0261_FF@8 NPC_NO_SPRITE +026-1,85,81,0 duplicate(#0261_FF@0) #0261_FF@9 NPC_NO_SPRITE +026-1,92,76,0 duplicate(#0261_FF@0) #0261_FF@10 NPC_NO_SPRITE +026-1,92,81,0 duplicate(#0261_FF@0) #0261_FF@11 NPC_NO_SPRITE + |