Date: 2016/01/16 07:24:10 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
##############################
# File for NPC Sage Tutorial #
##############################
###########################################
# Assignment script for NPC Sage Tutorial #
###########################################
NPC_Sage_Tutorial:
type: assignment
actions:
on assignment:
- ^run Assign_Triggers npc:<npc>
interact scripts:
- 1 NPC_Sage_Tutorial_Interact
#########################################
# Interact script for NPC Sage Tutorial #
#########################################
NPC_Sage_Tutorial_Interact:
type: interact
steps:
1:
click trigger:
script:
- inject Tutorial_Whisper_Script
chat trigger:
1:
trigger: /Yes/ please!
script:
- inject NPC_Sage_Tutorial_Yes_Event
- run Tutorial npc:<npc>
2:
trigger: /No/ thanks!
- inject NPC_Sage_Tutorial_No_Event
- run Tutorial_End
2:
click trigger:
script:
- flag <player> next
- narrate format:Talk_Format "Great! Moving on..."
chat trigger:
1:
trigger: /cancel/
script:
- inject Tutorial_Cancel
- run Tutorial_End
#########################################
# Task script for initialising tutorial #
#########################################
Tutorial_Initialiser:
type: task
script:
- flag <player> inTutorial
- ^adjust <player> show_entity:<server.flag[TutorialNPC]>
- ^adjust <player> show_entity:<server.flag[TutorialPlaceHolder]>
- wait 10t
- ^adjust <player> spectate:<server.flag[TutorialPlaceHolder]>
###################################
# Task script for ending tutorial #
###################################
Tutorial_End:
type: task
script:
- if <s@NPC_Sage_Tutorial_Interact.step[<player>]> == 2 {
- zap s@NPC_Sage_Tutorial_Interact 1
}
- queue <player.has_flag[tutorialQueue]> clear
- flag <player> tutorialQueue:!
- flag <player> inTutorial:!
- ^adjust <player> spectate:<player>
- wait 10t
- ^adjust <player> hide_entity:<server.flag[TutorialNPC]>
- ^adjust <player> hide_entity:<server.flag[TutorialPlaceHolder]>
- queue clear
##############################################################
# World script for hiding NPCs on join, and handling log out #
##############################################################
Tutorial_World_Handler:
type: world
events:
on player first login:
- wait 3s
- inject Tutorial_Initialiser
- ^run Tutorial_Introduction npc:<server.flag[TutorialNPC]>
on player joins:
- wait 5t
- if <player.has_flag[inTutorial]> {
- ^run Tutorial_Introduction npc:<server.flag[TutorialNPC]>
}
else {
- ^adjust <player> hide_entity:<server.flag[TutorialNPC]>
- ^adjust <player> hide_entity:<server.flag[TutorialPlaceHolder]>
}
on player quits:
- if <player.has_flag[inTutorial]> {
- queue <player.has_flag[tuorialQueue]> stop
}
#############################################
# Task script for handling the introduction #
#############################################
Tutorial_Introduction:
type: task
script:
- narrate format:Talk_Format "Greetings, <player.name> and welcome to Custom Kits! I'm Ecaxon the sage, you seem new around here..."
- wait 2s
- narrate format:Talk_Format "Would you like some help?"
- wait 2s
##################
# Whisper format #
##################
Tutorial_Whisper_Script:
type: task
script:
- narrate format:Server_Format "Type <&l>'Yes'<&r> or <&l>'No'<&r> in chat!"
- wait 2s
- narrate format:Server_Format "You can cancel this tutorial anytime by saying <&l>'cancel'<&r>"
###########################
# Task script for waiting #
###########################
Tutorial_Wait_Next:
type: task
script:
- flag <player> next:!
- while <player.has_flag[next].not> {
- wait 5t
}
- flag <player> next:!
####################
# Acctual tutorial #
####################
Tutorial:
type: task
script:
- zap s@NPC_Sage_Tutorial_Interact 2
- flag <player> tutorialQueue:<queue>
- wait 2s
- narrate format:Talk_Format "Great! Okay, so <player.name>, once again, welcome to the realm of Custom Kits!"
- wait 3s
- narrate format:Talk_Format "Something note-worthy about this realm is the sheer amount of NPCs wandering around!"
- wait 2s
- narrate format:Talk_Format "All of whom can be interacted with through typin in chat while looking at them or simply right clicking them!"
- wait 3s
- narrate format:Talk_Format "A very important thing to note is that very much like you and me, how you treat them will determine how they treat you!"
- wait 3s
- narrate format:Talk_Format "So, if you go around being a total jerk to them, don't be suprised if they turn hostile towards you!"
- wait 3s
- narrate format:Talk_Format "How the NPC treats you is based on the esteem you have which can be viewed using the command /Esteem (player) !"
- wait 3s
- narrate format:Talk_Format "That might be a-lot to digest so I'll pause here for now!"
- wait 2s
- narrate format:Talk_Format "Right click me to continue!"
- inject Tutorial_Wait_Next
- narrate format:Talk_Format "Alright! Moving on to the actual game itself!"
- wait 2s
- narrate format:Talk_Format "So....Custom Kits! What is it?"
- wait 2s
- narrate format:Talk_Format "It's a unique twist on kit PvP where you start off with 200 Kit Points to build your kits..."
- wait 3s
- narrate format:Talk_Format "Items such as armour and weapons will each use up a different amount of kit points based on the individual item!"
- wait 4s
- narrate format:Talk_Format "The amount of kit points is always fixed at 200! So, you don't have to worry about that if you die!"
- wait 3s
- narrate format:Talk_Format "However, for consumable items such as potions and foodstuff, you are required to spend gold, the server's currency, to buy them!"
- wait 4s
- narrate format:Talk_Format "Upon dying, you will lose any consumable items you are carrying so be careful!"
- wait 3s
- narrate format:Talk_Format "I'll pause here once again!"
- wait 2s
- narrate format:Server_Format "Right click me to continue!"
- inject Tutoria_Wait_Next
- narrate format:Talk_Format "Alright I shall not go too in-depth now as there are other NPCs specialising in those areas!"
- wait 3s
- narrate format:Talk_Format "Elizabeth the guide next to the map for example will give you a tour of this area!"
- wait 3s
- narrate format:Talk_Format "The warrior at the Highscores area will instruct you on the leaderboard system we have!"
- wait 3s
- narrate format:Talk_Format "And lastly, that creepy guy in a black hood in the guild hub will teach you all about the guild system we have!"
- wait 4s
- narrate format:Talk_Format "Alright! There's all for me now! If you ever need any help, feel free to find me by the waterfall!"
- ^run Tutorial_End
#########################################
# Task script for handling cancel event #
#########################################
Tutorial_Cancel:
type: task
script:
- narrate format:Talk_Format "Alright! Do find me by the pavillion if you ever need help!"
######################################
# Task script for handling Yes event #
######################################
NPC_Sage_Tutorial_Yes_Event:
type: task
script:
- narrate format:Talk_Format "A wise choice indeed! Let's begin shall we?"
#####################################
# Task script for handling No event #
#####################################
NPC_Sage_Tutorial_No_Event:
type: task
script:
- narrate format:Talk_Format "Alright child, you can find me at the pavillion by the waterfall if you ever need my help!"