Solved Every second not working..?

  • 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 community!

    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.

GlacialDew

Member
Apr 8, 2018
40
3
8
Norrland
I have tried tons of different threads and i guess im just having problems with every second


code_language.skript:
on connect:
    if {level.%player's uuid%} is not set:
        set {level.%player's uuid%} to 1
        set {xp.%player's uuid%} to 0
        set {xp.req.%player's uuid%} to 100
        every second in "world":
            if {xp.%player's uuid%} is greater than or equal to {xp.req.%player's uuid%}:
                subtract {xp.req.%player's uuid%} from {xp.%player's uuid%}
                add 150 to {xp.req.%player's uuid%}
                add 1 to {level.%player's uuid%}
                stop
 
code_language.skript:
on connect:
    if {level.%player's uuid%} is not set:
        set {level.%player's uuid%} to 1
        set {xp.%player's uuid%} to 0
        set {xp.req.%player's uuid%} to 100
        while player's world is "world":
            if {xp.%player's uuid%} is greater than or equal to {xp.req.%player's uuid%}:
                subtract {xp.req.%player's uuid%} from {xp.%player's uuid%}
                add 150 to {xp.req.%player's uuid%}
                add 1 to {level.%player's uuid%}
                stop
            wait 1 seconds
 
Just a suggestion, use every 20 ticks as it can actually be every second, if tps is lower than 20 tps, every second will not be every second instead longer, as every 20 ticks would still be every second (Its wierd ik)
 
Status
Not open for further replies.