Paste #8521: Untitled Paste

Date: 2014/08/17 04:03:24 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19


- ^define entities <npc.location.find.npcs.within[<npc.flag[dsentry.range]>]>
    - ^define entity null
    - ^foreach %entities% {
      - if <%value%.name> == "Monster" {
          - announce "Target Engaged - <%value%.name>"
          } else {
          - announce "Excluding <%value%.name>"
          - define entities <def[entities].exclude[%value%]>
          }
        }
      }
    - ^foreach %entities% {
      - if <npc.can_see[%value%]> {
        - define entity %value%
        - foreach stop
        }
      }
    - ^if %entity% == null queue clear
    - ^flag npc dsentry.target:%entity%