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 


how do you convert this to c++?

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

Joined: 13 May 2011
Posts: 3

PostPosted: Fri May 13, 2011 5:47 pm    Post subject: how do you convert this to c++? Reply with quote

i wanna make a trainer
so i want to make this cheat engine script converted to c++ .
this cheat attracts all the enemy monsters to one location.
i want to make a x and a y textbox to get the location of the monsters.
i dont know much about converting so can anyone help.
heres the code
Code:

// Monster Mind Control
// v.97.2
//
[ENABLE]
alloc(SetAggro,256)
alloc(cave1,64)
alloc(cave2,64)
alloc(cave3,64)
alloc(cave4,64)
alloc(GetVacX,16)
alloc(GetVacY,16)
alloc(getX,50);
alloc(getY,50);
alloc(x,4)
registersymbol(X)
alloc(y,4)
registersymbol(Y)
label(SkipSaveX)
label(SkipSaveY)
 
getX:
mov eax,[00CB80A8] // Mouse Base Pointer
cmp dword ptr [eax+9c8],0c// Mouse Animation Offset
jne SkipSaveX
mov eax,[eax+978] // Mouse Location
mov edx,[eax+8C] // Mouse X Offset
mov [X],edx
SkipSaveX:
ret
 
getY:
mov eax,[00CB80A8] // Mouse Base Pointer
cmp dword ptr [eax+9c8],0c // Mouse Animation Offset
jne SkipSaveY
mov eax,[eax+978] // Mouse Location
mov edx,[eax+88] // Mouse Y Offset
mov [Y],edx
SkipSaveY:
ret
 
009C988A:
jmp SetAggro
 
SetAggro:
call 009C0200
mov edx,[00CB7BDC] // Char Base
mov edx,[edx+1948] // Char pID
mov edx,[edx+8]
mov [esi+00000760],edx
jmp 009C988A+5
 
GetVacX:
call getX
mov eax,[X]
ret
 
GetVacY:
call getY
mov eax,[Y]
ret

009C929E:
jmp cave1
 
cave1:
call getX
push eax
call edx
fild dword ptr [X]
jmp 009C929E+5
 
009C5C7D:
jmp cave2
 
cave2:
call getX
push edx
call eax
fcomp dword ptr [X]
jmp 009C5C7D+5
 
009C7E5B:
jmp cave3
dw 9090
db 90
 
cave3:
call getX
mov [esp+1c],eax
fild dword ptr [X]
jmp 009C7E5B+8
 
009C7ED5:
jmp cave4
dw 9090
db 90
 
cave4:
call getY
mov [esp+1c],eax
fild dword ptr [Y]
jmp 009C7ED5+8
 
[DISABLE]
009C988A: // E8 ? ? ? ? 85 C0 75 09 5F 5E 5B 8B E5 5D
call 009C0200
 
009C929E: // 50 FF D2 DB 00 DC 5C 24 14 ? ? F6 C4 05
push eax
call edx
fild dword ptr [eax]
 
009C5C7D: // 52 FF D0 DB 00 DC 5C 24 38 ? ? F6 C4 05
push edx
call eax
fcomp dword ptr [eax]
 
009C7E5B: // 89 44 24 1C DB 44 24 1C 51 57 DD 5C 24 28
mov [esp+1C],eax
fild dword ptr [esp+1C]
 
009C7ED5: // 89 44 24 1C DB 44 24 1C 51 8D 57 18 52
mov [esp+1C],eax
fild dword ptr [esp+1C]
 
dealloc(SetAggro)
dealloc(cave1)
dealloc(cave2)
dealloc(cave3)

_________________
help me translate CE script to c++?
Back to top
View user's profile Send private message MSN Messenger
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Fri May 13, 2011 7:19 pm    Post subject: Reply with quote

just use WriteProcessMemory() and write the bytes directly, that's all there is to it really. if you need to allocate memory for a cave you can just use VirtualAllocEx()
Back to top
View user's profile Send private message
EliteCandyX
How do I cheat?
Reputation: 0

Joined: 13 May 2011
Posts: 3

PostPosted: Fri May 13, 2011 7:22 pm    Post subject: Reply with quote

slovach wrote:
just use WriteProcessMemory() and write the bytes directly, that's all there is to it really. if you need to allocate memory for a cave you can just use VirtualAllocEx()

tyvm Razz

_________________
help me translate CE script to c++?
Back to top
View user's profile Send private message MSN Messenger
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sun May 15, 2011 12:02 am    Post subject: Reply with quote

i've never even played the game, what am i missing here that is so horrible. as far as i can see, you're the only one mentioning it so...
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Sun May 15, 2011 10:46 am    Post subject: Reply with quote

slovach wrote:
i've never even played the game, what am i missing here that is so horrible. as far as i can see, you're the only one mentioning it so...

There was a m@ple forum here one or two years ago till it made a mess here
so db decided to delete it

_________________
Stylo
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: Sun May 15, 2011 12:10 pm    Post subject: Reply with quote

Shrooms wrote:
slovach wrote:
just use WriteProcessMemory() and write the bytes directly, that's all there is to it really. if you need to allocate memory for a cave you can just use VirtualAllocEx()


Surprised your letting a mooplestory thread go by.


The game this is for is not mentioned at all in his post therefore it is fine. It is not our jobs to assume everything is related to something that is no longer allowed to be discussed here. If he specifically stated it was for said game, then yes, we would lock the topic.

But in this case he didn't so don't worry about it, moderators will handle it if needed.

_________________
- 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