Hi all, I haven't updated my bot during the last three updates and now I planned to do so. But nothin' seems right anymore, my statusbar text displayal function is out of work and so is the namespy along with lighthack.

Here's my codes:

[code=cpp]
void WriteTibiaMemoryStr(int vaTibia, char* szData)
{
p_Tibia = OpenProcess(PROCESS_VM_WRITE | PROCESS_VM_OPERATION, 0, pID);
WriteProcessMemory(p_Tibia, (void *)vaTibia, szData, strlen(szData) + 1, NULL);
CloseHandle(p_Tibia);
}

void WriteTibiaMemoryInt(int vaTibia, int szData)
{
p_Tibia = OpenProcess(PROCESS_VM_WRITE | PROCESS_VM_OPERATION, 0, pID);
WriteProcessMemory(p_Tibia, (void *)vaTibia, &szData, sizeof(szData), NULL);
CloseHandle(p_Tibia);
}

void WriteTibiaMemoryByte(int vaTibia, BYTE Op_Mod[], int nBytes)
{
p_Tibia = OpenProcess(PROCESS_VM_WRITE | PROCESS_VM_OPERATION, 0, pID);
WriteProcessMemory(p_Tibia, (void *)vaTibia, Op_Mod, nBytes, NULL);
CloseHandle(p_Tibia);
}
[/code]

This one works for about 5 seconds right after you logged in, then it stops and you need to cause an original Tibia statusbar message in order to get it work for another few seconds;

[code=cpp]
void SetStatusbarText(char szText[32])
{
WriteTibiaMemoryInt(va_TextTime, 50);
WriteTibiaMemoryStr(va_InfoText, szText);
WriteTibiaMemoryByte(va_InfoText + strlen(szText), 0x00, 1); // Tested both with and without, thought it might be some kinda length error
}
[/code]

Namespy (xray) causes a crash, all the addresses are up to date and if any of you have any suggestions I'd be thankful (:

[code=cpp]
void enableXray()
{
BYTE xRay1mod[] = { 0x90, 0x90 };
BYTE xRay2mod[] = { 0x90, 0x90 };

WriteTibiaMemoryByte(va_xRay1, xRay1mod, 2);
WriteTibiaMemoryByte(va_xRay2, xRay2mod, 2);
}

void disableXray()
{
BYTE xRay1org[] = { 0x75, 0x4A };
BYTE xRay2org[] = { 0x75, 0x40 };

WriteTibiaMemoryByte(va_xRay1, xRay1org, 2):
WriteTibiaMemoryByte(va_xRay2, xRay2org, 2);
}
[/code]

Lighthack goes like this and it causes another crash, have I missed somethin' after the game client updates?

[code=cpp]
void enableLight()
{
BYTE xLightmod[] = { 0x90, 0x90 };
BYTE xLightAdrMod[] = { 0xFF };

WriteTibiaMemoryByte(va_LightHack, xLightmod, 2);
WriteTibiaMemoryInt(va_LightHackAdr, 255);
}

void disableLight()
{
BYTE xLightorg [] = { 0x7E, 0x05 };
BYTE xLightAdrorg[] = { 0x80 };

WriteTibiaMemoryByte(va_LightHack, xLightorg, 2);
WriteTibiaMemoryInt(va_LightHackAdr, 128);
}
[/code]