Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
v 5.4.1
#59
I think a very failsafe approach for checkmainscreen is adding a small tweak like this:
modify waitmainscreen to include only the check and return true if main screen, otherwise return false

waitmainscreen()
  while 1
     if detect message, click reload, wait 5 sec, exitloop
     else
        if attacked, click okay, wait 1 sec
        if things are opened, click away, wait 1 sec
        if x button, click x, wait 1 sec
        if chat, click close chat, wait 1 sec
        if victory or defeat scene, click return home, wait 5 sec
        if end battle button, click end battle, wait 5 sec
    endif
     if main screen, return true, else return false
     exitloop
  wend
--------------------------------------------------------
checkmainscreen()
  if not in main screen (the 284, 28 check)
      while not waitmainscreen()
         if 10 minutes passed relaunch BS (ensure not 6 hour break, take 2~4 minutes to get to mainscreen)
      wend
   endif
--------------------------------------------------------
It can handle 6 hour break as well and doesn't have to use _sleep, if break message appear anywhere during the process bot just run until getresource () and call checkmainscreen() again (it will loop and click reload every 5 sec)

I think we should discuss on the approach first before implementing in code, so it can be optimized more easily before actual release
 


Messages In This Thread
v 5.4.1 - by GkevinOD - 01-08-2015, 01:08 PM
RE: v 5.4.1 - by SAIPER - 01-08-2015, 01:16 PM
RE: v 5.4.1 - by missileplatypus - 01-08-2015, 01:37 PM
RE: v 5.4.1 - by GkevinOD - 01-08-2015, 01:50 PM
RE: v 5.4.1 - by blindpick - 01-08-2015, 01:59 PM
RE: v 5.4.1 - by GkevinOD - 01-08-2015, 02:03 PM
RE: v 5.4.1 - by GkevinOD - 01-08-2015, 02:06 PM
RE: v 5.4.1 - by blindpick - 01-08-2015, 02:15 PM
RE: v 5.4.1 - by GkevinOD - 01-08-2015, 02:23 PM
RE: v 5.4.1 - by Kaz - 01-08-2015, 02:25 PM
RE: v 5.4.1 - by yuji - 01-08-2015, 02:28 PM
RE: v 5.4.1 - by blindpick - 01-08-2015, 02:33 PM
RE: v 5.4.1 - by yuji - 01-08-2015, 02:33 PM
RE: v 5.4.1 - by blindpick - 01-08-2015, 02:36 PM
RE: v 5.4.1 - by yuji - 01-08-2015, 02:37 PM
RE: v 5.4.1 - by Revial - 01-08-2015, 02:35 PM
RE: v 5.4.1 - by blindpick - 01-08-2015, 02:39 PM
RE: v 5.4.1 - by yuji - 01-08-2015, 02:41 PM
RE: v 5.4.1 - by GkevinOD - 01-08-2015, 02:54 PM
RE: v 5.4.1 - by yuji - 01-08-2015, 02:59 PM
RE: v 5.4.1 - by dinobot - 01-08-2015, 02:59 PM
RE: v 5.4.1 - by gragra - 01-08-2015, 02:59 PM
RE: v 5.4.1 - by skull1984 - 01-08-2015, 03:20 PM
RE: v 5.4.1 - by skull1984 - 01-08-2015, 03:44 PM
RE: v 5.4.1 - by GkevinOD - 01-08-2015, 03:48 PM
RE: v 5.4.1 - by hervianzhou - 01-08-2015, 06:54 PM
RE: v 5.4.1 - by blindpick - 01-08-2015, 05:32 PM
RE: v 5.4.1 - by Kingchen - 01-08-2015, 08:57 PM
RE: v 5.4.1 - by nyaosu - 01-08-2015, 09:35 PM
RE: v 5.4.1 - by pubeoutros - 01-08-2015, 09:43 PM
RE: v 5.4.1 - by manutt - 01-09-2015, 12:23 AM
RE: v 5.4.1 - by M Khalid - 01-09-2015, 12:39 AM
RE: v 5.4.1 - by EsEnZeT - 01-09-2015, 02:32 AM
RE: v 5.4.1 - by AlexXxuTzZu - 01-09-2015, 02:35 AM
RE: v 5.4.1 - by bushido-21 - 01-09-2015, 03:33 AM
RE: v 5.4.1 - by yuji - 01-09-2015, 03:34 AM
RE: v 5.4.1 - by dinobot - 01-09-2015, 03:59 AM
RE: v 5.4.1 - by Antidote - 01-09-2015, 04:50 AM
RE: v 5.4.1 - by dinobot - 01-09-2015, 04:56 AM
RE: v 5.4.1 - by kojometa - 01-09-2015, 05:33 AM
RE: v 5.4.1 - by dinobot - 01-09-2015, 05:36 AM
RE: v 5.4.1 - by Shriva - 01-09-2015, 05:40 AM
RE: v 5.4.1 - by kojometa - 01-09-2015, 05:41 AM
RE: v 5.4.1 - by dinobot - 01-09-2015, 05:47 AM
RE: v 5.4.1 - by dinobot - 01-09-2015, 05:48 AM
RE: v 5.4.1 - by kojometa - 01-09-2015, 06:04 AM
RE: v 5.4.1 - by GkevinOD - 01-09-2015, 08:50 AM
RE: v 5.4.1 - by kojometa - 01-09-2015, 08:54 AM
RE: v 5.4.1 - by GkevinOD - 01-09-2015, 08:59 AM
RE: v 5.4.1 - by Kingchen - 01-09-2015, 09:01 AM
RE: v 5.4.1 - by dinobot - 01-09-2015, 09:09 AM
RE: v 5.4.1 - by GkevinOD - 01-09-2015, 09:44 AM
RE: v 5.4.1 - by DiviniT3a - 01-09-2015, 10:07 AM
RE: v 5.4.1 - by kojometa - 01-09-2015, 11:55 AM
RE: v 5.4.1 - by blindpick - 01-09-2015, 12:05 PM
RE: v 5.4.1 - by kojometa - 01-09-2015, 12:11 PM
RE: v 5.4.1 - by mking2 - 01-09-2015, 12:40 PM
RE: v 5.4.1 - by danilp12 - 01-09-2015, 01:22 PM
RE: v 5.4.1 - by Antidote - 01-09-2015, 02:14 PM
RE: v 5.4.1 - by Antidote - 01-09-2015, 02:21 PM
RE: v 5.4.1 - by GkevinOD - 01-09-2015, 02:44 PM
RE: v 5.4.1 - by venom621 - 01-09-2015, 04:28 PM
RE: v 5.4.1 - by Antidote - 01-09-2015, 06:05 PM
RE: v 5.4.1 - by nyaosu - 01-09-2015, 08:22 PM
RE: v 5.4.1 - by zealous - 01-09-2015, 09:03 PM
RE: v 5.4.1 - by dinobot - 01-09-2015, 10:01 PM
RE: v 5.4.1 - by kojometa - 01-10-2015, 01:18 AM
RE: v 5.4.1 - by sefa96 - 01-10-2015, 03:10 AM
RE: v 5.4.1 - by kojometa - 01-10-2015, 04:37 AM
RE: v 5.4.1 - by Sinzed789 - 01-10-2015, 04:54 AM
RE: v 5.4.1 - by crowbart - 01-10-2015, 10:48 AM
RE: v 5.4.1 - by kojometa - 01-10-2015, 05:06 AM
RE: v 5.4.1 - by sefa96 - 01-10-2015, 06:21 AM
RE: v 5.4.1 - by Antidote - 01-10-2015, 08:33 AM
RE: v 5.4.1 - by blindpick - 01-10-2015, 09:01 AM
RE: v 5.4.1 - by Envyus - 01-10-2015, 09:15 AM
RE: v 5.4.1 - by Antidote - 01-10-2015, 09:25 AM
RE: v 5.4.1 - by bushido-21 - 01-10-2015, 09:41 AM
RE: v 5.4.1 - by Rd Koyoe - 01-10-2015, 09:42 AM
RE: v 5.4.1 - by Antidote - 01-10-2015, 09:57 AM
RE: v 5.4.1 - by Rd Koyoe - 01-10-2015, 11:50 AM
RE: v 5.4.1 - by blindpick - 01-10-2015, 10:27 AM
RE: v 5.4.1 - by bushido-21 - 01-10-2015, 10:28 AM
RE: v 5.4.1 - by bushido-21 - 01-10-2015, 10:33 AM
RE: v 5.4.1 - by mking2 - 01-10-2015, 11:01 AM
RE: v 5.4.1 - by missileplatypus - 01-10-2015, 11:39 AM
RE: v 5.4.1 - by ChristmasVape - 01-10-2015, 02:01 PM
RE: v 5.4.1 - by Antidote - 01-10-2015, 02:35 PM
RE: v 5.4.1 - by ChristmasVape - 01-10-2015, 03:08 PM
RE: v 5.4.1 - by Antidote - 01-10-2015, 03:53 PM
RE: v 5.4.1 - by Shriva - 01-10-2015, 07:30 PM
RE: v 5.4.1 - by bushido-21 - 01-10-2015, 08:13 PM
RE: v 5.4.1 - by xmrvn - 01-10-2015, 09:29 PM
RE: v 5.4.1 - by ChristmasVape - 01-10-2015, 10:54 PM
RE: v 5.4.1 - by COBOT - 01-10-2015, 10:55 PM
RE: v 5.4.1 - by kojometa - 01-10-2015, 11:40 PM
RE: v 5.4.1 - by hervianzhou - 01-11-2015, 12:19 AM
RE: v 5.4.1 - by sakoshi - 01-11-2015, 12:58 AM
RE: v 5.4.1 - by COBOT - 01-11-2015, 01:57 AM
RE: v 5.4.1 - by PusheR - 01-11-2015, 03:53 AM
RE: v 5.4.1 - by missileplatypus - 01-11-2015, 04:17 AM
RE: v 5.4.1 - by ChristmasVape - 01-11-2015, 08:34 AM
RE: v 5.4.1 - by AtoZ - 01-11-2015, 11:38 AM

Forum Jump:


Users browsing this thread: 17 Guest(s)

About The Bytecode Club

We're a community forum focused on Reverse Engineering, we try to target Java/Android but we also include other langauges/platforms. We pride ourselves in supporting and free and open sourced applications.

Website