Advertisement
omegakoolkidrocker

Dragonvale Plant Farming AHK Script No Logging

May 11th, 2024
1,406
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Autohotkey 1.63 KB | Software | 0 0
  1. break := false
  2.  
  3. PlantFarming() {
  4.     global break
  5.     Click 809 652 ; Select Breeding Cave
  6.     Sleep 550
  7.     Click 699 875 ; Select Retry
  8.     Sleep 360
  9.     Click 899 869 ; Confirm Breed
  10.     Sleep 4000
  11.     WaitForColour(0xFF1111, 945, 430, wait:=25, lookForColour:=true)
  12.     Click 955 552 ; Click on Cave
  13.     Sleep 450
  14.     Click 939 825 ; Place in Nursery
  15.     Sleep 500
  16.     Click 1098 437 ; Click on Nursery
  17.     Sleep 2500
  18. ; change coords depending on egg slot
  19. ; No Donation Board - 1: (,), 2: (,), 3: (278,826), 4: (257,846), 5: (80,846), 6:(,)
  20. ; Donation Board - 1: (,), 2: (475,826), 3: (433,849), 4: (400,865), 5: (238,867), 6:(,)
  21.     WaitForColour(0x22BB11, 80, 846, wait:=25, lookForColour:=false)
  22. ; change first number depending on which nursery slot egg goes into (numbered from right)
  23. ; No Donation Board - 1: 721, 2: 523, 3: 366, 4: 336, 5: 152, 6:
  24. ; Donation Board - 1: , 2: 555, 3: 507, 4: 471, 5: 302, 6:
  25.     Click 152 904 ; Click on Egg
  26.     Sleep 350
  27.     Click 1199 645 ; Click Sell
  28.     Sleep 360
  29.     Click 789 843 ; Click Yes
  30.     Sleep 360
  31. }
  32.  
  33. WaitForColour(colour, X, Y, wait:=50, lookForColour:=true) {
  34.     if (lookForColour)
  35.     {
  36.         Loop {
  37.             PixelGetColor, cRGB, %X%, %Y%, RGB
  38.             if (cRGB = colour) ; might need to update this if the heart isn't detected
  39.             {
  40.                 Break
  41.             }
  42.             Sleep %wait%
  43.         }
  44.     } else {
  45.         Loop {
  46.             PixelGetColor, cRGB, %X%, %Y%, RGB
  47.             if (cRGB != colour)
  48.             {
  49.                 Break
  50.             }
  51.             Sleep %wait%
  52.         }
  53.     }
  54.     return
  55. }
  56.  
  57. +x::
  58. MouseGetPos, PosX, PosY
  59. PixelGetColor, cRGB , %PosX%, %PosY%,RGB
  60. MsgBox, %cRGB% "`n" %PosX% ", " %PosY%
  61. return
  62.  
  63. +p::
  64. break := false
  65. Loop {
  66.     PlantFarming()
  67.     if break
  68.         Break
  69. }
  70. return
  71.  
  72. +o::
  73.     break := true
  74. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement