Date: 2014/04/25 11:07:42 UTC-07:00
Type: Denizen Script
BasicAttackTask:
type: task
definitions: radius|anchor
script:
- if <npc.has_flag[<player>]> {
- flag <npc> <player>:!
- foreach <location.find.players.within[<%radius%>]> {
- if <npc.has_flag[<%value%>]> {
- flag <npc> newtarget
- attack <npc> target:<%value%>
- foreach stop
else {
- flag <npc> newtarget:!
}
}
}
- if <npc.has_flag[newtarget]> == false {
- anchor walkto id:%anchor%
}
}