The Bytecode Club

Full Version: Made a function to get exact amount of troops in camp
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(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)
works Smile
(02-20-2015, 11:17 PM)Swede Wrote: [ -> ]works Smile

Highfive
it's running. this will enable more accurate troop training. no miss yet Smile
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..
Pages: 1 2