Jump to content

Pls Fix


SlimeFroster

Recommended Posts

command /ShopTest123:
    trigger:
        set {_gui} to a new chest inventory with 3 row with name "&6&lChoose The Shop!"
        set slot 11 of {_gui} to stone with name "&b&lBuyShop!"
        set slot 15 of {_gui} to grass with name "&2&lSellShop!"
        set slot 22 of {_gui} to barrier with name "&c&lExit."
        open {_gui} to player
 
on inventory click:
    if name of event-inventory is "&6&lChoose The Shop!":
        if index of event-slot = 11:
            close player's inventory
            wait 5 ticks
            set {_gui} to a new chest inventory with 5 row with name "&b&lBuyShop!"
            set slot 44 of {_gui} to barrier with name "&c&lExit"                           # Prices
            set slot 36 of {_gui} to barrier with name "&c&lExit"
            set slot 40 of {_gui} to paper with name "&f&lPage 0/1"
            set slot 31 of {_gui} to spawner with name "&d&lSpawners."
            open {_gui} to player
on inventory click:
    if name of event-inventory is "&6&lChoose The Shop!":
        if index of event-slot = 15:
            close player's inventory
            wait 5 ticks
            set {_gui} to a new chest inventory with 5 row with name "&2&lSellShop!"
            set slot 44 of {_gui} to barrier with name "&c&lExit"
            set slot 36 of {_gui} to barrier with name "&c&lExit"
            set slot 40 of {_gui} to paper with name "&7&lPage 0/1"
            set slot 0 of {_gui} to dirt with name "&2&l$0.1"
            set slot 1 of {_gui} to grass with name "&2&l$0.4"                   # Prices
            set slot 2 of {_gui} to coarse dirt with name "&2&l$0.15"
            set slot 3 of {_gui} to cobblestone with name "&2&l$0.2"
            set slot 4 of {_gui} to stone with name "&2&l$0.5"            
            open {_gui} to player
on inventory click:                
    if name of event-inventory is "&6&lChoose The Shop!":
        if index of event-slot = 22:
            close player's inventory
            send "&2&lShop | Closed &6&lChoose The Shop!"
on inventory click:
    if name of event-inventory is "&b&lBuyShop!":
        if index of event-slot = 44:
            close player's inventory
            send "&2&lShop | Closed &b&lBuyShop."
on inventory click:
    if name of event-inventory is "&2&lSellShop!":
        if index of event-slot = 44:
            close player's inventory
            send "&2&lShop | Closed SellShop."
on inventory click:
    if name of event-inventory is "&b&lBuyShop!":
        if index of event-slot = 36:
            close player's inventory
            send "&2&lShop | Closed &b&lBuyShop."
on inventory click:
    if name of event-inventory is "&2&lSellShop!":                   # barriers
        if index of event-slot = 36:
            close player's inventory
            send "&2&lShop | Closed SellShop."
on inventory click:
    if name of event-inventory is "&b&lBuyShop!":
        if index of event-slot = 40:
            cancel event
on inventory click:
    if name of event-inventory is "&2&lSellShop!":
        if index of event-slot = 40:
            cancel event
on inventory click:
    if name of event-inventory is "&2&lSellShop!":
        if index of event-slot = 0:
            if player has dirt:
                remove 1 dirt from player's inventory
                add 0.1 to player's balance
                send "&2&lShop | SuccessFully Gave You $0.1."
            else:
                send "&2&lShop | Get More Dirt!"
on inventory click:                                           # give money
    if name of event-inventory is "&2&lSellShop!":
        if index of event-slot = 0:
            cancel event
on inventory click:
    if name of event-inventory is "&2&lSellShop!":
        if index of event-slot = 1:
            if player has grass:
                remove 1 grass from player's inventory
                add 0.4 to player's balance
                send "&2&lShop | SuccessFully Gave You $0.4."
            else:
                send "&2&lShop | Get More Grass!"
on inventory click:
    if name of event-inventory is "&2&lSellShop!":
        if index of event-slot = 1:
            cancel event
on inventory click:
    if name of event-inventory is "&2&lSellShop!":
        if index of event-slot = 2:
            if player has coarse dirt:
                remove 1 coarse dirt from player's inventory
                add 0.15 to player's balance
                send "&2&lShop | SuccessFully Gave You $0.15."
            else:
                send "&2&lShop | Get More coarse dirt!"
on inventory click:
    if name of event-inventory is "&2&lSellShop!":
        if index of event-slot = 2:
            cancel event
on inventory click:
    if name of event-inventory is "&2&lSellShop!":
        if index of event-slot = 3:
            if player has cobblestone:
                remove 1 cobblestone from player's inventory
                add 0.2 to player's balance
                send "&2&lShop | SuccessFully Gave You $0.2."
            else:
                send "&2&lShop | Get More CobbleStone!"
on inventory click:
    if name of event-inventory is "&2&lSellShop!":
        if index of event-slot = 3:
            cancel event
on inventory click:
    if name of event-inventory is "&2&lSellShop!":
        if index of event-slot = 4:
            if player has stone:
                remove 1 stone from player's inventory
                add 0.5 to player's balance
                send "&2&lShop | SuccessFully Gave You $0.5."
            else:
                send "&2&lShop | Get More Stone!"
on inventory click:
    if name of event-inventory is "&2&lSellShop!":
        if index of event-slot = 4:
            cancel event
on inventory click:
    if name of event-inventory is "&b&lBuyShop!":                            # buy shop stuff now
        if index of event-slot = 31:
            close player's inventory
            wait 5 ticks
            set {_gui} to a new chest inventory with 3 row with name "&d&lChoose The Spawner."
            set slot 18 of {_gui} to barrier with name "&c&lExit"
            set slot 26 of {_gui} to barrier with name "&c&lExit"
            set slot 0 of {_gui} to spawner with name "&d&lPig Spawner:" with lore "&2&l$100,000"
            open {_gui} to player
on inventory click:
    if name of event-inventory is "&d&lChoose The Spawner.":
        if index of event-slot = 18:
            close player's inventory
            send "&2&lShop | Closed Spawners Shop."
on inventory click:
    if name of event-inventory is "&d&lChoose The Spawner.":
        if index of event-slot = 26:
            close player's inventory
            send "&2&lShop | Closed Spawners Shop."
on inventory click:
    if name of event-inventory is "&d&lChoose The Spawner.":
        if index of event-slot = 0:
            give player 1 pig spawner
            remove 100000 from player's balance
            send "&2&lShop | SuccessFully Gave You &d&l1 Pig Spawner."
        else:
            send "&2&lShop | Get More Money!"
on inventory click:
    if name of event-inventory is "&d&lChoose The Spawner.":
        if index of event-slot = 0:
            cancel event
Link to comment
Share on other sites

on inventory click:
    if name of event-inventory is "&d&lChoose The Spawner.":
        if index of event-slot = 0:
            give player 1 pig spawner             # dosent give spawner and even if i have less than 100k says successfully bought
            remove 100000 from player's balance
            send "&2&lShop | SuccessFully Gave You &d&l1 Pig Spawner."
        else:
            send "&2&lShop | Get More Money!"
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...