Modifying the full army function to attack when camp is almost three quaters - Printable Version +- The Bytecode Club - Reverse Engineering Forum (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: Modifying the full army function to attack when camp is almost three quaters (/showthread.php?tid=574) |
Modifying the full army function to attack when camp is almost three quaters - totocaca - 02-06-2015 Hello all, Im new here and was very interesting how everyone got along with developing a great bot. Thanks to all for making it I have a small change that I think would be great speeding up the looting process. Ive noticed you dont always need the full let say 200 troops for a loot attack. i think about 150 is more than enough. If the bot begins to search for raids at 150, by the time it finds one and attacks, on return 50 troops will already be trained saving time. I attempted to play around with the $fullArmy function but it didnt work. The whole function is skipped when the bot is ran, dont understand why. This is my non working edit of it: Func CheckFullArmy() _CaptureRegion() Click(364, 435) ;Clicks my army camp _Sleep(150) Click(383, 596) ;Clicks info ;A green pixel is looked for at around 3/4 of filled capacity. $Pixel = _ColorCheck(_GetPixelColor(644, 212), Hex(0x34A800, 6), 20) If $Pixel Then $fullArmy = True Else $fullArmy = False EndIf _Sleep(Random(5, 15, 1)) Click(697, 146) ;to close the info window EndFunc ;==>CheckFullArmy Would appreciate anyone that could help Thank you RE: Modifying the full army function to attack when camp is almost three quaters - dixonhill - 02-06-2015 It's possible to do, however once you click that Attack button to start searching, your troop number is committed, which means whatever number of troops you had at that point will be used in the subsequent battle once you find a good opponent. I agree though that most of the time I don't need the entire army to make profits. One practical suggestion that works for me is put some bulky troops in the camp, troops you don't use for the bot. Like a couple-three of Healers, a couple of dragons or a bunch of giants. Then change your camp capacity number to the number of remaining available slots, and voila! - you have a decreased camp, which decreases your time between loots. I have not ran projections yet plotting the trade-off in number of troops versus the frequency of raids versus profit, but it's underway. In fact, I have been working on getting all that data saved programmatically and using as metrics to determine baselines and make intelligent tweaks to methods. In a few words: the numbers of the search attempts, G/E/DE/Tr gained/lost, number and type of troops used are inserted into a database (local CSV file, MS Access, or a remote SQL server) and the metrics developed on any frontend reporting services. Could just dump stuff into an XML file to be displayed on a web page (local IIS or apache, or remote webserver) that you can access remotely to check on what's up with your hardworking bot. Possibilities are endless... -- D RE: Modifying the full army function to attack when camp is almost three quaters - AtoZ - 02-19-2015 |