Jump to content

I need some skript help..


Ramina__

Recommended Posts

So i am making a thanos gauntlet skript And well the snap wont work here is the code the snap error is in bold 

 

 

on right click:
    if player's tool is bone named "&dInfinityGauntlet":
        open chest with 3 rows named "&5ABILITIES" to player
        format gui slot 12 of player with purple dye named "&dDoubleHealth" with lore "&5Get an extra &b10&5 Health points" to run:
            if {Ability::%player%} is not set:
                if {doublehealth::%player%} is not set:
                    set {doublehealth::%player%} to "DOUBLEHEALTH"
                    set {Ability::%player%} to "DoubleHealth"
                    send "&dActivated &dAbility &a%{Ability::%player%}%"
                    set player's health to 10
                    apply regeneration 4 to player for 15 seconds
                    apply health boost 5 to player for 60 seconds
                    close player's inventory
                    wait 10 second
                    send "&dYou no longer have &aDoubleHealth&d!"
                    delete {Ability::%player%}
                    delete {doublehealth::%player%}
                else:
                    send "&dThis is currently on cooldown!"
                    close player's inventory
                    stop
            else:
                send "&dYou Currently have &a%{Ability::%player%}% &dActive!"
                close player's inventory
                stop

        format gui slot 13 of player with cyan dye named "&4&lSNAP" with lore "&5Kill half of the player's online" to run:
            if {snapuse::%player%} is not set:
                set {snapuse::%player%} to "SNAP"
                loop all players:
                    add loop-player to {Killist::*}
                    if loop-player has permission "helper":
                        remove loop-player from {Killist::*}
                    remove player from {Killist::*}
                    broadcast "&dSOMEONE USED &5&lTHANOS &dSNAP"
                    wait 5 seconds


                        kill half of {Killist::*}


                    broadcast "&dThe world is balanced again..."
                    wait 30 second
                    delete {killist::*}
                    delete {snapuse::%player%}
                    stop
            else:
                send "&dThis is currently on cooldown!"
                close player's inventory
                stop
        format gui slot 14 of player with grey dye named "&7VANISH" with lore "&dCompletly vanish from all players view for &a30 seconds" to run:
            if {Ability::%player%} is not set:
                if {Vanishcooldown::%player%} is not set:
                    set {Vanishcooldown::%player%} to "VANISH"
                    set {Ability::%player%} to "VANISH"
                    hide player from all players
                    send "&dYou are now &7VANISHED&d for 30 seconds!"
                    close player's inventory
                    wait 30 second
                    delete {Ability::%player%}
                    delete {Vanishcooldown::%player%}
                    send "&dYou are no longer &7VANISHED" to player
                    reveal player from all players
                else:
                    send "&dThis is currently on cooldown!" to player
                    close player's inventory
            else:
                send "&dYou Currently have &a%{Ability::%player%}% &dActive!"
                close player's inventory
        format gui slot 22 of player with lime dye named "&aFLIGHT" with lore "&dYou are able to &aFLY&d until deactivation!" to run:
            if {flight::%player%} is not set:
                if {flightcooldown::%player%} is not set:
                    set {flight::%player%} to "FLIGHT"
                    set {flightcooldown::%player%} to true
                    enable flight for player
                    send "&dYou can now &5&lFLY&d!"
                    close player's inventory
                    wait 25 second
                    if {flight::%player%} is set:
                        send "&4&lFLIGHT&d Disabling in 5 seconds!"
                        wait 2 seconds
                        send "&4&lFLIGHT&d Disabling in 3 seconds!"
                        wait 1 second
                        send "&4&lFLIGHT&d Disabling in 2 seconds!"
                        wait 1 second
                        send "&4&lFLIGHT&d Disabling in 1 seconds!"
                        delete {flight::%player%}
                        disable flight for player
                        send "&dYou can no longer &aFLY &dand is now on cooldown!"
                        wait 30 second
                        delete {flightcooldown::%player%}
                else:
                    send "&dThis is currently on cooldown!"
                    close player's inventory
            else:
                send "&aFlight&d has been disabled!"
                disable flight for player
                delete {flight::%player%}
                close player's inventory

        format gui slot 26 of player with red wool named "&4DISABLE ABILITY" to run:
            if {Ability::%player%} is set:
                if {flight::%player%} is set:
                    send "&dDisabled ability &a%{Ability::%player%}% &dand &5%{flight::%player%}%"
                    delete {Ability::%player%}
                    reveal player from all players
                    disable fly for player
                else:
                    send "&dDisabled ability &a%{Ability::%player%}%&d!"
                    delete {Ability::%player%}
                    reveal player from all players
                    disable fly for player
                
            else:
                send "&dYou &4Don't &dhave an ability toggled!"
                
            
        

Link to comment
Share on other sites

10 hours ago, nolando09 said:

So i am making a thanos gauntlet skript And well the snap wont work here is the code the snap error is in bold 

 

 

