Paste #6466: Untitled Paste

Date: 2014/07/06 22:46:20 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


Emperium Boss:
  type: assignment
  default constants:
    anchor_name: Emperium Boss Anchor
  actions:
    on assignment:
    - trigger name:proximity toggle:true cooldown:15 radius:20
    - trigger name:damage toggle:true cooldown:15 radius:20
    - vulnerable state:true
    - if !<server.flag[emperium_bosses].as_list> contains <npc.id> flag global emperium_bosses:->:<npc.id>
    on spawn:
    - flag npc anchor_check_running:!
    - health 9999
    - equip "hand:i@Emperium Axe" "head:i@Emperium Helmet" "chest:i@Emperium Chestplate" "legs:i@Emperium Leggings" "boots:i@Emperium Boots"
    on enter proximity:
    - attack
    on damage:
    - attack
    on attack:
    - if !<npc.flag[anchor_check_running]> {
      - flag npc anchor_check_running:true
      - run "script:Emperium Boss Anchor Check"
      }
Emperium Boss World Director:
  type: world
  events:
    on entity damaged by player:
    - if <server.flag[emperium_bosses].as_list> contains <context.entity.id> {
      - determine passively "cancelled"
      - hurt <context.entity> <context.damage>
      }
Emperium Boss Anchor Check:
  type: task
  script:
  - define anchor_name <npc.constant[anchor_name]>
  - define anchor <npc.anchor[%anchor_name%]>
  - if <npc.location.distance[%anchor%]> > 30 {
    - anchor "id:%anchor_name%" assume
    - flag npc anchor_check_running:!
    }
    else {
    - run "script:Emperium Boss Anchor Check" delay:30
    }