Date: 2016/01/19 00:54:04 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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
#######################
# File for NPC Grocer #
#######################
####################################
# Assignment script for NPC Grocer #
####################################
NPC_Grocer:
type: assignment
actions:
on assignment:
- ^run Assign_Triggers npc:<npc>
- ^run Esteem_NPC_Responses npc:<npc>
- ^run Assign_Walk_Flags npc:<npc> def:3|10
- ^run Walk npc:<npc>
interact scripts:
- NPC_Grocer_Interact
##################################
# Interact script for NPC Grocer #
##################################
NPC_Grocer_Interact:
type: interact
steps:
1:
click trigger:
script:
- inject NPC_Grocer_Greeting_Event
- open inventory d:in@NPC_Grocer_Inventory
chat trigger:
1:
trigger: /Failure/
script:
- inject NPC_Grocer_Rude_Event
2:
trigger: /Failure in life/
script:
- inject NPC_Grocer_Rude_Event
3:
trigger: /Hi/
script:
- inject NPC_Grocer_Greeting_Event
4:
trigger: /Hello/
script:
- inject NPC_Grocer_Greeting_Event
5:
trigger: /Hullo/
script:
- inject NPC_Grocer_Greeting_Event
6:
trigger: /Sup/?
script:
- inject NPC_Grocer_Greeting_Event
7:
trigger: /What's up/?
script:
- inject NPC_Grocer_Greeting_Event
8:
trigger: /Yo/!
script:
- inject NPC_Grocer_Greeting_Event
9:
trigger: /Greeting/s!
script:
- inject NPC_Grocer_Greeting_Event
10:
trigger: /Who are you/?
script:
- inject NPC_Grocer_Who_Event
11:
trigger: What's your /job/?
script:
- inject NPC_Grocer_Who_Event
12:
trigger: What do you /work/ as?
script:
- inject NPC_Grocer_Who_Event
13:
trigger: /What do you/?
script:
- inject NPC_Grocer_Who_Event
14:
trigger: /How are you/ doing?
script:
- inject NPC_Grocer_How_Event
15:
trigger: /How have you been/?
script:
- inject NPC_Grocer_How_Event
16:
trigger: /How has it been/?
script:
- inject NPC_Grocer_How_Event
17:
trigger: /How's life/?
script:
- inject NPC_Grocer_How_Event
18:
trigger: /How has life been/?
script:
- inject NPC_Grocer_How_Event
19:
trigger: /How is life/?
script:
- inject NPC_Grocer_How_Event
20:
trigger: /credits/?
script:
- narrate format:Talk_Format "Credits: PlanetMinecraft user: LukyLucas http://www.planetminecraft.com/skin/arryn-mansions-cook/"
########################
# NPC Grocer inventory #
########################
NPC_Grocer_Inventory:
type: inventory
inventory: CHEST
title: <&2>Grocer's market specials<&r>
size: 27
slots:
- "[i@air] [i@air] [i@air] [i@air] [i@air] [i@air] [i@air] [i@air] [i@air]"
- "[i@air] [i@air] [i@air] [i@air] [i@Item_Display_Cake] [i@air] [i@air] [i@air] [i@air]"
- "[i@air] [i@air] [i@air] [i@air] [i@air] [i@air] [i@air] [i@air] [i@air]"
################################
# NPC_Grocer_Inventory_Handler #
################################
NPC_Grocer_Inventory_Handler:
type: world
events:
on player clicks in NPC_Grocer_Inventory:
- determine cancelled
on player drags in NPC_Grocer_Inventory:
- determine cancelled
on player clicks Item_Display_Cake in NPC_Grocer_Inventory:
- define price <proc[Item_Determine_Price].context[<server.flag[basePeaceOfferingPrice]>|<player.flag[esteem]>]>
- define item i@Item_Peace_Offering
- inject NPC_Grocer_Inventory_Handler_Helper
##################################################
# Helper script for NPC_Grocer_Inventory_Handler #
##################################################
NPC_Grocer_Inventory_Handler_Helper:
type: task
definitions: price|item
script:
- if <proc[Item_Determine_Player_Money].context[<def[price]>|<player.money>]> {
- if <player.inventory.can_fit[<def[item]>]> {
- take money quantity:<def[price]>
- give <def[item]> quantity:1
- inject NPC_Grocer_Purchase_Event
}
else {
- narrate format:Talk_Format "Hey greedy! Your inventory is full!"
}
}
else {
- narrate format:Talk_Format "Hey! You don't have enough money to buy that!"
###########################################
# Task script for handling greeting event #
###########################################
NPC_Grocer_Greeting_Event:
type: task
script:
- walk stop
- queue <npc.flag[walkQueue]> pause
- if <proc[Esteem_Determine]> == "liked" {
- random {
- narrate format:Talk_Format "Hey <player.name>! What can I get for you today?"
- narrate format:Talk_Format "May I get you anything today, <player.name>?"
- narrate format:Talk_Format "Anything you are specifically after today, <player.name>?"
- narrate format:Talk_Format "What are you after, <player.name>?"
- narrate format:Talk_Format "Do you need help with anything? <player.name>?"
- narrate format:Talk_Format "Are you looking for anything, <player.name>?"
}
}
else if <proc[Esteem_Determine]> == "neutral" {
- random {
- narrate format:Talk_Format "Hello <player.name>, can I interest you"
- narrate format:Talk_Format "Can I interest you in some of my wares?"
- narrate format:Talk_Format "May I help you?"
- narrate format:Talk_Format "What do you need??"
- narrate format:Talk_Format "What can I get you today?"
- narrate format:Talk_Format "How can I help you?"
}
}
else if <proc[Esteem_Determine]> == "disliked" {
- random {
- narrate format:Talk_Format "Are you looking for something?"
- narrate format:Talk_Format "Can I help you?"
- narrate format:Talk_Format "Watcha buying?"
- narrate format:Talk_Format "Is there anything you want?"
- narrate format:Talk_Format "Are you looking for something?"
- narrate format:Talk_Format "Do you need anything?"
}
}
- walk <npc.anchor[<npc.flag[anchorPoint]>]>
- queue <npc.flag[walkQueue]> resume
#######################################
# Task script for handling who events #
#######################################
NPC_Grocer_Who_Event:
type: task
script:
- walk stop
- queue <npc.flag[walkQueue]> pause
- if <proc[Esteem_Determine]> == "liked" {
- random {
- narrate format:Talk_Format "Haha, <player.name>, I'm Fred, the local grocery store owner!"
- narrate format:Talk_Format "Oh have you forgotten old Fred? This is my shop!"
- narrate format:Talk_Format "It's old Fred the grocer! Have you forgotten me?"
- narrate format:Talk_Format "Is that really you, <player.name>? It's been yearss! I'm Fred, remember? Fred the grocer."
- narrate format:Talk_Format "I'm Fred! I own my own grocery stall!"
- narrate format:Talk_Format "Hey <player.name>, have you forgotten me already? I'm Fred!"
}
}
else if <proc[Esteem_Determine]> == "neutral" {
- random {
- narrate format:Talk_Format "It's me, Fred! How are you, <player.name>?"
- narrate format:Talk_Format "Have you forgotten me, old friend? It's me Freddi!"
- narrate format:Talk_Format "I'm Fred, I run my own business, and who may you be?"
- narrate format:Talk_Format "I'm Freddie, I own a stall here in the market."
- narrate format:Talk_Format "I'm Freddy, I own this stall here, how about you?"
- narrate format:Talk_Format "I'm Freddie, this grocery shop is mine, traveller."
}
}
else if <proc[Esteem_Determine]> == "disliked" {
- random {
- narrate format:Talk_Format "I sell groceries for a living...."
- narrate format:Talk_Format "I own this grocery shop.."
- narrate format:Talk_Format "I'm Fred, I run my oww grocery shop here."
- narrate format:Talk_Format "Do I know you?"
- narrate format:Talk_Format "I'm Fred, the shop's owner."
- narrate format:Talk_Format "I'm the owner of this shop, Fred."
}
}
- walk <npc.anchor[<npc.flag[anchorPoint]>]>
- queue <npc.flag[walkQueue]> resume
######################################
# Task script for handling how event #
######################################
NPC_Grocer_How_Event:
type: task
script:
- walk stop
- queue <npc.flag[walkQueue]> pause
- if <proc[Esteem_Determine]> == "liked" {
- random {
- narrate format:Talk_Format "Hey <player.name>, how's it going? I'm doing good!"
- narrate format:Talk_Format "It can't get any better! How's your life?"
- narrate format:Talk_Format "Oh, never mind me! How are you?"
- narrate format:Talk_Format "How am I???? Haha, nothing can ever make me feel down!"
- narrate format:Talk_Format "Old Fred has been doing well, I run my own business now!"
- narrate format:Talk_Format "Just the same as usual. Good!"
}
}
else if <proc[Esteem_Determine]> == "neutral" {
- random {
- narrate format:Talk_Format "Old Fred has been fine! How about you?"
- narrate format:Talk_Format "It's going well! How's it been man?"
- narrate format:Talk_Format "I'm all good pal, how are you?"
- narrate format:Talk_Format "Old Fred never feels down! You know that!"
- narrate format:Talk_Format "Pal, how's it going? I'm good."
- narrate format:Talk_Format "I'm"
}
}
else if <proc[Esteem_Determine]> == "disliked" {
- random {
- narrate format:Talk_Format "I've been good."
- narrate format:Talk_Format "I'm cool, what about you?"
- narrate format:Talk_Format "It's good to see you! Old Fred has been doing well!"
- narrate format:Talk_Format "My life has been good..."
- narrate format:Talk_Format "It's going smoothly!"
- narrate format:Talk_Format "My life has been good."
}
}
- walk <npc.anchor[<npc.flag[anchorPoint]>]>
- queue <npc.flag[walkQueue]> resume
########################################
# Task script for handling rude events #
########################################
NPC_Grocer_Rude_Event:
type: task
script:
- walk stop
- queue <npc.flag[walkQueue]> pause
- if <proc[Esteem_Determine]> == "liked" {
- random {
- narrate format:Talk_Format "My gosh, how rude can you be?"
- narrate format:Talk_Format "Good riddance!"
- narrate format:Talk_Format "Do you have to?"
- narrate format:Talk_Format "What are you trying to imply?"
- narrate format:Talk_Format "How rude can you be?"
- narrate format:Talk_Format "YOu're going to cause your own downfall."
}
}
else if <proc[Esteem_Determine]> == "neutral" {
- random {
- narrate format:Talk_Format "Keep continuing... and someone's going to end up with a pumpkin shoved up."
- narrate format:Talk_Format "Easy on it!"
- narrate format:Talk_Format "You won't like me when I'm anrgy."
- narrate format:Talk_Format "Hey! What's the big idea?"
- narrate format:Talk_Format "Don't you dare call me that!"
- narrate format:Talk_Format "Hey!"
}
}
else if <proc[Esteem_Determine]> == "disliked" {
- random {
- narrate format:Talk_Format "You're thicker than a head of cabbage!"
- narrate format:Talk_Format "Hey, shut it, turnip brain!"
- narrate format:Talk_Format "Hey watch it there!"
- narrate format:Talk_Format "Don't get all pissy with me now, chump."
- narrate format:Talk_Format "Get lost before I ram a pumpkin up!"
- narrate format:Talk_Format "Someone needs to shut up here."
}
}
- walk <npc.anchor[<npc.flag[anchorPoint]>]>
- queue <npc.flag[walkQueue]> resume