Solved every {var} ticks

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

King_Creeperz

Member
Oct 6, 2020
45
0
8
so I am making this "Autoclicker" for my server. but when I try to do it it doesn't work. this is my "IMPORTANT" code is to this

every {autoclickperticks::%player's uuid%} ticks:
if {autoclick::%player's uuid%} is true:

idk how to make it so it uses it with the variable to use the event
 
I don't get what are you trying to do with it, and that's not how it works. There is no player in a periodical event
I think he wanted to create an auto clicker, so the variable "{autoclick::%player's uuid%}" is set to a number of ticks via a command, but yeah this won't work
 
{autoclick::%player's uuid%} means if it is true and it will auto click. you don't need to do the "auto click part" and {autoclickperticks::%player's uuid%} means how many ticks the player requested in the command. but I need help with the every "var" ticks
[doublepost=1629041894,1629041828][/doublepost]
I don't get what are you trying to do with it, and that's not how it works. There is no player in a periodical event
Ah I see I forgot to loop all players ty
[doublepost=1629042509][/doublepost]but if I try it it says that it is a unknown event. how do I make it so the variable is compatible with every <number> ticks so I can do every {var} ticks
 
{autoclick::%player's uuid%} means if it is true and it will auto click. you don't need to do the "auto click part" and {autoclickperticks::%player's uuid%} means how many ticks the player requested in the command. but I need help with the every "var" ticks
[doublepost=1629041894,1629041828][/doublepost]
Ah I see I forgot to loop all players ty
[doublepost=1629042509][/doublepost]but if I try it it says that it is a unknown event. how do I make it so the variable is compatible with every <number> ticks so I can do every {var} ticks
Yeah I copied the wrong variable, anyways a way you could do this, is:
Code:
every tick:
    loop all players:
        if {autoclick::%loop-player's uuid%} is true:
            if {ticks.%loop-player's uuid%} = {autoclickperticks::%loop-player's uuid%}:
                set {ticks.%loop-player's uuid%} to 0  
                #code here

            else:
                add 1 to {ticks.%loop-player's uuid%}
Haven't tested it
 
Yeah I copied the wrong variable, anyways a way you could do this, is:
Code:
every tick:
    loop all players:
        if {autoclick::%loop-player's uuid%} is true:
            if {ticks.%loop-player's uuid%} = {autoclickperticks::%loop-player's uuid%}:
                set {ticks.%loop-player's uuid%} to 0 
                #code here

            else:
                add 1 to {ticks.%loop-player's uuid%}
Haven't tested it

Thanks I'll try it later. I won't reply if it works
and flag it as solved
 
Status
Not open for further replies.