#skript anti wall attack

1 messages · Page 1 of 1 (latest)

tepid mesa
#

so i made this skript

  loop all players:
    set {_current_target} to target entity of loop-player
    if {_current_target} isn't set:
      set {_current_target} to "nothing"
    add {_current_target} to {targets::%loop-player's uuid%::*}
    if (size of {targets::%loop-player's uuid%::*}) > 20:
      remove the 1st element of {targets::%loop-player's uuid%::*} from {targets::%loop-player's uuid%::*}

on damage:
  if damage cause is attack:
    if damage cause isn't projectile:
      if {targets::%attacker's uuid%::*} contains victim:
        set {_ballsack} to true
      else if {targets::%attacker's uuid%::*} doesn't contain victim:
        if target entity of attacker isn't victim:
          cancel event
          send "&cYour attack was invalidated! (incorrectRotation)" to attacker
          add 1 to {cheatscore::%attacker%}
          if {cheatscore::%attacker%} is 15:
            if {potentialcheaters::*} doesn't contain attacker:
              add "%attacker%" to {potentialcheaters::*}

that invalidates "wrong" attacks that arent possible (through walls) but i noticed alot of false positives and the entire system is kinda shit in general. Any way to do this more accurately?

lime locust
#

why not just do the target check in on damage: rather than a laggy periodical and variables?