Why can't I format my shop?

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

oHeckGage

Active Member
Mar 24, 2020
110
6
18
22
It doesn't matter about the to do nothing part I just need to know why it won't work:

Code:
command /seeds:
  trigger:
    open virtual chest named "&aSeeds Shop" to player
    format slot 10 of player's current inventory to a coal named "&8Coal &aSeeds" to do nothing

(The part that doesn't work is the formatting part of the shop)
 
This format works, although you can take it out of the inventory, it's not too hard to stop that from happening.

Code:
command /seeds:
    trigger:
        open chest with 6 rows named "&aSeeds Shop" to player
        wait 1 tick
        set slot 10 of player's current inventory to coal named "&8Coal &aSeeds"
 
Code:
command /seeds:
  trigger:
    open virtual chest inventory with size 3 named "&aSeeds Shop" to player
    format slot 10 of player with coal named "&8Coal &aSeeds" to do nothing
 
This format works, although you can take it out of the inventory, it's not too hard to stop that from happening.

Code:
command /seeds:
    trigger:
        open chest with 6 rows named "&aSeeds Shop" to player
        wait 1 tick
        set slot 10 of player's current inventory to coal named "&8Coal &aSeeds"
I have already tried that and it works apart from the fact that I want it to give you things but I already know how to do that
 
If you're making a shop skript:

Code:
Command /seeds:
    trigger:
        open virtual chest inventory with size 3 named "&aSeeds Shop" to player
        format gui slot 10 of player with coal named "&8Coal &aSeeds" to run:
            if player's balance is more than or equal to 10:
                take 10 from player's balance
                give player 1 coal named "&8Coal &aSeeds"
                send "&aYou bought x1 &8Coal &aSeeds!"
 
This format works, although you can take it out of the inventory, it's not too hard to stop that from happening.

Code:
command /seeds:
    trigger:
        open chest with 6 rows named "&aSeeds Shop" to player
        wait 1 tick
        set slot 10 of player's current inventory to coal named "&8Coal &aSeeds"
It pops up errors for me, although I want the end to be
Code:
 format slot 10 of player with coal named "&8Coal &aSeeds" to close then run [execute player command "coalseed %player%"]
[doublepost=1585143157,1585143127][/doublepost]
If you're making a shop skript:

Code:
Command /seeds:
    trigger:
        open virtual chest inventory with size 3 named "&aSeeds Shop" to player
        format gui slot 10 of player with coal named "&8Coal &aSeeds" to run:
            if player's balance is more than or equal to 10:
                take 10 from player's balance
                give player 1 coal named "&8Coal &aSeeds"
                send "&aYou bought x1 &8Coal &aSeeds!"
Thanks I will try it!
 
  • Like
Reactions: Potato
It pops up errors for me, although I want the end to be
Code:
 format slot 10 of player with coal named "&8Coal &aSeeds" to close then run [execute player command "coalseed %player%"]
[doublepost=1585143157,1585143127][/doublepost]
Thanks I will try it!
if "Take 10 from player's balance" doesnt work try doing "remove 10 from player's balance"
 
if "Take 10 from player's balance" doesnt work try doing "remove 10 from player's balance"
I already did it "take" didn't work so I tried remove and it worked but how should I make iron as coal replaced with iron ingot doesn't work for some reason
 
What do you mean?


So I am trying to make custom seeds (I can give you my custom seeds skript) and I want it so you can buy these seeds.
When I copy and paste the coal seed format it works apart from at the top, the actual formatting part, when I format it to be an iron ingot, it doesn't work.

Here is the code:
Code:
Command /seeds:
    trigger:
        open virtual chest inventory with size 3 named "&aSeeds Shop" to player
        format gui slot 10 of player with coal named "&8Coal &aSeeds" to run:
            if player's balance is more than or equal to 1000:
                remove 1000 from player's balance
                give player 1 wheat seed named "&8Coal &aSeed"
                send "&aYou bought x1 &8Coal &aSeed!"
        format gui slot 12 of player with iron ingot named "&7Iron &aSeeds" to run:
            if player's balance is more than or equal to 10000:
                remove 10000 from player's balance
                give player 1 wheat seed named "&7Iron &aSeed"
                send "&aYou bought x1 &7Iron &aSeed"
Wait actually I might of found the problem
Yup so instead of with iron ingot it should've been with an iron ingot
[doublepost=1585150963,1585150517][/doublepost]
What do you mean?
Also I have another question how do I make it so you can't steal the things because I tried to close then run: and it doesn't work for some reason
 
So I am trying to make custom seeds (I can give you my custom seeds skript) and I want it so you can buy these seeds.
When I copy and paste the coal seed format it works apart from at the top, the actual formatting part, when I format it to be an iron ingot, it doesn't work.

Here is the code:
Code:
Command /seeds:
    trigger:
        open virtual chest inventory with size 3 named "&aSeeds Shop" to player
        format gui slot 10 of player with coal named "&8Coal &aSeeds" to run:
            if player's balance is more than or equal to 1000:
                remove 1000 from player's balance
                give player 1 wheat seed named "&8Coal &aSeed"
                send "&aYou bought x1 &8Coal &aSeed!"
        format gui slot 12 of player with iron ingot named "&7Iron &aSeeds" to run:
            if player's balance is more than or equal to 10000:
                remove 10000 from player's balance
                give player 1 wheat seed named "&7Iron &aSeed"
                send "&aYou bought x1 &7Iron &aSeed"
Wait actually I might of found the problem
Yup so instead of with iron ingot it should've been with an iron ingot
[doublepost=1585150963,1585150517][/doublepost]
Also I have another question how do I make it so you can't steal the things because I tried to close then run: and it doesn't work for some reason

Wierd, what version of skript are you using?
[doublepost=1585155624][/doublepost]Add me on discord, so we can discuss there. Potato #2997
 
Status
Not open for further replies.