Problem with CInputControl in C# menu

User Tag List

Page 2 of 2 FirstFirst 12
Results 16 to 24 of 24
  1. #16
    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)
    Code:
    // Set input flags
    void CInputControl::SetFlags(unsigned int Flag, unsigned int Enable, unsigned int Time)
    {
    	// Function to set input flags
    	unsigned int SetFlags = gpRedPillMgr->GetFindPattern()->GetAddress("CInputControl__SetFlags");
    	// Timestamp function
    	unsigned int OsGetAsyncTimeMs = gpRedPillMgr->GetFindPattern()->GetAddress("OsGetAsyncTimeMs");
     	// Set the input flags
    	_asm
     	{
    		call OsGetAsyncTimeMs			// Get timestamp
     		push Time						// Time to set flag for
     		push eax						// Current timestamp
     		push Enable						// Whether to enable or disable the flag
     		push Flag						// The flag to set
    		mov ecx, this					// Get class pointer for __thiscall
     		call SetFlags
     	}
    }
    Tested and working.

    Problem with CInputControl in C#
  2. #17
    Fraak's Avatar Member
    Reputation
    20
    Join Date
    Mar 2007
    Posts
    14
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cant get it to work

    I have been trying for a couple of days now but I cant get it to work, This is my code so far.

    Code:
    _wowObj.Asm.AddLine("mov eax, {0}", System.Environment.TickCount); // Base of the Cinput class
    _wowObj.Asm.AddLine("mov ecx, {0}", (uint)0x011779A4);  // Base of the Cinput class
    _wowObj.Asm.AddLine("push {0}", time);
    _wowObj.Asm.AddLine("push eax");
    _wowObj.Asm.AddLine("push {0}", enable);
    _wowObj.Asm.AddLine("push {0}", flag);
    _wowObj.Asm.AddLine("call {0}", (uint) 0x005548F0); // SetFlag (DOH)
    _wowObj.Asm.AddLine("retn");
    Hoping either of you can tell me what I am doing wrong...

  3. #18
    charly's Avatar Established Member
    Reputation
    63
    Join Date
    Jan 2007
    Posts
    72
    Thanks G/R
    15/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @Cypher: Thank you.

    @Fraak: Your code is identical to mine but I use the value at the address CInput (Memory.ReadInt(process, 0x011779A4)), not the address itself. Nevertheless I must nudge my character in-game if I want it moves.

    Cypher said that the good way is to use the pointer to your instance (this in c++). Apparently it's not possible in c#. If I use the value at CInput address, it's because there is another post on mmoowned where people uses this technique.


  4. #19
    Shynd's Avatar Contributor
    Reputation
    97
    Join Date
    May 2008
    Posts
    393
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Holy ****ing hell, here's some idiot-proof functions that handle all of the OH SO DIFFICULT CInputControl crap for you. They are all of type void and do not require any parameters. If you cannot figure out how to use them, too bad.
    Code:
    StartMoveForward               -- 0x00554C80
    StopMoveForward                -- 0x00554CD0
    StartMoveBackward              -- 0x00554D10
    StopMoveBackward               -- 0x00554D60
    StartTurnLeft                  -- 0x00554DA0
    StopTurnLeft                   -- 0x00554DE0
    StartTurnRight                 -- 0x00554E30
    StopTurnRight                  -- 0x00554E70

  5. #20
    charly's Avatar Established Member
    Reputation
    63
    Join Date
    Jan 2007
    Posts
    72
    Thanks G/R
    15/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Shynd View Post
    Holy ****ing hell, here's some idiot-proof functions that handle all of the OH SO DIFFICULT CInputControl crap for you. They are all of type void and do not require any parameters. If you cannot figure out how to use them, too bad.
    Code:
    StartMoveForward               -- 0x00554C80
    StopMoveForward                -- 0x00554CD0
    StartMoveBackward              -- 0x00554D10
    StopMoveBackward               -- 0x00554D60
    StartTurnLeft                  -- 0x00554DA0
    StopTurnLeft                   -- 0x00554DE0
    StartTurnRight                 -- 0x00554E30
    StopTurnRight                  -- 0x00554E70
    Are you angry ? I tried to use CInputControl just for fun..


  6. #21
    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 Shynd View Post
    Holy ****ing hell, here's some idiot-proof functions that handle all of the OH SO DIFFICULT CInputControl crap for you. They are all of type void and do not require any parameters. If you cannot figure out how to use them, too bad.
    Code:
    StartMoveForward               -- 0x00554C80
    StopMoveForward                -- 0x00554CD0
    StartMoveBackward              -- 0x00554D10
    StopMoveBackward               -- 0x00554D60
    StartTurnLeft                  -- 0x00554DA0
    StopTurnLeft                   -- 0x00554DE0
    StartTurnRight                 -- 0x00554E30
    StopTurnRight                  -- 0x00554E70
    Lua ftw? All the movement functions are in one of the arrays at off_FCCFD8.

    Code:
    0x00554A00 -> JumpOrAscendStart
    0x00554B20 -> AscendStop
    0x00554BC0 -> DescendStop
    0x005538C0 -> ToggleRun
    0x00554C10 -> ToggleAutoRun
    0x00554C80 -> MoveForwardStart
    0x00554CD0 -> MoveForwardStop
    0x00554D10 -> MoveBackwardStart
    0x00554D60 -> MoveBackwardStop
    0x00554DA0 -> TurnLeftStart
    0x00554DE0 -> TurnLeftStop
    0x00554E30 -> TurnRightStart
    0x00554E70 -> TurnRightStop
    0x00554EC0 -> StrafeLeftStart
    0x00554F10 -> StrafeLeftStop
    0x00554F50 -> StrafeRightStart
    0x00554FA0 -> StrafeRightStop
    0x00555360 -> PitchUpStart
    0x00554FF0 -> PitchUpStop
    0x005553A0 -> PitchDownStart
    0x00555040 -> PitchDownStop
    0x00555090 -> TurnOrActionStart
    0x00555100 -> TurnOrActionStop
    0x00555140 -> CameraOrSelectOrMoveStart
    0x005551B0 -> CameraOrSelectOrMoveStop
    0x00555200 -> MoveAndSteerStart
    0x005552B0 -> MoveAndSteerStop
    0x00555F40 -> SetMouselookOverrideBinding
    0x00555660 -> MouselookStart
    0x00555310 -> MouselookStop
    0x00552C00 -> IsMouselooking
    0x005542F0 -> VehicleExit
    0x00554340 -> VehiclePrevSeat
    0x00554390 -> VehicleNextSeat
    0x00555360 -> VehicleAimUpStart
    0x00554FF0 -> VehicleAimUpStop
    0x005553A0 -> VehicleAimDownStart
    0x00555040 -> VehicleAimDownStop
    0x005543E0 -> VehicleAimIncrement
    0x00554440 -> VehicleAimDecrement
    0x00554490 -> VehicleAimRequestAngle
    0x00552C40 -> VehicleAimGetAngle
    0x00554520 -> VehicleAimRequestNormAngle
    0x00552C90 -> VehicleAimGetNormAngle
    0x00552D30 -> VehicleAimSetNormPower
    0x005529D0 -> VehicleAimGetNormPower
    0x005545C0 -> IsUsingVehicleControls
    0x00554610 -> CanExitVehicle
    0x00554660 -> CanSwitchVehicleSeats
    0x00552D90 -> IsVehicleAimAngleAdjustable
    0x00552E00 -> IsVehicleAimPowerAdjustable

  7. #22
    Fraak's Avatar Member
    Reputation
    20
    Join Date
    Mar 2007
    Posts
    14
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by charly View Post
    @Fraak: Your code is identical to mine but I use the value at the address CInput (Memory.ReadInt(process, 0x011779A4)), not the address itself. Nevertheless I must nudge my character in-game if I want it moves.
    Thank you got it to work this way, About that you have to nudge your character. Wat you need to to do is update the object manager before (just as with Lua_DoString and such in the other threads). Now I am not sure why this is but it does the trick.

  8. #23
    charly's Avatar Established Member
    Reputation
    63
    Join Date
    Jan 2007
    Posts
    72
    Thanks G/R
    15/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll try. thanks


  9. #24
    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)
    0x011779A4 is of type CInputControl** from your code, thats why you need to dereference it once first.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Problems With Instance Switching
    By SandLOL in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 08-30-2006, 09:22 PM
  2. Problem with WPE
    By weedlord in forum World of Warcraft General
    Replies: 0
    Last Post: 08-14-2006, 03:35 AM
  3. Problem with BWH 1.11.2
    By gwl15 in forum World of Warcraft General
    Replies: 3
    Last Post: 08-11-2006, 05:37 PM
  4. Problem with CE.
    By Eldretch in forum World of Warcraft General
    Replies: 1
    Last Post: 08-08-2006, 06:49 PM
  5. I have problem with BHW 3.0
    By sunrize1 in forum World of Warcraft General
    Replies: 1
    Last Post: 07-17-2006, 08:49 AM
All times are GMT -5. The time now is 02:05 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