Paste #8190: Edit of P#8189 - Bandit Script

Date: 2014/08/11 02:52:23 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


bandit:
  type: assignment

  default constants:
    approach message: Give me your stuff!
    fleeing message: You'll regret that!
    death message: Aaarrgghhh!

  actions:
    on assignment:
    - trigger name:proximity toggle:true radius:4
    - trigger name:damage toggle:true
    - health toggle:true
    - vulnerable

    on enter proximity:
    - if <npc.flag[in_pursuit]> 
      queue clear
    - flag npc in_pursuit:true
    - lookclose toggle:true
    - chat "<cons:approach message>"

    on exit proximity:
    - if !<npc.flag[in_pursuit]> 
      queue clear
    - attack
    - lookclose toggle:false
    - narrate "<npc.nickname> yells at you, '<cons:fleeing message>'"

    on death:
    - chat "<cons:death message>"
    - random 2
    - drop item:gold_nugget qty:1
      location:<npc.location>
    - drop XP qty:10 location:<npc.location>
    - flag npc in_pursuit:!

    on despawn:
    - flag npc in_pursuit:!