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 Redeem coins with right click

Discussion in 'Skript' started by kamilleon, Dec 30, 2019.

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

    kamilleon Member

    Joined:
    Nov 18, 2017
    Messages:
    48
    Likes Received:
    0
    The one at a time works, but I can't get the all at once to be redeemed to work.

    Any suggestions?

    Code (Text):
    1. on right click with gold nugget:
    2.     if name of player's held item is "&e&lÉrme &7(Jobb Katt)":
    3.         if player is sneaking:
    4.             set {_érem} to amount of gold nugget named "&e&lÉrme &7(Jobb Katt)" in player's inventory
    5.             remove {_érem} of gold nugget from player's inventory
    6.             add {_érem} to {érme::%player%}
    7.         else:
    8.             remove 1 of player's held item from player's held item
    9.             add 1 to {érme::%player%}


     
  2. Best Answer:
    Post #4 by TenToTu Sho, Dec 30, 2019
  3. TenToTu Sho

    TenToTu Sho Member

    Joined:
    Dec 30, 2019
    Messages:
    20
    Likes Received:
    2
    try this:

    Code (Text):
    1. if display name of player's held item is "&e&lÉrme &7(Jobb Katt)":
    2.         if player is sneaking:
    3.             set {_érem} to amount of player's held item in player's inventory
    4.             remove {_érem} of gold nugget from player's inventory
    5.             add {_érem} to {érme::%player%}
     
  4. kamilleon

    kamilleon Member

    Joined:
    Nov 18, 2017
    Messages:
    48
    Likes Received:
    0
    It adds the amount to {érme::%player%}, but doesn't remove them from the inventory
    --- Double Post Merged, Dec 30, 2019, Original Post Date: Dec 30, 2019 ---
    o, got it working

    Code (Text):
    1. on right click with gold nugget:
    2.     if name of player's held item is "&e&lÉrme &7(Jobb Katt)":
    3.         if player is sneaking:
    4.             set {_érem} to amount of player's held item in player's inventory
    5.             remove {_érem} of player's held item from player's inventory
    6.             add {_érem} to {érme::%player%}
     
  5. TenToTu Sho

    TenToTu Sho Member

    Joined:
    Dec 30, 2019
    Messages:
    20
    Likes Received:
    2
    For those who just need the solution:
    Code (Text):
    1. on right click with gold nugget:
    2.     if name of player's held item is "&e&lÉrme &7(Jobb Katt)":
    3.         if player is sneaking:
    4.             set {_érem} to amount of player's held item in player's inventory
    5.             remove {_érem} of player's held item from player's inventory
    6.             add {_érem} to {érme::%player%}
     
Thread Status:
Not open for further replies.

Share This Page

Loading...