###NPC Assignment### BasicBlacksmithasn: type: assignment actions: on assignment: - trigger name:click state:true - trigger name:chat state:true radius:5 on chat: - if == !Armor { - narrate "Take a look at my wears. Various armorment to keep you safe!" - wait 1 - inventory open d:in@BlackSmithArmorInv } - if == !Arms { - narrate "Gonna end up in a scrape or two? Check out our selection of weapons!" - wait 1 - inventory open d:in@BlacksmithWeaponsInv } - if == !Tools { - narrate "Have a project that needs doin'? We have everything you need!" - wait 1 - inventory open d:in@BlacksmithToolsInv } on click: - narrate "Take a look at my wears. Various armorment to keep you safe!" - wait 1 - inventory open d:in@BlacksmithArmorInv ###Shop Inventories and Items### BlacksmithWeaponsInv: type: inventory title: Arms For Sale size: 27 slots: - "[i@ISword] [i@GSword] [i@DSword] [] [] [] [] [] []" - "[i@BowShop] [i@ArrowShop] [] [] [] [] [] [] []" - "[] [] [] [] [] [] [i@BlacksmithToolsIt] [i@BlacksmithArmorIt] [i@RepairIt]" BlacksmithArmorInv: type: inventory title: Armor For Sale size: 27 slots: - "[] [] [] [] [] [] [] [] []" - "[] [] [] [] [] [] [] [] []" - "[] [] [] [] [] [] [i@BlacksmithToolsIt] [i@BlacksmithWeaponsIt] [i@RepairIt]" BlacksmithToolsInv: type: inventory title: Tools For Sale size: 27 slots: - "[] [] [] [] [] [] [] [] []" - "[] [] [] [] [] [] [] [] []" - "[] [] [] [] [] [] [i@BlacksmithArmorIt] [i@BlacksmithWeaponsIt] [i@RepairIt]" ###Menu Items### BlacksmithWeaponsIt: type: item material: diamond_sword display name: Weapons lore: - "Click here to browse" - "our selection of arms." BlacksmithArmorIt: type: item material: diamond_chestplate display name: Armor lore: - "Click here to browse" - "our selection of armor." BlacksmithToolsIt: type: item material: crafting_table display name: Tools lore: - "Click here to browse" - "our selection of tools" RepairIt: type: item material: anvil display name: Repair Item lore: - "Click here to repair" - "the item currently in" - "your hand." ###Weapons### ISword: type: item material: iron_sword display name: Iron Sword lore: - "Click here to purchase" - "a Iron Sword." - "Cost: 100" GSword: type: item material: golden_sword display name: Gold Sword lore: - "Click here to purchase" - "a Gold Sword." - "Cost: 1000" DSword: type: item material: diamond_sword display name: Diamond Sword lore: - "Click here to purchase" - "a Diamond Sword." - "Cost: 2500" BowShop: type: item material: bow display name: Bow lore: - "Click here to purchase" - "a bow." - "Cost: 100" ArrowShop: type: item material: arrow display name: Arrows lore: - "Click here to purchase" - "a bundle of 32 arrows." - "Cost: 50" ###Armor### IChestPlate: type: item material: iron_chestplate display name: Iron Chestplate lore: - "Click here to purchase" - "an Iron Chest Plate." - "Cost: " ###Shop Inventory Handler:### BasicBlacksmithHandler: type: world events: on player clicks in BlackSmithArmorInv: - determine cancelled on player drags in BlackSmithArmorInv: - determine cancelled on player clicks in BlacksmithWeaponsInv: - determine cancelled on player drags in BlacksmithWeaponsInv: - determine cancelled on player clicks in BlacksmithToolsInv: - determine cancelled on player drags in BlacksmithToolsInv: - determine cancelled on player clicks BlacksmithWeaponsIt in BlacksmithArmorInv ignorecancelled:true: - inventory close - inventory open d:in@BlacksmithWeaponsInv on player clicks BlacksmithArmorIt in BlacksmithWeaponsInv ignorecancelled:true: - inventory close - inventory open d:in@BlacksmithArmorInv on player clicks BlacksmithArmorIt in BlacksmithToolsInv ignorecancelled:true: - inventory close - inventory open d:in@BlacksmithArmorInv on player clicks BlacksmithWeaponsIt in BlacksmithToolsInv ignorecancelled:true: - inventory close - inventory open d:in@BlacksmithWeaponsInv on player clicks BlacksmithToolsIt in BlacksmithArmorInv ignorecancelled:true: - inventory close - inventory open d:in@BlacksmithToolsInv on player clicks BlacksmithToolsIt in BlacksmithWeaponsInv ignorecancelled:true: - inventory close - inventory open d:in@BlacksmithToolsInv ###Repair Handler### on player clicks RepairIt in BlacksmithArmorInv: - if >= "100" && != null { - money take quantity:100 - adjust durability:0 save:newitem - take iteminhand - give - narrate "<&o>$100 has been deducted from your balance." } else { - inventory close - narrate "You need to fix your wallet before I can fix your items." } on player clicks RepairIt in BlacksmithWeaponsInv: - if >= "100" && != null { - money take quantity:100 - adjust durability:0 save:newitem - take iteminhand - give - narrate "<&o>$100 has been deducted from your balance." } else { - inventory close - narrate "You need to fix your wallet before I can fix your items." } on player clicks RepairIt in BlacksmithToolsInv: - if >= "100" && != null { - money take quantity:100 - adjust durability:0 save:newitem - take iteminhand - give - narrate "<&o>$100 has been deducted from your balance." } else { - inventory close - narrate "You need to fix your wallet before I can fix your items." } ###Weapons Handler### on player clicks ISword in BlacksmithWeaponsInv: - if >= "100" { - money take quantity:100 - narrate "A quality and reliable blade!" - narrate "<&o>$100 has been deducted from your balance." } else { - inventory close - narrate "No coin, no sword." } on player clicks GSword in BlacksmithWeaponsInv: - if >= "1000" { - money take quantity:1000 - narrate "A bit brittle, but the sharpest you'll find!" - narrate "<&o>$1000 has been deducted from your balance." } else { - inventory close - narrate "No coin, no sword." } on player clicks DSword in BlacksmithWeaponsInv: - if >= "2500" { - money take quantity:2500 - narrate "Insanely durable and a bit heavy. This won't fail you!" - narrate "<&o>$2500 has been deducted from your balance." } else { - inventory close - narrate "No coin, no sword." } on player clicks BowShop in BlacksmithWeaponsInv: - if >= "100" { - money take quantity:100 - narrate "Looking to keep your distance or do a little hunting?" - narrate "<&o>$100 has been deducted from your balance." } else { - inventory close - narrate "No coin, no pew." } on player clicks ArrowShop in BlacksmithWeaponsInv: - if >= "50" { - money take quantity:50 - narrate "Guaranteed to stick anything you have the skill to hit." - narrate "<&o>$50 has been deducted from your balance." } else { - inventory close - narrate "No coin, no pew." } ###Armor Handler###