[Help] Aimbot

01/03/2012 06:09 JehovahzWitness#1
Can anyone explain how I would go about creating like a command to enable aimbotting.

Or Just to have a like scentsword fire whenever the target is on the screen
01/03/2012 06:26 pro4never#2
Well I'm going to ASSUME you're not posting in the complete wrong section AND asking incorrectly. If that's the case you wish your private server (which is non binary server) to have a command to let gm's use aimbot.

There's plenty of ways you could write it but here's some simple starting points...

Inside player class (regardless what it's called in your source), hold a target ID or a entity object as target.

Eg:

public uint AimbotTarget = 0;


In command do something like...

if(user.Permission < Permissions.PlayerHelper)
{
user.SendMessage("You do not have permission to use aimbot!");
break;
}
Player targ;
PlayerLookup(data[1], out targ);
if(targ == null)
{
user.SendMessage("No Such Player Found: " + data[1])
break;
}
user.AimbotTarget = targ.UID;
user.SendMessage("Target Acquired: Targeting player " + targ.Name);
if(Calculations.Distance(user, targ) < 10)
ProcessAttack(new Packet.InteractPacket{Action = Magic, Target = targ.UID, PositionX = targ.X, PositionY = targ.Y, ID = user.UID});


Then write something into your threading system (I'd put in your attack thread...)

foreach(Player p in Kernel.Clients.Values)
{
if(p.AimbotTarget != 0)
{
if(!kernel.Clients.ContainsKey(p.AimbotTarget)
{
p.AimbotTarget = 0;
continue;
}
Player targ = Kernel.Clients[p.AimbotTarget];
//I'd check to make sure client is REALLY connected just incase there was collection issue. If not connected remove from kernel.Clients
if(Calculations.Distance(user, targ) > 10)
continue;
ProcessAttack(new Packet.InteractPacket{Action = Magic, Target = targ.UID, PositionX = targ.X, PositionY = targ.Y, ID = user.UID});
}
}


Now... obviously this is not real code. I just pulled it out of my ass with no real consideration for efficiency or error checking...


You'd need to write all the required methods such as PlayerLookup and most likely your packets/methods all take different params then mine. Example is loosely based around albetros.
01/03/2012 13:33 Y u k i#3
Quote:
Originally Posted by pro4never View Post
....
Now... obviously this is not real code. I just pulled it out of my ass with no real consideration for efficiency or error checking...
...
Yoda mode:
Intressting things you put into your ass :rolleyes:
:D