Home Forum MultiPlayer Game Hacks & Cheats Other Semi-Popular First Person Shooter Hacks WarRock - International Hacks WarRock Hack Source Code OPK Posts 1–15 of 24 · Page 1 of 2
OPK
Hi, i've been doing trial and error with this code that i modified from an existing code from here:
http://www.mpgh.net/forum/showthread.php?t=695917
and my problem is every time the spawn wait timer set to 0, warrock automatically close.
Code:
struct CPlayer
{
char unknown0[66280]; //0x0000
float nofalldamage; //0x00102E8
char bhph1[20]; //0x102EC
float X; //0x0010300
char bhph2[4]; //0x10304
float Z; //0x0010308
char bhph3[4]; //0x1030C
float Y; //0x0010310
};//Size=0x10310(201420)
struct CBase
{
CPlayer* m_pLocalPlayer;;//0x0000
char* GlobalPtr[505156];//0x7b31c
CPlayer** m_pGlobalPlayers;//0x0000
};//size = 0x7b31c(505156)
CBase* pBase = (CBase*)ADR_PlayerPointer;
void OPK()
{
DWORD dwPlayerPtr = *(DWORD*)ADR_PlayerPointer;
if(dwPlayerPtr != 0)
{
if (GetAsyncKeyState(VK_NUMPAD3)&1)
{
if(OPKVal==0)
{
OPKVal=1;
for(int i = 0; i < 32; i++)
if ( pBase->m_pGlobalPlayers[i] - pBase->m_pLocalPlayer )
{
pBase->m_pGlobalPlayers[i]->X = OPKSaveX;
pBase->m_pGlobalPlayers[i]->Y = OPKSaveY;
pBase->m_pGlobalPlayers[i]->Z = OPKSaveZ;
}
else
{
OPKVal=0;
}
}
}
}
}
void OPKSAVESPOT()
{
if (GetAsyncKeyState(VK_F5)&1)
{
for(int i = 4; i < 32; i++)
{
OPKSaveX = pBase->m_pGlobalPlayers[i]->X;
OPKSaveY = pBase->m_pGlobalPlayers[i]->Y;
OPKSaveZ = pBase->m_pGlobalPlayers[i]->Z;
CPlayer* pPlayer = pBase->m_pGlobalPlayers[i];
pPlayer->X = OPKSaveX;
pPlayer->Y = OPKSaveY;
pPlayer->Z = OPKSaveZ;
}
}
}
It's because you just don't do T&E... Update the Cbase then onto your next problem
Originally Posted by
TrAdEMaRc
It's because you just don't do T&E... Update the Cbase then onto your next problem
If i'm not wrong, my CBase is up to date. 0x00B0B728 - 0x00A90408 - 4 = 0x7b31c which is correct, right?
Originally Posted by
Jhem
Hex:
0x7b31c
Dec:
504604
Holy Cow, i miscalculated my hex to decimal. Thanks Jhem.
EDIT: it is now working using this code:
Code:
struct CPlayer
{
char unknown0[66280]; //0x0000
float nofalldamage; //0x00102E8
char bhph1[20]; //0x102EC
float X; //0x0010300
char bhph2[4]; //0x10304
float Z; //0x0010308
char bhph3[4]; //0x1030C
float Y; //0x0010310
};//Size=0x10310(201420)
struct CBase
{
CPlayer* m_pLocalPlayer;;//0x0000
CHAR GlobalPtr[504604];//0x7b31c
CPlayer** m_pGlobalPlayers;//0x0000
};//size = 0x7b31c(504604)
CBase* pBase = (CBase*)ADR_PlayerPointer;
void OPK_ON()
{
if (GetAsyncKeyState(VK_NUMPAD3))
{
OPKVal = OPKVal = 1;
}
}
void OPK_OFF()
{
if (GetAsyncKeyState(VK_NUMPAD6))
{
OPKVal = OPKVal = 0;
}
}
void OPK()
{
if (OPKVal == 1)
{
for(int i = 0; i < 32; i++)
if ( pBase->m_pGlobalPlayers[i] - pBase->m_pLocalPlayer )
{
pBase->m_pGlobalPlayers[i]->X = OPKSaveX;
pBase->m_pGlobalPlayers[i]->Y = OPKSaveY;
pBase->m_pGlobalPlayers[i]->Z = OPKSaveZ;
}
}
void OPKSAVESPOT()
{
if (GetAsyncKeyState(VK_F5))
for(int i = 0; i < 32; i++)
{
OPKSaveX = pBase->m_pLocalPlayer->X;
OPKSaveY = pBase->m_pLocalPlayer->Y;
OPKSaveZ = pBase->m_pLocalPlayer->Z;
}
}
}
the problem is, the players heads back to their original position instantly after they spawn to the desired position that i set and vise versa. Any idea why?
Originally Posted by
-=meow=-
Holy Cow, i miscalculated my hex to decimal. Thanks Jhem.
EDIT: it is now working using this code:
Code:
struct CPlayer
{
char unknown0[66280]; //0x0000
float nofalldamage; //0x00102E8
char bhph1[20]; //0x102EC
float X; //0x0010300
char bhph2[4]; //0x10304
float Z; //0x0010308
char bhph3[4]; //0x1030C
float Y; //0x0010310
};//Size=0x10310(201420)
struct CBase
{
CPlayer* m_pLocalPlayer;;//0x0000
CHAR GlobalPtr[504604];//0x7b31c
CPlayer** m_pGlobalPlayers;//0x0000
};//size = 0x7b31c(504604)
CBase* pBase = (CBase*)ADR_PlayerPointer;
void OPK_ON()
{
if (GetAsyncKeyState(VK_NUMPAD3))
{
OPKVal = OPKVal = 1;
}
}
void OPK_OFF()
{
if (GetAsyncKeyState(VK_NUMPAD6))
{
OPKVal = OPKVal = 0;
}
}
void OPK()
{
if (OPKVal == 1)
{
for(int i = 0; i < 32; i++)
if ( pBase->m_pGlobalPlayers[i] - pBase->m_pLocalPlayer )
{
pBase->m_pGlobalPlayers[i]->X = OPKSaveX;
pBase->m_pGlobalPlayers[i]->Y = OPKSaveY;
pBase->m_pGlobalPlayers[i]->Z = OPKSaveZ;
}
}
void OPKSAVESPOT()
{
if (GetAsyncKeyState(VK_F5))
for(int i = 0; i < 32; i++)
{
OPKSaveX = pBase->m_pLocalPlayer->X;
OPKSaveY = pBase->m_pLocalPlayer->Y;
OPKSaveZ = pBase->m_pLocalPlayer->Z;
}
}
}
the problem is, the players heads back to their original position instantly after they spawn to the desired position that i set and vise versa. Any idea why?
Remove sleep
or
Originally Posted by
Ryuzaki2
Remove sleep
or
I'm sorry sir, but i don't have any Sleep(); Syntax.
Originally Posted by
-=meow=-
I'm sorry sir, but i don't have any Sleep(); Syntax.
Hmm, that's weird did you create an infinite loop? like
or
Originally Posted by
Ryuzaki2
Hmm, that's weird did you create an infinite loop? like
or
Yes, here:
Code:
void OperationThread()
{
for(;; )
{
if(*InGame)
{
OPK_ON();
OPK_OFF();
OPK();
OPKSAVESPOT();
}
if(*OutGame)
{
Sleep(100);
}
}
}
Code:
#include <windows.h>
#include <stdio.h>
#define ADR_Playerpointer 0x00A90408
#define ADR_Serverpointer 0x00A8F3B0
DWORD *ingame= (DWORD*)ADR_Playerpointer;
DWORD *outgame= (DWORD*)ADR_Serverpointer;
struct CPlayer
{
char unknown0[66280]; //0x0000
float nofalldamage; //0x00102E8
char bhph1[20]; //0x102EC
float X; //0x0010300
char bhph2[4]; //0x10304
float Z; //0x0010308
char bhph3[4]; //0x1030C
float Y; //0x0010310
};//Size=0x10310(201420)
struct CBase
{
CPlayer* m_pLocalPlayer;;//0x0000
CHAR GlobalPtr[504604];//0x7b31c
CPlayer** m_pGlobalPlayers;//0x0000
};//size = 0x7b31c(504604)
CBase* pBase = (CBase*)ADR_Playerpointer;
void OPK_ON()
{
if (GetAsyncKeyState(VK_NUMPAD3))
{
OPKVal = OPKVal = 1;
}
}
void OPK_OFF()
{
if (GetAsyncKeyState(VK_NUMPAD6))
{
OPKVal = OPKVal = 0;
}
}
void OPK()
{
if (OPKVal == 1)
{
for(int i = 0; i < 32; i++)
if ( pBase->m_pGlobalPlayers[i] - pBase->m_pLocalPlayer )
{
pBase->m_pGlobalPlayers[i]->X = OPKSaveX;
pBase->m_pGlobalPlayers[i]->Y = OPKSaveY;
pBase->m_pGlobalPlayers[i]->Z = OPKSaveZ;
}
}
void OPKSAVESPOT()
{
if (GetAsyncKeyState(VK_F5))
for(int i = 0; i < 32; i++)
{
OPKSaveX = pBase->m_pLocalPlayer->X;
OPKSaveY = pBase->m_pLocalPlayer->Y;
OPKSaveZ = pBase->m_pLocalPlayer->Z;
}
}
}
void HackThread()
{
for(;; )
{
if(*ingame)
{
OPK_ON();
OPK_OFF();
OPK();
}
if(*outgame)
{
}
}
Sleep(0);
}
BOOL WINAPI DllMain(HINSTANCE mod, DWORD DWORD_GRUND, LPVOID res)
{
switch(DWORD_GRUND)
{
case 1:
MessageBoxA(NULL,"Created by: ALLAN","SUCCESS",MB_OK);
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)HackThread , 0, 0, 0);
break;
}
return TRUE;
}
is that the correct full code??
i have error
Originally Posted by
azl3rz08
Code:
#include <windows.h>
#include <stdio.h>
#define ADR_Playerpointer 0x00A90408
#define ADR_Serverpointer 0x00A8F3B0
DWORD *ingame= (DWORD*)ADR_Playerpointer;
DWORD *outgame= (DWORD*)ADR_Serverpointer;
struct CPlayer
{
char unknown0[66280]; //0x0000
float nofalldamage; //0x00102E8
char bhph1[20]; //0x102EC
float X; //0x0010300
char bhph2[4]; //0x10304
float Z; //0x0010308
char bhph3[4]; //0x1030C
float Y; //0x0010310
};//Size=0x10310(201420)
struct CBase
{
CPlayer* m_pLocalPlayer;;//0x0000
CHAR GlobalPtr[504604];//0x7b31c
CPlayer** m_pGlobalPlayers;//0x0000
};//size = 0x7b31c(504604)
CBase* pBase = (CBase*)ADR_Playerpointer;
void OPK_ON()
{
if (GetAsyncKeyState(VK_NUMPAD3))
{
OPKVal = OPKVal = 1;
}
}
void OPK_OFF()
{
if (GetAsyncKeyState(VK_NUMPAD6))
{
OPKVal = OPKVal = 0;
}
}
void OPK()
{
if (OPKVal == 1)
{
for(int i = 0; i < 32; i++)
if ( pBase->m_pGlobalPlayers[i] - pBase->m_pLocalPlayer )
{
pBase->m_pGlobalPlayers[i]->X = OPKSaveX;
pBase->m_pGlobalPlayers[i]->Y = OPKSaveY;
pBase->m_pGlobalPlayers[i]->Z = OPKSaveZ;
}
}
void OPKSAVESPOT()
{
if (GetAsyncKeyState(VK_F5))
for(int i = 0; i < 32; i++)
{
OPKSaveX = pBase->m_pLocalPlayer->X;
OPKSaveY = pBase->m_pLocalPlayer->Y;
OPKSaveZ = pBase->m_pLocalPlayer->Z;
}
}
}
void HackThread()
{
for(;; )
{
if(*ingame)
{
OPK_ON();
OPK_OFF();
OPK();
}
if(*outgame)
{
}
}
Sleep(0);
}
BOOL WINAPI DllMain(HINSTANCE mod, DWORD DWORD_GRUND, LPVOID res)
{
switch(DWORD_GRUND)
{
case 1:
MessageBoxA(NULL,"Created by: ALLAN","SUCCESS",MB_OK);
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)HackThread , 0, 0, 0);
break;
}
return TRUE;
}
is that the correct full code??
i have error
You have an error because you didn't declared those variables.
Can you put it into pastebin?
Originally Posted by
Jhem
No it's not yet. I haven't found a solution yet on how to make the players stay longer in my desired postion(x,y,z). Also i have use your Jhem Loader V1.5 before it was patched, and it has the same problem when it comes to OPK. I can't kill anyone.I Wonder what's the problem
This part is your problem.
Code:
void OPK_ON()
{
if (GetAsyncKeyState(VK_NUMPAD3))
{
OPKVal = OPKVal = 1;
}
}
void OPK_OFF()
{
if (GetAsyncKeyState(VK_NUMPAD6))
{
OPKVal = OPKVal = 0;
}
}
void OPK()
{
if (OPKVal == 1)
{
for(int i = 0; i < 32; i++)
if ( pBase->m_pGlobalPlayers[i] - pBase->m_pLocalPlayer )
{
pBase->m_pGlobalPlayers[i]->X = OPKSaveX;
pBase->m_pGlobalPlayers[i]->Y = OPKSaveY;
pBase->m_pGlobalPlayers[i]->Z = OPKSaveZ;
}
}
void OPKSAVESPOT()
{
if (GetAsyncKeyState(VK_F5))
for(int i = 0; i < 32; i++)
{
OPKSaveX = pBase->m_pLocalPlayer->X;
OPKSaveY = pBase->m_pLocalPlayer->Y;
OPKSaveZ = pBase->m_pLocalPlayer->Z;
}
}
}
Why? Think about it.
Fixed
Code:
void OPKSave()
{
if (GetAsyncKeyState(VK_F5))
{
pBase->m_pGlobalPlayers[i]->X = OPKSaveX;
pBase->m_pGlobalPlayers[i]->Y = OPKSaveY;
pBase->m_pGlobalPlayers[i]->Z = OPKSaveZ;
}
}
void OPK()
{
if (OPKVal == 1))
{
for(int i = 0; i < 32; i++)
{
OPKSaveX = pBase->m_pLocalPlayer->X;
OPKSaveY = pBase->m_pLocalPlayer->Y;
OPKSaveZ = pBase->m_pLocalPlayer->Z;
}
}
}
Posts 1–15 of 24 · Page 1 of 2
This thread is closed for replies.