0% found this document useful (1 vote)
1K views

Code To Make Bot Hayday

This document defines variables and procedures for automating tasks in multiple Hay Day farms, including harvesting crops, growing crops, selling items, and collecting/depositing items from the tray. It uses touch inputs and delays to mimic user interactions like tapping, dragging, waiting for loading screens. The goal is to efficiently complete repetitive tasks across multiple farms through automation.

Uploaded by

Foru Forme
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
1K views

Code To Make Bot Hayday

This document defines variables and procedures for automating tasks in multiple Hay Day farms, including harvesting crops, growing crops, selling items, and collecting/depositing items from the tray. It uses touch inputs and delays to mimic user interactions like tapping, dragging, waiting for loading screens. The goal is to efficiently complete repetitive tasks across multiple farms through automation.

Uploaded by

Foru Forme
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 14

DEVICE: Auto Tran Tran 11_2020

SCREEN_SIZE: 640x480 (softkey)

Var #x 0
Var #y 0
Var #a 0
Var #b 0
Var #x1 0
Var #y1 0
Var #a1 0
Var #b1 0
Var #a2 0
Var #b2 0
Var #x2 0
Var #y2 0
Var #Color 0
Var #Color1 0
Var #Count 0
Var #Startx 0
Var #Starty 0
Var #Endx 0
Var #Endy 0
Var #Starta 0
Var #Startb 0
Var #Enda 0
Var #Endb 0
Var #MoveSteps 0
Var #MoveSteps1 0
Var #Tempx 0
Var #Tempy 0
Var #Tempx1 0
Var #Tempy1 0
Var #MoveStepsTemp 0
Var #MoveStepsTemp1 0
Var #s 0
Var #ZoomSteps 0
Var #LoadSteps 0
Var #s1 10000
Var #Times 0
Var #Page 1
Var #Field 0
Var #Price 1
Var #Tr 0

:Start
toast Auto_4acc_clone
Set #LoadSteps 0
#LoadSteps = 0

:LoadSteps
Set #Times 0
if #LoadSteps < 1
#LoadSteps = #LoadSteps + 1
goto :Steps
endif
goto :Start

:Steps
if #LoadSteps == 1
goto :Openfarm1
endif

:Openfarm1
toast farm 1
sleep 500
RunApp com.supercell.haydaytr01
WaitApp com.supercell.haydaytr01
sleep 1000
touchDown 0 298 325
sleep 1
touchUp 0
sleep 100
touchDown 0 55 60
sleep 1
touchUp 0
sleep 100
touchDown 0 20 371
sleep 1
touchUp 0
sleep 100
touchDown 0 55 60
sleep 1
touchUp 0
sleep 100
touchDown 0 20 371
sleep 1
touchUp 0
sleep 100
goto :Loadingtime

:Openfarm2
toast farm 2
sleep 500
RunApp com.supercell.haydaytr02
WaitApp com.supercell.haydaytr02
sleep 1000
touchDown 0 298 325
sleep 1
touchUp 0
sleep 100
touchDown 0 55 60
sleep 1
touchUp 0
sleep 100
touchDown 0 20 371
sleep 1
touchUp 0
sleep 100
touchDown 0 55 60
sleep 1
touchUp 0
sleep 100
touchDown 0 20 371
sleep 1
touchUp 0
sleep 100
goto :Loadingtime
:Openfarm3
toast farm 3
sleep 500
RunApp com.supercell.haydaytr03
WaitApp com.supercell.haydaytr03
sleep 1000
touchDown 0 298 325
sleep 1
touchUp 0
sleep 100
touchDown 0 55 60
sleep 1
touchUp 0
sleep 100
touchDown 0 20 371
sleep 1
touchUp 0
sleep 100
touchDown 0 55 60
sleep 1
touchUp 0
sleep 100
touchDown 0 20 371
sleep 1
touchUp 0
sleep 100
goto :Loadingtime

:Openfarm4
toast farm 4
sleep 500
RunApp com.supercell.haydaytr04
WaitApp com.supercell.haydaytr04
sleep 1000
touchDown 0 298 325
sleep 1
touchUp 0
sleep 100
touchDown 0 55 60
sleep 1
touchUp 0
sleep 100
touchDown 0 20 371
sleep 1
touchUp 0
sleep 100
touchDown 0 55 60
sleep 1
touchUp 0
sleep 100
touchDown 0 20 371
sleep 1
touchUp 0
sleep 100
goto :Loadingtime

