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 


C++ Project

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Ziztey
Grandmaster Cheater
Reputation: 0

Joined: 20 Dec 2007
Posts: 535
Location: 127.0.0.1

PostPosted: Thu Dec 25, 2008 1:48 pm    Post subject: C++ Project Reply with quote

Here's my project, how can I make so the addresses write to MapleStory?

Code:

// Main
#include <Windows.h>
#include <iostream>
#include <conio.h>
using namespace std;

bool bHack = false;
bool xHack = false;

int main()
{
   for (;;Sleep(10))
   {
      cout << "project\r\n";
      cout << "Credits: \r\n";
      _getch();
            if (GetAsyncKeyState(VK_F1))
     {
       if (bHack == false) // jag hade gjort if (bHack == false), smakfråga
          {
            *(BYTE*)0x4A0A6B = 0x73;
            bHack = true;
         if (bHack) {
            cout << "Hack exekverat";
         }
         else if (!bHack) {
            cout << "Hack misslyckat att exekvera";
         }
         }
         else if (bHack == true)
         {
            *(BYTE*)0x4A0A6B = 0x74;
            bHack = false;
         if (bHack == false)
         {
            cout << "hack avstängt";
         }
         else if (bHack == true)
         {
            cout << "Hack kunde inte stängas av";
         }
         }
         Sleep(200);
      }
      else if (GetAsyncKeyState(VK_F2))
      {
         if (xHack == false) // jag hade gjort if (xHack == false), smakfråga
         {
             //*(BYTE*)0x***** = 0x*1; // här skriver du in dina fusk
             xHack = true;
          if (xHack == true)
          {
             cout << "hack exekverat";
          }
         
          else if (xHack == false)
          {
             cout << "hack misslyckades att exekvera";
          }
          }
         else if (xHack == true)
         {
             //*(BYTE*)0x**** = 0x*2;
             xHack = false;
          if (xHack == false)
          {
             cout << "hack avstängt";
          }
          else if (xHack == true)
          {
             cout << "hack misslycakdes att stängas av";
          }
         }
    }
}
}

_________________
kenta7795 wrote:
Lol, how do I know its fake?

The source is a .cpp, and a .h

Private server much?
Back to top
View user's profile Send private message
Deve
Expert Cheater
Reputation: 0

Joined: 20 Jan 2007
Posts: 245
Location: Stockholm, Sweden

PostPosted: Thu Dec 25, 2008 1:53 pm    Post subject: Reply with quote

