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 KillAura Bot skript

Discussion in 'Skript' started by BotiiX, Aug 2, 2020 at 4:24 PM.

  1. BotiiX

    BotiiX Member

    Joined:
    Jul 14, 2020
    Messages:
    8
    Likes Received:
    0
    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 (Text):
    1.  
    2. function circleBot(p: player):
    3.     set {_n} to npc named "%random integer between 100000 and 999999%" "PLAYER"
    4.     set fly of npc {_n} to true
    5.     set protect of npc {_n} to false
    6.     spawn npc {_n} at location of {_p} ~ vector 2, 0, 0
    7.     set {_e} to entity from npc {_n}
    8.     set gravity of {_e} to false
    9.     add {_e} to {bots::*}
    10.     loop 5 times:
    11.         loop 360 times:
    12.             set {_ploc} to location of {_p}
    13.             set {_v} to vector from yaw loop-number-2 and pitch 0
    14.             set vector length of {_v} to 2
    15.             teleport {_e} to {_ploc} ~ {_v}
    16.             mod(loop-number-2, 12) = 0
    17.             wait 1 tick
    18.     remove {_e} from {bots::*}
    19.     remove npc {_n}
    20.  
    21. on damage:
    22.     {bots::*} contains victim
    23.     attacker is set
    24.     attacker is a player
    25.     send "You hit a bot!" to attacker
    26.  
    27. command /bot:
    28.     trigger:
    29.         circleBot(player)
    --- Double Post Merged, Aug 2, 2020 at 4:25 PM, Original Post Date: Aug 2, 2020 at 4:24 PM ---
    And what I want is to send a message to the staff member who summoned the bot when they hit the bot
     
  2. Best Answer:
    Post #2 by egamer3000, Aug 2, 2020 at 9:23 PM
  3. egamer3000

    egamer3000 Active Member

    Joined:
    Nov 25, 2019
    Messages:
    37
    Likes Received:
    7
    Code (Text):
    1. command /adminbot <player>:
    2.   trigger:
    3.     circleBot(arg-1)
    4.     message "&eChecking %arg-1%!"
    5.     set {checking::%arg-1's uuid%} to true
    6. on damage:
    7.   if {checking::%attacker's uuid%} == true:
    8.     if {bots::*} contains name of target:
    9.       set {checking::%attacker's uuid%} to false      
    10.       loop all players:
    11.         message "&c%attacker% was caught using KillAura!" to loop-player if loop-player has permission "staff.alert"
    should work.
     
  4. BotiiX

    BotiiX Member

    Joined:
    Jul 14, 2020
    Messages:
    8
    Likes Received:
    0
    I changed a few things and now it's working! Thank you!
     
Loading...