Code:
; ===============================================================
; Edit hotkeys in this section
; ===============================================================
salvageDelay := 1 ; Set delay when using auto salvage (lower = faster | higher = slower)
SetMouseDelay, -1 ; Sets the delay that will occur after each mouse movement or click.
SetKeyDelay, -1 ; Sets the delay that will occur after each keystroke
^#LButton::cubeOneSlot() ; Hotkey to go threw cube for one slot items
^#RButton::cubeTwoSlots() ; Hotkey to go threw cube for two slot items
^#WheelUp::stopScript() ; Hotkey to stop script
^#WheelDown::stopScript() ; Hotkey to stop script
!LButton::fastLeftClick() ; Hotkey to click fast with left mouse button
!RButton::fastRightClick() ; Hotkey to click fast with right mouse button
$F10:: ; Hotkey to salvage inventory
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 500)
salvageStuff()
return
; ===============================================================
; Information - READ THIS BEFORE ASKING QUESTIONS
; ===============================================================
; NOTE: In Diablo Goto Option > Key Bindings > Then check to make sure none of them are set to the above hotkeys keys
; To use cube
; 1st step - Open cube to which ever page you need to use
; 2nd step - Press required hotkey depeneding on if its 1-slot or 2-slot items
; When using fast salvage: go to blacksmith and enter salvage tab first (salavge hotkey is double tap by default)
; If you find it is skipping items when converting with the cube try setting the mouse/key dealys to a higher number
; INFO - setting hotkeys
; set the hotkey by changing the text BEFORE the double colons
; example>>> HOTKEY_HERE::randomText() <<<example
; ! = alt key
; + = shift key
; ^ = crtl key
; # = windows key
; EXAMPLE ^!f::randomText() would activate macro by pressing crtl + alt + f at the same time
; EXAMPLE q::randomText() would actiavte macro by just pressing the q key
; ===============================================================
; cube - one slot
; ===============================================================
cubeOneSlot()
{
setResUtilities()
SetMouseDelay, 4
SetKeyDelay, 2
Global inventoryX, inventoryY
Global cubeBookFillX, cubeBookFillY
Global cubeTransmuteX, cubeTransmuteY
Global cubeBookArrowRightX, cubeBookArrowRightY
Global cubeBookArrowLeftX, cubeBookArrowLeftY
Global nextItem, startItem
Sleep 100
Loop, 54
{
MouseClick, Right, inventoryX, inventoryY
MouseClick, Left, cubeBookFillX, cubeBookFillY
MouseClick, Left, cubeTransmuteX, cubeTransmuteY
MouseClick, Left, cubeBookArrowRightX, cubeBookArrowRightY
MouseClick, Left, cubeBookArrowLeftX, cubeBookArrowLeftY
inventoryX := inventoryX + nextItem
if (A_Index == 9)
{
inventoryY := inventoryY + nextItem
inventoryX := startItem
}
if (A_Index == 18)
{
inventoryY := inventoryY + nextItem
inventoryX := startItem
}
if (A_Index == 27)
{
inventoryY := inventoryY + nextItem
inventoryX := startItem
}
if (A_Index == 36)
{
inventoryY := inventoryY + nextItem
inventoryX := startItem
}
if (A_Index == 45)
{
inventoryY := inventoryY + nextItem
inventoryX := startItem
}
}
Reload
}
; ===============================================================
; cube - two slots
; ===============================================================
cubeTwoSlots()
{
setResUtilities()
SetMouseDelay, 4
SetKeyDelay, 2
Global inventoryX, inventoryY
Global cubeBookFillX, cubeBookFillY
Global cubeTransmuteX, cubeTransmuteY
Global cubeBookArrowRightX, cubeBookArrowRightY
Global cubeBookArrowLeftX, cubeBookArrowLeftY
Global nextItem, startItem
Sleep 100
Loop, 27
{
MouseClick, Right, inventoryX, inventoryY
MouseClick, Left, cubeBookFillX, cubeBookFillY
MouseClick, Left, cubeTransmuteX, cubeTransmuteY
MouseClick, Left, cubeBookArrowRightX, cubeBookArrowRightY
MouseClick, Left, cubeBookArrowLeftX, cubeBookArrowLeftY
inventoryX := inventoryX + nextItem
if (A_Index == 9)
{
inventoryY := inventoryY + (nextItem * 2)
inventoryX := startItem
}
if (A_Index == 18)
{
inventoryY := inventoryY + (nextItem * 2)
inventoryX := startItem
}
}
Reload
}
; ===============================================================
; salvage inventory
; ===============================================================
salvageStuff()
{
setResUtilities()
SendMode, Input
Global salvageX, salvageY
Global inventoryX, inventoryY
Global nextItem, startItem, salvageDelay
MouseClick, Left, salvageX, salvageY
Loop, 54
{
MouseClick, Left, inventoryX, inventoryY
; Sleep %salvageDelay%
SendInput {Enter Down}
SendInput {Enter Up}
Sleep %salvageDelay%
SendInput {Enter Down}
SendInput {Enter Up}
Sleep %salvageDelay%
inventoryX := inventoryX + nextItem
if (A_Index == 9)
{
inventoryY := inventoryY + nextItem
inventoryX := startItem
}
if (A_Index == 18)
{
inventoryY := inventoryY + nextItem
inventoryX := startItem
}
if (A_Index == 27)
{
inventoryY := inventoryY + nextItem
inventoryX := startItem
}
if (A_Index == 36)
{
inventoryY := inventoryY + nextItem
inventoryX := startItem
}
if (A_Index == 45)
{
inventoryY := inventoryY + nextItem
inventoryX := startItem
}
}
SendInput, {Esc}
Reload
}
; ===============================================================
; fast click - Left
; ===============================================================
fastLeftClick()
{
Loop
{
GetKeyState, var, LButton, P
If var = U
Break
MouseClick, Left
Sleep 5
}
Return
}
; ===============================================================
; fast click - Right
; ===============================================================
fastRightClick()
{
Loop
{
GetKeyState, var, RButton, P
If var = U
Break
MouseClick, Right
Sleep 5
}
Return
}
; ===============================================================
; break loop
; ===============================================================
stopScript()
{
Reload
ExitApp
}
; ===============================================================
; set resolution coordinates
; ===============================================================
setResUtilities()
{
Global cubeBookX := 577
Global cubeBookY := 1100
Global cubeBookArrowRightX := 1137
Global cubeBookArrowRightY := 1121
Global cubeBookArrowLeftX := 777
Global cubeBookArrowLeftY := 1123
Global cubeBookFillX := 969
Global cubeBookFillY := 1114
Global cubeTransmuteX := 314
Global cubeTransmuteY := 1100
Global inventoryX := 1975
Global inventoryY := 780
Global nextItem := 64
Global startItem := 1975
Global salvageX := 221
Global salvageY := 339
Global exitgameX := 344
Global exitgameY := 647
Global mapbackX := 1198
Global mapbackY := 173
Global actoneX := 980
Global actoneY := 822
Global actonehomeX := 1358
Global actonehomeY := 643
Global obeliskX := 2406
Global obelisky := 813
Global grX := 363
Global grY := 633
Global gracceptX := 372
Global gracceptY := 1128
Global yellowItemCountX := 165
Global yellowItemCountY := 1043
Global yellowItemCraftX := 419
Global yellowItemCraftY := 1043
SysGet, screenSizeX, 0
SysGet, screenSizeY, 1
if (screenSizeX != 2560 || screenSizeY != 1440)
{
Global cubeX *= (screenSizeX / 2560)
Global cubeY *= (screenSizeY / 1440)
Global cubeBookX *= (screenSizeX / 2560)
Global cubeBookY *= (screenSizeY / 1440)
Global cubeBookArrowRightX *= (screenSizeX / 2560)
Global cubeBookArrowRightY *= (screenSizeY / 1440)
Global cubeBookArrowLeftX *= (screenSizeX / 2560)
Global cubeBookArrowLeftY *= (screenSizeY / 1440)
Global cubeBookFillX *= (screenSizeX / 2560)
Global cubeBookFillY *= (screenSizeY / 1440)
Global cubeTransmuteX *= (screenSizeX / 2560)
Global cubeTransmuteY *= (screenSizeY / 1440)
Global inventoryX *= (screenSizeX / 2560)
Global inventoryY *= (screenSizeY / 1440)
Global nextItem *= (screenSizeX / 2560)
Global startItem *= (screenSizeX / 2560)
Global salvageX *= (screenSizeX / 2560)
Global salvageY *= (screenSizeY / 1440)
Global exitgameX *= (screenSizeY / 1440)
Global exitgameY *= (screenSizeY / 1440)
Global actoneX *= (screenSizeX / 2560)
Global actoneY *= (screenSizeY / 1440)
Global actonehomeX *= (screenSizeX / 2560)
Global actonehomeY *= (screenSizeY / 1440)
Global obeliskX *= (screenSizeX / 2560)
Global obelisky *= (screenSizeY / 1440)
Global grX *= (screenSizeX / 2560)
Global grY *= (screenSizeY / 1440)
Global gracceptX *= (screenSizeX / 2560)
Global gracceptY *= (screenSizeY / 1440)
Global yellowItemCountX *= (screenSizeX / 2560)
Global yellowItemCountY *= (screenSizeY / 1440)
Global yellowItemCraftX *= (screenSizeX / 2560)
Global yellowItemCraftY *= (screenSizeY / 1440)
}
return
}