Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Orich's Magic-Find Swap Script for AutoHotKey and/or AutoIt
- ;
- ; This is configured for 1920x1200 resolution
- ;
- ; Features
- ; 1. Only 7 variables to change for different resolutions
- ; 2. Randomized delay to be less obvious to warden
- ;
- ; Alt-S to start the swap
- !s::
- ; open inventory
- Send i
- sleep 60
- start_x := 1358 ; left-most X coordinate of the first gear slot
- start_y := 654 ; top-most Y coordinate of the first gear slot
- box_width := 48 ; width of each slot
- box_height := 100 ; height of each slot
- next_inc := 54 ; distance to the next slot
- jewel_height := 47 ; height of half-height items (belts, jewelry, etc.)
- under_jewel_y := start_y + jewel_height + 3 ; Top most Y coordinate of the row 2 jewelry (note: "2" is the number of pixels that lie between two slots in the inventory)
- Loop, 8
- {
- curslot := a_index - 1
- xleft := (curslot * next_inc) + 1358
- xright := xleft + box_width
- ytop := start_y
- ybot := start_y + box_height
- xvar := Random(xleft, xright)
- yvar := Random(ytop, ybot)
- ControlClick,, Diablo III,, Right,, x%xvar% y%yvar%
- RandomDelay()
- }
- ; Next two rows w/ 2 rings, 1 amulet, 1 belt
- Loop, 2
- {
- curslot := (a_index + 7)
- xleft := (curslot * next_inc) + 1358
- xright := xleft + box_width
- ytop := start_y
- ybot := start_y + jewel_height
- ; Jewel slot #1
- xvar := Random(xleft, xright)
- yvar := Random(ytop, ybot)
- ControlClick,, Diablo III,, Right,, x%xvar% y%yvar%
- RandomDelay()
- ; Jewel slot #2
- xvar := Random(xleft, xright)
- ytop := under_jewel_y
- ybot := under_jewel_y + jewel_height
- yvar := Random(ytop, ybot)
- Send {ALT down}
- ControlClick,, Diablo III,, Right,, x%xvar% y%yvar%
- Send {Alt up}
- RandomDelay()
- }
- Send i
- return
- Random(min,max) {
- Random, out, %min%, %max%
- return out
- }
- RandomDelay() {
- ;sleepvar := Random(60,200)
- Random(10,20)
- sleep %sleepvar%
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement