Date: 2015/11/27 17:00:36 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#format chat for the NPC
cchat:
type: format
format: "<&b><npc.name><&f> <&co> <&a><text>"
#my npc greeter, no need to be 65 or work at walmart.
greeter:
type: assignment
actions:
on assignment:
- trigger name:click state:true
- trigger name:chat state:true
interact scripts:
- 10 greet_em
#now the actual scripts
greet_em:
type: interact
steps:
1:
click trigger:
script:
- narrate format:cchat "Hello I am <npc.name>, would you care for a tour?"
- narrate "Type /yes/ or /no/"
chat trigger:
1:
trigger: /Yes/ sure
script:
- narrate format:cchat "Ok then follow me"
#creater an NPC named greeter and saves it for later use in the script.
- ^create player NPCGreeter <npc.location> save:greeter
#hide_entity is a mechanism
- ^adjust <player> hide_entity:<npc>
# Now to make the npc not be in the list of online players.
- ^adjust <server.list.online_players.exclude[<player>]> hide_entity:<entry[greeter].created_npc>
#now run the greeter_path and greeter_talk tasks
- ^run greeter_path npc:<entry[greeter].created_npc> def:<^npc>
- ^run greeter_talk npc:<entry[greeter].created_npc>
- zap 2
2:
trigger: /No/ thanks
script:
- narrate format:cchat "Ok then enjoy your time here"
#now taks scrips for path
greeter_path:
type: task
definitions: masternpc
script:
- ^flag <npc> step:1
- ~walk <def[masternpc].anchor[tourstop1]> auto_range
- ^inject greeter_waits
- ^flag <npc> step:2
- ~walk <def[masternpc].anchor[tourstop2]> auto_range
- ^inject greeter_waits
- ^flag <npc> step:3
- ~walk <def[masternpc].anchor[tourstop3]> auto_range
- ^inject greeter_waits
- wait 1
- remove <npc>
- adjust <player> show_entity:<def[masternpc]>
- zap 1 script:s@greet_em
#the greeter waits for player to catch up
greeter_waits:
type: task
script:
- ^while <npc.location.distance[<player.location>].is[OR_MORE].than[5]> {
- narrate format:cchat "Come along, please try and keep up"
- wait 1}
#now the taks script for talking points on the path
greeter_talk:
type: task
script:
- narrrate format:cchat "We are glad you joined the Chapel Perilous"
- wait 2
- narrate format:cchat "A modded survival server"
- while <npc.flag[step].is[OR_LESS].than[1]> {
- wait 1
}
- narrate format:cchat "Here we have the Erisian Temple of Dealey Plaza"
- while <npc.flag[step].is[OR_LESS].than[2]> {
- wait 1
}
- narrate format:cchat "Here we have the JFK Inn of Dealey Plaza"
- while <npc.flag[step].is[OR_LESS].than[3]> {
- wait 1
}
- narrate format:cchat "Here we have the DealeyLlama's Deal o'Rama"