Advertisement
Guest User

Untitled

a guest
Jun 21st, 2012
1,627
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; Orich's Magic-Find Swap Script for AutoHotKey and/or AutoIt
  2. ;
  3. ; This is configured for 1920x1200 resolution
  4. ;
  5. ; Features
  6. ;    1.  Only 7 variables to change for different resolutions
  7. ;    2.  Randomized delay to be less obvious to warden
  8. ;
  9.  
  10.  
  11. ; Alt-S to start the swap
  12. !s::
  13.  
  14. ; open inventory
  15. Send i
  16. sleep 60
  17.  
  18. start_x    := 1358  ; left-most X coordinate of the first gear slot
  19. start_y    := 654   ; top-most  Y coordinate of the first gear slot
  20. box_width  := 48    ; width of each slot
  21. box_height := 100   ; height of each slot
  22. next_inc   := 54    ; distance to the next slot
  23. jewel_height := 47  ; height of half-height items (belts, jewelry, etc.)
  24.  
  25. 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)
  26.  
  27.  
  28. Loop, 8
  29. {
  30.     curslot := a_index - 1
  31.     xleft   := (curslot * next_inc) + 1358
  32.     xright  := xleft + box_width
  33.     ytop    := start_y
  34.     ybot    := start_y + box_height
  35.  
  36.     xvar    := Random(xleft, xright)
  37.     yvar    := Random(ytop, ybot)
  38.  
  39.     ControlClick,, Diablo III,, Right,, x%xvar% y%yvar%
  40.  
  41.     RandomDelay()
  42. }
  43.  
  44. ; Next two rows w/ 2 rings, 1 amulet, 1 belt
  45. Loop, 2
  46. {
  47.     curslot := (a_index + 7)
  48.     xleft   := (curslot * next_inc) + 1358
  49.     xright  := xleft + box_width
  50.     ytop    := start_y
  51.     ybot    := start_y + jewel_height
  52.  
  53.     ; Jewel slot #1
  54.     xvar    := Random(xleft, xright)
  55.     yvar    := Random(ytop, ybot)
  56.     ControlClick,, Diablo III,, Right,, x%xvar% y%yvar%
  57.     RandomDelay()
  58.  
  59.     ; Jewel slot #2
  60.     xvar    := Random(xleft, xright)
  61.     ytop    := under_jewel_y
  62.     ybot    := under_jewel_y + jewel_height
  63.     yvar    := Random(ytop, ybot)
  64.     Send {ALT down}
  65.     ControlClick,, Diablo III,, Right,, x%xvar% y%yvar%
  66.     Send {Alt up}
  67.     RandomDelay()
  68. }
  69.  
  70.  
  71. Send i
  72. return
  73.  
  74.  
  75. Random(min,max) {
  76.         Random, out, %min%, %max%
  77.         return out
  78. }
  79.  
  80. RandomDelay() {
  81.     ;sleepvar := Random(60,200)
  82.     Random(10,20)
  83.     sleep %sleepvar%
  84. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement