Paste #4317: Warrior

Date: 2014/05/12 19:38:46 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


Warrior:
  type: assignment
  actions:
    on spawn:
    - anchor id:home add l@275,64,141,World
    - trigger name:proximity state:true
    - health 30 state:true
    - equip <hand:268> <head:298> <chest:299> <legs:300> <boots:301>
  Interact scripts:
  - 10 WarriorAI
WarriorAI:
  type: interact
  Steps:
    1:
      proximity trigger:
        entry:
            script:
            - flag npc targets:->:<player>
            - attack <npc> target:<npc.flag[targets]>
            - random 2
            - attack <npc> target:<npc.flag[targets]>
            - run Slash
        exit:
            script:
            - flag npc targets:<-:<player>
            - if <npc.flag[targets]> != null {
                - attack <npc> target:<npc.flag[targets]>
                } else {
                - anchor id:home walknear r:5
                }
Slash:
    type: task
    script:
    - chat "Feel my might!"
    - wait 1
    - potion damage <player> p:5
    - cooldown 5s
    - zap step:1 script:WarriorAI