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

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Randomly Smite a Player Alive

Discussion in 'Requests' started by Chemically, May 12, 2019.

  1. C

    Chemically Member

    Joined:
    Feb 27, 2019
    Messages:
    3
    Likes Received:
    0
    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.
     
  2. Runakai1

    Runakai1 Well-Known Member

    Joined:
    Apr 27, 2018
    Messages:
    353
    Likes Received:
    18
    Code (Skript):
    1.  
    2. command shocker [<text>]:
    3.     trigger:
    4.         arg-1 is set:
    5.             arg-1 is "enable":
    6.                 set {strike} to true
    7.                 send "enable"
    8.                 while {strike} is set:
    9.                     strike lightning at random player out of all players where [input' gamemode != spectator]
    10.                     wait 10 minutes
    11.             else if arg-1 is "disable":
    12.                 delete {strike}
    13.                 send "disable"
     
  3. C

    Chemically Member

    Joined:
    Feb 27, 2019
    Messages:
    3
    Likes Received:
    0
  4. Runakai1

    Runakai1 Well-Known Member

    Joined:
    Apr 27, 2018
    Messages:
    353
    Likes Received:
    18
  5. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    1,760
    Likes Received:
    124
    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.
     
Loading...