Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Enhanced bot using memory reads
#11
Greyman add me on Skype Wink
Reply
#12
(01-17-2015, 12:32 AM)barracoda Wrote:  Is this from an enemy base? o_O

(01-17-2015, 09:42 PM)Envyus Wrote:  Greyman add me on Skype Wink

Hi Envy,

I'd like to, but unfortunately I'm unable to use Skype - at home I have the kids running around constantly (now THERE'S a massive time sink Tongue), and at work the corporate firewall gets in the way.

Any other suggestions?

Grey.
Reply
#13
We only use the message feature of Skype and have an on going developers group conversation. That is the only way we currently don't use any other methods to communicate.
Reply
#14
(01-17-2015, 09:01 PM)madalilng Wrote:  here's my computation to calculate miners/pumps this should work.

Code:
double[] collector_max = { 500, 1000, 1500, 2500, 10000, 20000, 30000, 50000, 75000, 100000, 150000, 200000 };
double[] collector_ph = { 200, 400, 600, 800, 1000, 1300, 1600, 1900, 2200, 2500, 3000, 3500 };

foreach (var B in _b.buildings)
{
int _lvl = B.lvl; // Collector level..
var _collectedtime = B.res_time;
var _timedif = (collector_max[_lvl] / collector_ph[_lvl] * 3600) - _collectedtime ;
var _collectedres = (_timedif * (collector_ph[_lvl] / 3600));
if (B.data == 1000002){ // elixir pump
Total_elix += (double)(_collectedres);
}
if (B.data == 1000004)
   { // Gold Mine
        Total_Gold += (double)(_collectedres);
   }
}

Hi Madalilng,

I've seen code very similar to this in a VMT entry, about 5 or 6 pointer references deep from the elixir collector base struct. It was one of about half a dozen routines I'd bookmarked for further analysis Smile

Many thanks for the heads up, I'll definitely be trying this out. I'm pretty sure I've seen something similar to res_time relatively close to the VMT entry in question, which makes it the top candidate for analysis when I circle back to collectors.

Interestingly, the res_time when the collector is boosted (if what I've found is equivalent) seems to go constantly backwards, while the in-memory reference to the resource per hour stays the same. It looked like SuperCell dodgy the boost by modifying the time basepoint, rather than boosting the collection rate. Have you noticed anything similar? Bizarre if true, but the same result in the end I guess.
Reply
#15
Some basic info to help get people going, who might also be interested in going down this path.

Some of the building types are missing - particularly TH9+, as I don't have anyone in my clan above TH8 (lame I know!). I've only started building up these types in the last few days, so it's on my to-do list to circle back and find a couple of TH9's/TH10's while raiding, to fill in the gaps.

public enum ClashBuildingType
{
ArmyCamp = 1000000,
TownHall = 1000001,
ElixirCollector = 1000002,
ElixirStorage = 1000003,
GoldCollector = 1000004,
GoldStorage = 1000005,
Barracks = 1000006,
Laboratory = 1000007,
Cannon = 1000008,
ArcherTower = 1000009,
Wall = 1000010,
WizardTower = 1000011,
AirDefense = 1000012,
Mortar = 1000013,
ClanCastle = 1000014,
BuilderHut = 1000015,
HiddenTesla = 1000019,
SpellFactory = 1000020,
BarbarianKing = 1000022,
DarkElixirDrill = 1000023,
DarkElixirStorage = 1000024,
DarkBarracks = 1000026
}

public enum ClashTroopType
{
Barbarian = 4000000,
Archer = 4000001,
Goblin = 4000002,
Giant = 4000003,
Wallbreaker = 4000004,
Balloon = 4000005,
Wizard = 4000006,
Healer = 4000007,
Dragon = 4000008,
Pekka = 4000009
}
Reply
#16
1000021 = xbow.
1000027 = inferno tower.
Reply
#17
minion = 4000010
hogs = 4000011
valkyrie = 4000012
Golem= 4000013
Warlock= 4000015
Reply
#18
public enum ClashTrapType
{
Bomb = 12000000,
SpringTrap = 12000001,
GiantBomb = 12000002,
AirMine = 12000005,
SeekingAirMine = 12000006,
SkeletonTrap = 12000008
}
Reply
#19
Reply
#20
Reply
 


Forum Jump:


Users browsing this thread: 18 Guest(s)

About The Bytecode Club

We're a community forum focused on Reverse Engineering, we try to target Java/Android but we also include other langauges/platforms. We pride ourselves in supporting and free and open sourced applications.

Website