If It's our turn, we are in battle, btvc is less than 4, and auto battles aren't full If we finished a battle and our auto battles aren't full yet we add 1 to btvcĮlse If (whoseturn = 1) AND (inbattle = 1) AND (btvc < 4) and (Flag = 1) Just a reminder that our actual ab count is 5x btvc's value ToolTip, 5x=%btvc%, 452, 62, 2 Another useless visual indication. If battle ends for any other reason we continue as normal. To let BattleManager2 know to go to BattleManager4 instead If we're out of auto battles and the battle ended Flag=1 as a global variable. Mostly a pointless line but you can put whatever is useful to you or remove it. ToolTip, AB=%abcount%, 452, 62, 2 Visual display of auto battle count. If our AB is empty we'll be doing guard battles. If our AB isn't empty we're going to keep doing auto battles. Because there's no point in going forward otherwise.Įlse If (Flag = 0) AND (whoseturn = 1) AND (inbattle = 1) AND (abcount != 0) If not in battle we're going back to the last label. (Max normally is 120 from in-game setting "very fast") ![]() The above automatically checks if battlespeed is set to 420, if not it sets it to 420. MemoryWrite(hwnd1,btspd,420,"int",Offsets=0) ToolTip, Started!, 402, 62, 1 Just a visual indicator that you started the code. Assigns the memory found from address abc+offset abcoff to variable "abcount" Assigns the memory found from address whot to variable "whoseturn"Ībcount := MemoryReadPointer(hwnd1,abc, "int",1,abcoff) Whoseturn := MemoryReadPointer(hwnd1,whot, "int",Offsets=0) Assigns the memory found from address inbt to variable "inbattle" Inbattle := MemoryReadPointer(hwnd1,inbt, "int",Offsets=0) Assigns the memory found from address btspd to variable "speed" Speed := MemoryReadPointer(hwnd1,btspd, "int",Offsets=0) It jumps into our first label with the press of home key. The above hotkey automatically sets two of our global variables. Flag will be our global variable working much like a railroad switch. This will be our auto battle total divided by 5 (Specifically counting up from 0, not when using auto battle!) btvc is my weird abbreviation for battle variable count which is even worded oddly. To obtain this offset you need to learn how to find a pointer to the auto battle count address. (This is as simple as finding the 4byte integer for your visually obvious AB count in-game)Ībcoff = 0x012BA8 Offset for auto battle count. address I used for auto battle count, requires offset for pointer. If my turn = 1 and if enemy turn = 0 (Same as above) Whot = 0xF1A798 address I used for whose turn. (Easy to find and it's also static, no pointer required.) If not in battle = 0 and if in battle = 1 Inbt = 0xF6F9E4 address I used for if in battle. ![]() and probably on the internet somewhere for your server already Just like cheat engine in its most basic form, we're opening the memory from the client for access.ītspd = 0xF25288 address I used for battlespeed, it should be a static address in all versions of AO. WinGet, Atlantica, PID, Atlantica Online Point to the client to retrieve PID as var I write far too many scripts for far too many different games with different hotkeys! ToolTip, |DEL=Exit|End=Stop|Home=Start|, 103, 75, 3 Feel free to remove these two lines. WinActivate, Atlantica Online Force this to open so the below ToolTip gets a static position. Mostly irrelevant without UAC disabled since memory requires admin anyway. #SingleInstance force This makes it so we can only open one instance of the script at a time. #Include, memory.ahk FIle must be in same folder or further specified! This will have a UAC prompt like anything that tries to run as admin if UAC is enabled. Makes the script rerun itself as admin if not elevated already
0 Comments
Leave a Reply. |