1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Why can't I format my shop?

Discussion in 'Skript' started by oHeckGage, Mar 25, 2020.

Thread Status:
Not open for further replies.
  1. oHeckGage

    oHeckGage Active Member

    Joined:
    Mar 24, 2020
    Messages:
    105
    Likes Received:
    5
    It doesn't matter about the to do nothing part I just need to know why it won't work:

    Code (Text):
    1.  
    2. command /seeds:
    3.   trigger:
    4.     open virtual chest named "&aSeeds Shop" to player
    5.     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)
     
  2. Selvati

    Selvati Active Member

    Joined:
    Jun 26, 2017
    Messages:
    190
    Likes Received:
    9
    This format works, although you can take it out of the inventory, it's not too hard to stop that from happening.

    Code (Text):
    1. command /seeds:
    2.     trigger:
    3.         open chest with 6 rows named "&aSeeds Shop" to player
    4.         wait 1 tick
    5.         set slot 10 of player's current inventory to coal named "&8Coal &aSeeds"
     
  3. Potato

    Potato Active Member

    Joined:
    Feb 24, 2020
    Messages:
    57
    Likes Received:
    0
    Code (Text):
    1.  
    2. command /seeds:
    3.   trigger:
    4.     open virtual chest inventory with size 3 named "&aSeeds Shop" to player
    5.     format slot 10 of player with coal named "&8Coal &aSeeds" to do nothing
     
  4. oHeckGage

    oHeckGage Active Member

    Joined:
    Mar 24, 2020
    Messages:
    105
    Likes Received:
    5
    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
     
  5. Potato

    Potato Active Member

    Joined:
    Feb 24, 2020
    Messages:
    57
    Likes Received:
    0
    If you're making a shop skript:

    Code (Text):
    1. Command /seeds:
    2.     trigger:
    3.         open virtual chest inventory with size 3 named "&aSeeds Shop" to player
    4.         format gui slot 10 of player with coal named "&8Coal &aSeeds" to run:
    5.             if player's balance is more than or equal to 10:
    6.                 take 10 from player's balance
    7.                 give player 1 coal named "&8Coal &aSeeds"
    8.                 send "&aYou bought x1 &8Coal &aSeeds!"
     
  6. oHeckGage

    oHeckGage Active Member

    Joined:
    Mar 24, 2020
    Messages:
    105
    Likes Received:
    5
    It pops up errors for me, although I want the end to be
    Code (Text):
    1.  format slot 10 of player with coal named "&8Coal &aSeeds" to close then run [execute player command "coalseed %player%"]
    --- Double Post Merged, Mar 25, 2020, Original Post Date: Mar 25, 2020 ---
    Thanks I will try it!
     
    • Like Like x 1
  7. Potato

    Potato Active Member

    Joined:
    Feb 24, 2020
    Messages:
    57
    Likes Received:
    0
    if "Take 10 from player's balance" doesnt work try doing "remove 10 from player's balance"
     
  8. oHeckGage

    oHeckGage Active Member

    Joined:
    Mar 24, 2020
    Messages:
    105
    Likes Received:
    5
    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
     
  9. Potato

    Potato Active Member

    Joined:
    Feb 24, 2020
    Messages:
    57
    Likes Received:
    0
    What do you mean?
     
  10. oHeckGage

    oHeckGage Active Member

    Joined:
    Mar 24, 2020
    Messages:
    105
    Likes Received:
    5

    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 (Text):
    1.  
    2. Command /seeds:
    3.     trigger:
    4.         open virtual chest inventory with size 3 named "&aSeeds Shop" to player
    5.         format gui slot 10 of player with coal named "&8Coal &aSeeds" to run:
    6.             if player's balance is more than or equal to 1000:
    7.                 remove 1000 from player's balance
    8.                 give player 1 wheat seed named "&8Coal &aSeed"
    9.                 send "&aYou bought x1 &8Coal &aSeed!"
    10.         format gui slot 12 of player with iron ingot named "&7Iron &aSeeds" to run:
    11.             if player's balance is more than or equal to 10000:
    12.                 remove 10000 from player's balance
    13.                 give player 1 wheat seed named "&7Iron &aSeed"
    14.                 send "&aYou bought x1 &7Iron &aSeed"
    15.  
    Wait actually I might of found the problem
    Yup so instead of with iron ingot it should've been with an iron ingot
    --- Double Post Merged, Mar 25, 2020, Original Post Date: Mar 25, 2020 ---
    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
     
  11. Potato

    Potato Active Member

    Joined:
    Feb 24, 2020
    Messages:
    57
    Likes Received:
    0
    Wierd, what version of skript are you using?
    --- Double Post Merged, Mar 25, 2020 ---
    Add me on discord, so we can discuss there. Potato #2997
     
  12. oHeckGage

    oHeckGage Active Member

    Joined:
    Mar 24, 2020
    Messages:
    105
    Likes Received:
    5
    Ok I sent a friend request
     
Thread Status:
Not open for further replies.

Share This Page

Loading...