PC55654

12d2d

Jul 2nd, 2025
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 74.60 KB | None | 0 0
  1. ; Virage GAG Macro [FREE VERSION]
  2.  
  3. #SingleInstance, Force
  4. #NoEnv
  5. SetWorkingDir %A_ScriptDir%
  6. #WinActivateForce
  7. SetMouseDelay, -1
  8. SetWinDelay, -1
  9. SetControlDelay, -1
  10. SetBatchLines, -1
  11.  
  12. ; globals
  13.  
  14. global webhookURL
  15. global privateServerLink
  16. global discordUserID
  17. global PingSelected
  18. global reconnectingProcess
  19.  
  20. global windowIDS := []
  21. global currentWindow := ""
  22. global firstWindow := ""
  23. global instanceNumber
  24. global idDisplay := ""
  25. global started := 0
  26.  
  27. global cycleCount := 0
  28. global cycleFinished := 0
  29. global toolTipText := ""
  30.  
  31. global currentItem := ""
  32. global currentArray := ""
  33. global currentSelectedArray := ""
  34. global indexItem := ""
  35. global indexArray := []
  36.  
  37. global currentHour
  38. global currentMinute
  39. global currentSecond
  40.  
  41. global midX
  42. global midY
  43.  
  44. global msgBoxCooldown := 0
  45.  
  46. global gearAutoActive := 0
  47. global seedAutoActive := 0
  48. global eggAutoActive := 0
  49. global cosmeticAutoActive := 0
  50. global honeyShopAutoActive := 0
  51. global honeyDepositAutoActive := 0
  52. global collectPollinatedAutoActive := 0
  53.  
  54. global GAME_PASS_ID := 1244038348
  55. global VERIFIED_KEY := "VerifiedUser"
  56.  
  57. global actionQueue := []
  58.  
  59. settingsFile := A_ScriptDir "\settings.ini"
  60.  
  61. ; unused
  62.  
  63. global currentShop := ""
  64.  
  65. global selectedResolution
  66.  
  67. global scrollCounts_1080p, scrollCounts_1440p_100, scrollCounts_1440p_125
  68. scrollCounts_1080p := [2, 4, 6, 8, 9, 11, 13, 14, 16, 18, 20, 21, 23, 25, 26, 28, 29, 31]
  69. scrollCounts_1440p_100 := [3, 5, 8, 10, 13, 15, 17, 20, 22, 24, 27, 30, 31, 34, 36, 38, 40, 42]
  70. scrollCounts_1440p_125 := [3, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 23, 25, 27, 29, 30, 31, 32]
  71.  
  72. global gearScroll_1080p, toolScroll_1440p_100, toolScroll_1440p_125
  73. gearScroll_1080p := [1, 2, 4, 6, 8, 9, 11, 13]
  74. gearScroll_1440p_100 := [2, 3, 6, 8, 10, 13, 15, 17]
  75. gearScroll_1440p_125 := [1, 3, 4, 6, 8, 9, 12, 12]
  76.  
  77. ; http functions
  78.  
  79. SendDiscordMessage(webhookURL, message) {
  80.  
  81. FormatTime, messageTime, , hh:mm:ss tt
  82. fullMessage := "[" . messageTime . "] " . message
  83.  
  84. json := "{""content"": """ . fullMessage . """}"
  85. whr := ComObjCreate("WinHttp.WinHttpRequest.5.1")
  86.  
  87. try {
  88. whr.Open("POST", webhookURL, false)
  89. whr.SetRequestHeader("Content-Type", "application/json")
  90. whr.Send(json)
  91. whr.WaitForResponse()
  92. status := whr.Status
  93.  
  94. if (status != 200 && status != 204) {
  95. return
  96. }
  97. } catch {
  98. return
  99. }
  100.  
  101. }
  102.  
  103. checkValidity(url, msg := 0, mode := "nil") {
  104.  
  105. global webhookURL
  106. global privateServerLink
  107. global settingsFile
  108.  
  109. isValid := 0
  110.  
  111. if (mode = "webhook" && (url = "" || !(InStr(url, "discord.com/api") || InStr(url, "discordapp.com/api")))) {
  112. isValid := 0
  113. if (msg) {
  114. MsgBox, 0, Message, Invalid Webhook
  115. IniRead, savedWebhook, %settingsFile%, Main, UserWebhook,
  116. GuiControl,, webhookURL, %savedWebhook%
  117. }
  118. return false
  119. }
  120.  
  121. if (mode = "privateserver" && (url = "" || !InStr(url, "roblox.com/share"))) {
  122. isValid := 0
  123. if (msg) {
  124. MsgBox, 0, Message, Invalid Private Server Link
  125. IniRead, savedServerLink, %settingsFile%, Main, PrivateServerLink,
  126. GuiControl,, privateServerLink, %savedServerLink%
  127. }
  128. return false
  129. }
  130.  
  131. try {
  132. whr := ComObjCreate("WinHttp.WinHttpRequest.5.1")
  133. whr.Open("GET", url, false)
  134. whr.Send()
  135. whr.WaitForResponse()
  136. status := whr.Status
  137.  
  138. if (mode = "webhook" && (status = 200 || status = 204)) {
  139. isValid := 1
  140. } else if (mode = "privateserver" && (status >= 200 && status < 400)) {
  141. isValid := 1
  142. }
  143. } catch {
  144. isValid := 0
  145. }
  146.  
  147. if (msg) {
  148. if (mode = "webhook") {
  149. if (isValid && webhookURL != "") {
  150. IniWrite, %webhookURL%, %settingsFile%, Main, UserWebhook
  151. MsgBox, 0, Message, Webhook Saved Successfully
  152. }
  153. else if (!isValid && webhookURL != "") {
  154. MsgBox, 0, Message, Invalid Webhook
  155. IniRead, savedWebhook, %settingsFile%, Main, UserWebhook,
  156. GuiControl,, webhookURL, %savedWebhook%
  157. }
  158. } else if (mode = "privateserver") {
  159. if (isValid && privateServerLink != "") {
  160. IniWrite, %privateServerLink%, %settingsFile%, Main, PrivateServerLink
  161. MsgBox, 0, Message, Private Server Link Saved Successfully
  162. }
  163. else if (!isValid && privateServerLink != "") {
  164. MsgBox, 0, Message, Invalid Private Server Link
  165. IniRead, savedServerLink, %settingsFile%, Main, PrivateServerLink,
  166. GuiControl,, privateServerLink, %savedServerLink%
  167. }
  168. }
  169. }
  170.  
  171. return isValid
  172.  
  173. }
  174.  
  175.  
  176. showPopupMessage(msgText := "nil", duration := 2000) {
  177.  
  178. static popupID := 99
  179.  
  180. ; get main GUI position and size
  181. WinGetPos, guiX, guiY, guiW, guiH, A
  182.  
  183. innerX := 20
  184. innerY := 35
  185. innerW := 200
  186. innerH := 50
  187. winW := 200
  188. winH := 50
  189. x := guiX + (guiW - winW) // 2 - 40
  190. y := guiY + (guiH - winH) // 2
  191.  
  192. if (!msgBoxCooldown) {
  193. msgBoxCooldown = 1
  194. Gui, %popupID%:Destroy
  195. Gui, %popupID%:+AlwaysOnTop -Caption +ToolWindow +Border
  196. Gui, %popupID%:Color, FFFFFF
  197. Gui, %popupID%:Font, s10 cBlack, Segoe UI
  198. Gui, %popupID%:Add, Text, x%innerX% y%innerY% w%innerW% h%innerH% BackgroundWhite Center cBlack, %msgText%
  199. Gui, %popupID%:Show, x%x% y%y% NoActivate
  200. SetTimer, HidePopupMessage, -%duration%
  201. Sleep, 2200
  202. msgBoxCooldown = 0
  203. }
  204.  
  205. }
  206.  
  207. DonateResponder(ctrlName) {
  208.  
  209. MsgBox, 1, Disclaimer,
  210. (
  211. Your browser will open with a link to a roblox gamepass once you press OK.
  212. - Feel free to check the code, there are no malicious links.
  213. )
  214.  
  215. IfMsgBox, OK
  216. if (ctrlName = "Donate100")
  217. Run, https://www.roblox.com/game-pass/1197306369/100-Donation
  218. else if (ctrlName = "Donate500")
  219. Run, https://www.roblox.com/game-pass/1222540123/500-Donation
  220. else if (ctrlName = "Donate1000")
  221. Run, https://www.roblox.com/game-pass/1222262383/1000-Donation
  222. else if (ctrlName = "Donate2500")
  223. Run, https://www.roblox.com/game-pass/1222306189/2500-Donation
  224. else if (ctrlName = "Donate10000")
  225. Run, https://www.roblox.com/game-pass/1220930414/10-000-Donation
  226. else
  227. return
  228.  
  229. }
  230.  
  231. ; mouse functions
  232.  
  233. SafeMoveRelative(xRatio, yRatio) {
  234.  
  235. if WinExist("ahk_exe RobloxPlayerBeta.exe") {
  236. WinGetPos, winX, winY, winW, winH, ahk_exe RobloxPlayerBeta.exe
  237. moveX := winX + Round(xRatio * winW)
  238. moveY := winY + Round(yRatio * winH)
  239. MouseMove, %moveX%, %moveY%
  240. }
  241.  
  242. }
  243.  
  244. SafeClickRelative(xRatio, yRatio) {
  245.  
  246. if WinExist("ahk_exe RobloxPlayerBeta.exe") {
  247. WinGetPos, winX, winY, winW, winH, ahk_exe RobloxPlayerBeta.exe
  248. clickX := winX + Round(xRatio * winW)
  249. clickY := winY + Round(yRatio * winH)
  250. Click, %clickX%, %clickY%
  251. }
  252.  
  253. }
  254.  
  255. getMouseCoord(axis) {
  256.  
  257. WinGetPos, winX, winY, winW, winH, ahk_exe RobloxPlayerBeta.exe
  258. CoordMode, Mouse, Screen
  259. MouseGetPos, mouseX, mouseY
  260.  
  261. relX := (mouseX - winX) / winW
  262. relY := (mouseY - winY) / winH
  263.  
  264. if (axis = "x")
  265. return relX
  266. else if (axis = "y")
  267. return relY
  268.  
  269. return "" ; error
  270.  
  271. }
  272.  
  273. ; directional sequence encoder/executor
  274. ; if you're going to modify the calls to this make sure you know what you're doing (ui navigation has some odd behaviours)
  275.  
  276. uiUniversal(order := 0, exitUi := 1, continuous := 0, spam := 0, spamCount := 30, delayTime := 50, mode := "universal", index := 0, dir := "nil", itemType := "nil") {
  277.  
  278. global SavedSpeed
  279. global SavedKeybind
  280.  
  281. global indexItem
  282. global currentArray
  283.  
  284. If (!order && mode = "universal") {
  285. return
  286. }
  287.  
  288. if (!continuous) {
  289. sendKeybind(SavedKeybind)
  290. Sleep, 50
  291. }
  292.  
  293. ; right = 1, left = 2, up = 3, down = 4, enter = 0, manual delay = 5
  294. if (mode = "universal") {
  295.  
  296. Loop, Parse, order
  297. {
  298. if (A_LoopField = "1") {
  299. repeatKey("Right", 1)
  300. }
  301. else if (A_LoopField = "2") {
  302. repeatKey("Left", 1)
  303. }
  304. else if (A_LoopField = "3") {
  305. repeatKey("Up", 1)
  306. }
  307. else if (A_LoopField = "4") {
  308. repeatKey("Down", 1)
  309. }
  310. else if (A_LoopField = "0") {
  311. repeatKey("Enter", spam ? spamCount : 1, spam ? 10 : 0)
  312. }
  313. else if (A_LoopField = "5") {
  314. Sleep, 100
  315. }
  316. if (SavedSpeed = "Stable" && A_LoopField != "5") {
  317. Sleep, %delayTime%
  318. }
  319. }
  320.  
  321. }
  322. else if (mode = "calculate") {
  323.  
  324. previousIndex := findIndex(currentArray, indexItem)
  325. sendCount := index - previousIndex
  326.  
  327. if (dir = "up") {
  328. repeatKey(dir)
  329. repeatKey("Enter")
  330. repeatKey(dir, sendCount)
  331. }
  332. else if (dir = "down") {
  333. if ((currentArray.Name = "honeyItems") && (previousIndex = 1 || previousIndex = 10 || previousIndex = 12)) {
  334. if (!(findIndex(indexArray, 1, "bool"))) {
  335. sendCount++
  336. }
  337. sendCount--
  338. }
  339. repeatKey(dir, sendCount)
  340. repeatKey("Enter")
  341. repeatKey(dir)
  342. if ((currentArray.Name = "honeyItems") && (index = 1 || index = 10 || index = 12)) {
  343. repeatKey(dir)
  344. }
  345. }
  346.  
  347. }
  348. else if (mode = "close") {
  349.  
  350. if (dir = "up") {
  351. repeatKey(dir)
  352. repeatKey("Enter")
  353. repeatKey(dir, index)
  354. }
  355. else if (dir = "down") {
  356. repeatKey(dir, index)
  357. repeatKey("Enter")
  358. repeatKey(dir)
  359. }
  360.  
  361. }
  362.  
  363. if (exitUi) {
  364. Sleep, 50
  365. sendKeybind(SavedKeybind)
  366. }
  367.  
  368. return
  369.  
  370. }
  371.  
  372. ; universal shop buyer
  373.  
  374. buyUniversal(itemType) {
  375.  
  376. global currentArray
  377. global currentSelectedArray
  378. global indexItem := ""
  379. global indexArray := []
  380.  
  381. indexArray := []
  382. lastIndex := 0
  383.  
  384. ; name array
  385. arrayName := itemType . "Items"
  386. currentArray := %arrayName%
  387. currentArray.Name := arrayName
  388.  
  389. ; get arrays
  390. StringUpper, itemType, itemType, T
  391.  
  392. selectedArrayName := "selected" . itemtype . "Items"
  393. currentSelectedArray := %selectedArrayName%
  394.  
  395. ; get item indexes
  396. for i, selectedItem in currentSelectedArray {
  397. indexArray.Push(findIndex(currentArray, selectedItem))
  398. }
  399.  
  400. ; buy items
  401. for i, index in indexArray {
  402. currentItem := currentSelectedArray[i]
  403. Sleep, 50
  404. uiUniversal(, 0, 1, , , , "calculate", index, "down", itemType)
  405. indexItem := currentSelectedArray[i]
  406. sleepAmount(100, 200)
  407. quickDetect(0x26EE26, 0x1DB31D, 5, 0.4262, 0.2903, 0.6918, 0.8508)
  408. Sleep, 50
  409. lastIndex := index - 1
  410. }
  411.  
  412. ; end
  413. Sleep, 100
  414. uiUniversal(, 0, 1,,,, "close", lastIndex, "up", itemType)
  415. Sleep, 100
  416.  
  417. }
  418.  
  419. ; helper functions
  420.  
  421. repeatKey(key := "nil", count := 1, delay := 30) {
  422.  
  423. global SavedSpeed
  424.  
  425. if (key = "nil") {
  426. return
  427. }
  428.  
  429. Loop, %count% {
  430. Send {%key%}
  431. Sleep, % (SavedSpeed = "Ultra" ? (delay - 25) : SavedSpeed = "Max" ? (delay - 30) : delay)
  432. }
  433.  
  434. }
  435.  
  436. sendKeybind(keybind) {
  437. if (keybind = "\") {
  438. Send, \
  439. } else {
  440. Send, {%keybind%}
  441. }
  442. }
  443.  
  444.  
  445. sleepAmount(fastTime, slowTime) {
  446.  
  447. global SavedSpeed
  448.  
  449. Sleep, % (SavedSpeed != "Stable") ? fastTime : slowTime
  450.  
  451. }
  452.  
  453. findIndex(array := "", value := "", returnValue := "int") {
  454.  
  455. for index, item in array {
  456. if (value = item) {
  457. if (returnValue = "int") {
  458. return index
  459. }
  460. else if (returnValue = "bool") {
  461. return true
  462. }
  463. }
  464. }
  465.  
  466. if (returnValue = "int") {
  467. return 1
  468. }
  469. else if (returnValue = "bool") {
  470. return false
  471. }
  472.  
  473. }
  474.  
  475. searchItem(search := "nil") {
  476.  
  477. if(search = "nil") {
  478. Return
  479. }
  480.  
  481. uiUniversal("1011143333333333333333333311440", 0)
  482. Sleep, 50
  483. typeString(search)
  484. Sleep, 50
  485.  
  486. if (search = "recall") {
  487. uiUniversal("22211550554155055", 1, 1)
  488. }
  489. else if (search = "pollinated") {
  490. uiUniversal("22115505544444444444444444444441111111155055", 1, 1)
  491. }
  492. else if (search = "pollen") {
  493. uiUniversal("2211550554444444444111111155055", 1, 1)
  494. }
  495.  
  496. uiUniversal(10)
  497.  
  498. }
  499.  
  500. typeString(string, enter := 1, clean := 1) {
  501.  
  502. if (string = "") {
  503. Return
  504. }
  505.  
  506. if (clean) {
  507. Send {BackSpace 20}
  508. Sleep, 100
  509. }
  510.  
  511. Loop, Parse, string
  512. {
  513. Send, {%A_LoopField%}
  514. Sleep, 100
  515. }
  516.  
  517. if (enter) {
  518. Send, {Enter}
  519. }
  520.  
  521. Return
  522.  
  523. }
  524.  
  525. dialogueClick(shop) {
  526.  
  527. Loop, 5 {
  528. Send, {WheelUp}
  529. Sleep, 20
  530. }
  531.  
  532. Sleep, 500
  533.  
  534. if (shop = "gear") {
  535. SafeClickRelative(midX + 0.4, midY - 0.1)
  536. }
  537. else if (shop = "honey") {
  538. SafeClickRelative(midX + 0.4, midY)
  539. }
  540.  
  541. Sleep, 500
  542.  
  543. Loop, 5 {
  544. Send, {WheelDown}
  545. Sleep, 20
  546. }
  547.  
  548. SafeClickRelative(midX, midY)
  549.  
  550. }
  551.  
  552. hotbarController(select := 0, unselect := 0, key := "nil") {
  553.  
  554. if ((select = 1 && unselect = 1) || (select = 0 && unselect = 0) || key = "nil") {
  555. Return
  556. }
  557.  
  558. if (unselect) {
  559. Send, {%key%}
  560. Sleep, 200
  561. Send, {%key%}
  562. }
  563. else if (select) {
  564. Send, {%key%}
  565. }
  566.  
  567. }
  568.  
  569. closeRobuxPrompt() {
  570.  
  571. Loop, 4 {
  572. Send {Escape}
  573. Sleep, 100
  574. }
  575.  
  576. }
  577.  
  578. getWindowIDS(returnIndex := 0) {
  579.  
  580. global windowIDS
  581. global idDisplay
  582. global firstWindow
  583.  
  584. windowIDS := []
  585. idDisplay := ""
  586. firstWindow := ""
  587.  
  588. WinGet, robloxWindows, List, ahk_exe RobloxPlayerBeta.exe
  589.  
  590. Loop, %robloxWindows% {
  591. windowIDS.Push(robloxWindows%A_Index%)
  592. idDisplay .= windowIDS[A_Index] . ", "
  593. }
  594.  
  595. firstWindow := % windowIDS[1]
  596.  
  597. StringTrimRight, idDisplay, idDisplay, 2
  598.  
  599. if (returnIndex) {
  600. Return windowIDS[returnIndex]
  601. }
  602.  
  603. }
  604.  
  605. closeShop(shop, success) {
  606.  
  607. StringUpper, shop, shop, T
  608.  
  609. if (success) {
  610.  
  611. Sleep, 500
  612. if (shop = "Honey") {
  613. uiUniversal("43333311140320", 1, 1)
  614. }
  615. else {
  616. uiUniversal("4330320", 1, 1)
  617. }
  618.  
  619. }
  620. else {
  621.  
  622. ToolTip, % "Error In Detecting " . shop
  623. SetTimer, HideTooltip, -1500
  624. SendDiscordMessage(webhookURL, "Failed To Detect " . shop . " Shop Opening [Error]" . (PingSelected ? " <@" . discordUserID . ">" : ""))
  625. ; failsafe
  626. uiUniversal("3332223111133322231111054105")
  627.  
  628. }
  629.  
  630. }
  631.  
  632. walkDistance(order := 0, multiplier := 1) {
  633.  
  634. ; later
  635.  
  636. }
  637.  
  638. sendMessages() {
  639.  
  640. ; later
  641.  
  642. }
  643.  
  644. ; color detectors
  645.  
  646. quickDetectEgg(buyColor, variation := 10, x1Ratio := 0.0, y1Ratio := 0.0, x2Ratio := 1.0, y2Ratio := 1.0) {
  647.  
  648. global selectedEggItems
  649. global currentItem
  650.  
  651. eggsCompleted := 0
  652. isSelected := 0
  653.  
  654. eggColorMap := Object()
  655. eggColorMap["Common Egg"] := "0xFFFFFF"
  656. eggColorMap["Uncommon Egg"] := "0x81A7D3"
  657. eggColorMap["Rare Egg"] := "0xBB5421"
  658. eggColorMap["Legendary Egg"] := "0x2D78A3"
  659. eggColorMap["Mythical Egg"] := "0x00CCFF"
  660. eggColorMap["Bug Egg"] := "0x86FFD5"
  661. eggColorMap["Common Summer Egg"] := "0x00FFFF"
  662. eggColorMap["Rare Summer Egg"] := "0xFBFCA8"
  663. eggColorMap["Paradise Egg"] := "0x32CDFF"
  664. eggColorMap["Bee Egg"] := "0x00ACFF"
  665.  
  666. Loop, 5 {
  667. for rarity, color in eggColorMap {
  668. currentItem := rarity
  669. isSelected := 0
  670.  
  671. for i, selected in selectedEggItems {
  672. if (selected = rarity) {
  673. isSelected := 1
  674. break
  675. }
  676. }
  677.  
  678. ; check for the egg on screen, if its selected it gets bought
  679. if (simpleDetect(color, variation, 0.41, 0.32, 0.54, 0.38)) {
  680. if (isSelected) {
  681. quickDetect(buyColor, 0, 5, 0.4, 0.60, 0.65, 0.70, 0, 1)
  682. eggsCompleted = 1
  683. break
  684. } else {
  685. if (simpleDetect(buyColor, variation, 0.40, 0.60, 0.65, 0.70)) {
  686. ToolTip, % currentItem . "`nIn Stock, Not Selected"
  687. SetTimer, HideTooltip, -1500
  688. SendDiscordMessage(webhookURL, currentItem . " In Stock, Not Selected")
  689. }
  690. else {
  691. ToolTip, % currentItem . "`nNot In Stock, Not Selected"
  692. SetTimer, HideTooltip, -1500
  693. SendDiscordMessage(webhookURL, currentItem . " Not In Stock, Not Selected")
  694. }
  695. uiUniversal(1105, 1, 1)
  696. eggsCompleted = 1
  697. break
  698. }
  699. }
  700. }
  701. ; failsafe
  702. if (eggsCompleted) {
  703. return
  704. }
  705. Sleep, 1500
  706. }
  707.  
  708. if (!eggsCompleted) {
  709. uiUniversal(5, 1, 1)
  710. ToolTip, Error In Detection
  711. SetTimer, HideTooltip, -1500
  712. SendDiscordMessage(webhookURL, "Failed To Detect Any Egg [Error]" . (PingSelected ? " <@" . discordUserID . ">" : ""))
  713. }
  714.  
  715. }
  716.  
  717. simpleDetect(colorInBGR, variation, x1Ratio := 0.0, y1Ratio := 0.0, x2Ratio := 1.0, y2Ratio := 1.0) {
  718.  
  719. CoordMode, Pixel, Screen
  720. CoordMode, Mouse, Screen
  721.  
  722. ; limit search to specified area
  723. WinGetPos, winX, winY, winW, winH, ahk_exe RobloxPlayerBeta.exe
  724.  
  725. x1 := winX + Round(x1Ratio * winW)
  726. y1 := winY + Round(y1Ratio * winH)
  727. x2 := winX + Round(x2Ratio * winW)
  728. y2 := winY + Round(y2Ratio * winH)
  729.  
  730. PixelSearch, FoundX, FoundY, x1, y1, x2, y2, colorInBGR, variation, Fast
  731. if (ErrorLevel = 0) {
  732. return true
  733. }
  734.  
  735. }
  736.  
  737. quickDetect(color1, color2, variation := 10, x1Ratio := 0.0, y1Ratio := 0.0, x2Ratio := 1.0, y2Ratio := 1.0, item := 1, egg := 0) {
  738.  
  739. CoordMode, Pixel, Screen
  740. CoordMode, Mouse, Screen
  741.  
  742. stock := 0
  743. eggDetected := 0
  744.  
  745. global currentItem
  746.  
  747. ; change to whatever you want to be pinged for
  748. pingItems := ["Bamboo Seed", "Coconut Seed", "Cactus Seed", "Dragon Fruit Seed", "Mango Seed", "Grape Seed", "Mushroom Seed", "Pepper Seed"
  749. , "Cacao Seed", "Beanstalk Seed"
  750. , "Basic Sprinkler", "Advanced Sprinkler", "Godly Sprinkler", "Lightning Rod", "Master Sprinkler"
  751. , "Rare Egg", "Legendary Egg", "Mythical Egg", "Bug Egg"
  752. , "Flower Seed Pack", "Nectarine Seed", "Hive Fruit Seed", "Honey Sprinkler"
  753. , "Bee Egg", "Bee Crate", "Honey Comb", "Bee Chair", "Honey Torch", "Honey Walkway"]
  754.  
  755. ping := false
  756.  
  757. if (PingSelected) {
  758. for i, pingitem in pingItems {
  759. if (pingitem = currentItem) {
  760. ping := true
  761. break
  762. }
  763. }
  764. }
  765.  
  766. ; limit search to specified area
  767. WinGetPos, winX, winY, winW, winH, ahk_exe RobloxPlayerBeta.exe
  768.  
  769. x1 := winX + Round(x1Ratio * winW)
  770. y1 := winY + Round(y1Ratio * winH)
  771. x2 := winX + Round(x2Ratio * winW)
  772. y2 := winY + Round(y2Ratio * winH)
  773.  
  774. ; for seeds/gears checks if either color is there (buy button)
  775. if (item) {
  776. for index, color in [color1, color2] {
  777. PixelSearch, FoundX, FoundY, x1, y1, x2, y2, %color%, variation, Fast RGB
  778. if (ErrorLevel = 0) {
  779. stock := 1
  780. ToolTip, %currentItem% `nIn Stock
  781. SetTimer, HideTooltip, -1500
  782. uiUniversal(50, 0, 1, 1)
  783. Sleep, 50
  784. if (ping)
  785. SendDiscordMessage(webhookURL, "Bought " . currentItem . ". <@" . discordUserID . ">")
  786. else
  787. SendDiscordMessage(webhookURL, "Bought " . currentItem . ".")
  788. }
  789. }
  790. }
  791.  
  792. ; for eggs
  793. if (egg) {
  794. PixelSearch, FoundX, FoundY, x1, y1, x2, y2, color1, variation, Fast RGB
  795. if (ErrorLevel = 0) {
  796. stock := 1
  797. ToolTip, %currentItem% `nIn Stock
  798. SetTimer, HideTooltip, -1500
  799. uiUniversal(500, 1, 1)
  800. Sleep, 50
  801. if (ping)
  802. SendDiscordMessage(webhookURL, "Bought " . currentItem . ". <@" . discordUserID . ">")
  803. else
  804. SendDiscordMessage(webhookURL, "Bought " . currentItem . ".")
  805. }
  806. if (!stock) {
  807. uiUniversal(1105, 1, 1)
  808. SendDiscordMessage(webhookURL, currentItem . " Not In Stock.")
  809. }
  810. }
  811.  
  812. Sleep, 100
  813.  
  814. if (!stock) {
  815. ToolTip, %currentItem% `nNot In Stock
  816. SetTimer, HideTooltip, -1500
  817. ; SendDiscordMessage(webhookURL, currentItem . " Not In Stock.")
  818. }
  819.  
  820. }
  821.  
  822. ; item arrays
  823.  
  824. seedItems := ["Carrot Seed", "Strawberry Seed", "Blueberry Seed", "Tomato Seed"
  825. , "Cauliflower Seed", "Watermelon Seed", "Rafflesia Seed"
  826. , "Green Apple Seed", "Avocado Seed", "Banana Seed", "Pineapple Seed"
  827. , "Kiwi Seed", "Bell Pepper Seed", "Prickly Pear Seed", "Loquat Seed"
  828. , "Feijoa Seed", "Pitcher Plant", "Sugar Apple"]
  829.  
  830. gearItems := ["Watering Can", "Trowel", "Recall Wrench", "Basic Sprinkler", "Advanced Sprinkler"
  831. , "Godly Sprinkler", "Magnifying Glass", "Tanning Mirror", "Master Sprinkler", "Cleaning Spray", "Favorite Tool", "Harvest Tool", "Friendship Pot"]
  832.  
  833. eggItems := ["Common Egg", "Common Summer Egg", "Rare Summer Egg", "Mythical Egg", "Paradise Egg"
  834. , "Bee Egg", "Bug Egg"]
  835.  
  836. cosmeticItems := ["Cosmetic 1", "Cosmetic 2", "Cosmetic 3", "Cosmetic 4", "Cosmetic 5"
  837. , "Cosmetic 6", "Cosmetic 7", "Cosmetic 8", "Cosmetic 9"]
  838.  
  839. ; honeyItems := ["Flower Seed Pack", "placeHolder1", "Lavender Seed", "Nectarshade Seed", "Nectarine Seed", "Hive Fruit Seed", "Pollen Rader", "Nectar Staff"
  840. ; , "Honey Sprinkler", "Bee Egg", "placeHolder2", "Bee Crate", "placeHolder3", "Honey Comb", "Bee Chair", "Honey Torch", "Honey Walkway"]
  841.  
  842. ;realHoneyItems := ["Flower Seed Pack", "Lavender Seed", "Nectarshade Seed", "Nectarine Seed", "Hive Fruit Seed", "Pollen Rader", "Nectar Staff"
  843. ; , "Honey Sprinkler", "Bee Egg", "Bee Crate", "Honey Comb", "Bee Chair", "Honey Torch", "Honey Walkway"]
  844.  
  845. global craftItems, craftItems2
  846. craftItems := ["Crafters Seed Pack", "Manuka Flower", "Dandelion"
  847. , "Lumira", "Honeysuckle", "Bee Balm", "Nectar Thorn", "Suncoil"]
  848. craftItems2 := ["Tropical Mist Sprinkler", "Berry Blusher Sprinkler"
  849. , "Spice Spritzer Sprinkler", "Sweet Soaker Sprinkler"
  850. , "Flower Freeze Sprinkler", "Stalk Sprout Sprinkler"
  851. , "Mutation Spray Choc", "Mutation Spray Pollinated"
  852. , "Mutation Spray Shocked", "Honey Crafters Crate"
  853. , "Anti Bee Egg", "Pack Bee"]
  854.  
  855. settingsFile := A_ScriptDir "\settings.ini"
  856.  
  857. /*
  858. fff(username) {
  859. global GAME_PASS_ID
  860. username := Trim(username)
  861.  
  862. reqBody := "{""usernames"":[""" username """],""excludeBannedUsers"":true}"
  863. whr := ComObjCreate("WinHttp.WinHttpRequest.5.1")
  864. whr.Open("POST","https://users.roblox.com/v1/usernames/users",false)
  865. whr.SetRequestHeader("Content-Type","application/json")
  866. whr.Send(reqBody), whr.WaitForResponse()
  867. if (whr.Status!=200 || !RegExMatch(whr.ResponseText,"""id"":\s*(\d+)",m))
  868. return 0
  869. userId := m1
  870.  
  871. ownURL := "https://inventory.roblox.com/v1/users/" userId
  872. . "/items/GamePass/" GAME_PASS_ID
  873. whr2 := ComObjCreate("WinHttp.WinHttpRequest.5.1")
  874. whr2.Open("GET",ownURL,false), whr2.Send(), whr2.WaitForResponse()
  875. if (whr2.Status!=200) ; request itself failed
  876. return 0
  877.  
  878. return !RegExMatch(whr2.ResponseText, """data"":\s*\[\s*\]")
  879. }
  880.  
  881.  
  882. IniRead, isVerified, %settingsFile%, Main, %VERIFIED_KEY%, 0
  883. if (!isVerified) {
  884. InputBox, rbUser, Premium Access, Please enter your Roblox username:
  885. if (ErrorLevel)
  886. ExitApp ; user cancelled
  887.  
  888. if (fff(rbUser)) {
  889. IniWrite, 1, %settingsFile%, Main, %VERIFIED_KEY%
  890. IniWrite, %rbUser%, %settingsFile%, Main, VerifiedUsername
  891. MsgBox, 0, Success, Verification successful, enjoy the macro!
  892. } else {
  893. MsgBox, 16, Access Denied, Sorry, that account does not own the required game-pass.
  894. ExitApp
  895. }
  896. }
  897. */
  898.  
  899. Gosub, ShowGui
  900.  
  901. ; main ui
  902. ShowGui:
  903.  
  904. Gui, Destroy
  905. Gui, +Resize +MinimizeBox +SysMenu
  906. Gui, Margin, 10, 10
  907. Gui, Color, 0x202020
  908. Gui, Font, s9 cWhite, Segoe UI
  909. Gui, Add, Tab, x10 y10 w580 h440 vMyTab, Seeds|Gears|Eggs|Cosmetics|Settings|Credits
  910.  
  911. Gui, Tab, 1
  912. Gui, Font, s9 c90EE90 Bold, Segoe UI
  913. Gui, Add, GroupBox, x23 y50 w475 h340 c90EE90, Seed Shop Items
  914. IniRead, SelectAllSeeds, %settingsFile%, Seed, SelectAllSeeds, 0
  915. Gui, Add, Checkbox, % "x50 y90 vSelectAllSeeds gHandleSelectAll c90EE90 " . (SelectAllSeeds ? "Checked" : ""), Select All Seeds
  916. Loop, % seedItems.Length() {
  917. IniRead, sVal, %settingsFile%, Seed, Item%A_Index%, 0
  918. if (A_Index > 18) {
  919. col := 350
  920. idx := A_Index - 18
  921. yBase := 125
  922. }
  923. else if (A_Index > 9) {
  924. col := 200
  925. idx := A_Index - 10
  926. yBase := 125
  927. }
  928. else {
  929. col := 50
  930. idx := A_Index
  931. yBase := 100
  932. }
  933. y := yBase + (idx * 25)
  934. Gui, Add, Checkbox, % "x" col " y" y " vSeedItem" A_Index " gHandleSelectAll cD3D3D3 " . (sVal ? "Checked" : ""), % seedItems[A_Index]
  935. }
  936.  
  937. Gui, Tab, 2
  938. Gui, Font, s9 c87CEEB Bold, Segoe UI
  939. Gui, Add, GroupBox, x23 y50 w475 h340 c87CEEB, Gear Shop Items
  940. IniRead, SelectAllGears, %settingsFile%, Gear, SelectAllGears, 0
  941. Gui, Add, Checkbox, % "x50 y90 vSelectAllGears gHandleSelectAll c87CEEB " . (SelectAllGears ? "Checked" : ""), Select All Gears
  942. Loop, % gearItems.Length() {
  943. IniRead, gVal, %settingsFile%, Gear, Item%A_Index%, 0
  944. if (A_Index > 9) {
  945. col := 200
  946. idx := A_Index - 10
  947. yBase := 125
  948. }
  949. else {
  950. col := 50
  951. idx := A_Index
  952. yBase := 100
  953. }
  954. y := yBase + (idx * 25)
  955. Gui, Add, Checkbox, % "x" col " y" y " vGearItem" A_Index " gHandleSelectAll cD3D3D3 " . (gVal ? "Checked" : ""), % gearItems[A_Index]
  956. }
  957.  
  958. Gui, Tab, 3
  959. Gui, Font, s9 ce87b07 Bold, Segoe UI
  960. Gui, Add, GroupBox, x23 y50 w475 h340 ce87b07, Egg Shop
  961. IniRead, SelectAllEggs, %settingsFile%, Egg, SelectAllEggs, 0
  962. Gui, Add, Checkbox, % "x50 y90 vSelectAllEggs gHandleSelectAll ce87b07 " . (SelectAllEggs ? "Checked" : ""), Select All Eggs
  963. Loop, % eggItems.Length() {
  964. IniRead, eVal, %settingsFile%, Egg, Item%A_Index%, 0
  965. y := 125 + (A_Index - 1) * 25
  966. Gui, Add, Checkbox, % "x50 y" y " vEggItem" A_Index " gHandleSelectAll cD3D3D3 " . (eVal ? "Checked" : ""), % eggItems[A_Index]
  967. }
  968.  
  969. /*
  970. Gui, Tab, 4
  971. Gui, Font, s9 ce8ac07 Bold, Segoe UI
  972. Gui, Add, GroupBox, x23 y50 w475 h340 ce8ac07, Honey
  973. IniRead, AutoCollectPollinated, %settingsFile%, Honey, AutoCollectPollinated, 0
  974. Gui, Add, Checkbox, % "x50 y90 vAutoCollectPollinated ce8ac07 " . (AutoCollectPollinated ? "Checked" : ""), Auto-Collect Pollinated Plants
  975. IniRead, AutoHoney, %settingsFile%, Honey, AutoDepositHoney, 0
  976. Gui, Add, Checkbox, % "x50 y115 vAutoHoney ce8ac07 " . (AutoHoney ? "Checked" : ""), Auto-Deposit Honey
  977.  
  978.  
  979. Gui, Tab, 5
  980. Gui, Font, s9 cBF40BF Bold, Segoe UI
  981.  
  982. Gui, Add, GroupBox, x23 y50 w230 h380 cBF40BF, Crafting Seeds
  983. Gui, Add, Text, x40 y130 w200 h40, Coming soon
  984.  
  985. IniRead, SelectAllCraft, %settingsFile%, Craft, SelectAllCraft, 0
  986. Gui, Add, Checkbox, % "x40 y90 vSelectAllCraft gHandleSelectAll cBF40BF " . (SelectAllCraft ? "Checked" : ""), Select All Seeds
  987. Loop, % craftItems.Length() {
  988. IniRead, cVal, %settingsFile%, Craft, Item%A_Index%, 0
  989. y := 125 + (A_Index - 1) * 25
  990. Gui, Add, Checkbox, % "x40 y" y " vCraftItem" A_Index " gHandleSelectAll cD3D3D3 " . (cVal ? "Checked" : ""), % craftItems[A_Index]
  991. }
  992.  
  993.  
  994. Gui, Add, GroupBox, x270 y50 w230 h380 cBF40BF, Crafting Tools
  995.  
  996. IniRead, SelectAllCraft2, %settingsFile%, Craft2, SelectAllCraft2, 0
  997. Gui, Add, Checkbox, % "x280 y90 vSelectAllCraft2 gHandleSelectAll cBF40BF " . (SelectAllCraft2 ? "Checked" : ""), Select All Tools
  998. Loop, % craftItems2.Length() {
  999. IniRead, c2Val, %settingsFile%, Craft2, Item%A_Index%, 0
  1000. y := 125 + (A_Index - 1) * 25
  1001. Gui, Add, Checkbox, % "x280 y" y " vCraftItem2" A_Index " gHandleSelectAll cD3D3D3 " . (c2Val ? "Checked" : ""), % craftItems2[A_Index]
  1002. }
  1003. */
  1004.  
  1005. Gui, Tab, 4
  1006. Gui, Font, s9 cD41551 Bold, Segoe UI
  1007. Gui, Add, GroupBox, x23 y50 w475 h340 cD41551, Cosmetic Shop
  1008. IniRead, BuyAllCosmetics, %settingsFile%, Cosmetic, BuyAllCosmetics, 0
  1009. Gui, Add, Checkbox, % "x50 y90 vBuyAllCosmetics cD41551 " . (BuyAllCosmetics ? "Checked" : ""), Buy All Cosmetics
  1010.  
  1011. Gui, Tab, 5
  1012. Gui, Font, s9 cWhite Bold, Segoe UI
  1013.  
  1014. ; opt1 := (selectedResolution = 1 ? "Checked" : "")
  1015. ; opt2 := (selectedResolution = 2 ? "Checked" : "")
  1016. ; opt3 := (selectedResolution = 3 ? "Checked" : "")
  1017. ; opt4 := (selectedResolution = 4 ? "Checked" : "")
  1018.  
  1019. ;Gui, Add, GroupBox, x30 y200 w260 h110, Resolution
  1020. ; Gui, Add, Text, x50 y220, Resolutions:
  1021. ; IniRead, selectedResolution, %settingsFile%, Main, Resolution, 1
  1022. ; Gui, Add, Radio, x50 y240 vselectedResolution gUpdateResolution c708090 %opt1%, 2560x1440 125`%
  1023. ; Gui, Add, Radio, x50 y260 gUpdateResolution c708090 %opt2%, 2560x1440 100`%
  1024. ; Gui, Add, Radio, x50 y280 gUpdateResolution c708090 %opt3%, 1920x1080 100`%
  1025. ; Gui, Add, Radio, x50 y300 gUpdateResolution c708090 %opt4%, 1280x720 100`%
  1026.  
  1027. Gui, Font, s9, cWhite Bold, Segoe UI
  1028. Gui, Add, GroupBox, x23 y50 w475 h340 cD3D3D3, Settings
  1029.  
  1030. IniRead, PingSelected, %settingsFile%, Main, PingSelected, 0
  1031. pingColor := PingSelected ? "c90EE90" : "cD3D3D3"
  1032. Gui, Add, Checkbox, % "x50 y225 vPingSelected gUpdateSettingColor " . pingColor . (PingSelected ? " Checked" : ""), Discord Pings
  1033.  
  1034. IniRead, AutoAlign, %settingsFile%, Main, AutoAlign, 0
  1035. autoColor := AutoAlign ? "c90EE90" : "cD3D3D3"
  1036. Gui, Add, Checkbox, % "x50 y250 vAutoAlign gUpdateSettingColor " . autoColor . (AutoAlign ? " Checked" : ""), Auto-Align
  1037.  
  1038. Gui, Font, s8 cD3D3D3 Bold, Segoe UI
  1039. Gui, Add, Text, x50 y90, Webhook URL:
  1040. Gui, Font, s8 cBlack, Segoe UI
  1041. IniRead, savedWebhook, %settingsFile%, Main, UserWebhook
  1042. if (savedWebhook = "ERROR") {
  1043. savedWebhook := ""
  1044. }
  1045. Gui, Add, Edit, x140 y90 w250 h18 vwebhookURL +BackgroundFFFFFF, %savedWebhook%
  1046. Gui, Font, s8 cWhite, Segoe UI
  1047. Gui, Add, Button, x400 y90 w85 h18 gDisplayWebhookValidity Background202020, Save Webhook
  1048.  
  1049. Gui, Font, s8 cD3D3D3 Bold, Segoe UI
  1050. Gui, Add, Text, x50 y115, Discord User ID:
  1051. Gui, Font, s8 cBlack, Segoe UI
  1052. IniRead, savedUserID, %settingsFile%, Main, DiscordUserID
  1053. if (savedUserID = "ERROR") {
  1054. savedUserID := ""
  1055. }
  1056. Gui, Add, Edit, x140 y115 w250 h18 vdiscordUserID +BackgroundFFFFFF, %savedUserID%
  1057. Gui, Font, s8 cD3D3D3 Bold, Segoe UI
  1058. Gui, Add, Button, x400 y115 w85 h18 gUpdateUserID Background202020, Save UserID
  1059. IniRead, savedUserID, %settingsFile%, Main, DiscordUserID
  1060.  
  1061.  
  1062. Gui, Add, Button, x400 y165 w85 h18 gClearSaves Background202020, Clear Saves
  1063.  
  1064. Gui, Font, s8 cD3D3D3 Bold, Segoe UI
  1065. Gui, Add, Text, x50 y165, UI Navigation Keybind:
  1066. Gui, Font, s8 cBlack, Segoe UI
  1067. IniRead, SavedKeybind, %settingsFile%, Main, UINavigationKeybind, \
  1068. if (SavedKeybind = "")
  1069. {
  1070. SavedKeybind := "\"
  1071. IniWrite, %SavedKeybind%, %settingsFile%, Main, UINavigationKeybind
  1072. }
  1073. Gui, Add, Edit, x180 y165 w40 h18 Limit1 vSavedKeybind gUpdateKeybind, %SavedKeybind%
  1074.  
  1075.  
  1076. Gui, Font, s8 cD3D3D3 Bold, Segoe UI
  1077. Gui, Add, Text, x50 y190, Macro Speed:
  1078. Gui, Font, s8 cBlack, Segoe UI
  1079. IniRead, SavedSpeed, %settingsFile%, Main, MacroSpeed, Stable
  1080. Gui, Add, DropDownList, vSavedSpeed gUpdateSpeed x130 y190 w50, Stable|Fast|Ultra|Max
  1081. GuiControl, ChooseString, SavedSpeed, %SavedSpeed%
  1082.  
  1083. Gui, Font, s10 cWhite Bold, Segoe UI
  1084. Gui, Add, Button, x50 y335 w150 h40 gStartScanMultiInstance Background202020, Start Macro (F5)
  1085. Gui, Add, Button, x320 y335 w150 h40 gQuit Background202020, Stop Macro (F7)
  1086.  
  1087. Gui, Tab, 6
  1088. Gui, Font, s9 cWhite Bold, Segoe UI
  1089. Gui, Add, GroupBox, x23 y50 w475 h340 cD3D3D3, Credits
  1090.  
  1091. Gui, Add, Picture, x40 y70 w48 h48, % mainDir "Images\\Virage.png"
  1092. Gui, Font, s10 cWhite Bold, Segoe UI
  1093. Gui, Add, Text, x100 y70 w200 h24, Virage
  1094. Gui, Font, s8 cFFC0CB Italic, Segoe UI
  1095. Gui, Add, Text, x100 y96 w200 h16, Macro Creator
  1096. Gui, Font, s8 cWhite, Segoe UI
  1097. Gui, Add, Text, x40 y130 w200 h40, This started as a small project that turned into a side quest...
  1098.  
  1099. Gui, Add, Picture, x240 y70 w48 h48, % mainDir "Images\\Real.png"
  1100. Gui, Font, s10 cWhite Bold, Segoe UI
  1101. Gui, Add, Text, x300 y70 w180 h24, Real
  1102. Gui, Font, s8 cWhite, Segoe UI
  1103. Gui, Add, Text, x300 y96 w180 h40, Greatly helped to modify the macro to make it better and more consistent.
  1104.  
  1105. Gui, Font, s9 cWhite Bold, Segoe UI
  1106. Gui, Add, Text, x40 y274 w200 h20, Extra Resources:
  1107. Gui, Font, s8 cD3D3D3 Underline, Segoe UI
  1108. Gui, Add, Link, x40 y294 w300 h16, Join the <a href="https://discord.com/invite/BPPSAG8MN5">Discord Server</a>!
  1109. Gui, Add, Link, x40 y314 w300 h16, Check the <a href="https://github.com/VirageRoblox/Virage-Grow-A-Garden-Macro/releases/latest">Github</a> for the latest macro updates!
  1110. Gui, Add, Link, x40 y334 w300 h16, Watch the latest macro <a href="https://www.youtube.com/@VirageRoblox">tutorial</a> on Youtube!
  1111. ; Gui, Font, s9 cWhite norm, Segoe UI
  1112. ; Gui, Add, GroupBox, x23 y50 w475 h340 cD7A9E3, Donate
  1113. ; Gui, Font, s8 cD7A9E3 Bold, Segoe UI
  1114. ; Gui, Add, Button, x50 y90 w100 h25 gDonate vDonate100 BackgroundF0F0F0, 100 Robux
  1115. ; Gui, Add, Button, x50 y150 w100 h25 gDonate vDonate500 BackgroundF0F0F0, 500 Robux
  1116. ; Gui, Add, Button, x50 y210 w100 h25 gDonate vDonate1000 BackgroundF0F0F0, 1000 Robux
  1117. ; Gui, Add, Button, x50 y270 w100 h25 gDonate vDonate2500 BackgroundF0F0F0, 2500 Robux
  1118. ; Gui, Add, Button, x50 y330 w100 h25 gDonate vDonate10000 BackgroundF0F0F0, 10000 Robux
  1119.  
  1120. Gui, Show, w520 h460, Virage Premium GAG Macro [FREE VERSION]
  1121.  
  1122. Return
  1123.  
  1124. ; ui handlers
  1125.  
  1126. DisplayWebhookValidity:
  1127.  
  1128. Gui, Submit, NoHide
  1129.  
  1130. checkValidity(webhookURL, 1, "webhook")
  1131.  
  1132. Return
  1133.  
  1134. UpdateUserID:
  1135.  
  1136. Gui, Submit, NoHide
  1137.  
  1138. if (discordUserID != "") {
  1139. IniWrite, %discordUserID%, %settingsFile%, Main, DiscordUserID
  1140. MsgBox, 0, Message, Discord UserID Saved
  1141. }
  1142.  
  1143. Return
  1144.  
  1145. DisplayServerValidity:
  1146.  
  1147. Gui, Submit, NoHide
  1148.  
  1149. checkValidity(privateServerLink, 1, "privateserver")
  1150.  
  1151. Return
  1152.  
  1153. ClearSaves:
  1154.  
  1155. IniWrite, %A_Space%, %settingsFile%, Main, UserWebhook
  1156. IniWrite, %A_Space%, %settingsFile%, Main, DiscordUserID
  1157. IniWrite, %A_Space%, %settingsFile%, Main, PrivateServerLink
  1158.  
  1159. IniRead, savedWebhook, %settingsFile%, Main, UserWebhook
  1160. IniRead, savedUserID, %settingsFile%, Main, DiscordUserID
  1161. IniRead, savedServerLink, %settingsFile%, Main, PrivateServerLink
  1162.  
  1163. GuiControl,, webhookURL, %savedWebhook%
  1164. GuiControl,, discordUserID, %savedUserID%
  1165. GuiControl,, privateServerLink, %savedServerLink%
  1166.  
  1167. MsgBox, 0, Message, Webhook, User Id, and Private Server Link Cleared
  1168.  
  1169. Return
  1170.  
  1171. UpdateKeybind:
  1172. Gui, Submit, NoHide
  1173.  
  1174. if (StrLen(SavedKeybind) != 1)
  1175. return ; still editing – do nothing yet
  1176.  
  1177. IniWrite, %SavedKeybind%, %settingsFile%, Main, UINavigationKeybind
  1178. GuiControl,, SavedKeybind, %SavedKeybind%
  1179. MsgBox, 0, Message, % "Keybind saved as: " . SavedKeybind
  1180. Return
  1181.  
  1182.  
  1183.  
  1184. UpdateSpeed:
  1185.  
  1186. Gui, Submit, NoHide
  1187.  
  1188. IniWrite, %SavedSpeed%, %settingsFile%, Main, MacroSpeed
  1189. GuiControl, ChooseString, SavedSpeed, %SavedSpeed%
  1190. if (SavedSpeed = "Fast") {
  1191. MsgBox, 0, Disclaimer, % "Macro speed set to " . SavedSpeed . ". Use with caution (Requires a stable FPS rate)."
  1192. }
  1193. else if (SavedSpeed = "Ultra") {
  1194. MsgBox, 0, Disclaimer, % "Macro speed set to " . SavedSpeed . ". Use at your own risk, high chance of erroring/breaking (Requires a very stable and high FPS rate)."
  1195. }
  1196. else if (SavedSpeed = "Max") {
  1197. MsgBox, 0, Disclaimer, % "Macro speed set to " . SavedSpeed . ". Zero delay on UI Navigation inputs, I wouldn't recommend actually using this it's mostly here for fun."
  1198. }
  1199. else {
  1200. MsgBox, 0, Message, % "Macro speed set to " . SavedSpeed . ". Recommended for lower end devices."
  1201. }
  1202.  
  1203. Return
  1204.  
  1205. UpdateResolution:
  1206.  
  1207. Gui, Submit, NoHide
  1208.  
  1209. IniWrite, %selectedResolution%, %settingsFile%, Main, Resolution
  1210.  
  1211. return
  1212.  
  1213. HandleSelectAll:
  1214.  
  1215. Gui, Submit, NoHide
  1216.  
  1217. if (SubStr(A_GuiControl, 1, 9) = "SelectAll") {
  1218. group := SubStr(A_GuiControl, 10) ; seeds, gears, eggs
  1219. controlVar := A_GuiControl
  1220. Loop {
  1221. item := group . "Item" . A_Index
  1222. if (%item% = "")
  1223. break
  1224. GuiControl,, %item%, % %controlVar%
  1225. }
  1226. }
  1227. else if (RegExMatch(A_GuiControl, "^(Seed|Gear|Egg|Honey)Item\d+$", m)) {
  1228. group := m1 ; seed, gear, egg
  1229.  
  1230. assign := (group = "Seed" || group = "Gear" || group = "Egg") ? "SelectAll" . group . "s" : "SelectAll" . group
  1231.  
  1232. if (!%A_GuiControl%)
  1233. GuiControl,, %assign%, 0
  1234. }
  1235.  
  1236. if (A_GuiControl = "SelectAllSeeds") {
  1237. Loop, % seedItems.Length()
  1238. GuiControl,, SeedItem%A_Index%, % SelectAllSeeds
  1239. Gosub, SaveSettings
  1240. }
  1241. else if (A_GuiControl = "SelectAllEggs") {
  1242. Loop, % eggItems.Length()
  1243. GuiControl,, EggItem%A_Index%, % SelectAllEggs
  1244. Gosub, SaveSettings
  1245. }
  1246. else if (A_GuiControl = "SelectAllGears") {
  1247. Loop, % gearItems.Length()
  1248. GuiControl,, GearItem%A_Index%, % SelectAllGears
  1249. Gosub, SaveSettings
  1250. }
  1251. else if (A_GuiControl = "SelectAllHoney") {
  1252. Loop, % realHoneyItems.Length()
  1253. GuiControl,, HoneyItem%A_Index%, % SelectAllHoney
  1254. Gosub, SaveSettings
  1255. }
  1256.  
  1257. else if (A_GuiControl = "SelectAllCraft") {
  1258. Loop, % craftItems.Length()
  1259. GuiControl,, CraftItem%A_Index%, % SelectAllCraft
  1260. Gosub, SaveSettings
  1261. }
  1262. else if (A_GuiControl = "SelectAllCraft2") {
  1263. Loop, % craftItems2.Length()
  1264. GuiControl,, CraftItem2%A_Index%, % SelectAllCraft2
  1265. Gosub, SaveSettings
  1266. }
  1267. else if (RegExMatch(A_GuiControl, "^CraftItem\d+$")) {
  1268. if (!%A_GuiControl%)
  1269. GuiControl,, SelectAllCraft, 0
  1270. }
  1271. else if (RegExMatch(A_GuiControl, "^CraftItem2\d+$")) {
  1272. if (!%A_GuiControl%)
  1273. GuiControl,, SelectAllCraft2, 0
  1274. }
  1275. return
  1276.  
  1277. UpdateSettingColor:
  1278.  
  1279. Gui, Submit, NoHide
  1280.  
  1281. ; color values
  1282. autoColor := "+c" . (AutoAlign ? "90EE90" : "D3D3D3")
  1283. pingColor := "+c" . (PingSelected ? "90EE90" : "D3D3D3")
  1284. multiInstanceColor := "+c" . (MultiInstanceMode ? "90EE90" : "D3D3D3")
  1285. ; apply colors
  1286. GuiControl, %autoColor%, AutoAlign
  1287. GuiControl, +Redraw, AutoAlign
  1288.  
  1289.  
  1290. GuiControl, %pingColor%, PingSelected
  1291. GuiControl, +Redraw, PingSelected
  1292.  
  1293. GuiControl, %multiInstanceColor%, MultiInstanceMode
  1294. GuiControl, +Redraw, MultiInstanceMode
  1295.  
  1296. return
  1297.  
  1298. Donate:
  1299.  
  1300. DonateResponder(A_GuiControl)
  1301.  
  1302. Return
  1303.  
  1304. HideTooltip:
  1305.  
  1306. ToolTip
  1307.  
  1308. return
  1309.  
  1310. HidePopupMessage:
  1311.  
  1312. Gui, 99:Destroy
  1313.  
  1314. Return
  1315.  
  1316. GetScrollCountRes(index, mode := "seed") {
  1317.  
  1318. global scrollCounts_1080p, scrollCounts_1440p_100, scrollCounts_1440p_125
  1319. global gearScroll_1080p, gearScroll_1440p_100, gearScroll_1440p_125
  1320.  
  1321. if (mode = "seed") {
  1322. arr1 := scrollCounts_1080p
  1323. arr2 := scrollCounts_1440p_100
  1324. arr3 := scrollCounts_1440p_125
  1325. } else if (mode = "gear") {
  1326. arr1 := gearScroll_1080p
  1327. arr2 := gearScroll_1440p_100
  1328. arr3 := gearScroll_1440p_125
  1329. }
  1330.  
  1331. arr := (selectedResolution = 1) ? arr1
  1332. : (selectedResolution = 2) ? arr2
  1333. : (selectedResolution = 3) ? arr3
  1334. : []
  1335.  
  1336. loopCount := arr.HasKey(index) ? arr[index] : 0
  1337.  
  1338. return loopCount
  1339. }
  1340.  
  1341. ; item selection
  1342.  
  1343. UpdateSelectedItems:
  1344.  
  1345. Gui, Submit, NoHide
  1346.  
  1347. selectedSeedItems := []
  1348.  
  1349. Loop, % seedItems.Length() {
  1350. if (SeedItem%A_Index%)
  1351. selectedSeedItems.Push(seedItems[A_Index])
  1352. }
  1353.  
  1354. selectedGearItems := []
  1355.  
  1356. Loop, % gearItems.Length() {
  1357. if (GearItem%A_Index%)
  1358. selectedGearItems.Push(gearItems[A_Index])
  1359. }
  1360.  
  1361. selectedEggItems := []
  1362.  
  1363. Loop, % eggItems.Length() {
  1364. if (eggItem%A_Index%)
  1365. selectedEggItems.Push(eggItems[A_Index])
  1366. }
  1367.  
  1368. selectedHoneyItems := []
  1369.  
  1370. Loop, % realHoneyItems.Length() {
  1371. if (HoneyItem%A_Index%)
  1372. selectedHoneyItems.Push(realHoneyItems[A_Index])
  1373. }
  1374.  
  1375. Return
  1376.  
  1377. GetSelectedItems() {
  1378.  
  1379. result := ""
  1380. if (selectedSeedItems.Length()) {
  1381. result .= "Seed Items:`n"
  1382. for _, name in selectedSeedItems
  1383. result .= " - " name "`n"
  1384. }
  1385. if (selectedGearItems.Length()) {
  1386. result .= "Gear Items:`n"
  1387. for _, name in selectedGearItems
  1388. result .= " - " name "`n"
  1389. }
  1390. if (selectedEggItems.Length()) {
  1391. result .= "Egg Items:`n"
  1392. for _, name in selectedEggItems
  1393. result .= " - " name "`n"
  1394. }
  1395. if (selectedHoneyItems.Length()) {
  1396. result .= "Honey Items:`n"
  1397. for _, name in selectedHoneyItems
  1398. result .= " - " name "`n"
  1399. }
  1400.  
  1401. return result
  1402.  
  1403. }
  1404.  
  1405. ; macro starts
  1406.  
  1407. StartScanMultiInstance:
  1408.  
  1409. Gui, Submit, NoHide
  1410.  
  1411. global cycleCount
  1412. global cycleFinished
  1413.  
  1414. global lastGearMinute := -1
  1415. global lastSeedMinute := -1
  1416. global lastEggShopMinute := -1
  1417. global lastCosmeticShopHour := -1
  1418. global lastHoneyShopMinute := -1
  1419. ; global lastHoneyShopHour := -1
  1420. global lastDepositHoneyMinute := -1
  1421. global lastCollectPollinatedHour := -1
  1422.  
  1423. started := 1
  1424. cycleFinished := 1
  1425.  
  1426. currentSection := "StartScanMultiInstance"
  1427.  
  1428. SetTimer, AutoReconnect, Off
  1429. SetTimer, CheckLoadingScreen, Off
  1430.  
  1431. getWindowIDS()
  1432.  
  1433. SendDiscordMessage(webhookURL, "Macro started.")
  1434.  
  1435. if (MultiInstanceMode) {
  1436. MsgBox, 1, Multi-Instance Mode, % "You have " . windowIDS.MaxIndex() . " instances open. (Instance ID's: " . idDisplay . ")`nPress OK to start the macro."
  1437. IfMsgBox, Cancel
  1438. Return
  1439. }
  1440.  
  1441. if WinExist("ahk_id " . firstWindow) {
  1442. WinActivate
  1443. WinWaitActive, , , 2
  1444. }
  1445.  
  1446. if (MultiInstanceMode) {
  1447. for window in windowIDS {
  1448.  
  1449. currentWindow := % windowIDS[window]
  1450.  
  1451. ToolTip, % "Aligning Instance " . window . " (" . currentWindow . ")"
  1452. SetTimer, HideTooltip, -5000
  1453.  
  1454. WinActivate, % "ahk_id " . currentWindow
  1455.  
  1456. Sleep, 500
  1457. SafeClickRelative(0.5, 0.5)
  1458. Sleep, 100
  1459. Gosub, alignment
  1460. Sleep, 100
  1461.  
  1462. }
  1463. }
  1464. else {
  1465.  
  1466. Sleep, 500
  1467. Gosub, alignment
  1468. Sleep, 100
  1469.  
  1470. }
  1471.  
  1472. WinActivate, % "ahk_id " . firstWindow
  1473.  
  1474. Gui, Submit, NoHide
  1475.  
  1476. Gosub, UpdateSelectedItems
  1477. itemsText := GetSelectedItems()
  1478.  
  1479. Sleep, 500
  1480.  
  1481. Gosub, SetTimers
  1482.  
  1483. while (started) {
  1484. if (actionQueue.Length()) {
  1485. SetTimer, AutoReconnect, Off
  1486. ToolTip
  1487. next := actionQueue.RemoveAt(1)
  1488. if (MultiInstanceMode) {
  1489. for window in windowIDS {
  1490. currentWindow := % windowIDS[window]
  1491. instanceNumber := window
  1492. ToolTip, % "Running Cycle On Instance " . window
  1493. SetTimer, HideTooltip, -1500
  1494. SendDiscordMessage(webhookURL, "***Instance " . instanceNumber . "***")
  1495. WinActivate, % "ahk_id " . currentWindow
  1496. Sleep, 200
  1497. SafeClickRelative(midX, midY)
  1498. Sleep, 200
  1499. Gosub, % next
  1500. }
  1501. }
  1502. else {
  1503. WinActivate, % "ahk_id " . firstWindow
  1504. Gosub, % next
  1505. }
  1506. if (!actionQueue.MaxIndex()) {
  1507. cycleFinished := 1
  1508. }
  1509. Sleep, 500
  1510. } else {
  1511. Gosub, SetToolTip
  1512. if (cycleFinished) {
  1513. WinActivate, % "ahk_id " . firstWindow
  1514. cycleCount++
  1515. SendDiscordMessage(webhookURL, "[**CYCLE " . cycleCount . " COMPLETED**]")
  1516. cycleFinished := 0
  1517. if (!MultiInstanceMode) {
  1518. SetTimer, AutoReconnect, 5000
  1519. }
  1520. }
  1521. Sleep, 1000
  1522. }
  1523. }
  1524.  
  1525. Return
  1526.  
  1527. ; actions
  1528.  
  1529. AutoBuySeed:
  1530.  
  1531. ; queues if its not the first cycle and the time is a multiple of 5
  1532. if (cycleCount > 0 && Mod(currentMinute, 5) = 0 && currentMinute != lastSeedMinute) {
  1533. lastSeedMinute := currentMinute
  1534. SetTimer, PushBuySeed, -8000
  1535. }
  1536.  
  1537. Return
  1538.  
  1539. PushBuySeed:
  1540.  
  1541. actionQueue.Push("BuySeed")
  1542.  
  1543. Return
  1544.  
  1545. BuySeed:
  1546.  
  1547. currentSection := "BuySeed"
  1548. if (selectedSeedItems.Length())
  1549. Gosub, SeedShopPath
  1550.  
  1551. Return
  1552.  
  1553. AutoBuyGear:
  1554.  
  1555. ; queues if its not the first cycle and the time is a multiple of 5
  1556. if (cycleCount > 0 && Mod(currentMinute, 5) = 0 && currentMinute != lastGearMinute) {
  1557. lastGearMinute := currentMinute
  1558. SetTimer, PushBuyGear, -8000
  1559. }
  1560.  
  1561. Return
  1562.  
  1563. PushBuyGear:
  1564.  
  1565. actionQueue.Push("BuyGear")
  1566.  
  1567. Return
  1568.  
  1569. BuyGear:
  1570.  
  1571. currentSection := "BuyGear"
  1572. if (selectedGearItems.Length())
  1573. Gosub, GearShopPath
  1574.  
  1575. Return
  1576.  
  1577. AutoBuyEggShop:
  1578.  
  1579. ; queues if its not the first cycle and the time is a multiple of 30
  1580. if (cycleCount > 0 && Mod(currentMinute, 30) = 0 && currentMinute != lastEggShopMinute) {
  1581. lastEggShopMinute := currentMinute
  1582. SetTimer, PushBuyEggShop, -8000
  1583. }
  1584.  
  1585. Return
  1586.  
  1587. PushBuyEggShop:
  1588.  
  1589. actionQueue.Push("BuyEggShop")
  1590.  
  1591. Return
  1592.  
  1593. BuyEggShop:
  1594.  
  1595. currentSection := "BuyEggShop"
  1596. if (selectedEggItems.Length()) {
  1597. Gosub, EggShopPath
  1598. }
  1599.  
  1600. Return
  1601.  
  1602. AutoBuyCosmeticShop:
  1603.  
  1604. ; queues if its not the first cycle, the minute is 0, and the current hour is an even number (every 2 hours)
  1605. if (cycleCount > 0 && currentMinute = 0 && Mod(currentHour, 2) = 0 && currentHour != lastCosmeticShopHour) {
  1606. lastCosmeticShopHour := currentHour
  1607. SetTimer, PushBuyCosmeticShop, -8000
  1608. }
  1609.  
  1610. Return
  1611.  
  1612. PushBuyCosmeticShop:
  1613.  
  1614. actionQueue.Push("BuyCosmeticShop")
  1615.  
  1616. Return
  1617.  
  1618. BuyCosmeticShop:
  1619.  
  1620. currentSection := "BuyCosmeticShop"
  1621. if (BuyAllCosmetics) {
  1622. Gosub, CosmeticShopPath
  1623. }
  1624.  
  1625. Return
  1626.  
  1627. AutoCollectPollinated:
  1628.  
  1629. ; queues if its not the first cycle, the minute is 0, and the current hour isn't the same as the last hour it was run
  1630. if (cycleCount > 0 && currentMinute = 0 && currentHour != lastCollectPollinatedHour) {
  1631. lastHoneyShopHour := currentHour
  1632. SetTimer, PushCollectPollinated, -600000
  1633. }
  1634.  
  1635. Return
  1636.  
  1637. PushCollectPollinated:
  1638.  
  1639. actionQueue.Push("CollectPollinated")
  1640.  
  1641. Return
  1642.  
  1643. CollectPollinated:
  1644.  
  1645. currentSection := "CollectPollinated"
  1646. if (AutoCollectPollinated) {
  1647. Gosub, CollectPollinatedPath
  1648. }
  1649.  
  1650. Return
  1651.  
  1652. AutoBuyHoneyShop:
  1653.  
  1654. ; queues if its not the first cycle and the time is a multiple of 30
  1655. if (cycleCount > 0 && Mod(currentMinute, 30) = 0 && currentMinute != lastHoneyShopMinute) {
  1656. lastHoneyShopMinute := currentMinute
  1657. SetTimer, PushBuyHoneyShop, -8000
  1658. }
  1659.  
  1660. Return
  1661.  
  1662. PushBuyHoneyShop:
  1663.  
  1664. actionQueue.Push("BuyHoneyShop")
  1665.  
  1666. Return
  1667.  
  1668. BuyHoneyShop:
  1669.  
  1670. currentSection := "BuyHoneyShop"
  1671. if (selectedHoneyItems.Length()) {
  1672. Gosub, HoneyShop
  1673. }
  1674.  
  1675. Return
  1676.  
  1677. AutoDepositHoney:
  1678.  
  1679. ; queues if its not the first cycle and the time is a multiple of 5
  1680. if (cycleCount > 0 && Mod(currentMinute, 5) = 0 && currentMinute != lastDepositHoneyMinute) {
  1681. lastDepositHoneyMinute := currentMinute
  1682. SetTimer, PushDepositHoney, -8000
  1683. }
  1684.  
  1685. Return
  1686.  
  1687. PushDepositHoney:
  1688.  
  1689. actionQueue.Push("DepositHoney")
  1690.  
  1691. Return
  1692.  
  1693. DepositHoney:
  1694.  
  1695. currentSection := "DepositHoney"
  1696. if (AutoHoney) {
  1697. Gosub, DepositHoneyPath
  1698. }
  1699.  
  1700. Return
  1701.  
  1702. ; helper labels
  1703.  
  1704. SetToolTip:
  1705.  
  1706. mod5 := Mod(currentMinute, 5)
  1707. rem5min := (mod5 = 0) ? 5 : 5 - mod5
  1708. rem5sec := rem5min * 60 - currentSecond
  1709. if (rem5sec < 0)
  1710. rem5sec := 0
  1711. seedMin := rem5sec // 60
  1712. seedSec := Mod(rem5sec, 60)
  1713. seedText := (seedSec < 10) ? seedMin . ":0" . seedSec : seedMin . ":" . seedSec
  1714. gearMin := rem5sec // 60
  1715. gearSec := Mod(rem5sec, 60)
  1716. gearText := (gearSec < 10) ? gearMin . ":0" . gearSec : gearMin . ":" . gearSec
  1717. depositHoneyMin := rem5sec // 60
  1718. depositHoneySec := Mod(rem5sec, 60)
  1719. depositHoneyText := (depositHoneySec < 10) ? depositHoneyMin . ":0" . depositHoneySec : depositHoneyMin . ":" . depositHoneySec
  1720.  
  1721. mod30 := Mod(currentMinute, 30)
  1722. rem30min := (mod30 = 0) ? 30 : 30 - mod30
  1723. rem30sec := rem30min * 60 - currentSecond
  1724. if (rem30sec < 0)
  1725. rem30sec := 0
  1726. eggMin := rem30sec // 60
  1727. eggSec := Mod(rem30sec, 60)
  1728. eggText := (eggSec < 10) ? eggMin . ":0" . eggSec : eggMin . ":" . eggSec
  1729. honeyMin := rem30sec // 60
  1730. honeySec := Mod(rem30sec, 60)
  1731. honeyText := (honeySec < 10) ? honeyMin . ":0" . honeySec : honeyMin . ":" . honeySec
  1732.  
  1733. totalSecNow := currentHour * 3600 + currentMinute * 60 + currentSecond
  1734. nextCosHour := (Floor(currentHour/2) + 1) * 2
  1735. nextCosTotal := nextCosHour * 3600
  1736. remCossec := nextCosTotal - totalSecNow
  1737. if (remCossec < 0)
  1738. remCossec := 0
  1739. cosH := remCossec // 3600
  1740. cosM := (remCossec - cosH*3600) // 60
  1741. cosS := Mod(remCossec, 60)
  1742. if (cosH > 0)
  1743. cosText := cosH . ":" . (cosM < 10 ? "0" . cosM : cosM) . ":" . (cosS < 10 ? "0" . cosS : cosS)
  1744. else
  1745. cosText := cosM . ":" . (cosS < 10 ? "0" . cosS : cosS)
  1746.  
  1747. if (currentMinute = 0 && currentSecond = 0) {
  1748. remHoneySec := 0
  1749. } else {
  1750. remHoneySec := 3600 - (currentMinute * 60 + currentSecond)
  1751. }
  1752. collectPollinatedMin := remHoneySec // 60
  1753. collectPollinatedSec := Mod(remHoneySec, 60)
  1754. collectPollinatedText := (collectPollinatedSec < 10) ? collectPollinatedMin . ":0" . collectPollinatedSec : collectPollinatedMin . ":" . collectPollinatedSec
  1755.  
  1756. tooltipText := ""
  1757. if (selectedSeedItems.Length()) {
  1758. tooltipText .= "Seed Shop: " . seedText . "`n"
  1759. }
  1760. if (selectedGearItems.Length()) {
  1761. tooltipText .= "Gear Shop: " . gearText . "`n"
  1762. }
  1763. if (selectedEggItems.Length()) {
  1764. tooltipText .= "Egg Shop : " . eggText . "`n"
  1765. }
  1766. if (BuyAllCosmetics) {
  1767. tooltipText .= "Cosmetic Shop: " . cosText . "`n"
  1768. }
  1769. if (AutoHoney) {
  1770. tooltipText .= "Deposit Honey: " . depositHoneyText . "`n"
  1771. }
  1772. if (selectedHoneyItems.Length()) {
  1773. tooltipText .= "Honey Shop: " . honeyText . "`n"
  1774. }
  1775. if (AutoCollectPollinated) {
  1776. tooltipText .= "Collect Pollinated: " . collectPollinatedText . "`n"
  1777. }
  1778.  
  1779. if (tooltipText != "") {
  1780. CoordMode, Mouse, Screen
  1781. MouseGetPos, mX, mY
  1782. offsetX := 10
  1783. offsetY := 10
  1784. ToolTip, % tooltipText, % (mX + offsetX), % (mY + offsetY)
  1785. } else {
  1786. ToolTip ; clears any existing tooltip
  1787. }
  1788.  
  1789. Return
  1790.  
  1791. SetTimers:
  1792.  
  1793. SetTimer, UpdateTime, 1000
  1794.  
  1795. if (selectedSeedItems.Length()) {
  1796. actionQueue.Push("BuySeed")
  1797. }
  1798. seedAutoActive := 1
  1799. SetTimer, AutoBuySeed, 1000 ; checks every second if it should queue
  1800.  
  1801. if (selectedGearItems.Length()) {
  1802. actionQueue.Push("BuyGear")
  1803. }
  1804. gearAutoActive := 1
  1805. SetTimer, AutoBuyGear, 1000 ; checks every second if it should queue
  1806.  
  1807. if (selectedEggItems.Length()) {
  1808. actionQueue.Push("BuyEggShop")
  1809. }
  1810. eggAutoActive := 1
  1811. SetTimer, AutoBuyEggShop, 1000 ; checks every second if it should queue
  1812.  
  1813. if (BuyAllCosmetics) {
  1814. actionQueue.Push("BuyCosmeticShop")
  1815. }
  1816. cosmeticAutoActive := 1
  1817. SetTimer, AutoBuyCosmeticShop, 1000 ; checks every second if it should queue
  1818.  
  1819. if (AutoCollectPollinated) {
  1820. actionQueue.Push("CollectPollinated")
  1821. }
  1822. collectPollinatedAutoActive := 1
  1823. SetTimer, AutoCollectPollinated, 1000 ; checks every second if it should queue
  1824.  
  1825. if (selectedHoneyItems.Length()) {
  1826. actionQueue.Push("BuyHoneyShop")
  1827. }
  1828. honeyShopAutoActive := 1
  1829. SetTimer, AutoBuyHoneyShop, 1000 ; checks every second if it should queue
  1830.  
  1831. if (AutoHoney) {
  1832. actionQueue.Push("DepositHoney")
  1833. }
  1834. honeyDepositAutoActive := 1
  1835. SetTimer, AutoDepositHoney, 1000 ; checks every second if it should queue
  1836.  
  1837. Return
  1838.  
  1839. /*
  1840. VerifyUser(username) {
  1841. global GAME_PASS_ID
  1842. username := Trim(username)
  1843.  
  1844. reqBody := "{""usernames"":[""" username """],""excludeBannedUsers"":true}"
  1845. whr := ComObjCreate("WinHttp.WinHttpRequest.5.1")
  1846. whr.Open("POST","https://users.roblox.com/v1/usernames/users",false)
  1847. whr.SetRequestHeader("Content-Type","application/json")
  1848. whr.Send(reqBody), whr.WaitForResponse()
  1849. if (whr.Status!=200 || !RegExMatch(whr.ResponseText,"""id"":\s*(\d+)",m))
  1850. return 0
  1851. userId := m1
  1852.  
  1853. ownURL := "https://inventory.roblox.com/v1/users/" userId
  1854. . "/items/GamePass/" GAME_PASS_ID
  1855. whr2 := ComObjCreate("WinHttp.WinHttpRequest.5.1")
  1856. whr2.Open("GET",ownURL,false), whr2.Send(), whr2.WaitForResponse()
  1857. if (whr2.Status!=200) ; request itself failed
  1858. return 0
  1859.  
  1860. return !RegExMatch(whr2.ResponseText, """data"":\s*\[\s*\]")
  1861. }
  1862.  
  1863.  
  1864. IniRead, isVerified, %settingsFile%, Main, %VERIFIED_KEY%, 0
  1865. if (!isVerified) {
  1866. InputBox, rbUser, Premium Access, Please enter your Roblox username:
  1867. if (ErrorLevel)
  1868. ExitApp ; user cancelled
  1869.  
  1870. if (VerifyUser(rbUser)) {
  1871. IniWrite, 1, %settingsFile%, Main, %VERIFIED_KEY%
  1872. IniWrite, %rbUser%, %settingsFile%, Main, VerifiedUsername
  1873. MsgBox, 0, Success, Verification successful, enjoy the macro!
  1874. } else {
  1875. MsgBox, 16, Access Denied, Sorry, that account does not own the required game-pass.
  1876. ExitApp
  1877. }
  1878. }
  1879. */
  1880.  
  1881.  
  1882. UpdateTime:
  1883.  
  1884. FormatTime, currentHour,, hh
  1885. FormatTime, currentMinute,, mm
  1886. FormatTime, currentSecond,, ss
  1887.  
  1888. currentHour := currentHour + 0
  1889. currentMinute := currentMinute + 0
  1890. currentSecond := currentSecond + 0
  1891.  
  1892. Return
  1893.  
  1894. AutoReconnect:
  1895.  
  1896. global actionQueue
  1897.  
  1898. if (simpleDetect(0x302927, 0, 0.3988, 0.3548, 0.6047, 0.6674) && simpleDetect(0xFFFFFF, 0, 0.3988, 0.3548, 0.6047, 0.6674) && privateServerLink != "") {
  1899. started := 0
  1900. actionQueue := []
  1901. SetTimer, AutoReconnect, Off
  1902. Sleep, 500
  1903. WinClose, % "ahk_id" . firstWindow
  1904. Sleep, 1000
  1905. WinClose, % "ahk_id" . firstWindow
  1906. Sleep, 500
  1907. Run, % privateServerLink
  1908. ToolTip, Attempting To Reconnect
  1909. SetTimer, HideTooltip, -5000
  1910. SendDiscordMessage(webhookURL, "Lost connection or macro errored, attempting to reconnect..." . (PingSelected ? " <@" . discordUserID . ">" : ""))
  1911. sleepAmount(15000, 30000)
  1912. SetTimer, CheckLoadingScreen, 5000
  1913. }
  1914.  
  1915. Return
  1916.  
  1917. CheckLoadingScreen:
  1918.  
  1919. ToolTip, Detecting Rejoin
  1920.  
  1921. getWindowIDS()
  1922.  
  1923. WinActivate, % "ahk_id" . firstWindow
  1924.  
  1925. if (simpleDetect(0x000000, 0, 0.75, 0.75, 0.9, 0.9)) {
  1926. SafeClickRelative(midX, midY)
  1927. }
  1928. else {
  1929. ToolTip, Rejoined Successfully
  1930. sleepAmount(5000, 10000)
  1931. SendDiscordMessage(webhookURL, "Successfully reconnected to server." . (PingSelected ? " <@" . discordUserID . ">" : ""))
  1932. Sleep, 200
  1933. Gosub, StartScanMultiInstance
  1934. }
  1935.  
  1936. Return
  1937.  
  1938. ; set up labels
  1939.  
  1940. alignment:
  1941.  
  1942. ToolTip, Beginning Alignment
  1943. SetTimer, HideTooltip, -5000
  1944.  
  1945. SafeClickRelative(0.5, 0.5)
  1946. Sleep, 100
  1947.  
  1948. searchitem("recall")
  1949.  
  1950. Sleep, 200
  1951.  
  1952. if (AutoAlign) {
  1953. GoSub, cameraChange
  1954. Sleep, 100
  1955. Gosub, zoomAlignment
  1956. Sleep, 100
  1957. GoSub, cameraAlignment
  1958. Sleep, 100
  1959. Gosub, characterAlignment
  1960. Sleep, 100
  1961. Gosub, cameraChange
  1962. Sleep, 100
  1963. }
  1964. else {
  1965. Gosub, zoomAlignment
  1966. Sleep, 100
  1967. }
  1968.  
  1969. Sleep, 1000
  1970. uiUniversal(11110)
  1971. Sleep, 100
  1972.  
  1973. ToolTip, Alignment Complete
  1974. SetTimer, HideTooltip, -1000
  1975.  
  1976. Return
  1977.  
  1978. cameraChange:
  1979.  
  1980. ; changes camera mode to follow and can be called again to reverse it (0123, 0->3, 3->0)
  1981. Send, {Escape}
  1982. Sleep, 500
  1983. Send, {Tab}
  1984. Sleep, 400
  1985. Send {Down}
  1986. Sleep, 100
  1987. repeatKey("Right", 2, (SavedSpeed = "Ultra") ? 55 : (SavedSpeed = "Max") ? 60 : 30)
  1988. Sleep, 100
  1989. Send {Escape}
  1990.  
  1991. Return
  1992.  
  1993. cameraAlignment:
  1994.  
  1995. ; puts character in overhead view
  1996. Click, Right, Down
  1997. Sleep, 200
  1998. SafeMoveRelative(0.5, 0.5)
  1999. Sleep, 200
  2000. MouseMove, 0, 800, R
  2001. Sleep, 200
  2002. Click, Right, Up
  2003.  
  2004. Return
  2005.  
  2006. zoomAlignment:
  2007.  
  2008. ; sets correct player zoom
  2009. SafeMoveRelative(0.5, 0.5)
  2010. Sleep, 100
  2011.  
  2012. Loop, 40 {
  2013. Send, {WheelUp}
  2014. Sleep, 20
  2015. }
  2016.  
  2017. Sleep, 200
  2018.  
  2019. Loop, 6 {
  2020. Send, {WheelDown}
  2021. Sleep, 20
  2022. }
  2023.  
  2024. midX := getMouseCoord("x")
  2025. midY := getMouseCoord("y")
  2026.  
  2027. Return
  2028.  
  2029. characterAlignment:
  2030.  
  2031. ; aligns character through spam tping and using the follow camera mode
  2032.  
  2033. sendKeybind(SavedKeybind)
  2034. Sleep, 10
  2035.  
  2036. repeatKey("Right", 3)
  2037. Loop, % ((SavedSpeed = "Ultra") ? 12 : (SavedSpeed = "Max") ? 18 : 8) {
  2038. Send, {Enter}
  2039. Sleep, 10
  2040. repeatKey("Right", 2)
  2041. Sleep, 10
  2042. Send, {Enter}
  2043. Sleep, 10
  2044. repeatKey("Left", 2)
  2045. }
  2046. Sleep, 10
  2047. sendKeybind(SavedKeybind)
  2048.  
  2049. Return
  2050.  
  2051. ; buying paths
  2052.  
  2053. EggShopPath:
  2054.  
  2055. Sleep, 100
  2056. uiUniversal("11110")
  2057. Sleep, 100
  2058. hotbarController(1, 0, "2")
  2059. sleepAmount(100, 1000)
  2060. SafeClickRelative(midX, midY)
  2061. SendDiscordMessage(webhookURL, "**[Egg Cycle]**")
  2062. Sleep, 800
  2063.  
  2064. ; egg 1 sequence
  2065. Send, {w Down}
  2066. Sleep, 800
  2067. Send {w Up}
  2068. sleepAmount(500, 1000)
  2069. Send {e}
  2070. Sleep, 100
  2071. uiUniversal("11114", 0, 0)
  2072. Sleep, 100
  2073. quickDetectEgg(0x26EE26, 15, 0.41, 0.65, 0.52, 0.70)
  2074. Sleep, 800
  2075. ; egg 2 sequence
  2076. Send, {w down}
  2077. Sleep, 200
  2078. Send, {w up}
  2079. sleepAmount(100, 1000)
  2080. Send {e}
  2081. Sleep, 100
  2082. uiUniversal("11114", 0, 0)
  2083. Sleep, 100
  2084. quickDetectEgg(0x26EE26, 15, 0.41, 0.65, 0.52, 0.70)
  2085. Sleep, 800
  2086. ; egg 3 sequence
  2087. Send, {w down}
  2088. Sleep, 200
  2089. Send, {w up}
  2090. sleepAmount(100, 1000)
  2091. Send, {e}
  2092. Sleep, 200
  2093. uiUniversal("11114", 0, 0)
  2094. Sleep, 100
  2095. quickDetectEgg(0x26EE26, 15, 0.41, 0.65, 0.52, 0.70)
  2096. Sleep, 300
  2097.  
  2098. closeRobuxPrompt()
  2099. sleepAmount(1250, 2500)
  2100. SendDiscordMessage(webhookURL, "**[Eggs Completed]**")
  2101.  
  2102. Return
  2103.  
  2104. SeedShopPath:
  2105.  
  2106. seedsCompleted := 0
  2107.  
  2108. uiUniversal("1111020")
  2109. sleepAmount(100, 1000)
  2110. Send, {e}
  2111. SendDiscordMessage(webhookURL, "**[Seed Cycle]**")
  2112. sleepAmount(2500, 5000)
  2113. ; checks for the shop opening up to 5 times to ensure it doesn't fail
  2114. Loop, 5 {
  2115. if (simpleDetect(0x00CCFF, 10, 0.54, 0.20, 0.65, 0.325)) {
  2116. ToolTip, Seed Shop Opened
  2117. SetTimer, HideTooltip, -1500
  2118. SendDiscordMessage(webhookURL, "Seed Shop Opened.")
  2119. Sleep, 200
  2120. uiUniversal("33311443333114405550555", 0)
  2121. Sleep, 100
  2122. buyUniversal("seed")
  2123. SendDiscordMessage(webhookURL, "Seed Shop Closed.")
  2124. seedsCompleted = 1
  2125. }
  2126. if (seedsCompleted) {
  2127. break
  2128. }
  2129. Sleep, 2000
  2130. }
  2131.  
  2132. closeShop("seed", seedsCompleted)
  2133.  
  2134. Sleep, 200
  2135. Gosub, alignment
  2136. Sleep, 200
  2137.  
  2138. SendDiscordMessage(webhookURL, "**[Seeds Completed]**")
  2139.  
  2140. Return
  2141.  
  2142. GearShopPath:
  2143.  
  2144. gearsCompleted := 0
  2145.  
  2146. hotbarController(0, 1, "0")
  2147. uiUniversal("11110")
  2148. sleepAmount(100, 500)
  2149. hotbarController(1, 0, "2")
  2150. sleepAmount(100, 500)
  2151. SafeClickRelative(midX, midY)
  2152. sleepAmount(1200, 2500)
  2153. Send, {e}
  2154. sleepAmount(1500, 5000)
  2155. dialogueClick("gear")
  2156. SendDiscordMessage(webhookURL, "**[Gear Cycle]**")
  2157. sleepAmount(2500, 5000)
  2158. ; checks for the shop opening up to 5 times to ensure it doesn't fail
  2159. Loop, 5 {
  2160. if (simpleDetect(0x00CCFF, 10, 0.54, 0.20, 0.65, 0.325)) {
  2161. ToolTip, Gear Shop Opened
  2162. SetTimer, HideTooltip, -1500
  2163. SendDiscordMessage(webhookURL, "Gear Shop Opened.")
  2164. Sleep, 200
  2165. uiUniversal("33311443333114405550555", 0)
  2166. Sleep, 100
  2167. buyUniversal("gear")
  2168. SendDiscordMessage(webhookURL, "Gear Shop Closed.")
  2169. gearsCompleted = 1
  2170. }
  2171. if (gearsCompleted) {
  2172. break
  2173. }
  2174. Sleep, 2000
  2175. }
  2176.  
  2177. closeShop("gear", gearsCompleted)
  2178.  
  2179. hotbarController(0, 1, "0")
  2180. SendDiscordMessage(webhookURL, "**[Gears Completed]**")
  2181.  
  2182. Return
  2183.  
  2184. CosmeticShopPath:
  2185.  
  2186. cosmeticsCompleted := 0
  2187.  
  2188. hotbarController(0, 1, "0")
  2189. uiUniversal("11110")
  2190. sleepAmount(100, 500)
  2191. hotbarController(1, 0, "2")
  2192. sleepAmount(100, 500)
  2193. SafeClickRelative(midX, midY)
  2194. sleepAmount(800, 1000)
  2195. Send, {s Down}
  2196. Sleep, 550
  2197. Send, {s Up}
  2198. sleepAmount(100, 1000)
  2199. Send, {e}
  2200. sleepAmount(2500, 5000)
  2201. SendDiscordMessage(webhookURL, "**[Cosmetic Cycle]**")
  2202. ; checks for the shop opening up to 5 times to ensure it doesn't fail
  2203. Loop, 5 {
  2204. if (simpleDetect(0x00CCFF, 10, 0.61, 0.182, 0.764, 0.259)) {
  2205. ToolTip, Cosmetic Shop Opened
  2206. SetTimer, HideTooltip, -1500
  2207. SendDiscordMessage(webhookURL, "Cosmetic Shop Opened.")
  2208. Sleep, 200
  2209. for index, item in cosmeticItems {
  2210. label := StrReplace(item, " ", "")
  2211. currentItem := cosmeticItems[A_Index]
  2212. Gosub, %label%
  2213. SendDiscordMessage(webhookURL, "Bought " . currentItem . (PingSelected ? " <@" . discordUserID . ">" : ""))
  2214. Sleep, 100
  2215. }
  2216. SendDiscordMessage(webhookURL, "Cosmetic Shop Closed.")
  2217. cosmeticsCompleted = 1
  2218. }
  2219. if (cosmeticsCompleted) {
  2220. break
  2221. }
  2222. Sleep, 2000
  2223. }
  2224.  
  2225. if (cosmeticsCompleted) {
  2226. Sleep, 500
  2227. uiUniversal("111114150320")
  2228. }
  2229. else {
  2230. SendDiscordMessage(webhookURL, "Failed To Detect Cosmetic Shop Opening [Error]" . (PingSelected ? " <@" . discordUserID . ">" : ""))
  2231. ; failsafe
  2232. uiUniversal("11114111350")
  2233. Sleep, 50
  2234. uiUniversal("11110")
  2235. }
  2236.  
  2237. hotbarController(0, 1, "0")
  2238. SendDiscordMessage(webhookURL, "**[Cosmetics Completed]**")
  2239.  
  2240. Return
  2241.  
  2242. CollectPollinatedPath:
  2243.  
  2244. SendDiscordMessage(webhookURL, "**[Pollenated Plant Collection Cycle]**")
  2245. uiUniversal("11110")
  2246. sleepAmount(1000, 2000)
  2247.  
  2248. searchItem("pollen")
  2249. hotbarController(1, 0, "3")
  2250.  
  2251. ; left side
  2252. SendDiscordMessage(webhookURL, "**[Collecting Left Side...]**")
  2253. Send, {s down}
  2254. Sleep, 270
  2255. Send, {s up}
  2256. sleepAmount(200, 500)
  2257. Send, {a down}
  2258. Sleep, 900
  2259. Send, {a up}
  2260. sleepAmount(200, 500)
  2261. SafeClickRelative(midX, midY)
  2262. sleepAmount(8000, 10000)
  2263. Send, {a down}
  2264. Sleep, 800
  2265. Send, {a up}
  2266. sleepAmount(200, 500)
  2267. SafeClickRelative(midX, midY)
  2268. sleepAmount(8000, 10000)
  2269. Send, {a down}
  2270. Sleep, 600
  2271. Send, {a up}
  2272. sleepAmount(200, 500)
  2273.  
  2274. Send, {s down}
  2275. Sleep, 1000
  2276. Send, {s up}
  2277. sleepAmount(200, 500)
  2278. SafeClickRelative(midX, midY)
  2279. sleepAmount(8000, 10000)
  2280. Send, {s down}
  2281. Sleep, 1200
  2282. Send, {s up}
  2283. sleepAmount(200, 500)
  2284. SafeClickRelative(midX, midY)
  2285. sleepAmount(8000, 10000)
  2286. Send, {s down}
  2287. Sleep, 1300
  2288. Send, {s up}
  2289. sleepAmount(200, 500)
  2290. SafeClickRelative(midX, midY)
  2291. sleepAmount(8000, 10000)
  2292. Send, {s down}
  2293. Sleep, 1000
  2294. Send, {s up}
  2295. sleepAmount(200, 500)
  2296.  
  2297. Send, {d down}
  2298. Sleep, 900
  2299. Send, {d up}
  2300. sleepAmount(200, 500)
  2301. SafeClickRelative(midX, midY)
  2302. sleepAmount(8000, 10000)
  2303. Send, {d down}
  2304. Sleep, 800
  2305. Send, {d up}
  2306. sleepAmount(200, 500)
  2307. SafeClickRelative(midX, midY)
  2308. sleepAmount(8000, 10000)
  2309. Send, {d down}
  2310. Sleep, 600
  2311. Send, {d up}
  2312. sleepAmount(200, 500)
  2313.  
  2314. uiUniversal("11110")
  2315.  
  2316. ; right side
  2317. SendDiscordMessage(webhookURL, "**[Collecting Right Side...]**")
  2318. Send, {s down}
  2319. Sleep, 270
  2320. Send, {s up}
  2321. sleepAmount(200, 500)
  2322. Send, {d down}
  2323. Sleep, 800
  2324. Send, {d up}
  2325. sleepAmount(200, 500)
  2326. SafeClickRelative(midX, midY)
  2327. sleepAmount(8000, 10000)
  2328. Send, {d down}
  2329. Sleep, 800
  2330. Send, {d up}
  2331. sleepAmount(200, 500)
  2332. SafeClickRelative(midX, midY)
  2333. sleepAmount(8000, 10000)
  2334. Send, {d down}
  2335. Sleep, 600
  2336. Send, {d up}
  2337. sleepAmount(200, 500)
  2338.  
  2339. Send, {s down}
  2340. Sleep, 1000
  2341. Send, {s up}
  2342. sleepAmount(200, 500)
  2343. SafeClickRelative(midX, midY)
  2344. sleepAmount(8000, 10000)
  2345. Send, {s down}
  2346. Sleep, 1200
  2347. Send, {s up}
  2348. sleepAmount(200, 500)
  2349. SafeClickRelative(midX, midY)
  2350. sleepAmount(8000, 10000)
  2351. Send, {s down}
  2352. Sleep, 1300
  2353. Send, {s up}
  2354. sleepAmount(200, 500)
  2355. SafeClickRelative(midX, midY)
  2356. sleepAmount(8000, 10000)
  2357. Send, {s down}
  2358. Sleep, 1000
  2359. Send, {s up}
  2360. sleepAmount(200, 500)
  2361.  
  2362. Send, {a down}
  2363. Sleep, 900
  2364. Send, {a up}
  2365. sleepAmount(200, 500)
  2366. SafeClickRelative(midX, midY)
  2367. sleepAmount(8000, 10000)
  2368. Send, {a down}
  2369. Sleep, 800
  2370. Send, {a up}
  2371. sleepAmount(200, 500)
  2372. SafeClickRelative(midX, midY)
  2373. sleepAmount(8000, 10000)
  2374. Send, {a down}
  2375. Sleep, 600
  2376. Send, {a up}
  2377. sleepAmount(200, 500)
  2378.  
  2379. uiUniversal("11110")
  2380.  
  2381. ; middle
  2382. SendDiscordMessage(webhookURL, "**[Collecting Middle Area...]**")
  2383. Send, {s down}
  2384. Sleep, 1000
  2385. Send, {s up}
  2386. sleepAmount(200, 500)
  2387. SafeClickRelative(midX, midY)
  2388. sleepAmount(8000, 10000)
  2389. Send, {s down}
  2390. Sleep, 1200
  2391. Send, {s up}
  2392. sleepAmount(200, 500)
  2393. SafeClickRelative(midX, midY)
  2394. sleepAmount(8000, 10000)
  2395. Send, {s down}
  2396. Sleep, 1300
  2397. Send, {s up}
  2398. sleepAmount(200, 500)
  2399. SafeClickRelative(midX, midY)
  2400. sleepAmount(8000, 10000)
  2401. Send, {s down}
  2402. Sleep, 1000
  2403. Send, {s up}
  2404. sleepAmount(200, 500)
  2405. SafeClickRelative(midX, midY)
  2406. sleepAmount(8000, 10000)
  2407.  
  2408. hotbarController(0, 1, "0")
  2409. uiUniversal(11110)
  2410.  
  2411. SendDiscordMessage(webhookURL, "**[Pollenated Plant Collection Completed]**")
  2412.  
  2413. Return
  2414.  
  2415. DepositHoneyPath:
  2416. depositCount := 0
  2417.  
  2418. hotbarController(0, 1, "0")
  2419. uiUniversal("11110")
  2420. sleepAmount(100, 500)
  2421. hotbarController(1, 0, "2")
  2422. sleepAmount(100, 500)
  2423. SafeClickRelative(midX, midY)
  2424. sleepAmount(800, 1000)
  2425. Send, {s Down}
  2426. Sleep, 2000
  2427. Send, {s Up}
  2428. sleepAmount(100, 1000)
  2429. Loop, 3 {
  2430. searchItem("pollinated")
  2431. hotbarController(1, 0, "9")
  2432. sleepAmount(100, 500)
  2433. Loop, 2 {
  2434. Send {e}
  2435. Sleep, 200
  2436. }
  2437. depositCount++
  2438. SendDiscordMessage(webhookURL, "Depositing/Collecting Honey Try #" . depositCount . ".")
  2439. Sleep, 1000
  2440. }
  2441.  
  2442. hotbarController(0, 1, "0")
  2443. uiUniversal(11110)
  2444.  
  2445. SendDiscordMessage(webhookURL, "**[Honey Deposit Completed]**")
  2446.  
  2447. Return
  2448.  
  2449. HoneyShop:
  2450.  
  2451. honeyCompleted := 0
  2452.  
  2453. SendDiscordMessage(webhookURL, "**[Honey Shop Cycle]**")
  2454. uiUniversal("1111020")
  2455. sleepAmount(1000, 2000)
  2456. Send, {d down}
  2457. Sleep, 9050
  2458. Send, {d up}
  2459. sleepAmount(100, 1000)
  2460. Send, {w down}
  2461. Sleep, 250
  2462. Send, {w up}
  2463. Loop, 2 {
  2464. Send, {WheelDown}
  2465. Sleep, 20
  2466. }
  2467. sleepAmount(500, 1500)
  2468. Send, {e}
  2469. sleepAmount(500, 1500)
  2470. Loop, 2 {
  2471. Send, {WheelUp}
  2472. Sleep, 20
  2473. }
  2474. sleepAmount(500, 2000)
  2475. dialogueClick("honey")
  2476. sleepAmount(2500, 5000)
  2477. ; checks for the shop opening up to 5 times to ensure it doesn't fail
  2478. Loop, 5 {
  2479. if (simpleDetect(0x02EFD3, 10, 0.54, 0.20, 0.65, 0.325)) {
  2480. ToolTip, Honey Shop Opened
  2481. SetTimer, HideTooltip, -1500
  2482. SendDiscordMessage(webhookURL, "Honey Shop Opened.")
  2483. Sleep, 200
  2484. uiUniversal("3333114443333311405550555", 0)
  2485. Sleep, 100
  2486. buyUniversal("honey")
  2487. SendDiscordMessage(webhookURL, "Honey Shop Closed.")
  2488. honeyCompleted = 1
  2489. }
  2490. if (honeyCompleted) {
  2491. break
  2492. }
  2493. Sleep, 2000
  2494. }
  2495.  
  2496. closeShop("honey", honeyCompleted)
  2497.  
  2498. hotbarController(0, 1, "0")
  2499. SendDiscordMessage(webhookURL, "**[Honey Shop Completed]**")
  2500.  
  2501. Return
  2502.  
  2503. ; cosmetic labels
  2504.  
  2505. Cosmetic1:
  2506.  
  2507. Sleep, 50
  2508. Loop, 5 {
  2509. uiUniversal("111114450")
  2510. sleepAmount(50, 200)
  2511. }
  2512.  
  2513. Return
  2514.  
  2515. Cosmetic2:
  2516.  
  2517. Sleep, 50
  2518. Loop, 5 {
  2519. uiUniversal("11111442250")
  2520. sleepAmount(50, 200)
  2521. }
  2522.  
  2523. Return
  2524.  
  2525. Cosmetic3:
  2526.  
  2527. Sleep, 50
  2528. Loop, 5 {
  2529. uiUniversal("1111144222250")
  2530. sleepAmount(50, 200)
  2531. }
  2532.  
  2533. Return
  2534.  
  2535. Cosmetic4:
  2536.  
  2537. Sleep, 50
  2538. Loop, 5 {
  2539. uiUniversal("11111442222450")
  2540. sleepAmount(50, 200)
  2541. }
  2542.  
  2543. Return
  2544.  
  2545. Cosmetic5:
  2546.  
  2547. Sleep, 50
  2548. Loop, 5 {
  2549. uiUniversal("111114422224150")
  2550. sleepAmount(50, 200)
  2551. }
  2552.  
  2553. Return
  2554.  
  2555. Cosmetic6:
  2556.  
  2557. Sleep, 50
  2558. Loop, 5 {
  2559. uiUniversal("1111144222241150")
  2560. sleepAmount(50, 200)
  2561. }
  2562.  
  2563. Return
  2564.  
  2565. Cosmetic7:
  2566.  
  2567. Sleep, 50
  2568. Loop, 5 {
  2569. uiUniversal("11111442222411150")
  2570. sleepAmount(50, 200)
  2571. }
  2572.  
  2573. Return
  2574.  
  2575. Cosmetic8:
  2576.  
  2577. Sleep, 50
  2578. Loop, 5 {
  2579. uiUniversal("111114422224111150")
  2580. sleepAmount(50, 200)
  2581. }
  2582.  
  2583. Return
  2584.  
  2585. Cosmetic9:
  2586.  
  2587. Sleep, 50
  2588. Loop, 5 {
  2589. uiUniversal("1111144222241111150")
  2590. sleepAmount(50, 200)
  2591. }
  2592.  
  2593. Return
  2594.  
  2595. ; save settings and start/exit
  2596.  
  2597. SaveSettings:
  2598. Gui, Submit, NoHide
  2599.  
  2600. ; — Egg section —
  2601. Loop, % eggItems.Length()
  2602. IniWrite, % (EggItem%A_Index% ? 1 : 0), %settingsFile%, Egg, Item%A_Index%
  2603. IniWrite, % SelectAllEggs, %settingsFile%, Egg, SelectAllEggs
  2604.  
  2605. ; — Gear section —
  2606. Loop, % gearItems.Length()
  2607. IniWrite, % (GearItem%A_Index% ? 1 : 0), %settingsFile%, Gear, Item%A_Index%
  2608. IniWrite, % SelectAllGears, %settingsFile%, Gear, SelectAllGears
  2609.  
  2610. ; — Seed section —
  2611. Loop, % seedItems.Length()
  2612. IniWrite, % (SeedItem%A_Index% ? 1 : 0), %settingsFile%, Seed, Item%A_Index%
  2613. IniWrite, % SelectAllSeeds, %settingsFile%, Seed, SelectAllSeeds
  2614.  
  2615. ; — Honey section —
  2616. ; first the “place” items 1–10
  2617. Loop, 10
  2618. IniWrite, % (HoneyItem%A_Index% ? 1 : 0), %settingsFile%, Honey, Item%A_Index%
  2619. IniWrite, % SelectAllHoney, %settingsFile%, Honey, SelectAllHoney
  2620. IniWrite, % AutoHoney, %settingsFile%, Honey, AutoDepositHoney
  2621. ; then 11–14
  2622. Loop, % realHoneyItems.Length()
  2623. if (A_Index > 10 && A_Index <= 14)
  2624. IniWrite, % (HoneyItem%A_Index% ? 1 : 0), %settingsFile%, Honey, Item%A_Index%
  2625. IniWrite, % AutoCollectPollinated, %settingsFile%, Honey, AutoCollectPollinated
  2626.  
  2627. ; — Main section —
  2628. IniWrite, % AutoAlign, %settingsFile%, Main, AutoAlign
  2629. IniWrite, % PingSelected, %settingsFile%, Main, PingSelected
  2630. IniWrite, % MultiInstanceMode, %settingsFile%, Main, MultiInstanceMode
  2631. IniWrite, % SavedSpeed, %settingsFile%, Main, MacroSpeed
  2632. IniWrite, % privateServerLink, %settingsFile%, Main, PrivateServerLink
  2633. IniWrite, % discordUserID, %settingsFile%, Main, DiscordUserID
  2634. IniWrite, % SavedKeybind, %settingsFile%, Main, UINavigationKeybind
  2635. IniWrite, % webhookURL, %settingsFile%, Main, UserWebhook
  2636.  
  2637. ; — Cosmetic section —
  2638. IniWrite, % BuyAllCosmetics, %settingsFile%, Cosmetic, BuyAllCosmetics
  2639.  
  2640. ; — CraftSeed section —
  2641. IniWrite, % SelectAllCraft, %settingsFile%, CraftSeed, SelectAllCraftSeed
  2642.  
  2643. ; — CraftTool section —
  2644. IniWrite, % SelectAllCraft2, %settingsFile%, CraftTool, SelectAllCraftTool
  2645.  
  2646. ; — Craft (seeds) section —
  2647. Loop, % craftItems.Length()
  2648. IniWrite, % (CraftItem%A_Index% ? 1 : 0), %settingsFile%, Craft, Item%A_Index%
  2649. IniWrite, % SelectAllCraft, %settingsFile%, Craft, SelectAllCraft
  2650.  
  2651. ; — Craft2 (tools) section —
  2652. Loop, % craftItems2.Length()
  2653. IniWrite, % (CraftItem2%A_Index%?1:0), %settingsFile%, Craft2, Item%A_Index%
  2654. IniWrite, % SelectAllCraft2, %settingsFile%, Craft2, SelectAllCraft2
  2655.  
  2656. Return
  2657.  
  2658. StopMacro(terminate := 1) {
  2659.  
  2660. Gui, Submit, NoHide
  2661. Sleep, 50
  2662. started := 0
  2663. Gosub, SaveSettings
  2664. Gui, Destroy
  2665. if (terminate)
  2666. ExitApp
  2667.  
  2668. }
  2669.  
  2670. PauseMacro(terminate := 1) {
  2671.  
  2672. Gui, Submit, NoHide
  2673. Sleep, 50
  2674. started := 0
  2675. Gosub, SaveSettings
  2676.  
  2677. }
  2678.  
  2679. ; pressing x on window closes macro
  2680. GuiClose:
  2681.  
  2682. StopMacro(1)
  2683.  
  2684. Return
  2685.  
  2686. ; pressing f7 button reloads
  2687. Quit:
  2688.  
  2689. PauseMacro(1)
  2690. SendDiscordMessage(webhookURL, "Macro reloaded.")
  2691. Reload ; ahk built in reload
  2692.  
  2693. Return
  2694.  
  2695. ; f7 reloads
  2696. F7::
  2697.  
  2698. PauseMacro(1)
  2699. SendDiscordMessage(webhookURL, "Macro reloaded.")
  2700. Reload ; ahk built in reload
  2701.  
  2702. Return
  2703.  
  2704. ; f5 starts scan
  2705. F5::
  2706.  
  2707. Gosub, StartScanMultiInstance
  2708.  
  2709. Return
  2710.  
  2711. #MaxThreadsPerHotkey, 2
  2712.  
Advertisement
Add Comment
Please, Sign In to add comment