• Creating a small aimbot to shoot NPC's. How do?
    8 replies, posted
Hey! I really enjoy building little "wars" between NPC's in local servers (I always create massive armies on flat grass... I'm lucky I have a good processor!) and really enjoy modding and all that. I'm uncertain if it's not allowed or not (I looked at the rules but I do not see any rule pertaining to this, if It's against the rule I'll immediately delete the thread!) I wanted to create an aimbot that would aim at other NPC's (Zombies, combine, etc!) and I... can't exactly think about how to do this. I never took linear algebra or any 'advanced math' class (Only calc 1... ) and I know that I need to basically 'point a gun at their head' but I don't understand. I asked a friend and they told me the "steps" but they're not very good at explaining. Could any of you explain how an aimbot works line by line? My friend mentioned vectors, normalizing (?), bones and a lot of other terms I do not particularly understand. I do not even know where to begin honestly. Thank you! I do not need to be fed code but reading other code makes it a lot easier for me to understand, thanks in an advance!
You can download other aimbots off some websites and read them if that helps you.
[url]https://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index1685.html[/url]
Yes... "NPC" ... Yes..
So, update! I did exactly as you guys told me to, look up other aimbots and attempt to structure it as such but I have come into an issue I honestly can't solve! So, during my little "war" roleplay on a local server, I wanted to make the aimbot aim at zombies... but for some reason, they do not contain "ValveBiped.Bip01_Head1" for me to aim at... So, I instead used "Attachments" and made a list [code]attachments = { head = {"head","forward","eyes","anim_attachment_head","lefteye","righteye","nose","mouth","moth_left","mout_right","hat","headcrab"},[/code] Using this, I iterate through the head table, and lookup each attachment. If it's not nil and is valid, I'll attempt to GetAttachment and then return the Pos. This works, it will aim at their head, but only for 4/5th's of the zombie's walking animation. It constantly "loses" the head while its walking, and then regrabs it. Do you guys know why? I'd appreciate it!
[QUOTE=Lilyxfce;52110983]So, update! I did exactly as you guys told me to, look up other aimbots and attempt to structure it as such but I have come into an issue I honestly can't solve! So, during my little "war" roleplay on a local server, I wanted to make the aimbot aim at zombies... but for some reason, they do not contain "ValveBiped.Bip01_Head1" for me to aim at... So, I instead used "Attachments" and made a list [code]attachments = { head = {"head","forward","eyes","anim_attachment_head","lefteye","righteye","nose","mouth","moth_left","mout_right","hat","headcrab"},[/code] Using this, I iterate through the head table, and lookup each attachment. If it's not nil and is valid, I'll attempt to GetAttachment and then return the Pos. This works, it will aim at their head, but only for 4/5th's of the zombie's walking animation. It constantly "loses" the head while its walking, and then regrabs it. Do you guys know why? I'd appreciate it![/QUOTE] Well it looks like you have quite a good amount of typos in that table.
[QUOTE=VeXan;52111372]Well it looks like you have quite a good amount of typos in that table.[/QUOTE] I noticed! My friend didnt seem to spell correctly... That being said, I managed to print it's attachments out, and use "head" which correctly aims at the head... and then it often times breaks off. edit: I think it's best to just compile a list of bones for each specific zombie and combine and hard-code it at this point! [editline]16th April 2017[/editline] [QUOTE=VeXan;52111372]Well it looks like you have quite a good amount of typos in that table.[/QUOTE] I appreciate the help!
Most online players react to aimbots as a form of cheat, I'd recommend trying to find a monster setup you can target to specific players. UTDMT can be setup so they're on specific teams, so if those you want killed are on another team it'd accomplish your goals: [img]http://ic.pics.livejournal.com/evilgrins/3189901/2914771/2914771_original.png[/img]
[QUOTE=evilgrins;52126496]Most online players react to aimbots as a form of cheat, I'd recommend trying to find a monster setup you can target to specific players. UTDMT can be setup so they're on specific teams, so if those you want killed are on another team it'd accomplish your goals:[/QUOTE] Appreciate the response but I already wrote my own little aimbot for killing zombies! It's fun to mow down poison zombies in a war :)
Sorry, you need to Log In to post a reply to this thread.