SolidRain   01-06-2015, 07:03 AM
#1
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.
  
Users browsing this thread: 1 Guest(s)
Konloch Software - Bytecode Viewer - Reverse Engineering Forum
Copyright © 2014-2025 The Bytecode Club. Powered By MyBB.
CC0 Unless Specified Otherwise.