| | WoW Memory Editing WoW Memory Editing for learning purposes only.
This section is more advanced than others on MMOwned Read the section specific rules, infractions will be given out if u break them!That is including the expectations! - If you don't meet them then don't post |  | 
07-22-2009
| | Sergeant | | | Join Date: Jun 2009
Posts: 66
Reputation: 19 | | | [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 05:22 AM.
| Donate to remove ads, get your "DONATOR title, and get access to the MMOwned community's elite Shoutbawx. 
07-22-2009
|  | MaiN's Biatch Legendary User | | | Join Date: Mar 2007 Location: VirtualAllocEx
Posts: 1,115
Nominated 26 Times in 3 Posts  TOTM/W Award(s): 1 Reputation: 727 Points: 36,171, Level: 28 | Level up: 95%, 129 Points needed |     | | | 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 | 
07-22-2009
| | Corporal | | | Join Date: Jan 2009
Posts: 33
Reputation: 10 Level up: 87%, 52 Points needed | | | | 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 08:40 AM.
| 
07-22-2009
|  | Kynox's sister's pimp Legendary User | | | Join Date: Apr 2006 Location: ntdll.dll
Posts: 4,188
Nominated 63 Times in 4 Posts  TOTM/W Award(s): 1 Reputation: 1085 Points: 55,580, Level: 35 | Level up: 16%, 3,120 Points needed |     | | Quote:
Originally Posted by ggg898 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. | 
07-22-2009
| | Corporal | | | Join Date: Jan 2009
Posts: 33
Reputation: 10 Level up: 87%, 52 Points needed | | | | 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 08:48 AM.
| 
07-22-2009
|  | Contributor | | | Join Date: Dec 2006 Location: 0x005FCB40
Posts: 398
Reputation: 164 Level up: 17%, 668 Points needed |     | | Quote:
Originally Posted by ggg898 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
__________________ Thank You Scrubs, 2001 - 2009
Last edited by jjaa; 07-22-2009 at 09:05 AM.
| 
07-22-2009
|  | Site Donator | | | Join Date: Apr 2008
Posts: 305
Reputation: 62 Level up: 31%, 484 Points needed |   | | Quote:
Originally Posted by jjaa 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?
__________________ Don't believe everything you think.
Last edited by amadmonk; 07-22-2009 at 05:38 PM.
| 
07-22-2009
|  | MMOwned WebDev Legendary User | | | Join Date: Jan 2008
Posts: 1,918
Nominated 5 Times in 1 Post Reputation: 1029 Points: 22,725, Level: 21 | Level up: 21%, 1,275 Points needed |     | | Quote:
Originally Posted by amadmonk 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 | 
07-22-2009
|  | Site Donator | | | Join Date: Apr 2008
Posts: 305
Reputation: 62 Level up: 31%, 484 Points needed |   | | Quote:
Originally Posted by Apoc 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: - Disable the KILLFOCUS message
- Programmatically enable the "mouse look start"
- (?) Maybe programmatically simulate mouse capture?
- Inject fake mouse input
__________________ Don't believe everything you think. | 
07-22-2009
| | Sergeant | | | Join Date: Jun 2009
Posts: 66
Reputation: 19 | | | @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 10:45 PM.
|  |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -4. The time now is 06:21 PM. |