script to farm the albinaurics in loop on Elden ring (2024)

Here's an update to the code.
Since I don't have access to the weapon anymore I can not test it, so this is just code from another script.
The main changes are that it's now faster to capture the score and calculate each farm. It uses the score capture inside the code without having to call another script and most importantly it goes into a few statements to verify if you died and failed to collect the runes. If the runes are out of reach from their search code location - by the grace in this case - it will kill the script after a couple tries until the player manually collects them. At least that's how it worked on the other script, so I left the tooltips there to help in case someone wants to change it. I'm not sure how needed this is in this script, since the runes seem to always be by the grace, but just in case they don't, this will save you from losing them.
This post shows how to call another script, provided below, to restart Elden Ring and the script in case the game crashes. Make sure to check lines 94/95 and lines 62/74 on the reload script for their names so that they match. Please note that the names are different from what was used in the other farm code posts. Also, I haven't tested the timings for these changes or pretty much anything in this script as well so might be unwanted errors coming up with the files provided, their file names or so.
If you don't want any of these and feel comfortable with the shorter timings from the previous script, you can just remove the code you don't want

or change the {* up} part from the previous code

to improve on that.
Here's the new code:

Code: Select all

#NoEnv#Warn#SingleInstance ForceProcess, priority, , highSendMode InputSetWorkingDir %A_ScriptDir%SetTitleMatchMode, 2#MaxThreadsperHotkey 2CoordMode, Mouse, ScreenCoordMode, Pixel, ScreenCoordMode, Tooltip, ScreenWinGetPos, WinX, WinY, WinW, WinH, ELDEN RING™if (WinX !=0)Winmove, ELDEN RING™, , 0, 0SetBatchLines, -1WinActivate ELDEN RING™#IfWinActive, ELDEN RING™;#UseHook OffxposList:= [[1750, 1771], [1761, 1782], [1772, 1793], [1783, 1805], [1794, 1816],[1806, 1827] , [1817, 1840], [1830, 1850], [1843, 1865]]score := 0score0 := 0score0reload := 0F6::reloadF8::ExitAppF9::PauseF7::Gosub mainmain:previousscore := scoreloop {Sleep 50Send, {r up}{e up}{f up}{g up}{w up}{a up}{d up}{o up}Sleep 50Send, {g down}Sleep 30Send, {g up}loop, 300 {ImageSearch, , , 1802, 100, 1816, 119, *25 *transblack Compass.pngIf (ErrorLevel = 0) {break}If (A_Index = 300) {Sleep, 100Gosub mainbreak}}Send, {f down}Sleep 30Send, {f up}Sleep 30loop,100 {Imagesearch, , , 85, 150, 105, 970, *25 *transblack GraceList.pngIf (ErrorLevel = 0)breakIf (A_Index = 100) {Sleep 30Send, {f up}Sleep 30Send, {f down}Sleep 30Send, {f up}Sleep 30break}}Send, {e down}Sleep 30Send, {e up}Sleep 30Loop, 100 {Imagesearch, , , 1151, 582, 1162, 592, *115 *Transblack TravelCancel.pngIf (ErrorLevel = 0) {Send, {e down}Sleep 30Send, {e up}break}}Send, {e down}Sleep 1000loop, 1000 {Imagesearch, , , 148, 1018, 382, 1034, *55 *Transblack Next.pngIf (ErrorLevel = 1) {If (A_Index = 1) {Send, {e up}Sleep 145Send, {e down}Sleep 1000}break}If (A_Index =1000) and (ErrorLevel = 0) {run, MohgwinFarmTSchProcess, WaitClose, MohgwinFarmTSchExitApp}}Sleep 500loop, 400 {ImageSearch, , , 1685, 1026, 1705, 1045, *55 *transblack RuneIcon.pngIf (ErrorLevel = 0) {Sleep, 2000score =For each, xpos in xposList {Loop, 11 {digit := A_Index - 1image :="Digit" digit ".png"ImageSearch,,, xpos.1, 1025, xpos.2, 1047, *115 *transblack %image%err := ErrorLevelIf (digit = 10)digit:= 0} Until !errscore .= err ? "_" : digit}sessiontotal := score - previousscoreTooltip, score = %score%`nsession total = %sessiontotal%, 900, 900SetTimer, RemoveToolTip, -2000If (score0 = 0) {Tooltip, score0reload = %score0reload%`nscore0 = %score0%, 400, 100, 2SetTimer, RemoveToolTip2, -4000break}If (score0 = 1) {Tooltip, ErrorLevel = %ErrorLevel%`nscore0 = %score0%, 400, 100SetTimer, RemoveToolTip, -4000If (score < 150000) {Tooltip, ErrorLevel = %ErrorLevel%`nscore0 = %score0%`nscore0reload = %score0reload%`nscore < 150000`n"break", 600, 300, 2SetTimer, RemoveToolTip2, -4000break}If (score > 150000) {If (score < 290000) {Tooltip, ErrorLevel = %ErrorLevel%`nscore0 = %score0%`nscore0reload = %score0reload%`nscore > 150000`n"ExitApp", 700, 400, 2SetTimer, RemoveToolTip2, -4000Exitapp}Else {score0 := 0score0reload := 0break}}If (score = 0) {Score0+= 1Tooltip, ErrorLevel = %ErrorLevel%`nscore0 = %score0%`nscore0reload = %score0reload%`nscore = 0`n"Break", 800, 500, 2SetTimer, RemoveToolTip2, -4000break}}}If (ErrorLevel = 1) {If (A_Index = 1) {Send, {e down}Sleep 50Send, {e up}Sleep 350}If (A_Index = 400) {If (score0 = 2) {Tooltip, ErrorLevel = %ErrorLevel%`nscore0 = %score0%`nscore0reload = %score0reload%`n"exitApp", 900, 600, 2SetTimer, RemoveToolTip2, -4000ExitApp}If (score0reload > 0) {Tooltip, ErrorLevel = %ErrorLevel%`nscore0 = %score0%`nscore0reload = %score0reload%`n"Continue", 1000, 700, 2SetTimer, RemoveToolTip2, -4000continue}{score0 += 1Tooltip, ErrorLevel = %ErrorLevel%`nscore0 = %score0%`nscore0reload = %score0reload%`n"A_Index = 400", 1100, 800, 2SetTimer, RemoveToolTip2, -4000}}}}Sleep 60Send, {e up}Sleep 450ImageSearch, , , 862, 908, 927, 920, *55 *transblack YRetrieve.pngIf (ErrorLevel = 0) {Send, {e down}Sleep 50Send, {e up}Sleep 550If (score0 > 0) {score0reload := 0score0 := 0}};; W A W ==> we zig zag into position;BlockInput, MouseMoveSend, {e up}Sleep 300Send, {w down}Sleep 30Send, {space down}Sleep 1760Send, {a down}Sleep 1000Send, {a up}Sleep 1400Send, {a down}Sleep 400Send, {space up}{a up}{d down}Sleep 140Send, {d up}{w up}Sleep 50 ; you may need to adjust this for the Pixelsearch to workLoop {PixelSearch, PixelX, PixelY, 820, 400, 821, 600, 0x6EB0CF, 35, fastIf (ErrorLevel = 1){SoundBeep, 500Send, {w down}{d down}Sleep 30Send, {d up}{w up}break}If (ErrorLevel = 0) {SoundBeep, 1000ToolTip, %PixelX% %PixelY%,PixelX, PixelYSetTimer, RemoveToolTip, -3000break}};; TAB ==> we activate the weapon skill and wait some time to collect runesSend, {TAB down}Sleep 30Send, {TAB up};BlockInput, MouseMoveOffSleep 6500}returnRemoveToolTip:ToolTipreturn

