Thread Rating:
  • 7 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Developing Bot
For the attack strategy, you are right. I still think each method has its own up and down. I personally used both lp and lf, in my experience bruteforce approach used by lp or attack 'em all in lf is inconsistence in loot for each attack but in the long run can be more rewarding (for ex. 2 raids with < 30k loot followed by 3 raids with > 200k. Bully mode & dead fish is more consistent and less risky but might not give you as much in the long run.

But that is just pure in-game strategy. Talking about the code, right now I just use the default giant, 2 x barbarian, archer combo for testing. I need to make sure it can properly assign and drop troop unit first before moving on to other strategies, additional checks,.. Also many features rely on image recognition (which we both stuck on) so I guess I'll have to find a way for it to work. For the % of troops before attack, I believe lf currently set it at 90%. It's easy to implement if you can accurately read troop number from army camp. Thanks for your input, I'll take note of everything but in the mean time just work on core structure first. One thing at a time man Shadesup
Amazing team work, glad to see everyone working towards one goal.
The pixelsearch is just looking for a specific shade of red from the End Battle button so it knows when to start reading. I cannot reproduce your error but I do notice sometimes the bot cannot detect a specific shade when battle finish to click return home. For CheckSearch you can use this old function instead.

Code:
Func CheckSearch()
  Local $Check = ""
  While $Check = ""
 $Check = StringStripWS(_TesseractWinCapture($HWnD,"",0,"",1,2,$Left*$x_ratio,$Top*$y_ratio,$Right*$x_ratio,$Bottom*$y_ratio,0), 8)
 Sleep(500)
  WEnd
EndFunc
(12-18-2014, 06:39 PM)Antidote Wrote:  The pixelsearch is just looking for a specific shade of red from the End Battle button so it knows when to start reading. I cannot reproduce your error but I do notice sometimes the bot cannot detect a specific shade when battle finish to click return home. For CheckSearch you can use this old function instead.


Code:
Func CheckSearch()
  Local $Check = ""
  While $Check = ""
 $Check = StringStripWS(_TesseractWinCapture($HWnD,"",0,"",1,2,$Left*$x_ratio,$Top*$y_ratio,$Right*$x_ratio,$Bottom*$y_ratio,0), 8)
 Sleep(500)
  WEnd
EndFunc

0x0D355B = Midnight blue?
shit I just look up the hex. It's really midnight blue.. I think my pixel get color script fails to get the correct co-ord. I just printscreen and check again in photoshop. Can you change the value to 0xc00000? I use replace color and it's indeed the only spot on the screen with this color value. I will try to do the same to return home.
 


Forum Jump:


Users browsing this thread: 50 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