:Loadingtime
#Times = #Times + 1
#Color = 0
#Color1 = 0
if #Times > 35
toast error
goto :LoadSteps
endif
getColor #Color 262 12
if #Color == -2754049
toast load ok
sleep 3000
goto :Set
endif
sleep 2000
goto :Loadingtime

:Set
set #Times 0
set #Color 0
Set #PageTemp 1
set #Color1 0
set #s 0
set #Tray 0
set #ZoomSteps 1
set #Count 1
#ZoomSteps = 1

:Loadingdone
#Count = 1

:Zoom
#x = 50
#y = 30
#x1 = 450
#y1 = 450
#Startx = #x
#Starty = #y
#Endx = #x1
#Endy = #y1
#MoveSteps = 100
#MoveStepsTemp = #MoveSteps
#Tempx = ( #Endx - #Startx ) / #MoveSteps
#Tempy = ( #Endy - #Starty ) / #MoveSteps
touchDown 0 #Startx #Starty
sleep 1

:MoveZoom
if #MoveStepsTemp > 0
#Startx = #Startx + #Tempx
#Starty = #Starty + #Tempy
touchMove 0 #Startx #Starty
sleep 1
#MoveStepsTemp = #MoveStepsTemp - 1
goto :MoveZoom
endif
goto :MoveZoomEnd

:MoveZoomEnd
touchMove 0 #Endx #Endy
sleep 100
touchUp 0
sleep 100
goto :Doblezoom

:Doblezoom
if #Count > 0
#Count = #Count - 1
goto :Zoom
endif
goto :ZoomSteps

:ZoomSteps
if #ZoomSteps == 1
#ZoomSteps = #ZoomSteps + 1
goto :Harvest
elseif #ZoomSteps == 2
#ZoomSteps = #ZoomSteps + 1
goto :Grow
elseif #ZoomSteps == 3
#ZoomSteps = #ZoomSteps + 1
goto :Sell
endif
goto :end

:Harvest
toast Thu hoach
touchDown 0 147 286
sleep 300
touchUp 0
sleep 800
touchDown 0 147 286
sleep 300
touchUp 0
sleep 800
//Click harvest
touchDown 0 90 265
sleep 180
//Movefirst
touchMove 0 147 286
sleep 3
touchMove 0 140 280
sleep 3
touchMove 0 142 280
sleep 3
touchMove 0 144 280
sleep 3
touchMove 0 146 280
sleep 3
touchMove 0 148 280
sleep 3
touchMove 0 150 280
sleep 3
touchMove 0 152 280
sleep 3
touchMove 0 147 286
sleep 3
touchMove 0 140 282
sleep 3
touchMove 0 142 282
sleep 3
touchMove 0 144 282
sleep 3
touchMove 0 146 282
sleep 3
touchMove 0 148 282
sleep 3
touchMove 0 150 282
sleep 3
touchMove 0 152 282
sleep 3
touchMove 0 147 286
sleep 3
touchMove 0 140 284
sleep 3
touchMove 0 142 284
sleep 3
touchMove 0 144 284
sleep 3
touchMove 0 146 284
sleep 3
touchMove 0 148 284
sleep 3
touchMove 0 150 284
sleep 3
touchMove 0 152 284
sleep 3
touchMove 0 140 286
sleep 3
touchMove 0 142 286
sleep 3
touchMove 0 144 286
sleep 3
touchMove 0 146 286
sleep 3
touchMove 0 148 286
sleep 3
touchMove 0 150 286
sleep 3
touchMove 0 152 286
sleep 3
touchMove 0 140 288
sleep 3
touchMove 0 142 288
sleep 3
touchMove 0 144 288
sleep 3
touchMove 0 146 288
sleep 3
touchMove 0 148 288
sleep 3
touchMove 0 150 288
sleep 3
touchMove 0 152 288
sleep 3
touchMove 0 147 286
sleep 3
#s = 50
:Move
#x = 327
#y = 142
#x1 = -30
#y1 = 325
#x2 = 574
#y2 = 253
#MoveSteps = 0
#MoveSteps1 = 50

#Startx = #x
#Starty = #y
#Endx = #x1
#Endy = #y1
#MoveStepsTemp = #MoveSteps
#MoveStepsTemp1 = #MoveSteps1
#Tempx1 = ( #x2 - #x ) / #MoveSteps1
#Tempy1 = ( #y2 - #y ) / #MoveSteps1

