Paste #12998: Untitled Paste

Date: 2015/01/16 00:54:48 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


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>]> && <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[124].within[50]> { 
        - modifyblock <def[value]> m@123 no_physics
        } 
      } 
    debug: false