Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global quad_topleft := [24, 125]
- global slot_size := 14.6
- global slots := 24
- global sleep1 := 17
- global sleep2 := 34
- global last_x_index := 0
- global last_y_index := 0
- global inv_free_slots := 12 * 5 - 1
- ^+a::
- take_quad()
- return
- take_quad()
- {
- sleep 500
- done := false
- x_index := last_x_index
- y_index := last_y_index
- while (true)
- {
- temp_y := quad_topleft[2] + (slot_size * y_index)
- while (true)
- {
- temp_x := quad_topleft[1] + (slot_size * x_index)
- move_mouse(randomize_coords([temp_x, temp_y]))
- random_sleep(1,2,1)
- ; random_sleep(sleep1, sleep2, 2)
- ; control_click()
- ; random_sleep(sleep1, sleep2, 2)
- clicks += 1
- x_index += 1
- if (x_index == slots)
- {
- break
- }
- if (clicks > inv_free_slots)
- {
- done = true
- last_x_index := x_index
- break
- }
- }
- x_index := 0
- if (!done)
- {
- y_index += 1
- }
- if (y_index == slots)
- {
- last_x_index := 0
- last_y_index := 0
- break
- }
- if (done)
- {
- last_y_index := y_index
- break
- }
- }
- }
- randomize_coords(coords)
- {
- Random, x_rand, -1, 1
- Random, y_rand, -1, 1
- return [coords[1] + x_rand, coords[2] + y_rand]
- }
- move_mouse(coords)
- {
- MouseMove, coords[1], coords[2]
- }
- random_sleep(min_val, max_val, multiplier)
- {
- Random, out, min_val, max_val
- s := out * multiplier
- sleep %s%
- }
- control_click()
- {
- Send {LControl down}
- random_sleep(sleep1, sleep2, 1)
- Click
- random_sleep(sleep1, sleep2, 1)
- Send {LControl up}
- }
- f10::
- Reload
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement