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# automating a game the hardway? (League of Legends)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Diedy
Newbie cheater
Reputation: 0

Joined: 15 Jun 2011
Posts: 10

PostPosted: Sat Jun 18, 2011 4:39 pm    Post subject: C# automating a game the hardway? (League of Legends) Reply with quote

Hi guys !

This is my first post ever on CE forums.
I've been programming for years and I was interested in hacking and game development since I can remember.

Now, I've managed to get access to my Health, maxHealth and Level variable in C#. Initially I wanted to be able to pick my skill build order before entering a game and make the program automatically level my skills each time I level. I knew this could be done in two different ways, or I just send keystrokes if there is a hot key for levelling a skill or I inject the game to simulate a choice. For some weird reason the first method is not working in League of Legends, I use a keyboard simulator class but LoL doesn't recognise it's manoeuvres to level a skill. For open the chat and typing a text into it, it does work. But also, I don't like this unstable code anyway, when I would chat and level at the same time the bot wont level my skill correctly. I've come far since the few last days.

gamedev.stackexchange[DOT]com/questions/13626/creating-addons-for-any-game/13875#13875
(where I came from)

So the question is: what is this second method, how do I find what to inject and how do I do it ? (C#)

Thanks for reading/answering !

Diede
Back to top
View user's profile Send private message
streppel
Newbie cheater
Reputation: 0

Joined: 25 Jan 2010
Posts: 16

PostPosted: Sun Jun 19, 2011 5:49 pm    Post subject: Re: C# automating a game the hardway? (League of Legends) Reply with quote

Diedy wrote:
Hi guys !

This is my first post ever on CE forums.
I've been programming for years and I was interested in hacking and game development since I can remember.

Now, I've managed to get access to my Health, maxHealth and Level variable in C#. Initially I wanted to be able to pick my skill build order before entering a game and make the program automatically level my skills each time I level. I knew this could be done in two different ways, or I just send keystrokes if there is a hot key for levelling a skill or I inject the game to simulate a choice. For some weird reason the first method is not working in League of Legends, I use a keyboard simulator class but LoL doesn't recognise it's manoeuvres to level a skill. For open the chat and typing a text into it, it does work. But also, I don't like this unstable code anyway, when I would chat and level at the same time the bot wont level my skill correctly. I've come far since the few last days.

gamedev.stackexchange[DOT]com/questions/13626/creating-addons-for-any-game/13875#13875
(where I came from)

So the question is: what is this second method, how do I find what to inject and how do I do it ? (C#)

Thanks for reading/answering !

Diede


Hey
i don't know about league of legends, but in general it works with pushing arguments on the stack and calling the function.
download IDA or any other debugger and look at the LoL exes and dlls to see if there are debug informations and if the methodnames are obfuscated. if they are not you should be able to find the correct method for e.g. moving or whatever quite easily.

for the injection itself you should take a look at the blackmagic class(google helps you here) which has a wrapper for codeinjection

the other way would be to create a class dll that will be injected in the process(key words here would be managed injection, clr hosting)

if you need any more help just ask,i'll try to check these forums every now and then
Back to top
View user's profile Send private message
Diedy
Newbie cheater
Reputation: 0

Joined: 15 Jun 2011
Posts: 10

PostPosted: Mon Jun 20, 2011 7:13 am    Post subject: Re: C# automating a game the hardway? (League of Legends) Reply with quote

streppel wrote:
Diedy wrote:
Hi guys !

This is my first post ever on CE forums.
I've been programming for years and I was interested in hacking and game development since I can remember.

Now, I've managed to get access to my Health, maxHealth and Level variable in C#. Initially I wanted to be able to pick my skill build order before entering a game and make the program automatically level my skills each time I level. I knew this could be done in two different ways, or I just send keystrokes if there is a hot key for levelling a skill or I inject the game to simulate a choice. For some weird reason the first method is not working in League of Legends, I use a keyboard simulator class but LoL doesn't recognise it's manoeuvres to level a skill. For open the chat and typing a text into it, it does work. But also, I don't like this unstable code anyway, when I would chat and level at the same time the bot wont level my skill correctly. I've come far since the few last days.

gamedev.stackexchange[DOT]com/questions/13626/creating-addons-for-any-game/13875#13875
(where I came from)

So the question is: what is this second method, how do I find what to inject and how do I do it ? (C#)

Thanks for reading/answering !

Diede


Hey
i don't know about league of legends, but in general it works with pushing arguments on the stack and calling the function.
download IDA or any other debugger and look at the LoL exes and dlls to see if there are debug informations and if the methodnames are obfuscated. if they are not you should be able to find the correct method for e.g. moving or whatever quite easily.

for the injection itself you should take a look at the blackmagic class(google helps you here) which has a wrapper for codeinjection

the other way would be to create a class dll that will be injected in the process(key words here would be managed injection, clr hosting)

if you need any more help just ask,i'll try to check these forums every now and then


Thank you for your reply !

Can you give more information about that blackmagic class? I think I found the original class and I downloaded it's dll and example project.
But I can't even get the example project running without exceptions Sad

Do you have any experience with it ?

Thanks agian,
Diedy
Back to top
View user's profile Send private message
streppel
Newbie cheater
Reputation: 0

Joined: 25 Jan 2010
Posts: 16

PostPosted: Mon Jun 20, 2011 9:11 am    Post subject: Reply with quote

if you have the class simply include it in your c# project
you have to include the Magic namespace in the file
the contructor of the class take either a processid or a handle to the window as argument if i remember right
BlackMagic BM = new BlackMagic(Process.Id);
Back to top
View user's profile Send private message
Diedy
Newbie cheater
Reputation: 0

Joined: 15 Jun 2011
Posts: 10

PostPosted: Mon Jun 20, 2011 11:39 am    Post subject: Reply with quote

streppel wrote:
if you have the class simply include it in your c# project
you have to include the Magic namespace in the file
the contructor of the class take either a processid or a handle to the window as argument if i remember right
BlackMagic BM = new BlackMagic(Process.Id);


Yes ofcourse, but can you give an example for what I might need to do what I want to do? Trigger a method and pass the variables in an external process.
The problem I have with Black Magic is when I try to access a running process like: BlackMagic bm = new BlackMagic(SProcess.GetProcessFromProcessName("Notepad"));

I get the next exception:
Not all access rights or groups that are referenced are dedicated to the caller (Translated)

The exception is located in BMMain.cs public bool Open(int ProcessId)
System.Diagnostics.Process.EnterDebugMode();

Any idea how to fix this? Could you send me a project that works (Not the example project with BM).

And do you know how I can find certain functions I want with obfuscated naming? Any extra tools or methods of use of IDA ?

Many thanks again !
[/quote]
Back to top
View user's profile Send private message
lucidity
Advanced Cheater
Reputation: 0

Joined: 16 Feb 2011
Posts: 91

PostPosted: Mon Jun 20, 2011 11:59 am    Post subject: Reply with quote

You said "the hard way".

Write your own memory manipulation abstraction layer, you wuss.

_________________
» Antec Twelve Hundred Full Tower » EVGA E760 CLASSIFIED » EVGA GeForce GTX 580 SuperClocked 1536MB » i7-980XE » CORSAIR DOMINATOR 6GB PC3 12800 DDR3 » OS: Intel X25-M SSD » Game Storage: Raid-0 2 x WD VelociRaptor 10000 RPM » CE Cache Drive: 500GB WD Caviar » Power Supply: OCZ Z Series Gold 1000W
Back to top
View user's profile Send private message
Diedy
Newbie cheater
Reputation: 0

Joined: 15 Jun 2011
Posts: 10

PostPosted: Mon Jun 20, 2011 12:05 pm    Post subject: Reply with quote

lucidity wrote:
You said "the hard way".

Write your own memory manipulation abstraction layer, you wuss.


I said "the hard way" because the other option was sending key strokes which is rather simple.

You didn't answer my question but thanks for posting anyway,
Diede
Back to top
View user's profile Send private message
streppel
Newbie cheater
Reputation: 0

Joined: 25 Jan 2010
Posts: 16

PostPosted: Mon Jun 20, 2011 1:05 pm    Post subject: Reply with quote

Diedy wrote:
streppel wrote:
if you have the class simply include it in your c# project
you have to include the Magic namespace in the file
the contructor of the class take either a processid or a handle to the window as argument if i remember right
BlackMagic BM = new BlackMagic(Process.Id);


Yes ofcourse, but can you give an example for what I might need to do what I want to do? Trigger a method and pass the variables in an external process.
The problem I have with Black Magic is when I try to access a running process like: BlackMagic bm = new BlackMagic(SProcess.GetProcessFromProcessName("Notepad"));

I get the next exception:
Not all access rights or groups that are referenced are dedicated to the caller (Translated)

The exception is located in BMMain.cs public bool Open(int ProcessId)
System.Diagnostics.Process.EnterDebugMode();

Any idea how to fix this? Could you send me a project that works (Not the example project with BM).

And do you know how I can find certain functions I want with obfuscated naming? Any extra tools or methods of use of IDA ?

Many thanks again !
[/quote]

for the exception you get: i guess you use windows 7. disable all UAC stuff and reboot the pc, it should work then
Back to top
View user's profile Send private message
Diedy
Newbie cheater
Reputation: 0

Joined: 15 Jun 2011
Posts: 10

PostPosted: Mon Jun 20, 2011 2:49 pm    Post subject: Reply with quote

streppel wrote:
Diedy wrote:
streppel wrote:
if you have the class simply include it in your c# project
you have to include the Magic namespace in the file
the contructor of the class take either a processid or a handle to the window as argument if i remember right
BlackMagic BM = new BlackMagic(Process.Id);


Yes ofcourse, but can you give an example for what I might need to do what I want to do? Trigger a method and pass the variables in an external process.
The problem I have with Black Magic is when I try to access a running process like: BlackMagic bm = new BlackMagic(SProcess.GetProcessFromProcessName("Notepad"));

I get the next exception:
Not all access rights or groups that are referenced are dedicated to the caller (Translated)

The exception is located in BMMain.cs public bool Open(int ProcessId)
System.Diagnostics.Process.EnterDebugMode();

Any idea how to fix this? Could you send me a project that works (Not the example project with BM).

And do you know how I can find certain functions I want with obfuscated naming? Any extra tools or methods of use of IDA ?

Many thanks again !


for the exception you get: i guess you use windows 7. disable all UAC stuff and reboot the pc, it should work then[/quote]

Now I'm getting the next Exception at the same place:
A ReadProcessMemory- or WriteProcessMemory-command is only partially executed.

Is it possible to help me over Teamspeak/Teamviewer/Skype/IRC ?

Thanks !
Back to top
View user's profile Send private message
streppel
Newbie cheater
Reputation: 0

Joined: 25 Jan 2010
Posts: 16

PostPosted: Mon Jun 20, 2011 2:53 pm    Post subject: Reply with quote

sure,skype is fine, but don't expect my english to be really good. even tho it was my oral class in the a-levels it doesn't mean i'm good at it. pm me your skypename
Back to top
View user's profile Send private message
Diedy
Newbie cheater
Reputation: 0

Joined: 15 Jun 2011
Posts: 10

PostPosted: Mon Jun 20, 2011 2:57 pm    Post subject: Reply with quote

streppel wrote:
sure,skype is fine, but don't expect my english to be really good. even tho it was my oral class in the a-levels it doesn't mean i'm good at it. pm me your skypename


Is it possible you send me your Skype name in a pm? I can't yet.
Back to top
View user's profile Send private message
streppel
Newbie cheater
Reputation: 0

Joined: 25 Jan 2010
Posts: 16

PostPosted: Mon Jun 20, 2011 2:59 pm    Post subject: Reply with quote

Diedy wrote:
streppel wrote:
sure,skype is fine, but don't expect my english to be really good. even tho it was my oral class in the a-levels it doesn't mean i'm good at it. pm me your skypename


Is it possible you send me your Skype name in a pm? I can't yet.

neither....
xxxxxx
if anyone spams me i know it's one of the users here
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 Gamehacking 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