ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 1957

Force Challenge To Execute (Old Way)

by Rick - 04-04-2020 - 03:18 AM
#11
(04-04-2020 - 03:18 AM)Rick Wrote:
Code:
//Code For Forcing Challenge
typedef int(*XamInputGetState_t)(WORD dwUserIndex, DWORD r4, PXINPUT_STATE pState);
XamInputGetState_t XamInputGetStateOriginal;

BOOL pressButton = false;
BOOL ExecuteChallenge;
INT challengeCount = 0;

DWORD XamInputGetStateHook(DWORD dwUserIndex, DWORD r4, PXINPUT_STATE pState)
{
    DWORD dwResult = XamInputGetStateOriginal(dwUserIndex, r4, pState);

    if (dwUserIndex != 0 || dwResult != 0)
       return dwResult;

    if (pressButton){
       pState->Gamepad.wButtons |= XINPUT_GAMEPAD_A;
       pressButton = FALSE;
    }
    return dwResult;
}
VOID forever() {
    while (true) {
      Sleep(1);
      if (ExecuteChallenge){
         ExecuteChallenge= false;
         Sleep(2500);
         pressButton = true;
         printf("XboxLiveRocks Executed %i Challenges Successfully!\n", challengeCount); //print to xbwatson
         challengeCount++;
      }
   }
}
Code:
//Code for Challenge

HRESULT XekeysExecuteChallenge(...){
    //do challenge normally
    ExecuteChallenge = TRUE;
    
}
Code:
//Code for SystemHooks

BOOL IntializeChallengeHooks(){
    DoThread(forever);
    //everything else
}
Full Credit to Kraz & The xbO Team for this method.
nice leak!
Reply

Users browsing: 2 Guest(s)