- D1 Meta Docs - Denizen Script -
Home Page / Pi to one million places / Contact mcmonkey / Donate / Paste Scripts / Denizen Help /
You are browsing as a guest.
Login | Register


Click here to create your own public paste ~ ~ click to duplicate and edit this paste


TitleDiff note for paste #12992
TypeDiff
Date2015/01/16 00:34:19 UTC-08:00
ByGuest
Other
Paste
 NuclearPowerPlantFunction:
   type: world
   events: 
     on player places i@NuclearStation:
     - schematic load name:PowerPlant
     - wait 6t
     - schematic paste name:PowerPlant <context.location> noair
     - narrate "Hi"
     - flag server NukePlant:->:<context.location> 
     - flag server nukeswitch:->:<c.location.add[0,2,-8]>
     - foreach <server.flag[nukeplant].as_list> { 
       - modifyblock <def[value].find.blocks[123].within[50]> m@124 no_physics 
     } 
     on player right clicks m@lever:
-    - if <server.flag[nukeswitch].contains[<c.location>]> {
+    - if <server.flag[nukeswitch].contains[<c.location>]> && <c.location.switched> {
       - foreach <c.location.add[0,-2,8].find.blocks[123].within[50]> {
         - modifyblock <def[value]> m@124 no_physics 
+        }
+      }
+    - if <server.flag[nukeswitch].contains[<c.location>]> && <c.location.switched> == false {
+      - foreach <c.location.add[0,-2,8].find.blocks[123].within[50]> {
+        - modifyblock <def[value]> m@124 
         }
       }
-      
    
 
 



RawRaw



Pastes made: 57256