- D1 Meta Docs - Denizen Script -
Home Page / Pi to one million places / Contact mcmonkey / Donate / Paste Scripts / Denizen Help /
You are browsing as a guest.
Login | Register


Click here to create your own public paste ~ ~ click to duplicate and edit this paste


TitleUntitled Paste
TypeDenizen Script
Date2019/01/08 16:38:29 UTC-08:00
ByGuest
Other
Paste
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
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
40800
##################
##Smitty Handler##
##################

#Assignment#
Smittyasn:
  type: assignment
  actions:
    on assignment:
      - trigger name:click state:true
      - trigger name:chat state:true radius:5
    on click:
      - narrate "Smitty: Can I help you?"
      - inventory open d:in@SmittyGreetingInv

#Inventories#
SmittyGreetingInv:
  type: inventory
  title: What can I do for ya?
  size: 9
  slots:
  - "[i@smittychatit] [i@smittyquestsit] [] [] [] [] [] [] []"
  
SmittyQuestsInv:
  type: inventory
  title: Lookin' for work huh?
  size: 9
  slots:
  - "[] [] [] [] [] [] [] [] []"
  Procedural Items:
  - if <player.flag[SmittyQuests].is[==].to[FoundTheIronThieves]||false> {
    - queue clear
    }
  - determine <player.flag[SmittyQuests]>

#Inventory Items#
SmittyQuestsIt:
  type: item
  material: writable_book
  display name: Jobs
  lore:
  - "Looking for work?"

SmittyChatIt:
  type: item
  material: jukebox
  display name: Chat
  lore:
  - "Lookin' to chew the fat?"

#World Script#
SmittyHandler:
  type: world
  events:
    on player clicks smittychatit in SmittyGreetingInv:
    - determine passively cancelled
    - inventory close
#########################
#Job: Smitty's Assistant#
#########################
    - if <player.has_flag[SmittyQuests]> {
      - if <player.flag[SmittyQuests].is[==].to[FoundTheIronThieves]> && <yaml[<player.uuid>].read[Jobs].contains[SmittyAssistant].not> {
        - narrate "Smitty: Well, well, if it ain't my favorite Ork slayer. If yer ever lookin' for some extra coin, just chat with me and I'll put ya to work!"
        - wait 2
        - narrate "You can now seek employment at Smitty's Smithy. Click Chat With Smitty to put in a shift!"
        - wait 2
        - narrate "For starting a new Job your Frontier's Folly Reputation has increased by 1 and you gain 1 Unsung Reputation Points!"
        - yaml id:<player.uuid> set Jobs.FrontFolly.SmittyAssistant.ShiftsWorked:0
        - yaml id:<player.uuid> set UnsungReputation:+:1
        - yaml id:<player.uuid> set FrontFollyReputation:+:1
        - queue clear
        }
      }
    - if <yaml[<player.uuid>].read[Jobs].contains[SmittyAssistant]> {
      - if <player.has_flag[SmittyAssistantShift]> {
        - narrate "Smitty: I admire the enthusiasm, but there ain't much to do! Come on back later, won't be long before I've got more work."
        - narrate "This Job can only be completed once per day. Come back in <player.flag[SmittyAssistantShift].expiration.formatted>."
        }
      - if <player.food_level> <= 15 {
        - narrate "You're too fatigued to work. Eat some food first."
        - queue clear
        }
      - narrate "Smitty: Ah good to see ya! We've got plenty of work 'round here!"
      - if <yaml[<player.uuid>].read[Jobs.FrontFolly.SmittyAssistant.ShiftsWorked]> == 0 {
        - flag player SmittyAssistantShift Duration:24h
        - wait 2
        - cast BLINDNESS <player> d:5s
        - playsound <player> sound:BLOCK_ANVIL_USE
        - wait 4
        - adjust <player> food_level:5
        - narrate "Tired, but satisfied you complete your first shift with Smitty. For your work you receive: $200!"
        - money give quantity:200
        - yaml id:<player.uuid> set Jobs.FrontFolly.SmittyAssistant.ShiftsWorked:+:1
        - queue clear
        } else {
        - if <yaml[<player.uuid>].read[Jobs.FrontFolly.SmittyAssistant.ShiftsWorked].is[MORE].to[19]> && <player.has_flag[SmittyBonus].not> {
          - narrate "Smitty: You've put a lot of work in for me. I'm puttin' a bonus in your pay! Lets get 'er done!"
          - flag player SmittyBonus:1
          }
        - flag player SmittyAssistantShift Duration:24h
        - cast BLINDNESS <player> d:5s
        - playsound <player> sound:BLOCK_ANVIL_USE
        - wait 4
        - adjust <player> food_level:5
        - if <player.has_flag[SmittyBonus]> {
          - narrate "Tired, but satisfied you complete your shift with Smitty. For your work you receive: $<player.flag[SmittyBonus].mul[5].add[200]>!"
          - money give quantity:<player.flag[SmittyBonus].mul[10].add[200]>
          - yaml id:<player.uuid> set Jobs.FrontFolly.SmittyAssistant.ShiftsWorked:+:1
          - flag player SmittyBonus:+:1
          - queue clear
          } else {
          - narrate "Tired, but satisfied you complete your shift with Smitty. For your work you receive: $200!"
          - money give quantity:200
          - yaml id:<player.uuid> set Jobs.FrontFolly.SmittyAssistant.ShiftsWorked:+:1
          - queue clear
          }
        }
      }
    - narrate "Smitty: I ain't got time to lolly gag!"
    on player clicks smittyquestsit in SmittyGreetingInv:
    - determine passively cancelled
    - inventory close
    - if <player.has_flag[SmittyQuests].not> {
      - flag player SmittyQuests:GetSmittySomeIronIt
      }
    - inventory open d:in@SmittyQuestsInv
 
