Subtraction in Lore

  • 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.
Oct 18, 2017
11
0
0
24
code_language.skript:
                        set {checker1.%player%::*} to lore of clicked item split at " " parsed as a number
                        set {checker2.%player%::*} to lore of cursor item split at " " parsed as a number
                        if {checker1.%player%::*} minus {checker2.%player%::*} is equal to 1:
Errors:
38e02c244381bf2a579494d81b2b069a


Essentially I want to make it so if a pickaxe has Smelt 1 in the lore of the item, and I try to put an enchant on it, let's say Smelt 3, it wouldn't work because it would have to go through the steps, e.g. Smelt 1, Smelt 2, Smelt 3. I'm not sure how to do this because I would need to set something to the number in the lore of the clicked item, e.g. set {test.%player%} to all numbers in lore of cursor item, but that does not work as I have already tried. Thanks to anybody who helps!
 
Are you little new into skript?

You need:
-Split it
-Parsed it as number
-Add one to number
-Put it again into Lore
 
Status
Not open for further replies.