DEVICE: MI 2 4.1.1
SCREEN_SIZE: 750x1280
var #color 0
var #blue 0
var #pd1 0
var #pd2 0
var #pd3 0
var #pd4 0
var #dungeon1 0
var #dungeon2 0
var #mainpagedungeon 0
var #waitingforanimation 0
var #cleardungeocheck 0
:start
// input coordinates of search dungeon below //
touchpress 0 552 455
sleep 500
// input coordinates of getColor below //
getcolorgray #color 133 878
getcolorgray #blue 133 875
toast #color
toast #blue
if #color != #blue
// 650 897 = ENTER DUNGEON //
touchpress 0 650 897
touchpress 0 650 897
touchpress 0 650 897
touchpress 0 650 897
touchpress 0 650 897
touchpress 0 650 897
touchpress 0 650 897
else
goto :start
endif
// 405 1052 = ACCEPT DUNGEON //
touchpress 0 405 1052
touchpress 0 405 1052
touchpress 0 405 1052
touchpress 0 405 1052
touchpress 0 405 1052
touchpress 0 405 1052
touchpress 0 405 1052
touchpress 0 405 1052
touchpress 0 405 1052
touchpress 0 405 1052
// 194 421 = PLAYING DUNGEON //
:checkdungeonpage
touchpress 0 194 421
touchpress 0 194 421
sleep 500
// 651 907 = ENTER DUNGEON TO FIGHT //
getcolorgray #pd1 133 878
toast #pd1
getcolorgray #pd2 133 875
toast #pd2
if #pd1 != #pd2
goto :ENTERDUNGEON
else
goto :start
endif
:ENTERDUNGEON
sleep 800
touchPress 0 651 907
touchPress 0 651 907
touchPress 0 651 907
touchPress 0 651 907
touchPress 0 651 907
// 383 1093 = SPAM X 5 ENERGY //
touchPress 0 383 1093
touchPress 0 383 1093
touchPress 0 383 1093
touchPress 0 383 1093
touchPress 0 383 1093
touchPress 0 383 1093
touchPress 0 383 1093
touchPress 0 383 1093
touchPress 0 383 1093
touchPress 0 383 1093
sleep 9000
getcolorgray #waitingforanimation 408 983
toast #waitingforanimation
if #waitingforanimation != 98
sleep 100
else
touchdown 0 34 1234
endif
:gotomainpage
// 34 1234 = GO TO MAIN PAGE //
touchDown 0 34 1234
getcolorgray #mainpagedungeon 663 579
sleep 1000
toast #mainpagedungeon
if #mainpagedungeon != 171
goto :gotomainpage
else
touchdown 0 663 579
endif
sleep 1000
touchUp 0
sleep 1379
// 663 579 = ENTER DUNGEON PAGE //
touchDown 0 663 579
sleep 1000
touchUp 0
sleep 1902
// if-else function to ensure dungeon has ended //
:dungeonresults
touchpress 0 194 421
getcolorgray #dungeon1 564 902
toast #dungeon1
getcolorgray #pd3 133 878
getcolorgray #pd4 133 875
sleep 5000
if #dungeon1 = 144 or #dungeon1 = 37 or #dungeon1 = 0
// 649 892 = TAP ON RESULTS //
touchpress 0 649 892
touchpress 0 649 892
touchpress 0 649 892
touchpress 0 649 892
touchpress 0 649 892
touchpress 0 649 892
touchpress 0 649 892
touchpress 0 649 892
touchpress 0 649 892
touchpress 0 649 892
sleep 1000
elseif #pd3 = #pd4
goto :start
elseif #dungeon1 != 144 or #dungeon1 != 37 or #dungeon1 != 0
goto :dungeonresults
elseif #dungeon1 = 89
goto :start
endif
// START: THIS SEGMENT HERE DESCRIBES MOVING THE PAGE UP TO CLEAR DUNGEON
getcolorgray #cleardungeocheck 383 1093
toast #cleardungeocheck
if #cleardungeocheck = 35
goto
else
goto :gotomainpage
endif
sleep 2000
touchDown 0 441 891
sleep 19
touchMove 0 441 877
sleep 23
touchMove 0 441 822
sleep 10
touchMove 0 450 763
sleep 24
touchMove 0 490 625
sleep 9
touchMove 0 520 526
sleep 10
touchUp 0
sleep 500
// END: SEGMENT CONCLUDES HERE
// 429 1009 = CLEARING OF DUNGEON
touchDown 0 429 1009
sleep 51
touchDown 0 429 1009
sleep 51
touchDown 0 429 1009
sleep 51
touchDown 0 429 1009
sleep 51
touchDown 0 429 1009
sleep 51
touchDown 0 429 1009
sleep 51
touchDown 0 429 1009
sleep 51
touchDown 0 429 1009
sleep 51
touchDown 0 429 1009
sleep 51
touchDown 0 429 1009
sleep 51
touchDown 0 429 1009
sleep 51
touchDown 0 429 1009
sleep 51
touchUp 0
touchUp 0
touchUp 0
sleep 1500
touchDown 0 552 455
sleep 61
touchUp 0
touchdown 0 552 455
goto :start
:end






