Date: 2019/09/06 00:15:12 UTC-07: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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
cchat:
type: format
format: "<&b><npc.name><&f><&co> <&a><text>"
my_npc:
type: assignment
actions:
on assignment:
- trigger name:click state:true
- trigger name:chat state:true
interact scripts:
- 10 my_npc_interact
my_npc_interact:
type: interact
steps:
1:
click trigger:
script:
- narrate format:cchat "Hello! world you like a tour?"
- narrate "Say /yes/ or /no/"
chat trigger:
1:
trigger: /Yes/ i'd love to
script:
- narrate format:cchat "Okay great, follow me"
- ^create player MyNPC <npc.location> save:mynpc
- ^ajust <player> hide_entity:<npc>
- ^ajust <server.list_online_players.exclude[<player>]> hide_entity<entry[mynpc].created_npc>
- ^run my_npc_path npc:<entry.[mynpc].created_npc> def:<^npc>
- ^run my_npc_talk npc:<entry.[mynpc].created_npc>
- zap 2
2:
trigger: /No/ i don't want to
script:
- narrate format:cchat "kbye"
my_npc_path:
type: task
definitions: masternpc
script:
- ^flag <npc> step:1
- ~walk <def[masternpc].anchor[spot1]> auto_range
# - ^inject my_npc_trypause
- flag <npc> step:2
- ~walk <def[masternpc].anchor[spot2]> auto_range
# - ^inject my_npc_trypause
- flag <npc> step:3
- ~walk <def[masternpc].anchor[spot3]> auto_range
- remove <npc>
- ajust <player> show_entity:<def[masternpc]>
- zap 1 script:s@my_npc_interact
my_npc_trypause:
type: task
script:
- ^while <npc.location.distance[<player.location>].is[OR_LESS].than[5]>:
- wait 1
my_npc_talk:
type: task
difinitions: masternpc
script:
- narrate format:cchat "Hello and welcome"
- narrate format:cchat "This server is a cool place"
- while <[npc.flag[step].is[OR_LESS].than[1]>:
- wait 1
- narrate format:cchat "Over there is <&9>Thething"