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.

Solved Sell (item) for essentials money?

Discussion in 'Skript' started by EthanCW, Mar 17, 2019.

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

    EthanCW New Member

    Joined:
    Mar 16, 2019
    Messages:
    5
    Likes Received:
    0
    I made a skript where it's essentially a cookie clicker skript with a custom currency as {cookies}. I want the players to be able to do /sellcookies in order to get essentials money. 1 cookie = 1$

    Sell Cookies Skript:

    Code (Text):
    1. command /sellcookies:
    2.     permission: cookies.sell
    3.     permission message: &4Oh no, you can't sell cookies! Inform an admin.
    4.     trigger:
    5.         add {cookies} to {Money::%player%} # <-- Right here
    6.         wait 1 seconds
    7.         set {balance::%player%} to 0
    Balance Skript:

    Code (Text):
    1. command /cookies [<player>]:
    2.     permission: cookies.accessbal
    3.     permission message: &4Oh no, you dont have access! Inform an admin.
    4.     trigger:
    5.         if arg-1 is not set:
    6.             send "&7Currently, you have &6%{balance::%player%}% &7cookies."
    7.         else:
    8.             send "&7%arg 1% has &6%{balance::%player%}% &7cookies."
     
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    232
    what is your question?
     
  3. EthanCW

    EthanCW New Member

    Joined:
    Mar 16, 2019
    Messages:
    5
    Likes Received:
    0
    Can you exchange cookies for essentials money or custom currency from another skript?
     
  4. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    232
    Yes, just add to the balance of the player
    Money
     
  5. Ierdyr

    Ierdyr Member

    Joined:
    Mar 18, 2019
    Messages:
    14
    Likes Received:
    0
    IDK if this could help but you have a line that says “wait 1 seconds”
    I think it’s “Wait 1 second”
     
  6. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    232
    both work
     
Thread Status:
Not open for further replies.

Share This Page

Loading...