################## ##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 { - queue clear } - determine #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 { - if && ].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: set Jobs.FrontFolly.SmittyAssistant.ShiftsWorked:0 - yaml id: set UnsungReputation:+:1 - yaml id: set FrontFollyReputation:+:1 - queue clear } } - if ].read[Jobs].contains[SmittyAssistant]> { - if { - 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 ." } - if <= 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 ].read[Jobs.FrontFolly.SmittyAssistant.ShiftsWorked]> == 0 { - flag player SmittyAssistantShift Duration:24h - wait 2 - cast BLINDNESS d:5s - playsound sound:BLOCK_ANVIL_USE - wait 4 - adjust 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: set Jobs.FrontFolly.SmittyAssistant.ShiftsWorked:+:1 - queue clear } else { - if ].read[Jobs.FrontFolly.SmittyAssistant.ShiftsWorked].is[MORE].to[19]> && { - 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 d:5s - playsound sound:BLOCK_ANVIL_USE - wait 4 - adjust food_level:5 - if { - narrate "Tired, but satisfied you complete your shift with Smitty. For your work you receive: $!" - money give quantity: - yaml id: 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: 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 { - flag player SmittyQuests:GetSmittySomeIronIt } - inventory open d:in@SmittyQuestsInv ############################# #Quest: Get Smitty Some Iron# ############################# on player clicks GetSmittySomeIronIt in SmittyQuestsInv: - determine passively cancelled - if && { - inventory close - yaml id: 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: set ActiveQuests.FindTheIronThievesQ:! - yaml id: set CompletedQuests.GetSmittySomeIronQ.Completed:0 - yaml id: set CompletedQuests.FindTheIronThievesQ.Completed:0 - flag player SmittyQuests:FoundTheIronThieves - yaml id: set FrontFollyReputation:+:4 - yaml id: set ActiveQuests.Total:-:1 - yaml id: set CompletedQuests.Total:+:2 - yaml id: set UnsungReputation:+:2 - yaml savefile:/PlayerData/.yml id: - queue clear } - if ].read[ActiveQuests].contains[GetSmittySomeIronQ].not> { - yaml id: set ActiveQuests.GetSmittySomeIronQ.Act:1 - yaml id: set ActiveQuests.Total:+:1 - yaml savefile:/PlayerData/.yml id: - inventory close - adjust fake_equipment:|off_hand|i@GetSmittyIronNPC - adjust open_offhand_book - adjust fake_equipment: - narrate "Your journal has been updated." - queue clear } - if ].read[ActiveQuests].contains[GetSmittySomeIronQ]> { - if { - 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: set ActiveQuests.GetSmittySomeIronQ:! - yaml id: set CompletedQuests.GetSmittySomeIronQ.Completed:0 - flag player SmittyQuests:FindTheIronThievesIt - yaml id: set FrontFollyReputation:+:1 - yaml id: set ActiveQuests.Total:-:1 - yaml id: set CompletedQuests.Total:+:1 - yaml savefile:/PlayerData/.yml id: } 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 || ].read[ActiveQuests].contains[i@GetSmittySomeIronQ]> { - adjust i@GetSmittyIronQJ book: save:GetSmittyIronQJ - inventory close - adjust fake_equipment:|off_hand| - adjust open_offhand_book - adjust fake_equipment: } - inventory close - adjust fake_equipment:|off_hand|i@GetSmittyIronQJ - adjust open_offhand_book - adjust fake_equipment: ############################## #Quest: Find The Iron Thieves# ############################## on player enters OrkCamp: - if { - narrate "You find a foul smelling camp built into a small cave." - flag player FrontFollyOrkCamp } on player right clicks chest in FrontFollyOrkCamp: - if { - 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: set KeyItems:->:SmittysShipmentIt - flag player FoundTheIronThieves - yaml id: 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 { - 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: set KeyItems:->:SmittysShipmentIt - flag player FoundTheIronThieves - yaml id: 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 && { - 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: set ActiveQuests.FindTheIronThievesQ.Act:2 - yaml id: 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 ].read[ActiveQuests.FindTheIronThievesQ.Act].is[==].to[0]> { - adjust i@FindTheIronThievesQJ book: save:FindTheIronThievesQJ } - if ].read[ActiveQuests.FindTheIronThievesQ.Act].is[==].to[1]> { - adjust book: save:FindTheIronThievesQ } - if ].read[ActiveQuests.FindTheIronThievesQ.Act].is[==].to[2]> { - adjust book: save:FindTheIronThievesQ } - if ].read[ActiveQuests.FindTheIronThievesQ.Act].is[==].to[3]> { - adjust book: save:FindTheIronThievesQ } - inventory close - adjust fake_equipment:|off_hand| - adjust open_offhand_book - adjust fake_equipment: - queue clear - inventory close - adjust fake_equipment:|off_hand|i@FindTheIronThievesQJ - adjust open_offhand_book - adjust fake_equipment: on player clicks FindTheIronThievesIt in SmittyQuestsInv: - determine passively cancelled - if ].read[GlobalReputation]> < 5 || ].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 ].read[GlobalReputation]> and your Frontier's Folly Reputation is ].read[FrontFollyReputation]>" - queue clear } - if ].read[ActiveQuests].contains[FindTheIronThievesQ].not> { - yaml id: 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 ].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: set ActiveQuests.FindTheIronThievesQ:! - yaml id: set CompletedQuests.FindTheIronThievesQ.Completed:1 - flag player SmittyQuests:FoundTheIronThieves - yaml id: set FrontFollyReputation:+:3 - yaml id: set UnsungReputation:+:2 - yaml id: set ActiveQuests.Total:-:1 - yaml id: set CompletedQuests.Total:+:1 - yaml savefile:/PlayerData/.yml id: } } #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)"