Paste #7039: Untitled Paste

Date: 2014/07/17 16:56:23 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


companionloop:
  Type: Task
  script:
    - if <player.flag[npcn].as_npc.flag[busy]> == null {
      - narrate "not busy!"
      - if <player.flag[npcn].as_npc.location.distance[<player.location>]> >= 4 {
        - narrate "too far!"
        - follow  npc:<player.flag[npcn]> target:<player>
        }
      - if <player.flag[npcn].as_npc.location.distance[<player.location>]> <= 2  {
        - narrate " too close!"
        - follow npc:<player.flag[npcn]> stop
        }
      }
    - run companionloop