:MoveGrow
touchMove 0 #Startx #Starty
sleep #s

:MoveGrowEnd
touchMove 0 #Endx #Endy
sleep 50

:MoveGrow1
if #MoveStepsTemp1 > 0
#Startx = #x + #Tempx1 * ( #MoveSteps1 - #MoveStepsTemp1 + 1 )
#Starty = #y + #Tempy1 * ( #MoveSteps1 - #MoveStepsTemp1 + 1 )
#Endx = #x1 + #Tempx1 * ( #MoveSteps1 - #MoveStepsTemp1 + 1 )
#Endy = #y1 + #Tempy1 * ( #MoveSteps1 - #MoveStepsTemp1 + 1 )
#MoveStepsTemp1 = #MoveStepsTemp1 - 1
#MoveStepsTemp = #MoveSteps
goto :MoveGrow
endif

:MoveGrow1End
touchMove 0 469 437
sleep 50
touchUp 0
sleep 50
goto :Loadingdone

:Grow
#s = 100
touchDown 0 147 286
sleep 300
touchUp 0
sleep 800
touchDown 0 147 286
sleep 300
touchUp 0
sleep 800
//Click
if #Field == 0
touchDown 0 153 242
sleep 180
elseif #Field == 1
touchDown 0 115 279
sleep 180
endif
//Movefirst
touchMove 0 147 286
sleep 3
touchMove 0 140 280
sleep 3
touchMove 0 142 280
sleep 3
touchMove 0 144 280
sleep 3
touchMove 0 146 280
sleep 3
touchMove 0 148 280
sleep 3
touchMove 0 150 280
sleep 3
touchMove 0 152 280
sleep 3
touchMove 0 147 286
sleep 3
touchMove 0 140 282
sleep 3
touchMove 0 142 282
sleep 3
touchMove 0 144 282
sleep 3
touchMove 0 146 282
sleep 3
touchMove 0 148 282
sleep 3
touchMove 0 150 282
sleep 3
touchMove 0 152 282
sleep 3
touchMove 0 147 286
sleep 3
touchMove 0 140 284
sleep 3
touchMove 0 142 284
sleep 3
touchMove 0 144 284
sleep 3
touchMove 0 146 284
sleep 3
touchMove 0 148 284
sleep 3
touchMove 0 150 284
sleep 3
touchMove 0 152 284
sleep 3
touchMove 0 140 286
sleep 3
touchMove 0 142 286
sleep 3
touchMove 0 144 286
sleep 3
touchMove 0 146 286
sleep 3
touchMove 0 148 286
sleep 3
touchMove 0 150 286
sleep 3
touchMove 0 152 286
sleep 3
touchMove 0 140 288
sleep 3
touchMove 0 142 288
sleep 3
touchMove 0 144 288
sleep 3
touchMove 0 146 288
sleep 3
touchMove 0 148 288
sleep 3
touchMove 0 150 288
sleep 3
touchMove 0 152 288
sleep 3
touchMove 0 147 286
sleep 3
goto :Move

:Sell
touchDown 0 291 453
sleep 1
touchUp 0
sleep 100
touchDown 0 287 416
sleep 10
touchUp 0
sleep 500
toast 10

:Collect
touchDown 0 445 225
sleep 1
touchUp 0
touchDown 1 445 300
sleep 1
touchUp 1
touchDown 2 375 225
sleep 1
touchUp 2
touchDown 3 375 300
sleep 1
touchUp 3
touchDown 4 310 225
sleep 1
touchUp 4
touchDown 5 310 300
sleep 1
touchUp 5
touchDown 6 245 225
sleep 1
touchUp 6
touchDown 7 245 300
sleep 1
touchUp 7
touchDown 8 175 225
sleep 1
touchUp 8
touchDown 9 175 300
sleep 1
touchUp 9
sleep 200
touchDown 0 400 120
sleep 1
touchUp 0
sleep 100
toast Treo shop!
sleep 1000
goto :Tray0