############################# 
#Quest: Get Smitty Some Iron#
#############################      
    on player clicks GetSmittySomeIronIt in SmittyQuestsInv:
    - determine passively cancelled
    - if <player.has_flag[FoundTheIronThieves]> && <player.has_flag[SmittyQuests].not> {
      - inventory close
      - yaml id:<player.uuid> set KeyItems:<-:SmittysShipmentIt
      - narrate "Smitty: What do ya want? Huh? What do you have there?"
      - wait 2
      - narrate "Smitty: My shipment! You found it! Thank you! Where'd ya get this anyway?"
      - wait 2
      - narrate "Smitty: Orks you say! Well this deserves a reward! Here take the money I was givin' to the courier and a little something extra on the side."
      - wait 2
      - narrate "Smitty: C'mon back and chat with me sometime, I could always use a strong set of hands around here."
      - give money quantity:1250
      - give SmittySpecialIt
      - wait 2
      - narrate "You have completed this quest! Your reputation in Frontier's Folly increases by 4 and you gain 2 Unsung Reputation points!"
      - yaml id:<player.uuid> set ActiveQuests.FindTheIronThievesQ:!
      - yaml id:<player.uuid> set CompletedQuests.GetSmittySomeIronQ.Completed:0
      - yaml id:<player.uuid> set CompletedQuests.FindTheIronThievesQ.Completed:0
      - flag player SmittyQuests:FoundTheIronThieves
      - yaml id:<player.uuid> set FrontFollyReputation:+:4
      - yaml id:<player.uuid> set ActiveQuests.Total:-:1
      - yaml id:<player.uuid> set CompletedQuests.Total:+:2
      - yaml id:<player.uuid> set UnsungReputation:+:2
      - yaml savefile:/PlayerData/<def[value].uuid>.yml id:<def[value].uuid>
      - queue clear
      }
    - if <yaml[<player.uuid>].read[ActiveQuests].contains[GetSmittySomeIronQ].not> {
      - yaml id:<player.uuid> set ActiveQuests.GetSmittySomeIronQ.Act:1
      - yaml id:<player.uuid> set ActiveQuests.Total:+:1
      - yaml savefile:/PlayerData/<player.uuid>.yml id:<player.uuid>
      - inventory close
      - adjust <player> fake_equipment:<player>|off_hand|i@GetSmittyIronNPC
      - adjust <player> open_offhand_book
      - adjust <player> fake_equipment:<player>
      - narrate "Your journal has been updated."
      - queue clear
      }
    - if <yaml[<player.uuid>].read[ActiveQuests].contains[GetSmittySomeIronQ]> {
      - if <player.inventory.contains[iron_ingot].quantity[10]> {
        - inventory close
        - take iron_ingot quantity:10
        - narrate "Smitty: Perfect! Thank ya kindly. Here's yer payment! C'mon back, I'll probably have more work soon!"
        - give money quantity:350
        - wait 2
        - narrate "You have completed this quest! Your reputation in Frontier's Folly increases by 1!"
        - yaml id:<player.uuid> set ActiveQuests.GetSmittySomeIronQ:!
        - yaml id:<player.uuid> set CompletedQuests.GetSmittySomeIronQ.Completed:0
        - flag player SmittyQuests:FindTheIronThievesIt
        - yaml id:<player.uuid> set FrontFollyReputation:+:1
        - yaml id:<player.uuid> set ActiveQuests.Total:-:1
        - yaml id:<player.uuid> set CompletedQuests.Total:+:1
        - yaml savefile:/PlayerData/<def[value].uuid>.yml id:<def[value].uuid>
        } else {
        - inventory close
        - narrate "Smitty: Where's my ingots? No bars, no pay!"
        - queue clear
        }
      }
    on player clicks GetSmittySomeIronQ in inventory:
    - determine passively cancelled
    - if <player.inventory.contains[iron_ingot].quantity[10]> || <yaml[<player.uuid>].read[ActiveQuests].contains[i@GetSmittySomeIronQ]> {
      - adjust i@GetSmittyIronQJ book:<i@GetSmittyIronQJ.book.as_list.include[I have enough ingots now. I should head back over to Smitty's Smithy and claim my reward.]save:GetSmittyIronQJ 
      - inventory close
      - adjust <player> fake_equipment:<player>|off_hand|<def[GetSmittyIronQJ].result>
      - adjust <player> open_offhand_book
      - adjust <player> fake_equipment:<player>
      }
    - inventory close
    - adjust <player> fake_equipment:<player>|off_hand|i@GetSmittyIronQJ
    - adjust <player> open_offhand_book
    - adjust <player> fake_equipment:<player>

##############################
#Quest: Find The Iron Thieves#
##############################
    on player enters OrkCamp:
    - if <player.has_flag[FrontFollyOrkCamp].not> {
      - narrate "You find a foul smelling camp built into a small cave."
      - flag player FrontFollyOrkCamp
      }
    on player right clicks chest in FrontFollyOrkCamp:
    - if <player.has_flag[SmittyQuests].not> {
      - narrate "Inside the box among the other items you find a box of Iron Ingots addressed to a blacksmith in Frontier's Folly named Smitty."
      - wait 2
      - narrate "Your journal has been updated."
      - yaml id:<player.uuid> set KeyItems:->:SmittysShipmentIt
      - flag player FoundTheIronThieves
      - yaml id:<player.uuid> set ActiveQuests.FindTheIronThievesQ.Act:3
      - mythicspawn Ork 470,71,178,map
      - mythicspawn Ork 468,68,171,map
      - mythicspawn Ork 474,68,176,map
      - mythicspawn Ork 486,62,184,map
      - queue clear
      } else {
      - if <player.flag[SmittyQuests].is[==].to[GetSmittySomeIronIt]> {
        - narrate "Inside the box among the other items you find a box of Iron Ingots addressed to Smitty!"
        - wait 2
        - narrate "Your journal has been updated."
        - yaml id:<player.uuid> set KeyItems:->:SmittysShipmentIt
        - flag player FoundTheIronThieves
        - yaml id:<player.uuid> set ActiveQuests.GetSmittySomeIronQ.Act:1
        - mythicspawn Ork 470,71,178,map
        - mythicspawn Ork 468,68,171,map
        - mythicspawn Ork 474,68,176,map
        - mythicspawn Ork 486,62,184,map
        - queue clear
        }
      } 
    - if <player.has_flag[FindTheIronThievesQ]> && <player.has_flag[FoundTheIronThieves].not> {
      - flag player FoundTheIronThieves
      - narrate "Among the other items, you find a heavy wooden box containing Smitty's stolen iron."
      - wait 2
      - narrate "Your journal has been updated"
      - yaml id:<player.uuid> set ActiveQuests.FindTheIronThievesQ.Act:2
      - yaml id:<player.uuid> set KeyItems:->:SmittysShipmentIt
      - mythicspawn Ork 470,71,178,map
      - mythicspawn Ork 468,68,171,map
      - mythicspawn Ork 474,68,176,map
      - mythicspawn Ork 486,62,184,map
      - queue clear
      }
    on player clicks FindTheIronThievesQ in inventory:
    - determine passively cancelled
    - if <yaml[<player.uuid>].read[ActiveQuests.FindTheIronThievesQ.Act].is[==].to[0]> {
      - adjust i@FindTheIronThievesQJ book:<i@FindTheIronThievesQJ.book.as_list.include["When I tried to enter the mine, I was stopped by the foreman of the mine. I will need to find a way in to speak with Rocco. Perhaps if I applied for work?"]> save:FindTheIronThievesQJ
    }
    - if <yaml[<player.uuid>].read[ActiveQuests.FindTheIronThievesQ.Act].is[==].to[1]> {
      - adjust <entry[FindTheIronThievesQJ].result> book:<entry[FindTheIronThievesQJ].result.book.as_list.include["I have spoken with Rocco in the mine. He claimed to have heard about an Ork raiding party not far from where the caravan travels. He suggested I look there. According to him, the Ork camp is not far to the East from the outter East Gate of Frontier's Folly. He said it might be easier to find at night."]> save:FindTheIronThievesQ
    }
    - if <yaml[<player.uuid>].read[ActiveQuests.FindTheIronThievesQ.Act].is[==].to[2]> {
      - adjust <entry[FindTheIronThievesQJ].result> book:<entry[FindTheIronThievesQJ].result.book.as_list.include["After finding the Ork camp, I managed to locate Smitty's lost shipment. I should return it to him for my reward."]> save:FindTheIronThievesQ
    }
    - if <yaml[<player.uuid>].read[ActiveQuests.FindTheIronThievesQ.Act].is[==].to[3]> {
      - adjust <entry[FindTheIronThievesQJ].result> book:<entry[FindTheIronThievesQJ].result.book.as_list.set["While adventuring I stumbled upon an Ork camp inside a small cave. There was a chest with a shipment of Iron, addressed to Smitty's Arms Armor & Tools in the city of Frontier's Folly. Perhaps if I reutnr it I will get a reward."].at[6]> save:FindTheIronThievesQ
    }
      - inventory close
      - adjust <player> fake_equipment:<player>|off_hand|<entry[FindTheIronThievesQJ].result>
      - adjust <player> open_offhand_book
      - adjust <player> fake_equipment:<player>
      - queue clear
    - inventory close
    - adjust <player> fake_equipment:<player>|off_hand|i@FindTheIronThievesQJ
    - adjust <player> open_offhand_book
    - adjust <player> fake_equipment:<player>
    on player clicks FindTheIronThievesIt in SmittyQuestsInv:
    - determine passively cancelled
    - if <yaml[<player.uuid>].read[GlobalReputation]> < 5 || <yaml[<player.uuid>].read[FrontFollyReputation]> < 10 {
      - inventory close
      - narrate "Smitty: Sorry kid, but I need someone who can actually get the job done!"
      - wait 2
      - narrate "Your Global Reputation must be at least 5 or your Frontier's Folly Reputation at least 10 to start this quest." 
      - narrate "Your current Global Reputation is <yaml[<player.uuid>].read[GlobalReputation]> and your Frontier's Folly Reputation is <yaml[<player.uuid>].read[FrontFollyReputation]>"
      - queue clear
      }
    - if <yaml[<player.uuid>].read[ActiveQuests].contains[FindTheIronThievesQ].not> {
      - yaml id:<player.uuid> set ActiveQuests.FindTheIronThievesQ.Act:0
      - inventory close
      - narrate "Smitty: Those thieves are still out there, profittin' off of my property! I bet that scoundrel Rocco inside the Mining Company knows something. Go talk to him, find those bastards and get my shipment back!"
      - wait 2
      - narrate "Your journal has been updated."
      } else {
      - if <yaml[<player.uuid>].read[KeyItems].contains[SmittysShipmentIt].not> {
        - inventory close
        - narrate "Smitty: What're you lolly gaggin' 'round here for? Where's my shipment?!"
        - queue clear
        } else {
        - inventory close
        - narrate "Smitty: You found my shipment? Perfect! So who were the fools?"
        - wait 3
        - narrate "Smitty: ... Orks you say? They have been a problem as of late. You're tough kid, that's for sure! Here's a little something extra for the troubles."
        - give money quantity:1000
        - give smittyspecial
        - wait 3
        - narrate "You have completed this quest! Your Reputation in Frontier's Folly increases by 3 and you gain 2 Unsung Reputation points!"
        - yaml id:<player.uuid> set ActiveQuests.FindTheIronThievesQ:!
        - yaml id:<player.uuid> set CompletedQuests.FindTheIronThievesQ.Completed:1
        - flag player SmittyQuests:FoundTheIronThieves
        - yaml id:<player.uuid> set FrontFollyReputation:+:3
        - yaml id:<player.uuid> set UnsungReputation:+:2
        - yaml id:<player.uuid> set ActiveQuests.Total:-:1
        - yaml id:<player.uuid> set CompletedQuests.Total:+:1
        - yaml savefile:/PlayerData/<def[value].uuid>.yml id:<def[value].uuid>
        }
      }

#Inventory items: Get Smitty Some Iron#
GetSmittySomeIronIt:
  type: item
  material: writable_book
  display name: My order of ingots is late!
  lore:
  - "I have an important order"
  - "for an important customer"
  - "and my Iron shipment is"
  - "late!"
  
GetSmittySomeIronQ:
  type: item
  material: writable_book
  display name: Retrieve Ingots For Smitty.
  lore:
  - "Smitty of Frontier's Folly"
  - "needs help with a late shipment."

#Books: Get Smitty Some Iron#
GetSmittyIronNPC:
  type: book
  title: Get Smitty Some Iron
  signed: true
  text:
  - "I need ya to bring me some iron! My normal supplier is late and I need at least 10 more ingots to finish this order! I'll gladly pay ya $35 an ingot! Ya won't get a better price for iron!"

GetSmittyIronQJ:
  type: book
  title: Get Smitty Some Iron
  signed: true
  text:
  - "Smitty has asked me to retrieve him 10 Iron Ingots in order to complete a commission. Apparently his normal supplier is late."
      
#Inventory Items: Find The Iron Thieves#
FindTheIronThievesIt:
  type: item
  material: writable_book
  display name: Find The Bastards That Took My Iron!
  lore:
  - "Some thieves intercepted my last shipment!"
  - "Someone needs to find them and get back"
  - "what is mine!"

FindTheIronThievesQ:
  type: item
  material: writable_book
  display name: Find The Iron Thieves
  lore:
  - "Smitty has asked me to try"
  - "and find the thieves who"
  - "stole his iron shipment."
  
#Ket Item: Find The Iron Thieves#  
SmittysShipmentIt:
  type: item
  material: iron_ingot
  display name: Smitty's Stolen Shipment of Iron
  lore:
  - "This is a wooden box containing"
  - "the iron ingots the orks stole"
  - "from Smitty's supplier."

#Books: Find The Iron Thieves#  
FindTheIronThievesNPC:
  type: book
  title: Find The Iron Thieves
  signed: true
  text:
  - "I want my iron back! Apparently the supplier's delivery caravan was ransacked by unknown thugs. I need you to go out there and find them!"
  - "If I were you, I would start at the mining company next door. I hear there's a guy named Rocco who hangs out with shady folk. He might know somethin'!"  

FindTheIronThievesQJ:
  type: book
  author: God
  title: Find The Iron Thieves
  signed: true
  text:
  - "Smitty has asked me to try and find the thieves who intercepted his iron shipment. Smitty suggested I start by finding Rocco who works at the Lightfoot Mining Company and see if he knows anything."

#Reward Item: Find The Iron Thieves#
SmittySpecialIt:
  type: item
  display name: Smitty Special
  material: iron_sword
  lore:
  - "A beautiful blade forged by the"
  - "blacksmith named Smitty for helping"
  - "him find some thieves."
  - "(Socket)"
  - "(Socket)"



RawRaw



Pastes made: 66664