[Need Help] MousePosition menu

User Tag List

Results 1 to 10 of 10
  1. #1
    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)

    [Need Help] MousePosition

    This is definately not memory editing, but I'm not sure which section to put it in, and most ppl look here so..sry admins.

    Anyway, I'm using the cursor to rotate in-game and I just noticed something weird and I think (maybe) it has something to do w/ 3d view.
    Anyway, to rotate i setcursorposition to somewhere right-clickable on the wow screen (predefined point) , right click, move the mouse, and un-right click..pretty easy. But when you right_click it changes the mouse position a lot and when you move it..the values only change by 2-3

    MousePos Before Move: 760,585 (ie. setcurpos(clicable_point) )
    (right_click_down)
    MousePos After Move: 638,486 (ie. mouse_move(2px left))
    (right_click_up)
    LocalPlayer Start Rotation: 1.65556
    LocalPlayer End Rotation: 1.651633
    Angle Rotated: 0.003926992 'eh..looks like the mouse is a pretty accurate way to turn?

    Anyway, I was wondering: what's with the weird mouse position after right clicking, and why are the values only changing 2-3,4 at max I think. ??

    edit: It's not really important, because even though the cursor.position only changes by like 2,3 pixels, it still lets me rotate 360 correctly, so there isn't really a problem, just curious.
    Last edited by abuckau907; 07-22-2009 at 03:22 AM.

    [Need Help] MousePosition
  2. #2
    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)
    1) You can call SetFacint(float pAngle)
    2) You can overwrite you current facing in the movement struct and then 'nudging'
    3) You can use CInput_Control to turn
    4) You can do it with the camera and some other magic
    5) You can use the mouse

  3. #3
    ggg898's Avatar Member
    Reputation
    10
    Join Date
    Jan 2009
    Posts
    39
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Please dont use mouse to turn your char if you want to stay sane, I did when I first started out messing with wow, and I did it quite successfully too, but then after a while you realize that your values you move the mouse with depends if youre mounted, a ghost, screen res, mouse sensitivity... arghhh... Not to mention the fact that you cant use the mouse for other things while youre boting... Do yourself a favor and use nesox list. I myself use CTM and the lua functions to move around.
    Last edited by ggg898; 07-22-2009 at 06:40 AM.

  4. #4
    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 ggg898 View Post
    Please dont use mouse to turn your char if you want to stay sane, I did when I first started out messing with wow, and I did it quite successfully too, but then after a while you realize that your values you move the mouse with depends if youre mounted, a ghost, screen res, mouse sensitivity... arghhh... Do yourself a favor and use nesox list. I myself use CTM and the lua functions to move around.
    You do realize there's a cvar that controls your turn speed which you can easily modify... right? With a properly implemented mouse-turn routine you shouldn't have any issues.

  5. #5
    ggg898's Avatar Member
    Reputation
    10
    Join Date
    Jan 2009
    Posts
    39
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No actually I didnt, and i dint look into it more since the way i did it locked up the mouse so i couldnt surf for hairy porn while boting, and also the other methods are much easier and better to get precision with
    Last edited by ggg898; 07-22-2009 at 06:48 AM.

  6. #6
    jjaa's Avatar Contributor
    Reputation
    245
    Join Date
    Dec 2006
    Posts
    562
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ggg898 View Post
    No actually I didnt, and i dint look into it more since the way i did it locked up the mouse so i couldnt surf for hairy porn while boting, and also the other methods are much easier and better to get precision with

    You can use the CInputControl and CGCamera functions to do a mouse turn. To prevent the locking up of the mouse just do some WinAPI hooks.

    EDIT: Also mouse turning looks like 100x more realistic, and the
    precision is fine O.o
    Last edited by jjaa; 07-22-2009 at 07:05 AM.

  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 jjaa View Post

    You can use the CInputControl and CGCamera functions to do a mouse turn. To prevent the locking up of the mouse just do some WinAPI hooks.

    EDIT: Also mouse turning looks like 100x more realistic, and the
    precision is fine O.o
    Any reversing hints on CInputControl? I'm looking for a face routine that's better than CTM (although I have to admit that using the Face action on CTM is sexy since it apparently *keeps facing* the mob without interaction). Does this method require the "you must click once" thing?

    So far my foray into reversing CInput involved debugging into some of the LUA-exposed functions (MoveForwardStart). This produced a lot of surprising info (CTM pathing looks like a lot of little hardware events?? the LUA MoveXXXXStart/Stop methods cancel or act weird when you lose focus??), but not a whole lot of insight into who the overall system functions.

    EDIT: actually I think I was already 2/3 of the way there with CInputControl; I saw the call with 0x100 as a param in TurnLeftStart, which if I understand correctly is the call to set the "turn left" flag. Still gotta look into it to understand where it checks for window focus. Also, I have to figure out a good LUA entry for the CGCamera stuff -- MouseLookStart/MouseLookStop, maybe?
    Last edited by amadmonk; 07-22-2009 at 03:38 PM.
    Don't believe everything you think.

  8. #8
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by amadmonk View Post
    Any reversing hints on CInputControl? I'm looking for a face routine that's better than CTM (although I have to admit that using the Face action on CTM is sexy since it apparently *keeps facing* the mob without interaction). Does this method require the "you must click once" thing?

    So far my foray into reversing CInput involved debugging into some of the LUA-exposed functions (MoveForwardStart). This produced a lot of surprising info (CTM pathing looks like a lot of little hardware events?? the LUA MoveXXXXStart/Stop methods cancel or act weird when you lose focus??), but not a whole lot of insight into who the overall system functions.

    EDIT: actually I think I was already 2/3 of the way there with CInputControl; I saw the call with 0x100 as a param in TurnLeftStart, which if I understand correctly is the call to set the "turn left" flag. Still gotta look into it to understand where it checks for window focus. Also, I have to figure out a good LUA entry for the CGCamera stuff -- MouseLookStart/MouseLookStop, maybe?
    Code:
        /// <summary>
        /// The direction of movement in WoW as per the CGInputControl_ToggleControlBit function.
        /// These are actually the flags that are set/unset!
        /// </summary>
        [Flags]
        public enum MovementDirection : uint
        {
            None = 0,
            RMouse = (1 << 0), // 0x1,
            LMouse = (1 << 1), // 0x2,
            // 2 and 3 not used apparently. Possibly for flag masking?
            Forward = (1 << 4), // 0x10,
            Backward = (1 << 5), // 0x20,
            StrafeLeft = (1 << 6), // 0x40,
            StrafeRight = (1 << 7), // 0x80,
            TurnLeft = (1 << 8), // 0x100,
            TurnRight = (1 << 9), // 0x200,
            PitchUp = (1 << 10), // 0x400, For flying/swimming
            PitchDown = (1 << 11), // 0x800, For flying/swimming
            AutoRun = (1 << 12), // 0x1000,
            JumpAscend = (1 << 13), // 0x2000, For flying/swimming
            Descend = (1 << 14), // 0x4000, For flying/swimming
    
            ClickToMove = (1 << 22), // 0x400000, Note: Only turns the CTM flag on or off. Has no effect on movement!
    
            // 25 used somewhere. Can't figure out what for. Checked in Lua_IsMouseTurning. Possible camera turn?
            // Or mouse input flag? (Flag used: 0x2000001)
        }
    There are other things you may want as well. Just ask

  9. #9
    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 Apoc View Post
    There are other things you may want as well. Just ask
    But, but, but, I'm scared to ask. Y'all will just scream at me to USE THE SEARCH!!

    Actually what I mostly need to figure out is a way to debug the movement stuff.

    I'm guessing that when the WndProc gets a WM_KILLFOCUS message, the movement manager zaps or zeros out the current "hardware" movement flags. I think this is correct because CTM still works, but CTM -- from my initial pokings -- just emulates a series of hardware input events (my tracepoints in the IDA debugger lead me to this conclusion).

    So I'm guessing that for any movement except CTM to work properly, I'm going to have to disable the killfocus message path.

    Am I on the right track? I'm at work and don't have IDA etc. so I can't investigate this for an hour or two.

    WRT the camera and stuff I guess I need to:

    1. Disable the KILLFOCUS message
    2. Programmatically enable the "mouse look start"
    3. (?) Maybe programmatically simulate mouse capture?
    4. Inject fake mouse input
    Don't believe everything you think.

  10. #10
    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)
    @Nesox: I'm using the mouse, I know about ctm etc, thanks tho.?

    @ggg898: I don't actually use those values for anything, atm it uses hardcoded 10px and 3px when turning (if angle > .2 use 10px, else use 3px) then if math.abs(myRot-theirRelativeRot) < .008 //we are facing them! so while I haven't tested it while dead, it *should* still work the same (again, because I just use hardcoded 10px, 3px)

    I guess this might be stupid, but I don't know enough about security, so I was *trying* not to use writeprocessmemory() ..again, stupid I know, because all of you are doing it w/o problems...also, a lot of the code you guys talk about requires so much in-depth knowledge to know how to not get in trouble (even if they don't check now, they might, even if it's a .0001 chance) that atm i'd rather just stick to memreads and mouse/keyboard (which i might need to learn more about..as far as detection, but I'm guessing that's lower on the list than ppl using lua functions? Maybe not?) Any thoughts?
    Last edited by abuckau907; 07-22-2009 at 08:45 PM.

Similar Threads

  1. need help with shammy talents
    By jason in forum World of Warcraft General
    Replies: 5
    Last Post: 07-19-2006, 02:02 AM
  2. Need Help with WoW Glider
    By paypal in forum World of Warcraft General
    Replies: 2
    Last Post: 07-07-2006, 02:08 AM
  3. I need help
    By ff9pro in forum World of Warcraft General
    Replies: 4
    Last Post: 07-05-2006, 08:43 PM
  4. Need help
    By zamp in forum World of Warcraft General
    Replies: 1
    Last Post: 06-24-2006, 10:54 PM
  5. Need Help
    By Slumlorde in forum World of Warcraft General
    Replies: 4
    Last Post: 06-23-2006, 08:20 AM
All times are GMT -5. The time now is 04:37 AM. 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