Sooo anyway, a kid on a Minecraft forum wanted a macro to sell all the enderpearls from a chest at a shop that uses Essentials sign eco. I came up with this:
Code: Select all
#IfWinActive, Minecraft
DebugMode := 1
SingleOrDouble := 2
StartX := 830
StartY := 410
PurchaseClicks := 16
ChestHome := "spawner"
ShopHome := "shop"
CurrentX := 0
CurrentY := 0
TotalLoops := SingleOrDouble * 27
if (SingleOrDouble = 2) {
StartX := StartX - 10
StartY := StartY - 52
}
^o::ExitApp
^r::
Loop, %TotalLoops% {
if (CurrentX = 9) {
CurrentX = 0
CurrentY++
}
ChestX := StartX + (CurrentX * 36)
ChestY := StartY + (CurrentY * 36)
if (DebugMode = 0 or (DebugMode = 1 AND CurrentX = 0 AND CurrentY = 0)) {
send, T
sleep 150
send, /home %ChestHome%{enter}
sleep 500
MouseClick, right
sleep 400
}
MouseMove ChestX, ChestY
if (DebugMode = 0) {
msgbox "debug off"
sleep 50
send, {shift down}
sleep 100
MouseClick, left
sleep 100
send, {shift up}
sleep 100
send, {escape}
sleep 400
send, T
sleep 150
send, /home %ShopHome%{enter}
sleep 500
Loop, %PurchaseClicks% {
MouseClick, right
sleep 350
}
} else {
sleep 100
}
CurrentX++
}
return