Jump to content

Tps skript Help


NotKaizo

Recommended Posts

options:
    prefix: &7&l[&c&lHive&e&lMinez&7&l]

on tps change:
    if tps is lower than 19:
        set {fixing.tps} to true
    if {fixing.tps} = true:
        if tps is higher than 19:
            set {fixing.tps} to false
            broadcast "{@prefix}&a Tps is now stable!"

on break:
    if {fixing.tps} = true:
        cancel event
        send "{@prefix}&c Currently fixing the tps! Please be patient."

So, I am trying to make a skript where if the tps is below 19, it prevents player from mining as someone might be crashing it. I can't seem to get this working as I can't find an event that will work to replace on tps change:  event. If anyone could help out that will be great! 

 

Owner of play.hiveminez.net

 

⊱------------------------------⊰

Joined Minehut on 1/28/2021 (Same day I got Minecraft)

[VIP] - 3/14/2021

[LEGEND] - 5/27/2021

⊱------------------------------⊰

Discord - NotKaizo#0001

In-game name - iKaizo_

If you need any help, feel free to contact me.

Link to comment
Share on other sites

26 minutes ago, NotKaizo31 said:

options:
    prefix: &7&l[&c&lHive&e&lMinez&7&l]

on tps change:
    if tps is lower than 19:
        set {fixing.tps} to true
    if {fixing.tps} = true:
        if tps is higher than 19:
            set {fixing.tps} to false
            broadcast "{@prefix}&a Tps is now stable!"

on break:
    if {fixing.tps} = true:
        cancel event
        send "{@prefix}&c Currently fixing the tps! Please be patient."

So, I am trying to make a skript where if the tps is below 19, it prevents player from mining as someone might be crashing it. I can't seem to get this working as I can't find an event that will work to replace on tps change:  event. If anyone could help out that will be great! 

"on tps change:" is not a thing. I recommend doing every 5 seconds: or something and then the rest of the code

I used to play Minehut I guess?
Yeah, I still watch the forums for some reason. (15/5/2023)
Link to comment
Share on other sites

18 minutes ago, pizzaschut said:

"on tps change:" is not a thing. I recommend doing every 5 seconds: or something and then the rest of the code

Do I just change on tps change event to every 5 seconds? Or do I need to change some of the code too

 

Owner of play.hiveminez.net

 

⊱------------------------------⊰

Joined Minehut on 1/28/2021 (Same day I got Minecraft)

[VIP] - 3/14/2021

[LEGEND] - 5/27/2021

⊱------------------------------⊰

Discord - NotKaizo#0001

In-game name - iKaizo_

If you need any help, feel free to contact me.

Link to comment
Share on other sites

options:
    main_color: &f
    second_color: &7
    prefix: &f» &7

every 3 seconds:
    tps from the last minute <= 19:
        set {tps} to true if {tps} is not set
    else:
        delete {tps}

on spawn:
    event-entity != player #just to make sure
    {tps} is true
    cancel event

didn't test but should give general idea

Edited by tuberkens
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...