Date: 2015/12/10 23:00:28 UTC-08:00
Type: Denizen Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
NPC_Guide_Interact:
type: interact
steps:
1:
chat trigger:
1:
trigger: /yes/
script:
- ^create player Guide <npc.location> save:InstancedNPC
- ^flag <entry[InstancedNPC].created_npc> OriginalGuide:<^npc>
- ^run NPC_Guide_Tour npc:<entry[InstancedNPC].created_npc> def:<^npc>
- zap 2
##################################################
NPC_Guide_Instance:
type: assignment
actions:
on assignment:
- trigger name:chat state:true
interact scripts:
- 1 NPC_Guide_Instance_Interact
###############################################################
NPC_Guide_Instance_Interact:
type: interact
steps:
1:
chat trigger:
1:
trigger: /cancel/
script:
- run NPC_Guide_Leave def:<npc.flag[OriginalGuide]>
##############################################################
NPC_Guide_Tour:
type: task
definitions: masternpc
script:
- flag <npc> tourQueue:<queue.id>
- inject NPC_Event_Introduction
- ~walk <def[masternpc].anchor[1_1]> auto_range
- ^inject NPC_Guide_Wait_Walk
- run NPC_Guide_Leave npc:<npc> def:<npc.flag[OriginalGuide]>
###################################################################
NPC_Guide_Leave:
type: task
definitions: GuideOriginal
script:
- zap script:s@NPC_Guide_Interact 1
- queue <npc.flag[tourQueue]> clear #Supposed to stop the NPC_Guide_Tour script but it does not and the script continues running
- remove <npc>
- queue clear