total reorg
This commit is contained in:
parent
bf71b3a66e
commit
fc8abba690
@ -12,7 +12,7 @@ class Doer(val r: Robot) {
|
|||||||
val yWiggle = 15;
|
val yWiggle = 15;
|
||||||
}
|
}
|
||||||
|
|
||||||
public fun doLoop(volume: Int, step: Int, task: (Doer)->Unit){
|
fun doLoop(volume: Int, step: Int, task: (Doer)->Unit){
|
||||||
val r = Doer(Robot())
|
val r = Doer(Robot())
|
||||||
val totalSteps =(ceil((volume/step).toDouble()) +1).toInt()
|
val totalSteps =(ceil((volume/step).toDouble()) +1).toInt()
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ class Doer(val r: Robot) {
|
|||||||
report(i+1, totalSteps, System.currentTimeMillis() - start)
|
report(i+1, totalSteps, System.currentTimeMillis() - start)
|
||||||
task(this)
|
task(this)
|
||||||
}
|
}
|
||||||
|
println()
|
||||||
val finish = System.currentTimeMillis()
|
val finish = System.currentTimeMillis()
|
||||||
println("Finished everything in ${prettyTimeString(finish - start)}")
|
println("Finished everything in ${prettyTimeString(finish - start)}")
|
||||||
r.drawStar(getPointerLocationAfter(0))
|
r.drawStar(getPointerLocationAfter(0))
|
||||||
|
|||||||
@ -8,6 +8,6 @@ import kotlin.math.ceil
|
|||||||
import kotlin.random.Random
|
import kotlin.random.Random
|
||||||
|
|
||||||
fun main() {
|
fun main() {
|
||||||
Routines.potionGrindWithWell(5100, 14)
|
Routines.potionGrindWithWell(2000)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,8 @@ import java.awt.Robot
|
|||||||
|
|
||||||
object Routines {
|
object Routines {
|
||||||
|
|
||||||
fun cleanHerbs(volume: Int, step: Int){
|
fun cleanHerbs(volume: Int, step: Int = 14){
|
||||||
|
val step = 28;
|
||||||
val r = Doer(Robot())
|
val r = Doer(Robot())
|
||||||
println("Put your mouse over the bank...")
|
println("Put your mouse over the bank...")
|
||||||
val chest = r.getPointerLocationAfter(3000L)
|
val chest = r.getPointerLocationAfter(3000L)
|
||||||
@ -13,7 +14,7 @@ object Routines {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun potionGrind(volume: Int, step: Int){
|
fun potionGrind(volume: Int, step: Int = 14){
|
||||||
val r = Doer(Robot())
|
val r = Doer(Robot())
|
||||||
println("Put your mouse over the bank...")
|
println("Put your mouse over the bank...")
|
||||||
val chest = r.getPointerLocationAfter(3000L)
|
val chest = r.getPointerLocationAfter(3000L)
|
||||||
@ -22,9 +23,8 @@ object Routines {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun potionGrindWithWell(volume: Int, step: Int){
|
fun potionGrindWithWell(volume: Int, step: Int = 14){
|
||||||
val r = Doer(Robot())
|
val r = Doer(Robot())
|
||||||
|
|
||||||
println("Put your mouse over the bank...")
|
println("Put your mouse over the bank...")
|
||||||
val chest = r.getPointerLocationAfter(3000L)
|
val chest = r.getPointerLocationAfter(3000L)
|
||||||
println("Put your mouse over the well...")
|
println("Put your mouse over the well...")
|
||||||
@ -34,7 +34,7 @@ object Routines {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun furnaceGrind(volume: Int, step: Int){
|
fun furnaceGrind(volume: Int, step: Int = 28){
|
||||||
val r = Doer(Robot())
|
val r = Doer(Robot())
|
||||||
println("Reset the camera and zoom in")
|
println("Reset the camera and zoom in")
|
||||||
r.sleep(1000)
|
r.sleep(1000)
|
||||||
@ -68,7 +68,7 @@ object Routines {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun supremeOverloadGrind(volume: Int, step: Int){
|
fun supremeOverloadGrind(volume: Int, step: Int = 4){
|
||||||
val r = Doer(Robot())
|
val r = Doer(Robot())
|
||||||
println("Place mouse over chest")
|
println("Place mouse over chest")
|
||||||
val chestPoint = r.getPointerLocationAfter(3000L)
|
val chestPoint = r.getPointerLocationAfter(3000L)
|
||||||
|
|||||||
@ -23,46 +23,41 @@ object Tasks {
|
|||||||
d.mouseMove(chest)
|
d.mouseMove(chest)
|
||||||
d.sleep(100, 0, 100)
|
d.sleep(100, 0, 100)
|
||||||
d.click(InputEvent.BUTTON1_DOWN_MASK)
|
d.click(InputEvent.BUTTON1_DOWN_MASK)
|
||||||
d.sleep(600, 0, 800)
|
d.sleep(800, 100, 500)
|
||||||
d.keypress(KeyEvent.VK_F6)
|
d.keypress(KeyEvent.VK_F6)
|
||||||
d.sleep(600, 0, 800)
|
d.sleep(800, 100, 500)
|
||||||
d.keypress(KeyEvent.VK_EQUALS)
|
d.keypress(KeyEvent.VK_MINUS)
|
||||||
d.sleep(600, 0, 800)
|
d.sleep(800, 0, 500)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun makePotions(d: Doer, chest: Point) {
|
fun makePotions(d: Doer, chest: Point) {
|
||||||
d.mouseMove(d.getAlmostPoint(chest))
|
d.mouseMove(d.getAlmostPoint(chest))
|
||||||
d.click(InputEvent.BUTTON1_DOWN_MASK)
|
d.click(InputEvent.BUTTON1_DOWN_MASK)
|
||||||
d.sleep(Random.nextInt(1300, 1600).toLong())
|
d.sleep(1200, 100, 500)
|
||||||
|
|
||||||
d.keypress(KeyEvent.VK_F6)
|
d.keypress(KeyEvent.VK_F6)
|
||||||
d.sleep(Random.nextInt(1000, 1500).toLong())
|
d.sleep(1200, 100, 500)
|
||||||
|
|
||||||
d.keypress(KeyEvent.VK_EQUALS)
|
d.keypress(KeyEvent.VK_MINUS)
|
||||||
val sleepDur = Random.nextInt(1000, 1500).toLong()
|
d.sleep(1200, 100, 500)
|
||||||
d.sleep(sleepDur)
|
|
||||||
|
|
||||||
d.keypress(KeyEvent.VK_SPACE)
|
d.keypress(KeyEvent.VK_SPACE)
|
||||||
if (sleepDur < 1200) {
|
d.sleep(18600L, 600, 1200)
|
||||||
d.sleep(Random.nextInt(600, 1200).toLong())
|
|
||||||
d.keypress(KeyEvent.VK_SPACE)
|
|
||||||
}
|
|
||||||
d.sleep(17000L, 500, 1000)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun makePotions(d: Doer, chest: Point, well: Point) {
|
fun makePotions(d: Doer, chest: Point, well: Point) {
|
||||||
d.mouseMove(d.getAlmostPoint(chest))
|
d.mouseMove(d.getAlmostPoint(chest))
|
||||||
d.click(InputEvent.BUTTON1_DOWN_MASK)
|
d.click(InputEvent.BUTTON1_DOWN_MASK)
|
||||||
d.sleep(1000, 600, 1000)
|
d.sleep(800, 100, 500)
|
||||||
|
|
||||||
d.keypress(KeyEvent.VK_F6)
|
d.keypress(KeyEvent.VK_F6)
|
||||||
d.sleep(1000, 50, 500)
|
d.sleep(800, 100, 500)
|
||||||
|
|
||||||
d.mouseMove(well)
|
d.mouseMove(well)
|
||||||
d.sleep(100, 0, 50)
|
d.sleep(100, 0, 50)
|
||||||
|
|
||||||
d.click(InputEvent.BUTTON1_DOWN_MASK)
|
d.click(InputEvent.BUTTON1_DOWN_MASK)
|
||||||
d.sleep(1500, 0, 500)
|
d.sleep(800, 100, 500)
|
||||||
|
|
||||||
d.keypress(KeyEvent.VK_SPACE)
|
d.keypress(KeyEvent.VK_SPACE)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user