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.

Need help with conditions

Discussion in 'Skript' started by claytyne, Sep 22, 2020.

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

    claytyne Member

    Joined:
    May 12, 2020
    Messages:
    26
    Likes Received:
    0
    i need a help with my /home command. i want to it charge 5 coins. It teleports you if you enough, but it doesn't remove the coins.

    here's the code:

    Code (Text):
    1. command /home:
    2.     description: Teleport yourself to your home
    3.     trigger:
    4.         if {home.%player%} is not set:
    5.             play sound "block.note_block.bass" to player
    6.             message "&cYou have not set your home yet!"
    7.             stop
    8.  
    9.         if player has 5 gold nuggets named "&6&l&oCoin":
    10.             teleport player to {home.%player%}
    11.             play sound "entity.experience_orb.pickup" to player
    12.             remove 5 gold nugget named "&6&l&Coin" from player's inventory
    13.         else:
    14.             message "&cYou don't have enough coins!"
    15.             play sound "block.note_block.bass" to player
     
  2. Runakai

    Supporter

    Joined:
    Apr 27, 2018
    Messages:
    497
    Likes Received:
    31
    mc version and skript version?
     
  3. emperorofwater

    Joined:
    Oct 28, 2019
    Messages:
    24
    Likes Received:
    0
    Code (Text):
    1. command /home:
    2.     description: Teleport yourself to your home
    3.     trigger:
    4.         if {home.%player%} is not set:
    5.             play sound "block.note_block.bass" to player
    6.             message "&cYou have not set your home yet!"
    7.             stop
    8.  
    9.         if player has 5 gold nuggets named "&6&l&oCoin":
    10.             teleport player to {home.%player%}
    11.             play sound "entity.experience_orb.pickup" to player
    12.             remove 5 gold nuggets named "&6&l&Coin" from player
    13.         else:
    14.             message "&cYou don't have enough coins!"
    15.             play sound "block.note_block.bass" to player
    This should work
     
  4. claytyne

    claytyne Member

    Joined:
    May 12, 2020
    Messages:
    26
    Likes Received:
    0
    thanks!
     
  5. Skoll

    Skoll Active Member

    Joined:
    Sep 2, 2020
    Messages:
    65
    Likes Received:
    6
    Won't work.
    The first name in the code is "&6&l&oCoin", and the second is "&6&l&Coin"
     
Thread Status:
Not open for further replies.

Share This Page

Loading...