and here's the reload code:

Code: Select all

#NoEnv; #WarnSendLevel 1SendMode InputSetWorkingDir %A_ScriptDir%;Process, close, ELDEN RING™SetTitleMatchMode, 2#MaxThreadsperHotkey 2CoordMode, Mouse, ScreenCoordMode, Pixel, ScreenCoordMode, Tooltip, ScreenProcess, close, eldenring.exeSleep, 400run, start_protected_game.exe, C:\Program Files (x86)\Steam\steamapps\common\ELDEN RING\Gameloop {ImageSearch, , , 689, 414, 704, 431, *25 *Transblack EldenRingStart.pngif (ErrorLevel = 0) {Send, {enter down}sleep, 50Send, {enter up}break}}loop {ImageSearch, , , 846, 601, 873, 611, *25 *Transblack EldenRingOK.pngif (ErrorLevel = 0) {MouseMove, 962, 661Send, {LButton down}sleep, 50Send, {LButton up}break}}loop {ImageSearch, , , 891, 742, 915, 753, *25 *Transblack EldenRingInformation.pngif (ErrorLevel = 0) {MouseMove, 950, 749sleep, 50Send, {LButton down}sleep, 50Send, {LButton up}break}}loop {ImageSearch, , , 689, 414, 704, 431, *25 *Transblack EldenRingStart.pngif (ErrorLevel = 0) {MouseMove, 966, 808sleep, 50Send, {LButton down}sleep, 50Send, {LButton up}break}}sleep, 5000loop, 1000 {Imagesearch, , , 148, 1018, 382, 1034, *115 *Transblack Next.pngIf (ErrorLevel = 1)breakIf (A_Index = 10000) and (ErrorLevel = 0) {run, MohgwinFarmCloseReturn}}Sleep 1000loop, 400 {If (A_Index = 1) {tooltip, RuneIcon.png search started, 1100, 800, 18SetTimer, RemoveToolTip18, -1000}ImageSearch, , ,1685, 1026, 1705, 1045, *55 *transblack RuneIcon.pngIf (ErrorLevel = 0){run, MohgwinFarm20.ahkSleep, 2000Send, {F7 down}Sleep, 50Send, {F7 up}tooltip, MohgwinFarmClose exited, 1000, 800, 17SetTimer, RemoveToolTip17, -1000Sleep, 1000break}}RemoveToolTip17:ToolTip,,,,17returnRemoveToolTip18:ToolTip,,,,18returnExitApp

Their names are MohgwinFarm20.ahk and MohgwinFarmClose.ahk if that makes it easier for you or I missed something, and the elevated task is named MohgwinFarmTSch. Special thanks to Mikeyww for providing the score code.

script to farm the albinaurics in loop on Elden ring (2024)
Top Articles
Latest Posts
Article information

Author: Dr. Pierre Goyette

Last Updated:

Views: 6266

Rating: 5 / 5 (70 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Dr. Pierre Goyette

Birthday: 1998-01-29

Address: Apt. 611 3357 Yong Plain, West Audra, IL 70053

Phone: +5819954278378

Job: Construction Director

Hobby: Embroidery, Creative writing, Shopping, Driving, Stand-up comedy, Coffee roasting, Scrapbooking

Introduction: My name is Dr. Pierre Goyette, I am a enchanting, powerful, jolly, rich, graceful, colorful, zany person who loves writing and wants to share my knowledge and understanding with you.