The Bytecode Club - Reverse Engineering Forum
SUGGESTION: 5.3.4 and 5.4: Elixer Change - 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: SUGGESTION: 5.3.4 and 5.4: Elixer Change (/showthread.php?tid=248)



SUGGESTION: 5.3.4 and 5.4: Elixer Change - SolidRain - 01-06-2015

I noticed that only gold is checked to see if the fight should be ended. I'm currently hunting for elixer so I made a temporary change to the GoldChange function:

    AUTOIT Programming
  1. Func GoldChange() ;Checks 30 seconds if gold changes
  2. Local $Gold1, $Gold2
  3. getBSPos()
  4. ;$Gold1 = getGold($BSpos[0] + 51, $BSpos[1] + 66)
  5. $Gold1 = getElixir($BSpos[0] + 51, $BSpos[1] + 66 + 29)
  6. If _Sleep(15000) Or $RunState = False Then ExitLoop
  7. ;$Gold2 = getGold($BSpos[0] + 51, $BSpos[1] + 66)
  8. $Gold2 = getElixir($BSpos[0] + 51, $BSpos[1] + 66 + 29)
  9. If $Gold1 = $Gold2 Then
  10. SetLog("Elixer change detected, waiting...")
  11. EndFunc ;==>GoldChange



I may work on a more robust implementation, but wasn't sure of the best way to proceed. I think the main options are:

1. Always check for both gold and elixer change (not DE since low levels won't have it)
2. Check for resources that are selected on the search tab. So if you have gold, elixer, and DE all selected with values set, all three would have to stop changing before the fight is ended. If no resources are selected, default to gold (to avoid ending the fight immediately).
3. Add new UI components (checkboxes) to indicate which resources you want to wait for (separate from search choice)

#3 is probably unnecessary. I kind of like #2.


RE: SUGGESTION: 5.3.4 and 5.4: Elixer Change - cryzies - 01-06-2015

I was also thinking about this. Probably going to implement change detection for elixer and DE.


RE: SUGGESTION: 5.3.4 and 5.4: Elixer Change - SolidRain - 01-06-2015

As a followup, I was watching one raid and noticed that there were still a lot of troops left, but they were trying to break down outer walls. The code didn't detect any resource change and thus ended the battle. If left for a little longer, they would have broken through and got to storages.

I'm not sure what could be done about this, other than extend the time between checks (perhaps with the checking for 0 remaining). I may try it. Length of battle is not really an issue because troops train in the background.

I wonder if screenshot comparisons would work? Probably too much idle animation for this to be reliable. Just thinking out loud, this is probably overkill.