First, you need to tell the program what process you want to hack on, using hWnd.
Example(SpawnTrainer)
Code:
   HWND FindGhostWindow = 0;
   while(FindGhostWindow==0) {
      FindGhostWindow = FindWindow("GhostSoul", "Ghost Online"); // When the window "Ghost Online" appears, it continues downwards..
      Sleep(200);


   GetWindowThreadProcessId(FindGhostWindow, &gamePid);
   hGame = OpenProcess(PROCESS_ALL_ACCESS, NULL, gamePid);


All thanks to Spawnfestis

ReadProcessMemory: http://msdn.microsoft.com/en-us/library/ms680553(VS.85).aspx
WirteProcessMemory: http://msdn.microsoft.com/en-us/library/ms680553(VS.85).aspx
Back to top
View user's profile Send private message MSN Messenger
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Thu Dec 25, 2008 2:11 pm    Post subject: Reply with quote

First you format C:, then burn the shit out of your PC and then read the commented lines in the source.
Back to top
View user's profile Send private message MSN Messenger
Jonyleeson
Master Cheater
Reputation: 0

Joined: 03 May 2007
Posts: 484
Location: Hérault, France

PostPosted: Thu Dec 25, 2008 2:11 pm    Post subject: Reply with quote

Code:
int main()
{
    [...]
    *(BYTE*)0x4A0A6B = 0x73;
    [...]
}

Point?

_________________
Back to top
View user's profile Send private message
Zerith
Master Cheater
Reputation: 1

Joined: 07 Oct 2007
Posts: 468

PostPosted: Thu Dec 25, 2008 2:13 pm    Post subject: Reply with quote

Ziztey, first learn C++, don't just copy codes and call it your own.

Code:

for (;;Sleep(10))
   {
      cout << "project\r\n";
      cout << "Credits: \r\n";
      _getch();
            if (GetAsyncKeyState(VK_F1))
     {
       if (bHack == false) // jag hade gjort if (bHack == false), smakfråga
          {
            *(BYTE*)0x4A0A6B = 0x73;
            bHack = true;
         if (bHack) {
            cout << "Hack exekverat";
         }

You're writing to your own process memory, how is that helpful?
You're writing the credits in the main loop!?, that would spam the console with the credits.
And many more mistakes you made..

First learn shit before trying anything like this.
Back to top
View user's profile Send private message MSN Messenger
Ziztey
Grandmaster Cheater
Reputation: 0

Joined: 20 Dec 2007
Posts: 535
Location: 127.0.0.1

PostPosted: Thu Dec 25, 2008 2:15 pm    Post subject: Reply with quote

I didn't call the codes mine, I called the project mine.
And i don't want to learn myself C++ for this project, cant just someone explain?

_________________
kenta7795 wrote:
Lol, how do I know its fake?

The source is a .cpp, and a .h

Private server much?
Back to top
View user's profile Send private message
Zerith
Master Cheater
Reputation: 1

Joined: 07 Oct 2007
Posts: 468

PostPosted: Thu Dec 25, 2008 2:16 pm    Post subject: Reply with quote

Ziztey wrote:
I didn't call the codes mine, I called the project mine.
And i don't want to learn myself C++ for this project, cant just someone explain?


Such idiots like you, should not be on the General Programming forum, as you are no programmer, and not trying to learn anything.
Back to top
View user's profile Send private message MSN Messenger
Ziztey
Grandmaster Cheater
Reputation: 0

Joined: 20 Dec 2007
Posts: 535
Location: 127.0.0.1

PostPosted: Thu Dec 25, 2008 2:18 pm    Post subject: Reply with quote

I don't want to read like five books for this project, this is something I'm doing for fun, I mean... Thanks.
_________________
kenta7795 wrote:
Lol, how do I know its fake?

The source is a .cpp, and a .h

Private server much?
Back to top
View user's profile Send private message
Jonyleeson
Master Cheater
Reputation: 0

Joined: 03 May 2007
Posts: 484
Location: Hérault, France

PostPosted: Thu Dec 25, 2008 2:19 pm    Post subject: Reply with quote

Quote:
if (bHack == false) // jag hade gjort if (bHack == false), smakfråga
{
*(BYTE*)0x4A0A6B = 0x73;
bHack = true;
if (bHack) {

cout << "Hack exekverat";
}
else if (!bHack) {
cout << "Hack misslyckat att exekvera";
}
}
else if (bHack == true)
{
*(BYTE*)0x4A0A6B = 0x74;
bHack = false;
if (bHack == false)

{
cout << "hack avstängt";
}
else if (bHack == true)
{
cout << "Hack kunde inte stängas av";
}
}
Sleep(200);


1) Your condition testing is inconsistent
2) Your setting bHack to true then testing if it's true and false? And then you're setting bHack to false and doing the same?
3) Same applies to xHack
4) OMG SOMEONE CODE ME TEH MAPLE HACK PLZ THEN I GET CREDITS KTHX

_________________
Back to top
View user's profile Send private message
smartz993
I post too much
Reputation: 2

Joined: 20 Jun 2006
Posts: 2013
Location: USA

PostPosted: Thu Dec 25, 2008 2:32 pm    Post subject: Reply with quote

CoolCat wrote:
Quote:
if (bHack == false) // jag hade gjort if (bHack == false), smakfråga
{
*(BYTE*)0x4A0A6B = 0x73;
bHack = true;
if (bHack) {

cout << "Hack exekverat";
}
else if (!bHack) {
cout << "Hack misslyckat att exekvera";
}
}
else if (bHack == true)
{
*(BYTE*)0x4A0A6B = 0x74;
bHack = false;
if (bHack == false)

{
cout << "hack avstängt";
}
else if (bHack == true)
{
cout << "Hack kunde inte stängas av";
}
}
Sleep(200);


