Date: 2014/04/19 15:41:38 UTC-07:00
Type: Denizen Script
BasicAttackProc:
type: procedure
definitions: radius|anchor
script:
## This proc will search for a new target.
- 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
}
}
## if it fails to find a new target return to anchor
- if <npc.has_flag[newtarget]> {
else {
- anchor walkto id:%anchor%
}
}
}