Solved Invalid Target Skript

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

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

ESW_ST33le

Member
May 6, 2020
32
1
6
23
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?
 
hmm, give me a minute.
[doublepost=1595458792,1595458661][/doublepost]
Code:
#Killaura Check / Rotations
on damage:
    attacker is player
    "%damage cause%" != "potion"
    set {_b} to vector of location of attacker
    set {_c} to vector of location of victim
    set {_E} to {_c} -- {_b}
    set {_F} to angle between {_E} and {_b}
    add 1 to {Counter.%attacker's uuid%}
    if {Counter.%attacker's uuid%} = 1:
        set {Angle.a.%attacker's uuid%} to {_F}
    if {Counter.%attacker's uuid%} = 2:
        clear {Counter.%attacker's uuid%}
        if difference between {Counter2.%attacker's uuid%} and now = 0 second:
            Alert(attacker,"Killaura", 3)
        if difference between {Counter2.%attacker's uuid%} and now <= 0.3 second:
            if difference between {Angle.a.%attacker's uuid%} and {_F} >= 45:
                Alert(attacker,"Killaura", 2)
    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
 
hmm, give me a minute.
[doublepost=1595458792,1595458661][/doublepost]
Code:
#Killaura Check / Rotations
on damage:
    attacker is player
    "%damage cause%" != "potion"
    set {_b} to vector of location of attacker
    set {_c} to vector of location of victim
    set {_E} to {_c} -- {_b}
    set {_F} to angle between {_E} and {_b}
    add 1 to {Counter.%attacker's uuid%}
    if {Counter.%attacker's uuid%} = 1:
        set {Angle.a.%attacker's uuid%} to {_F}
    if {Counter.%attacker's uuid%} = 2:
        clear {Counter.%attacker's uuid%}
        if difference between {Counter2.%attacker's uuid%} and now = 0 second:
            Alert(attacker,"Killaura", 3)
        if difference between {Counter2.%attacker's uuid%} and now <= 0.3 second:
            if difference between {Angle.a.%attacker's uuid%} and {_F} >= 45:
                Alert(attacker,"Killaura", 2)
    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
Thank you. I will try it!
 
No Problem! Tell me if it doesnt work.
[doublepost=1595459793,1595459072][/doublepost]Also, best answer would be nice!
 
Status
Not open for further replies.