mSurvivalShopCommand: type: command name: shop usage: /shop description: opens a shop gui script: - inventory open d:mSurvivalShop mSurvivalShop: type: inventory debug: false title: Shop size: 54 procedural items: - determine definitions: filler: gray_stained_glass_pane slots: - "[filler] [filler] [filler] [filler] [questionmark] [filler] [filler] [filler] [filler]" - "[filler] [filler] [filler] [filler] [filler] [filler] [filler] [filler] [filler]" - "[filler] [] [] [] [] [] [] [] [filler]" - "[filler] [] [] [] [] [] [] [] [filler]" - "[filler] [filler] [filler] [] [] [] [filler] [filler] [filler]" - "[filler] [filler] [filler] [filler] [filler] [filler] [filler] [filler] [filler]" questionmark: type: item debug: false material: "i@player_head[display_name=<&f><&l>How to use;skull_skin=Jep|eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYmFkYzA0OGE3Y2U3OGY3ZGFkNzJhMDdkYTI3ZDg1YzA5MTY4ODFlNTUyMmVlZWQxZTNkYWYyMTdhMzhjMWEifX19|wot]" lore: - "<&e>Left-click <&f>to buy" - "<&e>Shift Left-click <&f>to buy 32x" - "" - "<&e>Right-click <&f>to sell" - "<&e>Shift Right-click <&f>to sell 32x" price: 1000 mSurvivalShopEvent: type: world debug: false events: on player opens mSurvivalShop: - playsound sound:BLOCK_CHEST_OPEN volume:0.5 on player closes mSurvivalShop: - playsound sound:BLOCK_CHEST_OPEN volume:0.5 pitch:0.8 on player drags in mSurvivalShop: - determine cancelled on player clicks in mSurvivalShop: - if != in@mSurvivalShop: - determine cancelled - if == i@gray_stained_glass_pane: - determine cancelled - determine cancelled passively - choose : - case "LEFT": - playsound sound:BLOCK_STONE_BUTTON_CLICK_ON volume:0.5 - if >= : - narrate "You bought <&9> <&f>for <&9>$" - take money quantity: - give - else: - narrate "<&c>You don't have enough money to buy " - case "RIGHT": - playsound sound:BLOCK_STONE_BUTTON_CLICK_ON volume:0.5 pitch:0.8 - if ]>: - take - narrate "You sold <&9> <&f>for <&9>$" - give money quantity: - else: - narrate "<&c>You don't have in your inventory" - case "SHIFT_LEFT": - playsound sound:BLOCK_STONE_BUTTON_CLICK_ON volume:0.5 - if >= : - narrate "You bought <&9>32x <&f>of <&9> <&f>for <&9>$" - take money quantity: - give quantity:32 - else: - narrate "<&c>You don't have enough money to buy 32x of " - case "SHIFT_RIGHT": - playsound sound:BLOCK_STONE_BUTTON_CLICK_ON volume:0.5 pitch:0.8 - if ].quantity[32]>: - take quantity:32 - narrate "You sold 32 of <&9> <&f>for <&9>$" - give money quantity: - else: - narrate "<&c>You don't have in your inventory" - default: - narrate "<&c>Please follow the instructions" mSurvivalShopList: type: yaml data items: - mBread - mApple - mStone #- mDirt - mSand - mGravel - mGrassBlock - mOakLog - mCoal - mRedstone - mIronIngot - mGoldIngot - mLapisLazuli - mBow - mIronSword - mIronAxe - mIronPickAxe ######################### # # item: # type: item # debug: false # material: i@stone # lore: # - <&7>Price: <&e>$ # - <&7>Sell price: <&e>$ # price: # ######################### mBread: type: item debug: false material: bread lore: - test - <&7>Price: <&e>$ - <&7>Sell price: <&e>$ price: 15 mApple: type: item debug: false material: apple lore: - <&7>Price: <&e>$ - <&7>Sell price: <&e>$ price: 20 mStone: type: item debug: false material: stone lore: - <&7>Price: <&e>$ - <&7>Sell price: <&e>$ price: 30 mSand: type: item debug: false material: sand lore: - <&7>Price: <&e>$ - <&7>Sell price: <&e>$ price: 35 mGravel: type: item debug: false material: gravel lore: - <&7>Price: <&e>$ - <&7>Sell price: <&e>$ price: 35 mDirt: type: item debug: false material: dirt lore: - <&7>Price: <&e>$ - <&7>Sell price: <&e>$ price: 25 mGrassBlock: type: item debug: false material: grass_block lore: - <&7>Price: <&e>$ - <&7>Sell price: <&e>$ price: 40 mOakLog: type: item debug: false material: oak_log lore: - <&7>Price: <&e>$ - <&7>Sell price: <&e>$ price: 30 mCoal: type: item debug: false material: coal lore: - <&7>Price: <&e>$ - <&7>Sell price: <&e>$ price: 25 mRedstone: type: item debug: false material: redstone lore: - <&7>Price: <&e>$ - <&7>Sell price: <&e>$ price: 50 mIronIngot: type: item debug: false material: iron_ingot lore: - <&7>Price: <&e>$ - <&7>Sell price: <&e>$ price: 120 mGoldIngot: type: item debug: false material: gold_ingot lore: - <&7>Price: <&e>$ - <&7>Sell price: <&e>$ price: 100 mLapisLazuli: type: item debug: false material: lapis_lazuli lore: - <&7>Price: <&e>$ - <&7>Sell price: <&e>$ price: 200 mBow: type: item debug: false material: bow lore: - <&7>Price: <&e>$ - <&7>Sell price: <&e>$ price: 60 mIronSword: type: item debug: false material: iron_sword lore: - <&7>Price: <&e>$ - <&7>Sell price: <&e>$ price: 40 mIronAxe: type: item debug: false material: iron_axe lore: - <&7>Price: <&e>$ - <&7>Sell price: <&e>$ price: 50 mIronPickAxe: type: item debug: false material: iron_pickaxe lore: - <&7>Price: <&e>$ - <&7>Sell price: <&e>$ price: 70