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.

Solved Invalid Target Skript

Discussion in 'Skript' started by ESW_ST33le, Jul 22, 2020.

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

    ESW_ST33le Member

    Joined:
    May 6, 2020
    Messages:
    32
    Likes Received:
    1
    Im trying to make an anti Killaura skript, and need help making an invalid target detection. It is when you hit someone with looking at there hitbox. Anyone have and ideas on how to do it?
     
  2. Gowixx

    Gowixx Member

    Joined:
    Jul 9, 2020
    Messages:
    28
    Likes Received:
    5
    hmm, give me a minute.
    --- Double Post Merged, Jul 22, 2020, Original Post Date: Jul 22, 2020 ---
    Code (Text):
    1. #Killaura Check / Rotations
    2. on damage:
    3.     attacker is player
    4.     "%damage cause%" != "potion"
    5.     set {_b} to vector of location of attacker
    6.     set {_c} to vector of location of victim
    7.     set {_E} to {_c} -- {_b}
    8.     set {_F} to angle between {_E} and {_b}
    9.     add 1 to {Counter.%attacker's uuid%}
    10.     if {Counter.%attacker's uuid%} = 1:
    11.         set {Angle.a.%attacker's uuid%} to {_F}
    12.     if {Counter.%attacker's uuid%} = 2:
    13.         clear {Counter.%attacker's uuid%}
    14.         if difference between {Counter2.%attacker's uuid%} and now = 0 second:
    15.             Alert(attacker,"Killaura", 3)
    16.         if difference between {Counter2.%attacker's uuid%} and now <= 0.3 second:
    17.             if difference between {Angle.a.%attacker's uuid%} and {_F} >= 45:
    18.                 Alert(attacker,"Killaura", 2)
    19.     set {Counter2.%attacker's uuid%} to now
    This should work good, Just so you know, this was not made by me. I took it from https://parser.skunity.com/resource/907
     
  3. ESW_ST33le

    ESW_ST33le Member

    Joined:
    May 6, 2020
    Messages:
    32
    Likes Received:
    1
    Thank you. I will try it!
     
  4. Gowixx

    Gowixx Member

    Joined:
    Jul 9, 2020
    Messages:
    28
    Likes Received:
    5
    No Problem! Tell me if it doesnt work.
    --- Double Post Merged, Jul 23, 2020, Original Post Date: Jul 23, 2020 ---
    Also, best answer would be nice!
     
Thread Status:
Not open for further replies.

Share This Page

Loading...