I can't figure out this GUI issue.

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

Iron_Chopper

Member
May 2, 2020
1
0
1
19
So i've been trying for a while here to try and make this code here work

It sort of works, and by that I mean with items that are different types they work fine, but when it comes to 2 of the same item type, but different name and lore, it takes whatever the last one I added and makes all of the items of that type the exact same item. How would I fix this?

Yes this is using TuSKe

Code:
command /weaponshop:
  trigger:
    set {_p} to player
    set {_uuid} to player's uuid
    if {%player's uuid%::ingame} is false:
      send "{@prefix} &aOpening the weapon shop..."
      open virtual chest with 6 rows named "&cWeapon Shop" to {_p}
      set {_wc} to 0
      loop {weapons::*}:
        set {_w} to loop-value
        broadcast "%{_w}%"
        format gui slot {_wc} of {_p} with {weapons::%loop-value%::shopitem} to run:
          if {%{_uuid}%::weapons::*} contains {_w}:
            send "{@prefix} &cYou allready own that weapon!"
          else if {%{_uuid}%::level} < {weapons::%{_w}%::requiredlevel}:
            send "{@prefix} &cYou are not a high enough level to buy that weapon!"
          else:
            if {%{_uuid}%::coins} >= {weapons::%{_w}%::cost}:
              send "{@prefix} &aWeapon Purchase successful!"
              remove {weapons::%{_w}%::cost} from {%{_uuid}%::coins}
              add {_w} to {%{_uuid}%::weapons::*}
              close player's inventory
            else:
              send "{@prefix} &cYou do not have enough coins to purchase this."
        add 1 to {_wc}
    else:
      send "{@prefix} &cYou may not use this command right now!"
 
Status
Not open for further replies.