This script started off as facerip's macro. I updated it heavily.
Some changes include:
Automatic detection of enemy death
Automatic detection of potion qty via memory readings =)
This macro is much more streamlined and works much faster.
If you're in a group, change the loot qty to 1 from 10 to save that time.
CODE
Constants
loot = {SPACE} //Hotkey to autoloot.
target = ] //Hotkey to target nearest enemy.
attack = 3 //Hotkey to autoattack.
alive = 0
Const = 0
recall = 8 // Put in Passport for when you run out of potions here.
End
SetActiveWindow Archlord
Call findEnemy
Procedure findEnemy
SetActiveWindow Archlord
Keys $target
Keydown {RIGHT} 0.2 sec
Call checkalive
Delay 0.5 sec
Call killEnemy
End
//GetRed 732, 43 = 222
//GetRed 732, 43 = 214
//GetRed 732, 43 = 228
Procedure checkalive
GetRed 416, 247 = 231
$alive=1
Else
GetRed 416, 247 = 239
$alive=1
else
$alive=0
end
End
end
Procedure killEnemy
while $alive=1
Keys $attack
Delay 1 Sec
call checkalive
end
Delay 2 sec
Call lootEnemy
End
Procedure lootEnemy
Loop 10
Keys $loot
Delay 0.2 Sec
End
ReadMemoryEx $Const = 09054E28, LongWord
If $Const < 5
Keys $recall
Else
End
Call findEnemy
End