Results 1 to 7 of 7
  1. #1
    thighwalker's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    0

    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);
                }
    
            }

  2. #2
    Pingo's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    687
    Reputation
    24
    Thanks
    865
    My Mood
    Blah
    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.
    Last edited by Pingo; 06-12-2013 at 10:52 AM.

  3. The Following User Says Thank You to Pingo For This Useful Post:

    Wazzaby (07-15-2013)

  4. #3
    thighwalker's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    0
    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.

  5. #4
    Pingo's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    687
    Reputation
    24
    Thanks
    865
    My Mood
    Blah
    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.

  6. The Following User Says Thank You to Pingo For This Useful Post:

    Wazzaby (07-15-2013)

  7. #5
    thighwalker's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    0
    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.

  8. #6
    Pingo's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    687
    Reputation
    24
    Thanks
    865
    My Mood
    Blah
    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?

  9. The Following User Says Thank You to Pingo For This Useful Post:

    Wazzaby (07-15-2013)

  10. #7
    thighwalker's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    0
    Full and Custom. I'll PM you a better contact method.

Similar Threads

  1. Uber tips for superjumping
    By Gotchuthief in forum Combat Arms Discussions
    Replies: 19
    Last Post: 02-14-2010, 03:23 PM
  2. Tips for super Spy?
    By ZeroTallon in forum Combat Arms Hacks & Cheats
    Replies: 10
    Last Post: 12-17-2008, 10:34 PM
  3. Tip for MPGH Public
    By AtSpZr in forum Combat Arms Hacks & Cheats
    Replies: 3
    Last Post: 10-19-2008, 02:17 PM
  4. Need Values And Tips For Making Trainer
    By jokuvaan11 in forum WarRock - International Hacks
    Replies: 6
    Last Post: 06-06-2007, 11:37 AM
  5. Im new and i need hacking tips for mph pleaze
    By office hackin jesus in forum General Game Hacking
    Replies: 12
    Last Post: 12-10-2006, 05:09 PM