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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

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

If a player doesn't hit another player

Discussion in 'Skript' started by TullyMastully, Aug 26, 2017.

Thread Status:
Not open for further replies.
  1. TullyMastully

    TullyMastully Member

    Joined:
    Aug 9, 2017
    Messages:
    38
    Likes Received:
    0
    I wanted to know if it's possible so if a player doesn't hit another player in 30 seconds for example, It will kill him.
    If so, how?

    Thanks in advance.
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    you could do something like

    Code (Skript):
    1.  
    2. (Whatever you want to do)
    3. wait 30 seconds
    4. if {hit.%player%} is not set:
    5.      kill the player
    6.  
    7. on damage:
    8.      attacker is a player
    9.      set {hit.%player%} to true
    10.  
    11.  
     
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Is this a joke?
     
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Why?!?! And please.. Respect Me!!
     
  5. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    wait # seconds/ticks/minutes etc is not an event. I thought that was basic skript knowledge.
     
  6. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    I'm new at the world of Skript, and I'm brazilian! I don't know english! I'm just 12 years old!
     
  7. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    It doesn't
     
  8. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Thanks, but the thing is, I'm making a tag game, and this is my code.
    Can you tell me where to put it?

    Code (Skript):
    1.  
    2. command /flametag:
    3.     trigger:
    4.         apply swiftness 2 to all players for 1000000 seconds
    5.         set {playerTarget} to a random player out of all players
    6.         send "{@prefix} &f%{playerTarget}% &7is the Tagger!" to all players
    7.         send "{@prefix} &7YOU ARE IT!" to {playerTarget}
    8.         set slot 0 of {playerTarget} to fire charge named " "
    9.         set slot 1 of {playerTarget} to fire charge named " "
    10.         set slot 2 of {playerTarget} to fire charge named " "
    11.         set slot 3 of {playerTarget} to fire charge named " "
    12.         set slot 4 of {playerTarget} to fire charge named " "
    13.         set slot 5 of {playerTarget} to fire charge named " "
    14.         set slot 6 of {playerTarget} to fire charge named " "
    15.         set slot 7 of {playerTarget} to fire charge named " "
    16.         set slot 8 of {playerTarget} to fire charge named " "
    17.         set slot 9 of {playerTarget} to fire charge named " "
    18.         set slot 10 of {playerTarget} to fire charge named "&c&lFLAMETAG "
    19.         set slot 11 of {playerTarget} to fire charge named "&c&lFLAMETAG "
    20.         set slot 12 of {playerTarget} to fire charge named "&c&lFLAMETAG "
    21.         set slot 13 of {playerTarget} to fire charge named "&c&lFLAMETAG "
    22.         set slot 14 of {playerTarget} to fire charge named "&c&lFLAMETAG "
    23.         set slot 15 of {playerTarget} to fire charge named "&c&lFLAMETAG "
    24.         set slot 16 of {playerTarget} to fire charge named "&c&lFLAMETAG "
    25.         set slot 17 of {playerTarget} to fire charge named "&c&lFLAMETAG "
    26.         set slot 18 of {playerTarget} to fire charge named "&c&lFLAMETAG "
    27.         set slot 19 of {playerTarget} to fire charge named "&c&lFLAMETAG "
    28.         set slot 20 of {playerTarget} to fire charge named "&c&lFLAMETAG "
    29.         set slot 21 of {playerTarget} to fire charge named "&c&lFLAMETAG "
    30.         set slot 22 of {playerTarget} to fire charge named "&c&lFLAMETAG "
    31.         set slot 23 of {playerTarget} to fire charge named "&c&lFLAMETAG "
    32.         set slot 24 of {playerTarget} to fire charge named "&c&lFLAMETAG "
    33.         set slot 25 of {playerTarget} to fire charge named "&c&lFLAMETAG "
    34.         set slot 26 of {playerTarget} to fire charge named "&c&lFLAMETAG "
    35.         set slot 27 of {playerTarget} to fire charge named "&c&lFLAMETAG "
    36.         set slot 28 of {playerTarget} to fire charge named "&c&lFLAMETAG "
    37.         set slot 29 of {playerTarget} to fire charge named "&c&lFLAMETAG "
    38.         set slot 30 of {playerTarget} to fire charge named "&c&lFLAMETAG "
    39.         set slot 31 of {playerTarget} to fire charge named "&c&lFLAMETAG "
    40.         set slot 32 of {playerTarget} to fire charge named "&c&lFLAMETAG "
    41.         set slot 33 of {playerTarget} to fire charge named "&c&lFLAMETAG "
    42.         set slot 34 of {playerTarget} to fire charge named "&c&lFLAMETAG "
    43.         set slot 35 of {playerTarget} to fire charge named "&c&lFLAMETAG"
    44.         equip {playerTarget} with leather chestplate dyed red named "&c&lFLAME&4&lTAG"
    45.         equip {playerTarget} with leather leggings dyed red named "&c&lFLAME&4&lTAG"
    46.         equip {playerTarget} with leather boots dyed red named "&c&lFLAME&4&lTAG"
    47.         set helmet of {playerTarget} to a TNT named "&c&lFLAME&4&lTAG"
    48.  
    49. if {hit.%player%} is not set:
    50.     kill the player
    51.      
    52. on damage:
    53.     if attacker is player:
    54.         if victim is player:
    55.             if attacker's tool is Fire charge:
    56.                 clear attacker's inventory
    57.                 set {hit.%player%} to true
    58.                 set {flametag.it.%victim%} to "Tagger"
    59.                 set slot 0 of victim to fire charge named " "
    60.                 set slot 1 of victim to fire charge named " "
    61.                 set slot 2 of victim to fire charge named " "
    62.                 set slot 3 of victim to fire charge named " "
    63.                 set slot 4 of victim to fire charge named " "
    64.                 set slot 5 of victim to fire charge named " "
    65.                 set slot 6 of victim to fire charge named " "
    66.                 set slot 7 of victim to fire charge named " "
    67.                 set slot 8 of victim to fire charge named " "
    68.                 set slot 9 of victim to fire charge named " "
    69.                 set slot 10 of victim to fire charge named "&c&lFLAMETAG "
    70.                 set slot 11 of victim to fire charge named "&c&lFLAMETAG "
    71.                 set slot 12 of victim to fire charge named "&c&lFLAMETAG "
    72.                 set slot 13 of victim to fire charge named "&c&lFLAMETAG "
    73.                 set slot 14 of victim to fire charge named "&c&lFLAMETAG "
    74.                 set slot 15 of victim to fire charge named "&c&lFLAMETAG "
    75.                 set slot 16 of victim to fire charge named "&c&lFLAMETAG "
    76.                 set slot 17 of victim to fire charge named "&c&lFLAMETAG "
    77.                 set slot 18 of victim to fire charge named "&c&lFLAMETAG "
    78.                 set slot 19 of victim to fire charge named "&c&lFLAMETAG "
    79.                 set slot 20 of victim to fire charge named "&c&lFLAMETAG "
    80.                 set slot 21 of victim to fire charge named "&c&lFLAMETAG "
    81.                 set slot 22 of victim to fire charge named "&c&lFLAMETAG "
    82.                 set slot 23 of victim to fire charge named "&c&lFLAMETAG "
    83.                 set slot 24 of victim to fire charge named "&c&lFLAMETAG "
    84.                 set slot 25 of victim to fire charge named "&c&lFLAMETAG "
    85.                 set slot 26 of victim to fire charge named "&c&lFLAMETAG "
    86.                 set slot 27 of victim to fire charge named "&c&lFLAMETAG "
    87.                 set slot 28 of victim to fire charge named "&c&lFLAMETAG "
    88.                 set slot 29 of victim to fire charge named "&c&lFLAMETAG "
    89.                 set slot 30 of victim to fire charge named "&c&lFLAMETAG "
    90.                 set slot 31 of victim to fire charge named "&c&lFLAMETAG "
    91.                 set slot 32 of victim to fire charge named "&c&lFLAMETAG "
    92.                 set slot 33 of victim to fire charge named "&c&lFLAMETAG "
    93.                 set slot 34 of victim to fire charge named "&c&lFLAMETAG "
    94.                 set slot 35 of victim to fire charge named "&c&lFLAMETAG"
    95.                 equip victim with leather chestplate dyed red named "&c&lFLAME&4&lTAG"
    96.                 equip victim with leather leggings dyed red named "&c&lFLAME&4&lTAG"
    97.                 equip victim with leather boots dyed red named "&c&lFLAME&4&lTAG"
    98.                 set helmet of victim to a TNT named "&c&lFLAME&4&lTAG"
    99.                 send "{@prefix} &f%victim% &7is the Tagger!" to all players
    100.                 send "{@prefix} &7YOU ARE IT!" to victim
    101.    
    102.    
    103. on death:
    104.     set death message to "{@prefix} &f%player% &7exploded to his death!"
    105.  
    106.  
     
Thread Status:
Not open for further replies.

Share This Page

Loading...