Solved Redeem coins with right click

  • 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.

kamilleon

Member
Nov 18, 2017
48
0
6
24
The one at a time works, but I can't get the all at once to be redeemed to work.

Any suggestions?

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

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

Code:
if display name of player's held item is "&e&lÉrme &7(Jobb Katt)":
        if player is sneaking:
            set {_érem} to amount of player's held item in player's inventory
            remove {_érem} of gold nugget from player's inventory
            add {_érem} to {érme::%player%}
It adds the amount to {érme::%player%}, but doesn't remove them from the inventory
[doublepost=1577721569,1577721373][/doublepost]
It adds the amount to {érme::%player%}, but doesn't remove them from the inventory

o, got it working

Code:
on right click with gold nugget:
    if name of player's held item is "&e&lÉrme &7(Jobb Katt)":
        if player is sneaking:
            set {_érem} to amount of player's held item in player's inventory
            remove {_érem} of player's held item from player's inventory
            add {_érem} to {érme::%player%}
 
For those who just need the solution:
Code:
on right click with gold nugget:
    if name of player's held item is "&e&lÉrme &7(Jobb Katt)":
        if player is sneaking:
            set {_érem} to amount of player's held item in player's inventory
            remove {_érem} of player's held item from player's inventory
            add {_érem} to {érme::%player%}
 
Status
Not open for further replies.