Author Topic: Client sided aiming?  (Read 1172 times)

Alright guys, first off, no this is not for an aimbot, it is for an zombie based RPG mod I'm working on, the actual use of it inside the client is to aim a "breakouts", truthfully I'm just making the mod based purely on my own knowledge gain and fun.

It will not be released.


I've tested a few things from resources and implicated my own ideas/thoughts into a function that when given a Position in coordinates will cause the player to aim at that location.

However with the current script it causes the player to look in the same direction every time, no matter what.

Code: [Select]
function Aim(%pos)
{
if(%pos != 0)
{
%player = serverConnection.getControlObject();
%fv = %player.getMuzzleVector(0);
%x = getWord(%fv,0);
%y = getWord(%fv,1);
%vv = vectorNormalize(vectorSub(%pos,%player.getPosition()));
%xx = getWord(%vv,0);
%yy = getWord(%vv,1);
$mvYaw = mATan(%xx,%yy)-mATan(%x,%y);
$mvPitch = mATan(getWord(%fv,2),mSqrt(%x*%x+%y*%y))-mATan(getWord(%vv,2),mSqrt(%xx*%xx+%yy*%yy));
}
}

Any ideas?

Just leme pull out my aimbot code here...
ah here it is

Code: [Select]
%fv = ServerConnection.getControlObject().getMuzzleVector(0);
%x = getWord(%fv, 0);
%y = getWord(%fv, 1);
%v1 = vectorNormalize(vectorSub(%pos, ServerConnection.getControlObject().getPosition()));
%x1 = getWord(%v1, 0);
%y1 = getWord(%v1, 1);
$mvYaw = mATan(%x1, %y1) - mATan(%x, %y);
$mvPitch = mATan(getWord(%fv, 2), mSqrt(%x*%x + %y*%y)) - mATan(getWord(%v1, 2), mSqrt(%x1 * %x1 + %y1 * %y1);

Don't ask me about the math behind it, I have no idea.

%pos is the target position to aim at

function aimAtPos(%pos)
{
   %player = serverConnection.getControlOb ject();
   %fv = %player.getMuzzleVector(0);
   %x = getWord(%fv,0);
   %y = getWord(%fv,1);
   %vv = vectorNormalize(vectorSub(%pos,%player.getPosition()));
   %xx = getWord(%vv,0);
   %yy = getWord(%vv,1);
   $mvYaw = mATan(%xx,%yy)-mATan(%x,%y);
   $mvPitch = mATan(getWord(%fv,2),mSqrt(%x*%x+%y*%y))-mATan(getWord(%vv,2),mSqrt(%xx*%xx+%yy*%yy));
}

Haha, you both posted the same thing as me xD

It causes me to look at one direction, no matter what Pos is set to :/

Haha, you both posted the same thing as me xD

It causes me to look at one direction, no matter what Pos is set to :/
works for me
show what your inputing for args.
also echo args, see whats going wrong.

Just leme pull out my aimbot code here...
ah here it is

Code: [Select]
%fv = ServerConnection.getControlObject().getMuzzleVector(0);
%x = getWord(%fv, 0);
%y = getWord(%fv, 1);
%v1 = vectorNormalize(vectorSub(%pos, ServerConnection.getControlObject().getPosition()));
%x1 = getWord(%v1, 0);
%y1 = getWord(%v1, 1);
$mvYaw = mATan(%x1, %y1) - mATan(%x, %y);
$mvPitch = mATan(getWord(%fv, 2), mSqrt(%x*%x + %y*%y)) - mATan(getWord(%v1, 2), mSqrt(%x1 * %x1 + %y1 * %y1);

Don't ask me about the math behind it, I have no idea.

%pos is the target position to aim at

Didn't Rudyman create this code for AOT?

%pos == 33.3086 -21.591 1.43051e006

This is what pos is equivalent to in the Aiming function.

Is it the "e" causing issues?  How can I get rid of this sort of number formatting?

Didn't Rudyman create this code for AOT?
aimbot
I took it out of the code for the blockland aimbot.

I took it out of the code for the blockland aimbot.
That old one which does however still work?

That old one which does however still work?
it didn't because it was patched
until I fixed it

it didn't because it was patched
until I fixed it
What it was never patched

Still have my question...

Didn't Rudyman create this code for AOT?

No, i dont think age of time has the ::getMuzzleVector function.

What if someone makes off with the code, edits it a bit into an add-on, and then releases it through the internet? You guys should have messaged each other.

What if someone makes off with the code, edits it a bit into an add-on, and then releases it through the internet? You guys should have messaged each other.

Anyone is welcome to a snippet of code.

You can't just "hide" a method, function, or anything.

If you seriously think there aren't already aimbots on the internet, try google.

Also, "makes off" would be the incorrect term, as it's not "protected", this code can be used by anyone.