The Bytecode Club
Enhanced bot using memory reads - Printable Version

+- The Bytecode Club (https://the.bytecode.club)
+-- Forum: Lobby (https://the.bytecode.club/forumdisplay.php?fid=1)
+--- Forum: Game Cheating, Botting & Reverse Engineering (https://the.bytecode.club/forumdisplay.php?fid=97)
+--- Thread: Enhanced bot using memory reads (/showthread.php?tid=348)

Pages: 1 2 3 4 5 6 7 8 9


RE: Enhanced bot using memory reads - Greyman - 01-24-2015

(01-24-2015, 02:35 AM)FastFrench Wrote:  Very interesting.

Do you have an idea if fights are resolved locally or server-side ?

Both. The fight is run locally, but the ultimate arbiter of the outcome is the server, where it's fully simulated based on whatever packets it receives describing the fight - those packets are largely troop/spell placements, containing both temporal and spatial coordinates.


RE: Enhanced bot using memory reads - Greyman - 01-24-2015

(01-24-2015, 09:01 AM)Antidote Wrote:  If we can do it within Windows environment it'll open up lots of possiblities for botting

The two best chances for a pure Windows bot are:
- SuperCell releasing a PC or (perhaps) a Windows Phone version of CoC
- A clientless bot using raw packets between client and server, as per the work that Madalilng has done in the MITM thread.

Reliably and consistently messing with BlueStacks or Andy memory directly would be a project of massive proportions, far eclipsing any work you'd do on the bot itself.


RE: Enhanced bot using memory reads - Greyman - 02-06-2015

Another enum to help those who are just starting out with reversing engineering the game memory:

public enum ClashSpellType
{
Lightning = 26000000,
Heal = 26000001,
Rage = 26000002,
Jump = 26000003,
Freeze = 26000004
}


RE: Enhanced bot using memory reads - Greyman - 02-06-2015

When you're looking at on-field troops in memory, or looking for icons on the attack bar.... this also comes in handy:

public enum ClashHeroType
{
BarbarianKing = 28000000,
ArcherQueen = 28000001
}


RE: Enhanced bot using memory reads - kojometa - 02-09-2015

wow i've just seen this thread the first time lol.
i was also trying to get mem information with CE in the past but i always had the problem with bluestacks.

the only packet-based features i have ever seen concerning coc was someone who coded a proxy and lead all the bluestacks traffic over it to sniff the enemy base. after that he spoofed it into his own base to have a look what troops the enemy has, where the hidden traps are located and so on Wink

gonna check out this topic frequently now


RE: Enhanced bot using memory reads - Snarg - 02-09-2015

(02-09-2015, 02:12 AM)kojometa Wrote:  the only packet-based features i have ever seen concerning coc was someone who coded a proxy and lead all the bluestacks traffic over it to sniff the enemy base. after that he spoofed it into his own base to have a look what troops the enemy has, where the hidden traps are located and so on Wink

gonna check out this topic frequently now

ultrapowa, who now charges a 'donation' fee for his advanced features. He does amazing work, but does not like to share.


RE: Enhanced bot using memory reads - okami6015 - 02-10-2015

hi guys , can i read memory values with use adb shell ? DeadtongueDeadtongue


RE: Enhanced bot using memory reads - Greyman - 02-10-2015

(02-09-2015, 02:12 AM)kojometa Wrote:  wow i've just seen this thread the first time lol.
i was also trying to get mem information with CE in the past but i always had the problem with bluestacks.

For a memory-reading bot the server component is a necessary evil, but it isn't a particularly big hurdle to get over. Set it up once and you're done.

What I'd really like to do is pair the memory-reading stuff I've developed with an existing bot, to enhance what's already there, but keep some of the internals closed so that commercial bots can't take advantage. Unfortunately the only freely-available one I'm aware of is here, and written in AutoIt. If it was C# or Java or some other remotely credible language, I'd be signing up.

There's some really cool stuff in what I've reverse engineered now. In addition to the building and trap information, enemy clan castle troops, etc, I also have available:

- Information for on-field troops during a battle, both enemy and friendly. Using the data you could intelligently figure out where to drop a lightning spell on enemy clan castle troops, for example. At the moment I just use it to know when my troops are dead so I can end the battle.

- Troops and spells still available on the battle bar - how many of each type, etc. Maybe you're already doing that with some sort of OCR?


As it stands I have a very primitive bot running, but with the extra level of information available (position and type of traps, walls, etc) you could make a very capable, intelligent bot that would blow anything else out there out of the water.


RE: Enhanced bot using memory reads - Greyman - 02-10-2015

(02-10-2015, 06:54 AM)okami6015 Wrote:  hi guys , can i read memory values with use adb shell ? DeadtongueDeadtongue

It wouldn't be straightforward or performant, but it is technically feasible. You'd still have to root the device, but as root you could read /proc/<pid>/mem for the CoC process.


RE: Enhanced bot using memory reads - Samota - 02-10-2015

Hello,

I am trying to track down the memory values so that I can implement them into the autoit bot. I have found the addresses by using Cheat Engine and unrooted BlueStacks, but I can't seem to find the pointers.

[Image: COC-vs-CheatEngine_zps56a36d4e.png]

When I click the "find out what writes to this address" option, it gives a prompt saying that it will attach the debugger of Cheat Engine to the process. When I click continue, it gives an error saying that it can't do it. I am really new to this whole memory reading thing, so it is completely possible that I am totally going about this the wrong way. Is there a different program that I should be using for this, or am I just doing it wrong?

Any help would be greatly appreciated!

-Sam