Paste #16264: here

Date: 2015/06/04 14:36:45 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


FrozenWorldScript:  
  type: world  
  debug: true  
  events:  
    on ENDER_DRAGON spawns: 
    - if <server.has_flag[gone_thru]> {  
      - flag global gone_thru:!  
      } else {  
      - determine passively cancelled  
      - flag global gone_thru:true  
      - run s@createdragon def:<context.location>  
      }  
    on e@ENDER_DRAGON targets:    
      - if <global.flag[targetscriptrunning]||null> == null {  
        - flag global targetscriptrunning:true  
        - announce "enderdragon targets <context.target.name>"   
        - flag global <context.entity>:true duration:90s   
        - wait 100   
        - flag global targetscriptrunning:!  
        - if <global.flag[<context.entity>]||null> == null {   
          - remove <context.entity>   
          - announce "despawned"   
          }  
        }  

SpecialDelayFrozenWorldScript: 
  type: world 
  debug: true 
  events: 
    on ENDER_DRAGON explodes:
      - if !<context.entity.has_flag[flying]> {
        - announce "Not on Cooldown"
      #already went through = awt 
        - flag <context.entity> flying:true duration:3s
        - fly <context.entity> origin:<context.entity.location> destination:<context.entity.location.add[3,20,0]> speed:3 
        } else {
        - announce "On Cooldown"
        }        
      #- run stopspazz def:<context.entity> delay:2s 
      - determine cancelled  
    on complete navigation:
      - flag <context.entity> flying:!
      - announce "Finished Flying"


createdragon:  
  type: task  
  debug: true  
  script:  
  - announce "Spawned dragon :D"  
  - spawn <e@ender_dragon[custom_name=Bilbo_Baggins]> %1% save:sb  
  - announce "<entry[sb].spawned_entities>"  
  - flag global sb:<entry[sb].spawned_entities>  
stopspazz: 
  type: task 
  debug: true 
  script: 
    - flag global <def[1]>timest:+:1 
    - announce "times through: <server.flag[<def[1]>timest]> vs <server.flag[%1%db]>" 
    - if <server.flag[<def[1]>timest]> >= <server.flag[%1%db].sub[1]> { 
      - flag global <def[1]>awt:! 
      - flag global <def[1]>timest:0
      - flag global <def[1]>db:0
      - announce "times through if statement: <server.flag[<def[1]>timest]>" 

      #already went through 
      } 
      else if <timest> == 1 { 
      - narrate "Flying up" 
      - fly <def[1]> origin:<def[1].location> destination:<def[1].location.add[3,20,0]> speed:3 
      }