Date: 2014/09/29 15:11:31 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
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
StableMasterAssign:
type: assignment
interact scripts:
- 10 DailyStablemasterQuest
default constants:
npctype: "FidgetingNPC"
actions:
on assignment:
- trigger name:chat state:true
- trigger name:click state:true
- trigger name:proximity state:true radius:5
- trigger name:damage state:false
- lookclose true range:4 realistic
on spawn:
- run s@stableinit instantly
on enter proximity:
- walk <player.location> radius:3
stableinit:
type: task
script:
- ^trigger name:chat state:true
- ^trigger name:click state:true
- ^trigger name:proximity state:true radius:5
- ^trigger name:damage state:false
- ^lookclose true range:4 realistic
DailystablemasterQuest:
type: interact
steps:
start*:
proximity trigger:
entry radius: 10
entry:
script:
- narrate "You hear the neighing of horses nearby"
- wait 2
- chat "<red>Hello there stranger."
- pause waypoints
- narrate "<green>Hint:<white>Right click to continue"
exit:
script:
- resume waypoints
click trigger:
script:
- pause waypoints
- chat "<red>I havent seen you around these parts before"
- wait 1
- chat "<red>Where are my manners my name is <npc.name>."
- wait 1
- chat "<red>Are you looking for work?"
- wait 1
- narrate "<white>You can say, <green>Yes<white> or <green>No<white>."
- trigger name:chat state:true radius:100
chat trigger:
1:
trigger: /Yes/, I could use the work.
script:
- chat "<red>Great! I am always looking for a little help around here."
- wait 1
- chat "<red>I need 5 iron bars to make shoes for all of these horses."
- wait 1
- chat "<red>Go fetch them for me and I will make it worth your time."
- narrate " <npc.name> returns to his work"
- ^flag server stablemaster:->:<player>
- resume waypoints
- zap step:initial
2:
trigger: /No/, I am far to busy.
script:
- chat "Fair enough come back if you find yourself looking for work"
- resume waypoints
initial:
click trigger:
script:
- if <player.inventory.contains[IRON_INGOT].qty[5]> {
- take iron_ingot qty:5
- pause waypoints
- chat "<red> Oh great you have the iron thank you so much."
- wait 1
- chat "<red>Here you go payment as promised."
- ^narrate "<red>You receieved <gold>5 Gold bars<red> from <npc.name>!"
- give gold_ingot qty:5
- wait 1
- chat "<red>Thank you again for your help!"
- wait 3
- chat "<red> Come back tommorow if you are still looking for work."
- narrate "<npc.name> Returns to his work"
- resume waypoints
- flag player stableCooldown duration:24h
- zap step:cooldown
} else {
- pause waypoints
- chat "<red>Please come back when you have the 5 iron bars."
- wait 1
- narrate " <npc.name> looks at you and shakes his head and goes back to his work."
- resume waypoints
}
wait:
click trigger:
script:
- chat "<red>Thanks again for your help."
- wait 3
- chat "<red>Stop back by tommorow if you are still looking for work."
- narrate "<green>Goes back to his work."
return:
click trigger:
script:
- pause waypoints
- random {
- chat "<red>Welcome back <player.name>"
- chat "<red>Hey there <player.name> long time no see."
- chat "<red>Glad to see you are still alive."
}
- wait 3
- chat "<red>Are you looking for more work?"
- narrate "<white>You can say, <green>Yes<white> or <green>No<white>."
- trigger name:chat state:true radius:100
chat trigger:
1:
trigger: /Yes/, I am.
script:
- random {
- chat "Great to hear!"
- chat "Wonderful!"
- chat "Fantastic!"
}
- wait 1
- chat "<red>I need you to fetch me 2 apples for the horses."
- wait 1
- chat "Return to me when you have finished."
- narrate "<npc.name>returns to his work"
- resume waypoints
- zap step:reward
2:
trigger: /No/, I am not.
script:
- chat "No problem come see me if you find yourself looking for work in the future."
- resume waypoints
waiting:
click trigger:
script:
- chat "<red>Please hurry with the apples <player.name> the horses are getting hungry."
reward:
click trigger:
script:
- if <player.inventory.contains[apple].qty[2]> {
- take apple qty:2
- pause waypoints
- chat "<red> Oh great you have the apples thank you so much."
- wait 1
- ^narrate "<red>You receieved <gold>10 Gold bar<red> from <npc.name>!"
- give gold_ingot qty:10
- wait 1
- chat "<red>Thank you again for your help!"
- flag player stableCooldown duration:24h
- zap step:cooldown
} else {
- chat "<red>Please come back when you have the 2 apples"
- wait 1
- narrate " <npc.name> looks at you and shakes his head then returns back to his work"
- resume waypoints
}
cooldown:
click trigger:
script:
- pause waypoints
- chat "<red>Thanks again for your help."
- wait 3
- chat "<red>Stop back by tommorow if you are still looking for work."
- narrate "Goes back to his work."
- resume waypoints
stableWorld:
type: world
debug: false
events:
on time changes in w@world:
- if <server.flag[stablemaster]> == "null" queue clear
- foreach <server.flag[stablemaster].as_list> {
- if !<%value%.as_player.flag[stableCooldown]> && <s@DailystablemasterQuest.step[%value%]> != "return" {
- zap script:DailystablemasterQuest step:return player:%value%
- if <%value%.as_player.is_online> {
- narrate player:%value% "<red>The Stable Master in Glint has more work for you."
- narrate player:%value% "<red>Return to him as soon as possible."
}
}
}