Paste #11546: NPC Smartlook

Date: 2014/11/26 16:13:35 UTC-08: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


# Usage:
# Put the script in your scripts folder + restart server or /reload
# Select an NPC you want to smartlook, and:
# /ex flag npc smartlook
npc_smartlook_world:
    type: world
    events:
        on server start:
        - while true {
          - foreach <server.get_npcs_flagged[smartlook]> {
            - define x <util.random.int[-10].to[10]>
            - define y <util.random.int[-1].to[1]>
            - define z <util.random.int[-10].to[10]>
            - look npc:%value% <npc.location.add[%x%,%y%,%z%]>
            }
          - wait 10s
          }