Mouse-like turning using CInputControl? menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    xpl0itz's Avatar Member
    Reputation
    1
    Join Date
    Oct 2008
    Posts
    8
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mouse-like turning using CInputControl?

    Can CInputControl be used for turning with the precision and, perhaps more importantly, speed of mouse-turning?

    I'm looking to do this since I want to be able to have one character replicate the movement of another, without sending keystrokes or the like because that would mess up the synchronization.

    Merry Christmas everyone!

    Mouse-like turning using CInputControl?
  2. #2
    rootguy's Avatar Member
    Reputation
    3
    Join Date
    Aug 2008
    Posts
    36
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, you'll need to use a setfacing routine.

  3. #3
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by rootguy View Post
    No, you'll need to use a setfacing routine.
    Actually, you can use CInputControl.

    Precision? Definitely.

    Speed? Well.. it depends...

    You could do it, but you'd have to ramp up the turn speed CVar, then reset it when you're done turning.

  4. #4
    abuckau907's Avatar Active Member
    Reputation
    49
    Join Date
    May 2009
    Posts
    225
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    edit: removed a lot of fluff code: warning: this is stripped down, will cause unexpected results!

    Code:
         Private Sub RightClickTurn(ByVal gamePoint As worldPoint, ByVal asGhost As Boolean)
            If gamePoint.TurnDistance() <= 0.2 Then Exit Sub 'already facing point, exit sub
            'Move cursor to right-click-turnable point on wow.gui
            modPublic.SetCursorPos(GOOEY.RCTP.X, GOOEY.RCTP.Y)
            Threading.Thread.Sleep(350) 'sleep because setcursorpos() takes a second, if I didn't sleep it would mouse_down at the wrong location
            mouse_event(MouseFlags.RIGHTDOWN, 0, 0, 0, 0)
            While gamePoint.TurnDistance > 0.05
                If gamePoint.TurnDirection = "left" Then
                    If gamePoint.TurnDistance > 0.2 Then
                        mouse_event(MouseFlags.MOVE, -30, 0, 0, 0)
                    Else
                        mouse_event(MouseFlags.MOVE, -5, 0, 0, 0)
                    End If
                Else
                    If gamePoint.TurnDistance > 0.2 Then
                        mouse_event(MouseFlags.MOVE, 30, 0, 0, 0)
                    Else
                        mouse_event(MouseFlags.MOVE, 5, 0, 0, 0)
                    End If
                End If
                           Threading.Thread.Sleep(150) ' needs some time of sleep -> or will over turn
            End While
            ' right_click_up to return mouse to a normal state..we're done turning
            mouse_event(MouseFlags.RIGHTUP, 0, 0, 0, 0)
          
        End Sub
    It has a few bugs/problems, but..
    1) Wow must be active window because I just use mouse_event..it doesn't send to 'wow.exe' it sends to 'active app'
    2) it turns by 5|30 px which works for me..could be refined ?
    3) I could have checked Wow's Form.Location + .Width to make a 'best guess' for where to move the cursor to 'turn-click' but I use a ' GUI callibrate ' form, so..depends on your needs really.

    ** it would be 100% better if wow didn't have to be the active app, but it works for me, a private bot for when I'm asleep: It REALLY can be annoying to have the bot basically own ur pc and not be able to use other programs -> probably not what you want...
    Last edited by abuckau907; 12-26-2009 at 06:09 PM.

  5. #5
    ostapus's Avatar Active Member
    Reputation
    60
    Join Date
    Nov 2008
    Posts
    180
    Thanks G/R
    3/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can look into WoWX sources (you can find it on forum), project is using right click mouse movement (like in above post) which can be remade to use CInputControl. Dunno about CVar.
    Cypher, what CVar name to control turn speed ?

  6. #6
    rootguy's Avatar Member
    Reputation
    3
    Join Date
    Aug 2008
    Posts
    36
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Cypher View Post
    Actually, you can use CInputControl.

    Precision? Definitely.

    Speed? Well.. it depends...

    You could do it, but you'd have to ramp up the turn speed CVar, then reset it when you're done turning.
    You are right, it is possible. It is however far more difficult to aproach the precision and speed of the setfacing routine. If you can use the input control class you might aswell go for the easiest solution right?

  7. #7
    amadmonk's Avatar Active Member
    Reputation
    124
    Join Date
    Apr 2008
    Posts
    772
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by rootguy View Post
    You are right, it is possible. It is however far more difficult to aproach the precision and speed of the setfacing routine. If you can use the input control class you might aswell go for the easiest solution right?
    I second this; setfacing is *easy* and doesn't look "bottish" at all. From a safety point of view (ie, Warden), afaik it is no more or less safe than just using CInputControl directly.

    Just use setfacing.
    Don't believe everything you think.

  8. #8
    abuckau907's Avatar Active Member
    Reputation
    49
    Join Date
    May 2009
    Posts
    225
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    [filler/repost]

    (dumb question?) but.. SetFace() would require you to write to wow memory? I'm just trying to stay as out-of-process as possible, so far 100% only mem_read 0% mem_write--> no technical background, but isn't that ..safer? I mean..apparently they don't monitor it yet, but...yet? Hehe.

    Q. Which is easier/possible to detect: mouse_event or mem_write ??
    Last edited by abuckau907; 12-28-2009 at 07:21 PM.

  9. #9
    Nesox's Avatar ★ Elder ★
    Reputation
    1280
    Join Date
    Mar 2007
    Posts
    1,238
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You don't need to overwrite any memory to set your facing altho it might be the easiest way in your case, you can always call the function too

    int __stdcall SetFacing(float)
    0x0096E010

    Or you could take a look at Babbot and steal the key based SetFacing function or just do it the proper way and rape wow with needles aka, injection

    Edit: if you got CInputControl::ToggleControlBit(...) working you could use that it's just like turning with keys but without having to bitch with window handles etc.

    Last edited by Nesox; 12-29-2009 at 04:37 AM.

  10. #10
    amadmonk's Avatar Active Member
    Reputation
    124
    Join Date
    Apr 2008
    Posts
    772
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by abuckau907 View Post
    [filler/repost]

    (dumb question?) but.. SetFace() would require you to write to wow memory? I'm just trying to stay as out-of-process as possible, so far 100% only mem_read 0% mem_write--> no technical background, but isn't that ..safer? I mean..apparently they don't monitor it yet, but...yet? Hehe.

    Q. Which is easier/possible to detect: mouse_event or mem_write ??
    Yes, SetFace would be vulnerable to a stack-check, but I can (almost) guarantee you that not only is Warden not doing this right now, it's unlikely (for technical reasons) that they'll be doing it any time soon.

    Frankly, I'm mildly more scared of CTM than things like SetFace and SetFlags (whatever y'all call it), since as Cypher and Apoc and others have pointed out, it would be *very* easy to just stash off the "last write event" to CTM, and then have Warden periodically look at what's there vs. what should be there. Blammo, you've flagged about 90% of the bots out there in one scan.

    Ultimately, passive bots (memory reads and key/mouse event injection) are the only thing remotely approaching "safe" (as long as Blizz plays nice and stays in their own process). They're also very ungainly and difficult to optimize (I have a lot of very personal experience on this; with a memread/keystroke injection bot, I coulndn't get navigation much better than the weaving of a drunken sailor. My current injected bot is snappy and precise)
    Don't believe everything you think.

  11. #11
    RoKFenris's Avatar Member
    Reputation
    16
    Join Date
    Jun 2008
    Posts
    69
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That is why I love using Linux:

    1 - Patch Wine so it uses just received events to determine mouse position, and never queries X.
    2 - Hijack all input going into WoW's window.
    3 - Filter out input you don't want to reach the client, and add any fake input you want (including fake mouse movement).
    4 - ???
    5 - Profit.

    Although my project is just a radar, I use this process to tweak the mouse and keyboard controls in order to "correct" little snags I have with them when running WoW under Linux, and to make WoW believe the mouse is over any unit I click on my radar without actually moving the real mouse pointer.

  12. #12
    amadmonk's Avatar Active Member
    Reputation
    124
    Join Date
    Apr 2008
    Posts
    772
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by RoKFenris View Post
    That is why I love using Linux:

    1 - Patch Wine so it uses just received events to determine mouse position, and never queries X.
    2 - Hijack all input going into WoW's window.
    3 - Filter out input you don't want to reach the client, and add any fake input you want (including fake mouse movement).
    4 - ???
    5 - Profit.

    Although my project is just a radar, I use this process to tweak the mouse and keyboard controls in order to "correct" little snags I have with them when running WoW under Linux, and to make WoW believe the mouse is over any unit I click on my radar without actually moving the real mouse pointer.
    Oh, nice. I was gonna do this a while back. I went so far as to d/l the sources, get the build setup working, and put in a couple of little test patches to wineserver. Sounds like you're *way* further along...

    You could probably even do some really spiffy API spoofing in Wine in general, since the wineserver is just basically the kernel (as far as the apps are concerned) anyway... Et voila, kernel hacks without the pain in the ass of writing/maintaining Windows drivers.
    Don't believe everything you think.

  13. #13
    RoKFenris's Avatar Member
    Reputation
    16
    Join Date
    Jun 2008
    Posts
    69
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by amadmonk View Post
    You could probably even do some really spiffy API spoofing in Wine in general, since the wineserver is just basically the kernel (as far as the apps are concerned) anyway... Et voila, kernel hacks without the pain in the ass of writing/maintaining Windows drivers.
    Yep. But not just the kernel, also the whole complement of DLLs Windows comes with. Besides, just the debug output can already be pure gold in the hands of someone who knows what he is doing.

    For example, prepend your wine invocation with "WINEDEBUG=-all,opengl" and you can watch in real time every opengl command WoW uses (which makes it easy to take a look at WoW's render path). I once went as far as modifying the debug functions in order to deference the pointers and print whatever parameters they point at, and change objects using specific textures (detected by CRC checks) to wireframe.

    Also, don't forget about LD_PRELOAD. I have right now a library that can dump every texture (or just specific size/format ones) to blp files as they are loaded, which I did just to test how preloading worked

    I sometimes think about doing a bot with just input manipulation and OpenGL API interception, as a proof of concept, but I'm too lazy to tackle it right now

  14. #14
    amadmonk's Avatar Active Member
    Reputation
    124
    Join Date
    Apr 2008
    Posts
    772
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by RoKFenris View Post
    Yep. But not just the kernel, also the whole complement of DLLs Windows comes with. Besides, just the debug output can already be pure gold in the hands of someone who knows what he is doing.

    For example, prepend your wine invocation with "WINEDEBUG=-all,opengl" and you can watch in real time every opengl command WoW uses (which makes it easy to take a look at WoW's render path). I once went as far as modifying the debug functions in order to deference the pointers and print whatever parameters they point at, and change objects using specific textures (detected by CRC checks) to wireframe.

    Also, don't forget about LD_PRELOAD. I have right now a library that can dump every texture (or just specific size/format ones) to blp files as they are loaded, which I did just to test how preloading worked

    I sometimes think about doing a bot with just input manipulation and OpenGL API interception, as a proof of concept, but I'm too lazy to tackle it right now
    Eeenteresting. Once my curent project is complete, I may have to reinvestigate Wine...
    Don't believe everything you think.

  15. #15
    nitrogrlie's Avatar Member
    Reputation
    11
    Join Date
    Oct 2009
    Posts
    81
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I haven't done this yet because it's the holidays and I'm on visiting family and friends all the time, but has anyone tried to use the protected WoW Lua functions for turning/moving? Advantages and disadvantages? Experiences?

    I assume precision is somewhat of a problem as the turns would be time-based and I'm guessing that the turn speed isn't all that great...

Page 1 of 2 12 LastLast

Similar Threads

  1. Any 100% undetectable fishbots like Iwanna used to be?
    By Nogorn in forum WoW Bots Questions & Requests
    Replies: 3
    Last Post: 04-04-2015, 02:52 AM
  2. Mount through wall 4.0.1 (Like it used to be)
    By Cruven123 in forum World of Warcraft Exploration
    Replies: 11
    Last Post: 11-17-2010, 08:43 PM
  3. Issues with using CInputControl
    By Xcron in forum WoW Memory Editing
    Replies: 6
    Last Post: 11-16-2009, 01:33 AM
  4. [shoutbox]Make it back like it used to be
    By T1B in forum Suggestions
    Replies: 2
    Last Post: 12-13-2008, 03:59 PM
  5. How do i have a blood elf druid or something like that using navicat?
    By jtmurkz in forum World of Warcraft Emulator Servers
    Replies: 7
    Last Post: 09-26-2007, 01:05 AM
All times are GMT -5. The time now is 03:38 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search