[AutoHotKey] Macro looter by phant0m

08/14/2009 11:28 Penakle#1
Loot Function- Works for dropping loot in backpack, backpack to bank, armor to paperdoll, and stacking, etc. Saves destination in a file for next time you play.
Alt-RightClick - Set Loot Destination
sets the x,y position of your loots destination. You can do this anytime.
Alt-LeftClick - Drag Loot
Drags loot from anywhere and drops it on loot destination, then cursor jumps back to original location. Simply hold Alt and click on loot.

Code:
IniFile := "C:\loot.txt"
FileGetSize, size, %IniFile%
if (size = "") {
MsgBox Setting up
IniWrite, 1300, %IniFile%, Loot, xdest ; --- destination x pos
IniWrite, 700, %IniFile%, Loot, ydest ; --- destination y pos
} else {
IniRead, xdest, %IniFile%, Loot, xdest ; --- destination x pos
IniRead, ydest, %IniFile%, Loot, ydest ; --- destination y pos
}
CoordMode, Pixel



$!Lbutton:: ;quick loot -------------------------

MouseGetPos, x1, y1
MouseClickDrag, left, x1, y1, xdest, ydest, 0 ;0 is mouse speed, 0 is instant
MouseMove, x1, y1, 0 ;0 is mouse speed, 0 is instant

return

$!Rbutton:: ;loot destination ------------------------->

MouseGetPos, xdest, ydest
IniWrite, %xdest%, %IniFile%, Loot, xdest
IniWrite, %ydest%, %IniFile%, Loot, ydest

return