Solved KillAura Bot 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.

BotiiX

New Member
Jul 14, 2020
9
0
1
21
Hello! I found a skript where you can summon a NPC around you. The problem is, I want it for the admins to be able to summon a killaura bot around players.


Code:
function circleBot(p: player):
    set {_n} to npc named "%random integer between 100000 and 999999%" "PLAYER"
    set fly of npc {_n} to true
    set protect of npc {_n} to false
    spawn npc {_n} at location of {_p} ~ vector 2, 0, 0
    set {_e} to entity from npc {_n}
    set gravity of {_e} to false
    add {_e} to {bots::*}
    loop 5 times:
        loop 360 times:
            set {_ploc} to location of {_p}
            set {_v} to vector from yaw loop-number-2 and pitch 0
            set vector length of {_v} to 2
            teleport {_e} to {_ploc} ~ {_v}
            mod(loop-number-2, 12) = 0
            wait 1 tick
    remove {_e} from {bots::*}
    remove npc {_n}
  
on damage:
    {bots::*} contains victim
    attacker is set
    attacker is a player
    send "You hit a bot!" to attacker
  
command /bot:
    trigger:
        circleBot(player)
[doublepost=1596381923,1596381851][/doublepost]And what I want is to send a message to the staff member who summoned the bot when they hit the bot
 
Code:
command /adminbot <player>:
  trigger:
    circleBot(arg-1)
    message "&eChecking %arg-1%!"
    set {checking::%arg-1's uuid%} to true
on damage:
  if {checking::%attacker's uuid%} == true:
    if {bots::*} contains name of target:
      set {checking::%attacker's uuid%} to false     
      loop all players:
        message "&c%attacker% was caught using KillAura!" to loop-player if loop-player has permission "staff.alert"
should work.

I changed a few things and now it's working! Thank you!
 
Status
Not open for further replies.