on right click:
    if player's tool is bone named "&dInfinityGauntlet":
        open chest with 3 rows named "&5ABILITIES" to player
        format gui slot 12 of player with purple dye named "&dDoubleHealth" with lore "&5Get an extra &b10&5 Health points" to run:
            if {Ability::%player%} is not set:
                if {doublehealth::%player%} is not set:
                    set {doublehealth::%player%} to "DOUBLEHEALTH"
                    set {Ability::%player%} to "DoubleHealth"
                    send "&dActivated &dAbility &a%{Ability::%player%}%"
                    set player's health to 10
                    apply regeneration 4 to player for 15 seconds
                    apply health boost 5 to player for 60 seconds
                    close player's inventory
                    wait 10 second
                    send "&dYou no longer have &aDoubleHealth&d!"
                    delete {Ability::%player%}
                    delete {doublehealth::%player%}
                else:
                    send "&dThis is currently on cooldown!"
                    close player's inventory
                    stop
            else:
                send "&dYou Currently have &a%{Ability::%player%}% &dActive!"
                close player's inventory
                stop

        format gui slot 13 of player with cyan dye named "&4&lSNAP" with lore "&5Kill half of the player's online" to run:
            if {snapuse::%player%} is not set:
                set {snapuse::%player%} to "SNAP"
                loop all players:
                    add loop-player to {Killist::*}
                    if loop-player has permission "helper":
                        remove loop-player from {Killist::*}
                    remove player from {Killist::*}
                    broadcast "&dSOMEONE USED &5&lTHANOS &dSNAP"
                    wait 5 seconds


                        kill half of {Killist::*}


                    broadcast "&dThe world is balanced again..."
                    wait 30 second
                    delete {killist::*}
                    delete {snapuse::%player%}
                    stop
            else:
                send "&dThis is currently on cooldown!"
                close player's inventory
                stop
        format gui slot 14 of player with grey dye named "&7VANISH" with lore "&dCompletly vanish from all players view for &a30 seconds" to run:
            if {Ability::%player%} is not set:
                if {Vanishcooldown::%player%} is not set:
                    set {Vanishcooldown::%player%} to "VANISH"
                    set {Ability::%player%} to "VANISH"
                    hide player from all players
                    send "&dYou are now &7VANISHED&d for 30 seconds!"
                    close player's inventory
                    wait 30 second
                    delete {Ability::%player%}
                    delete {Vanishcooldown::%player%}
                    send "&dYou are no longer &7VANISHED" to player
                    reveal player from all players
                else:
                    send "&dThis is currently on cooldown!" to player
                    close player's inventory
            else:
                send "&dYou Currently have &a%{Ability::%player%}% &dActive!"
                close player's inventory
        format gui slot 22 of player with lime dye named "&aFLIGHT" with lore "&dYou are able to &aFLY&d until deactivation!" to run:
            if {flight::%player%} is not set:
                if {flightcooldown::%player%} is not set:
                    set {flight::%player%} to "FLIGHT"
                    set {flightcooldown::%player%} to true
                    enable flight for player
                    send "&dYou can now &5&lFLY&d!"
                    close player's inventory
                    wait 25 second
                    if {flight::%player%} is set:
                        send "&4&lFLIGHT&d Disabling in 5 seconds!"
                        wait 2 seconds
                        send "&4&lFLIGHT&d Disabling in 3 seconds!"
                        wait 1 second
                        send "&4&lFLIGHT&d Disabling in 2 seconds!"
                        wait 1 second
                        send "&4&lFLIGHT&d Disabling in 1 seconds!"
                        delete {flight::%player%}
                        disable flight for player
                        send "&dYou can no longer &aFLY &dand is now on cooldown!"
                        wait 30 second
                        delete {flightcooldown::%player%}
                else:
                    send "&dThis is currently on cooldown!"
                    close player's inventory
            else:
                send "&aFlight&d has been disabled!"
                disable flight for player
                delete {flight::%player%}
                close player's inventory

        format gui slot 26 of player with red wool named "&4DISABLE ABILITY" to run:
            if {Ability::%player%} is set:
                if {flight::%player%} is set:
                    send "&dDisabled ability &a%{Ability::%player%}% &dand &5%{flight::%player%}%"
                    delete {Ability::%player%}
                    reveal player from all players
                    disable fly for player
                else:
                    send "&dDisabled ability &a%{Ability::%player%}%&d!"
                    delete {Ability::%player%}
                    reveal player from all players
                    disable fly for player
                
            else:
                send "&dYou &4Don't &dhave an ability toggled!"
                
            
        

What you would need to do is get the value of the variable and divide it by 2 and set the new number to another variable and kill that variable.

Developer

 

Joined Minecraft in 2010 on PC

Joined Minehut in August 2016

1 year Skript experience

2 months Java experience

5 months Javascript experience

 

Link to comment
Share on other sites

15 hours ago, nolando09 said:

Can you put it in stupid for me xD sorry..

I don't really spoonfeed, you can find tutorials on how to do it online. And work off other's code that they had trouble with, that's how I learned.

Developer

 

Joined Minecraft in 2010 on PC

Joined Minehut in August 2016

1 year Skript experience

2 months Java experience

5 months Javascript experience

 

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