Randomly Smite a Player Alive

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

Chemically

New Member
Feb 27, 2019
7
0
0
24
Category:
UHC

Suggested name:
Shocker

Spigot/Skript Version:
Spigot 1.8.9 and I think Skript is 2.1.2 (not sure)

What I want:
So I would like a skript where it would randomly smite someone that is alive in the game every 10 minutes. (dead people would be in spectator mode and command to smite people is /smite)

Ideas for commands:
/shocker enable (once enabled, the 10minute timer starts)
/shocker disable (once disabled, the timer stops and resets)


Ideas for permissions:
skript.op

When I'd like it by:

Possibly by this or next week.
 
code_language.skript:
command shocker [<text>]:
    trigger:
        arg-1 is set:
            arg-1 is "enable":
                set {strike} to true
                send "enable"
                while {strike} is set:
                    strike lightning at random player out of all players where [input' gamemode != spectator]
                    wait 10 minutes
            else if arg-1 is "disable":
                delete {strike}
                send "disable"
 
I get 1 error when I reload the skript:
93400f91898a232012014ffaf56a0efa.png

https://gyazo.com/93400f91898a232012014ffaf56a0efa
 
Spigot 1.8.9 and I think Skript is 2.1.2 (not sure)
Word of advice, I highly recommend you check what you actually have, since Spigot 1.8.9 isn't even a thing, you should really know which version of Spigot you are on.

And if you are wanting someone to make a script for you, you should really know which version of Skript you are on.