1) Your condition testing is inconsistent
2) Your setting bHack to true then testing if it's true and false? And then you're setting bHack to false and doing the same?
3) Same applies to xHack
4) OMG SOMEONE CODE ME TEH MAPLE HACK PLZ THEN I GET CREDITS KTHX


Code:
bHack ? *(BYTE*)0x4A0A6B = 0x74 : *(BYTE*)0x4A0A6B = 0x73;
bHack = !bHack;
cout << ((bHack) ? "Hack kunde inte stangas av" : "hack avstangt");
Sleep(200);


Yay me.
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Thu Dec 25, 2008 2:42 pm    Post subject: Reply with quote

Ziztey wrote:
I don't want to read like five books for this project, this is something I'm doing for fun, I mean... Thanks.


Then you don't want to program now do you.
All you want to do is hack pieces of code together and call the project yours like you said yourself.

It actually pisses me off when people say these stupid things like "oh i dun want to read!! its to hard!! ughhh"
Then all I have to say is piss off and good luck finding help with that attitude.

You aren't a programmer, I agree with Zerith.

_________________
Back to top
View user's profile Send private message
Ziztey
Grandmaster Cheater
Reputation: 0

Joined: 20 Dec 2007
Posts: 535
Location: 127.0.0.1

PostPosted: Thu Dec 25, 2008 2:52 pm    Post subject: Reply with quote

lurc wrote:
Ziztey wrote:
I don't want to read like five books for this project, this is something I'm doing for fun, I mean... Thanks.


Then you don't want to program now do you.
All you want to do is hack pieces of code together and call the project yours like you said yourself.

It actually pisses me off when people say these stupid things like "oh i dun want to read!! its to hard!! ughhh"
Then all I have to say is piss off and good luck finding help with that attitude.

You aren't a programmer, I agree with Zerith.


I know lurc, I'm not a programmer and I won't be one.
As I said, I would like to "make" this project for fun, I didn't plan to take any credits becuase I problaby won't release it. Sorry for my attitude, but's that's the situation. =/

_________________
kenta7795 wrote:
Lol, how do I know its fake?

The source is a .cpp, and a .h

Private server much?
Back to top
View user's profile Send private message
isair
Grandmaster Cheater
Reputation: 0

Joined: 28 Dec 2007
Posts: 804

PostPosted: Thu Dec 25, 2008 2:54 pm    Post subject: Reply with quote

You can't manipulate the memory of other process's by using pointers. You need to use ReadProcessMemory and WriteProcessMemory for that and to use those functions you need a process handle. If you wanna write to and read from memory using pointers you can make a DLL and inject it to the process you want to manipulate.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Ziztey
Grandmaster Cheater
Reputation: 0

Joined: 20 Dec 2007
Posts: 535
Location: 127.0.0.1

PostPosted: Thu Dec 25, 2008 2:58 pm    Post subject: Reply with quote

isair wrote:
You can't manipulate the memory of other process's by using pointers. You need to use ReadProcessMemory and WriteProcessMemory for that and to use those functions you need a process handle. If you wanna write to and read from memory using pointers you can make a DLL and inject it to the process you want to manipulate.

Okay, thank you.
Please, lock this thread naow.

_________________
kenta7795 wrote:
Lol, how do I know its fake?

The source is a .cpp, and a .h

Private server much?
Back to top
View user's profile Send private message
ElectroFusion
Grandmaster Cheater
Reputation: 0

Joined: 17 Dec 2006
Posts: 786

PostPosted: Thu Dec 25, 2008 2:59 pm    Post subject: Reply with quote

Ziztey, you can't code something unless you studied how to code for weeks. I used to suck, I still do sorta but I tried. You never were a programmer... To think, I used to think that you were great.
_________________
qwerty147 wrote:

ghostonline wrote:

what world are you in?

bera

but i live in NZ
Back to top
View user's profile Send private message
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