The Bytecode Club - Reverse Engineering Forum
Made a function to get exact amount of troops in camp - 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: Made a function to get exact amount of troops in camp (/showthread.php?tid=945)

Pages: 1 2


RE: Made a function to get exact amount of troops in camp - Henk500 - 02-20-2015

(02-20-2015, 10:17 PM)will321123 Wrote:  1. How do you use this?, im still new here, you just replace existing?

2. Also, can someone explain what it does iim of kinda slow lol. From what I understand it starts attack when army is > 95% so if i want a 100% army I jusy change to =100%?.

3. Will this solve the bug. When i donate the bot doesnt build new army and gets stuck. Lol..

4. Thank you guys for investing your time on this.

no no and no...

this is a function that developpers can use to determine how many troops u have in camp. Its a piece of code that needs to be included in the bot.
In my own bot i use it to determine if i want to attack. but its not something u just copy paste and it works...

so this is not for the "Normal" user to use...but for developpers to use (if they want and find it handy offcourse)


RE: Made a function to get exact amount of troops in camp - Swede - 02-20-2015

works Smile


RE: Made a function to get exact amount of troops in camp - Henk500 - 02-20-2015

(02-20-2015, 11:17 PM)Swede Wrote:  works Smile

Highfive


RE: Made a function to get exact amount of troops in camp - AtoZ - 02-20-2015

it's running. this will enable more accurate troop training. no miss yet Smile


RE: Made a function to get exact amount of troops in camp - LiquidBacon - 02-22-2015

Not meaning to ninja this, but im already seeing alot of code redundancy in this bot,
so Im offering a very simple alternative:

Code:
HotKeySet("+!f", "_checkFullArmy")

Func _checkFullArmy()
    $greenBar = _PixelSearch(426, 211, 708, 213, Hex(0x34A800,6), 0)
    If isArray($greenBar) Then
        SetLog("Camp "&Ceiling(($greenBar[0]-426)/280*100)&"% full.")
    Else
        SetLog("Camp is empty")
    EndIf
EndFunc

Just pop this somewhere in COCBot.au3, open a camp and press shift+alt+f
You don't even have to know the max. capacity for this..