:Put
touchDown 0 140 170
sleep 1
touchUp 0
sleep 50
touchDown 0 210 180
sleep 1
touchUp 0
sleep 50
touchDown 0 457 184
sleep 1
touchUp 0
touchDown 0 457 184
sleep 1
touchUp 0
touchDown 0 457 184
sleep 1
touchUp 0
touchDown 0 457 184
sleep 1
touchUp 0
touchDown 0 457 184
sleep 1
touchUp 0
touchDown 0 457 184
sleep 1
touchUp 0
if #Price == 1
touchDown 0 395 245
sleep 1
touchUp 0
sleep 50
elseif #Price == 2
touchDown 0 435 245
sleep 1
touchUp 0
sleep 50
endif
if #Tray == 1
touchDown 0 385 311
sleep 1
touchUp 0
sleep 50
endif
touchDown 0 415 351
sleep 1
touchUp 0
sleep 100
touchDown 0 400 120
sleep 1
touchUp 0
sleep 100

:Tray
if #Tray == 0
goto :Tray0
elseif #Tray == 1
goto :Tray1
elseif #Tray == 2
goto :Tray2
elseif #Tray == 3
goto :Tray3
elseif #Tray == 4
goto :Tray4
elseif #Tray == 5
goto :Tray5
elseif #Tray == 6
goto :Tray6
elseif #Tray == 7
goto :Tray7
elseif #Tray == 8
goto :Tray8
elseif #Tray == 9
goto :Tray9
endif

touchDown 0 445 300


sleep 1
touchUp 0
sleep 200
touchDown 0 360 240
sleep 1
touchUp 0
sleep 50
touchDown 0 320 290
sleep 1
touchUp 0
sleep 50
touchDown 0 400 120
sleep 1
touchUp 0
sleep 200

if #PageTemp < #Page


#PageTemp = #PageTemp + 1
#Tray = 0
touchDown 0 489 345
sleep 200
touchMove 0 179 345
sleep 1000
touchUp 0
sleep 100
toast 20
sleep 1000
goto :Collect

endif
touchDown 0 180 255
sleep 1
touchUp 0
sleep 100
touchDown 0 363 239
sleep 1
touchUp 0
sleep 100
touchDown 0 314 289
sleep 1
touchUp 0
sleep 100
touchDown 0 509 288
sleep 1
touchUp 0
sleep 100
touchDown 0 55 60
sleep 1
touchUp 0
sleep 100
touchDown 0 55 60
sleep 1
touchUp 0
sleep 100
goto :LoadSteps

:Tray0
touchDown 0 440 225
sleep 30
touchUp 0
sleep 30
touchDown 0 440 225
sleep 30
touchUp 0
sleep 30
#Tray = #Tray + 1
goto :Put
:Tray1
touchDown 0 440 330
sleep 30
touchUp 0
sleep 30
touchDown 0 440 330
sleep 30
touchUp 0
sleep 30
#Tray = #Tray + 1
goto :Put
:Tray2
touchDown 0 375 225
sleep 30
touchUp 0
sleep 30
touchDown 0 375 225
sleep 30
touchUp 0
sleep 30
#Tray = #Tray + 1
goto :Put
:Tray3
touchDown 0 375 300
sleep 30
touchUp 0
sleep 30
#Tray = #Tray + 1
goto :Put
:Tray4
touchDown 0 310 225
sleep 30
touchUp 0
sleep 30
touchDown 0 310 225
sleep 30
touchUp 0
sleep 30
#Tray = #Tray + 1
goto :Put
:Tray5
touchDown 0 310 300
sleep 30
touchUp 0
sleep 30
touchDown 0 310 300
sleep 30
touchUp 0
sleep 30
#Tray = #Tray + 1
goto :Put
:Tray6
touchDown 0 245 225
sleep 30
touchUp 0
sleep 30
touchDown 0 245 225
sleep 30
touchUp 0
sleep 30
#Tray = #Tray + 1
goto :Put
:Tray7
touchDown 0 245 300
sleep 30
touchUp 0
sleep 30
touchDown 0 245 300
sleep 30
touchUp 0
sleep 30
#Tray = #Tray + 1
goto :Put
:Tray8
touchDown 0 175 225
sleep 30
touchUp 0
sleep 30
touchDown 0 175 225
sleep 30
touchUp 0
sleep 30
#Tray = #Tray + 1
goto :Put
:Tray9
touchDown 0 175 300
sleep 30
touchUp 0
sleep 30
touchDown 0 175 300
sleep 30
touchUp 0
sleep 30
#Tray = #Tray + 1
goto :Put
:end

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy