Solved Upgrading system

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

WiebeHero

Active Member
Aug 23, 2017
135
5
0
23
Hello i am WiebeHero and i am stressing out atm so i hope you can help me with this.
Code:
on inventory click:
if the 1st line of lore of item contains "&7: : 0/2":
remove 1 diamond sword with lore "&7: : 0/2" from player's inventory
set the 1st line of lore of the player's tool to "Help me"
What do i do to make the player has to stack the diamond swords first?
What do i do to make it cancel the event if there is only 1 diamond sword with lore "&7: :0/2" in the inventory?

I am a noob and i have been struggling with this for over a week now so can anyone help me with this?
Thanks! ;D
 
Did you mean like this:
code_language.skript:
on inventory click:
    if the 1st line of lore of item contains "&7: : 0/2":
        if player has 64 diamond sword with lore "&7: : 0/2":
            remove 1 diamond sword with lore "&7: : 0/2" from player's inventory
            set the 1st line of lore of the player's tool to "Help me"
        if player has 1 diamond sword with lore "&7: : 0/2":
            cancel event
 
Hmmm not quite i mean the 2 diamond swords need to merge first like stacking them on eachotter and that you still will be able to move the 1 diamond sword around in the inventory
 
Sorry, my English is bad, can you speak more clearly?
Or it might look like this:
code_language.skript:
on inventory click:
    if the 1st line of lore of item contains "&7: : 0/2":
        if player has 1 stack diamond sword with lore "&7: : 0/2":  #Maybe, I have not tried yet
            remove 1 diamond sword with lore "&7: : 0/2" from player's inventory
            set the 1st line of lore of the player's tool to "Help me"
        if player has 1 diamond sword with lore "&7: : 0/2":
            cancel event
 
Hello, i am ChisleLP and i am stressing out atm so i hope you use next time the Help Template, btw explain us more what youre trying? Btw use the Code tags, I don't understand what are you trying to tell. btw its more helpfull if you tell us the error or what doesn't working...
 
As far as I understood, he tries to forge 2 diamonds sword with the lore he has given into one, I could be wrong though.
 
What im trying to do is this exactly: You have diamond swords with the same lore this ": : 0/2" if you drag one of these diamond swords to the other and merge/stack/put them on eachotter or whatever and it gives you a diamond sword with lore ": : 1/2" and if you have a diamond sword of ": : 0/2" and a diamond sword of ": : 1/2" that if you merge/stack/put them on eachotter it will give you a sword with ": : 2/2"
Hopefully i have now been a bit clear it was a bit fague sorry! XD
[doublepost=1506537664,1506537606][/doublepost]And bieing able to still move them around in youre inventory.
[doublepost=1506538286][/doublepost]Oml im so dumb..... I could have done this so much easier.... but i am just a stupid idiot as anyways but well i figured it out on my own XD for any of you who still dont know how i fixed or want to know how i changed it here it is:
on inventory click:
if the name of item is "Heroic Sword"
if the 1st line of lore of item contains "&7: : 0/2":
if player has 2 diamond sword with lore "&7: : 0/2":
remove 2 diamond sword with lore "&7: : 0/2" from player's inventory
give player diamond sword with lore "&7: : 1/2"
I still want to thank you all for helping!
 
  • Like
Reactions: HackerOTVW
Status
Not open for further replies.