Solved Strength Skirpt

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

BestGamerNL

Member
Apr 25, 2017
38
1
0
25
Hello im working on a bigg network Named stereoNetwork and we will open soon but i need some skirpt
Plugins so thats why im asking for an Strenght Skiript

What is basicaly must do is players can activate for them self

So i want a normal strenght skirpt not Strenght II But Strenght I

/st - Enable
/st - Disable

I know it is simple to made but what i want is when it is enabled it must be automaticly disable after 30 seconds
and than a cooldown for 10 minuts

Does any one know how to make so skirpt please set it in for me it helps me a lot
 
Here ya go:
code_language.skript:
command /st:
    permission: skript.st
    trigger:
        if {strength.%player%::coolDown} is not set:
            set {_test} to "11 minutes" parsed as timespan
            set {strength.%player%::coolDown} to difference between now and {_test}
        if {strength.%player%::enabled} is true:
            if difference between now and {strength.%player%::coolDown} is less than 30 seconds:
                message "&cYou have prematurely removed your Strength effect!" to player
                remove strength from the player
                set {strength.%player%::enabled} to false
        if difference between now and {strength.%player%::coolDown} is greater than 10 minutes:
            apply potion of strength of tier 1 to the player for 30 seconds
            set {strength.%player%::coolDown} to now
            set {strength.%player%::enabled} to true
            set {_timer} to 0
            while {strength.%player%::enabled} is true:
                wait 1 second
                add 1 to {_timer}
                if {_timer} = 30:
                    set {strength.%player%::enabled} to false
        else:
            message "&cYou have: &4%difference between now and {strength.%player%::coolDown}% &cseconds left before you can use Strength again!" to player

But yeah, post in the Request section for future request.
 
Here ya go:
code_language.skript:
command /st:
    permission: skript.st
    trigger:
        if {strength.%player%::coolDown} is not set:
            set {_test} to "11 minutes" parsed as timespan
            set {strength.%player%::coolDown} to difference between now and {_test}
        if {strength.%player%::enabled} is true:
            if difference between now and {strength.%player%::coolDown} is less than 30 seconds:
                message "&cYou have prematurely removed your Strength effect!" to player
                remove strength from the player
                set {strength.%player%::enabled} to false
        if difference between now and {strength.%player%::coolDown} is greater than 10 minutes:
            apply potion of strength of tier 1 to the player for 30 seconds
            set {strength.%player%::coolDown} to now
            set {strength.%player%::enabled} to true
            set {_timer} to 0
            while {strength.%player%::enabled} is true:
                wait 1 second
                add 1 to {_timer}
                if {_timer} = 30:
                    set {strength.%player%::enabled} to false
        else:
            message "&cYou have: &4%difference between now and {strength.%player%::coolDown}% &cseconds left before you can use Strength again!" to player

But yeah, post in the Request section for future request.
It would be a good idea to put all the variables in one list and use uuids like {strength::%player's uuid%::enabled}
 
It would be a good idea to put all the variables in one list and use uuids like {strength::%player's uuid%::enabled}
I would think everyone would have turned on the "use player UUIDs in variable names: " option in Skript's config by now xP
But yeah, if you don't have that enabled, you can use %uuid of player% in the variable name to replicate the effect.
 
I would think everyone would have turned on the "use player UUIDs in variable names: " option in Skript's config by now xP
But yeah, if you don't have that enabled, you can use %uuid of player% in the variable name to replicate the effect.
It's still best to use uuid because you can't rely on that option always being enabled
 
Status
Not open for further replies.