The Bytecode Club
Log inJoin the club
Video Game Reverse Engineering

Made a function to get exact amount of troops in camp

Started by Henk500 · Feb 20, 2015

14 replies217,704 views
Feb 20, 2015#11
  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)

Feb 20, 2015#12

works 🙂

Feb 20, 2015#13

works 🙂

🙌

Feb 20, 2015#14

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

Feb 21, 2015#15

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

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..

Got something to add?

Log in to post a reply.

Join the conversation