Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Help Me Please , How to Convert Byte OFF to ON :'(

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
dhanyasashi
How do I cheat?
Reputation: 0

Joined: 23 Feb 2013
Posts: 0

PostPosted: Sat Feb 23, 2013 5:15 am    Post subject: Help Me Please , How to Convert Byte OFF to ON :'( Reply with quote

//===================================//
//Name : Ryan Pebriansyah
//Created : Ryanltszh (Me)
//Thanks : Allah Swt
//Notice : Jgn di sebar pliss buatny susah
//===================================//


#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>

//============ OFFSET ============
#define Brutal 0xCB0210 //Cari Pke AOB
//============ ------ ============

LPTSTR ModulGame = "lostsaga.exe"; //Targetnya

void Patch(void *adr, void *ptr, int size)

{

DWORD OldProtection;
VirtualProtect(adr,size,PAGE_EXECUTE_READWRITE, &OldProtection);
memcpy(adr,ptr,size);
VirtualProtect(adr,size,OldProtection, &OldProtection);
}
void WritePointer(unsigned long ulBase, int iOffset, int iValue)
{
if (!IsBadReadPtr((VOID*)ulBase, sizeof(unsigned long)))
{
if (!IsBadWritePtr((void*)(*(unsigned long*)ulBase + iOffset), sizeof(unsigned long)))
{
*(int*)(*(unsigned long*)ulBase + iOffset) = iValue;
}
}
}
void SagaBlog()
{
while(1)
{



//========== Brutal ==========//
if (GetAsyncKeyState(VK_F1)&1) { // On
MessageBeep(MB_ICONINFORMATION);
DWORD adrMin1, adrMin2 = 0;
DWORD dwPB = (DWORD)GetModuleHandleA("lostsaga.exe");
if (dwPB > 0) {
adrMin1 = dwPB + (DWORD)Brutal;
Patch((void *)(adrMin1),(void*)(PBYTE)"\x43\x53\x5F\x44\x45\x4C\x41\x59\x00\x00\x00\x00\x57\x61\x69\x74", 16); // Byte ON
}
}

if (GetAsyncKeyState(VK_F2)&1) { // Off
MessageBeep(MB_ICONINFORMATION);
DWORD adrMin1, adrMin2 = 0;
DWORD dwPB = (DWORD)GetModuleHandleA("lostsaga.exe");
if (dwPB > 0) {
adrMin1 = dwPB + (DWORD)Brutal;
Patch((void *)(adrMin1),(void*)(PBYTE)"\x43\x53\x5F\x44\x45\x4C\x41\x59\x00\x00\x00\x00\x57\x61\x69\x74", 16); // Byte OFF
}
}

Sleep(108); // Perintah jeda
}
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sat Feb 23, 2013 2:36 pm    Post subject: Reply with quote

For one:
http://forum.cheatengine.org/faq.php#0

For two:
Your question doesn't even make sense and copy pasting others code asking for help is not a great way to get into programming. Try taking the time to learn the language before jumping into things you don't understand.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites