Tips for smooth function?

Posts 17 of 7 · Page 1 of 1
Tips for smooth function?
Hello. I am new to this forum, though I am not new to programming. This is, however, my first attempt at making an aimbot. My aimbot works and all (as in it aims at the target, shots hit the target), but the smoothing is not so good.

My goal here is to make it as stealthy as possible, so if someone could make some suggestions/put me in the right direction, it would be greatly appreciated.


Code:
  float mouseH = Mem.ReadFloat(Mem.Mouse());
            float mV = Mem.ReadFloat(Mem.Mouse() + 0x4);
            float Speed = float.Parse(textBox6.Text) / 179;
            if (vecth >= 0 && vecth < (Math.PI))
            {
                if (mouseH > ((vecth - 0.01F)) && mouseH <= ((vecth + 0.01F)))
                    Mem.WriteFloat(Mem.Mouse(), vecth);
                else
                {
                    if (mouseH >= 0 && mouseH > vecth && mouseH < (float)Math.PI)
                        Mem.WriteFloat(Mem.Mouse(), mouseH -= Speed);
                    if (mouseH >= 0 && mouseH < vecth && mouseH < (float)Math.PI)
                        Mem.WriteFloat(Mem.Mouse(), mouseH += Speed);
                    if (mouseH > (float)Math.PI && mouseH <= (float)(Math.PI * 2))
                        if (vecth < 2f) Mem.WriteFloat(Mem.Mouse(), mouseH += Speed);
                        else Mem.WriteFloat(Mem.Mouse(), mouseH -= Speed);
                }
            }
            if (vecth > (Math.PI) && vecth <= (float)(Math.PI * 2))
            {
                if (mouseH > (vecth - 0.1F) && mouseH <= (vecth + 0.1F))
                    Mem.WriteFloat(Mem.Mouse(), vecth);
                else
                {
                    if (mouseH > vecth && mouseH > (Math.PI))
                        Mem.WriteFloat(Mem.Mouse(), mouseH -= Speed);
                    if (mouseH < vecth && mouseH > 2f)
                        Mem.WriteFloat(Mem.Mouse(), mouseH += Speed);
                    if (mouseH < vecth && mouseH < 2f)
                        Mem.WriteFloat(Mem.Mouse(), mouseH -= Speed);
                }
            }
           
            if (mV > (vectv - 0.03f) && mV < (vectv + 0.03f))
                Mem.WriteFloat(Mem.Mouse() + 0x4, vectv);
            else
            {
                if (mV > vectv && mV != vectv)
                    Mem.WriteFloat(Mem.Mouse() + 0x4, mV -= Speed);
                if (mV < vectv && mV != vectv)
                    Mem.WriteFloat(Mem.Mouse() + 0x4, mV += Speed);
            }

        }
What game? Let me guess, halo right?

Edit: @thighwalker
Actually probably isn't. That code you posted is unique to halo.
I can't see it working for other games. You would probably need a friend in game to calculate or maybe someone has an easier option.
Quote Originally Posted by Pingo View Post
What game? Let me guess, halo right?

Edit: @thighwalker
Actually probably isn't. That code you posted is unique to halo.
I can't see it working for other games. You would probably need a friend in game to calculate or maybe someone has an easier option.
You would know, you're the only one who released a public source for a halo hack with smoothing :P. I'll give you credit where it's due, hope you don't mind if I tweak your SetMouse function.
Btw, the twitching was much lessened by subtracting vect2 from vect1 in the Get3d function, as opposed to the opposite.
Quote Originally Posted by thighwalker View Post
You would know, you're the only one who released a public source for a halo hack with smoothing :P. I'll give you credit where it's due, hope you don't mind if I tweak your SetMouse function.
Btw, the twitching was much lessened by subtracting vect2 from vect1 in the Get3d function, as opposed to the opposite.
Don't want credit, hurts to look at it.
Coded it a long time ago.

I'll see if I can dig up some of my old stuff and help you out better.
As far as I can remember, the anti snap worked fine.
What exactly are you trying to achieve?

I remember creating an app that would spawn fake players I would use to test the bot on.
I'll try finding that as well.
I appreciate such willing assistance.

if (mouseH > (vecth - 0.1F) && mouseH <= (vecth + 0.1F))
if (mV > (vectv - 0.03f) && mV < (vectv + 0.03f))

The anti snap worked well until it got to 0.1 horizontally or 0.03 vertically, then not so much.
I've messed around with several aimbots for different games, and they all seemed to have the smoothing down so well it would look legit. That's the ideal achievement.
Yea not a problem. I used to have fun messing with this game.
I think you should start from scratch and make a bot that isn't as bloated.

Remember the first bots?, something like that but with an anti snap.
I still have my halo disk, just need to install it again.
Custom,full or trial?
Full and Custom. I'll PM you a better contact method.
Posts 17 of 7 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?