Paste #7095: Edit of P#7091 - Edit of P#7089 - Edit of P#7088 - Untitled Paste

Date: 2014/07/18 13:16:01 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


TheBloodMoon:
  type: world
  debug: true
  events:
    on time changes in world:
    - if <context.time.is[ORMORE].than[20]> || <context.time.is[ORLESS].than[5]> {
      - run TheBloodMoonTask
      }
    on 6:00 in world:
    - execute as_server "butcher" 

TheBloodMoonTask:
    type: task
    debug: true
    script:
    - define bloodmoon <util.random.int[1].to[1]>
    - if bloodmoon == 1 {
      - announce "Hurry and digin in hell has broke loose"
      - define r <util.random.int[<1>].to[<5>]>
      - define bad <util.random.int[<1>].to[<1000>]>
      - define spawnspot <l@<util.random.int[<0>].to[<10000000>]>,100,<util.random.int[<0>].to[<10000000>]>,world.get_chunk.surface_blocks.random>
      - if %r% == 1 {
        - spawn pig_Zombie %spawnspot% qty:30
        }
        else if %r% == 2 {
        - spawn Blaze %spawnspot% qty:50
        }
        else if %r% == 3 {
        - spawn Magma_Cube %spawnspot% qty:50
        }
        else if %r% == 4 {
        - spawn Lightning %spawnspot% qty:50
        }
        else if %r% == 5 {
        - spawn GHAST %spawnspot% qty:50
        }
      - if %bad% == 123 {
        - spawn WITHER %spawnspot% qty:1
        }
      }
      else {
      - announce "You are safe for now"
      }