Hello everyone!
I want to ask you to give \ do, bot which itself lay stone on at the desired place
Thanks in advance
P.S: bot for KT\Union\ArkSu
XaoZLo wrote:loled2 wrote:Anyone knows a working paving bot?
idk if someone already posted it
- Code: Select all
import static sys.*
import static drunkard.*
import util.Walker
def area = selectArea("Select area to pave.")
if (area == null)
return;
def walker = new Walker()
walker.setAdvanceAction(this.&mine)
walker.walk(area)
boolean mine(Position nexttile) {
if (getCursor() != "dig") {
sendAction("laystone")
waitCursor("dig")
}
while (getTileType(nexttile) == TileType.VOID) {
mapAbsClick(nexttile.x, nexttile.y, 1, 0)
waitHourglass()
}
waitHourglass()
return true
}
Need to add 'Chip Stone' and the return to home position
Script on arksu:
- Code: Select all
#include <sys>
int myx;
int myy;
int initialx;
int initialy;
int numb = 33; // ширина дороги : road width
int nextx = 1;
int nexty = 0;
int iterator = 0;
int column=0;
int have_stones() {
if (set_inventory("Inventory")) {
while (next_item()) {
if (is_item_name("stone")) {
return 1;
}
}
}
return 0;
}
void chip_stones(){
if(!have_inventory("Inventory")) open_inventory();
while(!have_inventory("Inventory")) sleep(100);
set_inventory("Inventory");
do_click(find_object_by_name("bumlings/02",25),3,0) || ("bumlings/03",25),3,0) || ("bumlings/stal2",25),3,0) || ("bumlings/stal3",25),3,0);
wait_context_menu();
select_context_menu("Chip stone");
wait_hourglass();
drop();
map_abs_click(myx, myy, 1, 0);
wait_move();
}
void main() {
{
if (Stamina < 40)
drink_staminaou();
}
myx = my_coord_x();
myy = my_coord_y();
initialx = myx;
initialy = myy;
while (1) {
if(!have_stones()) {
myx = my_coord_x();
myy = my_coord_y();
chip_stones();
}
iterator=iterator+1;
{
if (Stamina < 40)
drink_staminaou();
}
send_action("laystone");
wait_dig_cursor();
while(have_stones() == 1){
map_click(nextx,nexty,1,0);
wait_hourglass();
if(numb <= iterator) {
initialy = initialy+11;
map_click(0,0,3,0);
{
if (Stamina < 40)
drink_staminaou();
}
map_abs_click(initialx,initialy,1,0)
wait_move();
send_action("laystone");
iterator=0;
}
iterator++;
{
if (Stamina < 40)
drink_staminaou();
}
}
map_click(0,0,3,0);
{
if (Stamina < 40)
drink_staminaou();
}
}
}
void drink_staminaou()
{
int bucket_x;
int bucket_y;
if(!have_inventory("Inventory")) open_inventory();
while(!have_inventory("Inventory")) sleep(100);
set_inventory("Inventory");
// проверяем стамину
if (Stamina > 40) return 0;
// если мой инвентарь открыт
if (set_inventory("Inventory"))
{
// ищем ведро с водой
while (next_item())
{
if (is_item_name("bucket-water"))
{
bucket_x = item_coord_x();
bucket_y = item_coord_y();
item_click("take");
wait_drag();
reset_inventory();
while (next_item())
{
if (is_item_name("waterskin"))
{
item_click("itemact");
sleep(1000);
item_drop(bucket_x,bucket_y);
wait_drop();
}
}
}
}
reset_inventory();
while (next_item())
{
if (is_item_name("waterskin"))
{
item_click("iact");
wait_context_menu();
select_context_menu("Drink");
wait_hourglass();
break;
}
}
}
sleep(200);
}
Fringe wrote:-snip- P.S: bot for KT\Union\ArkSu
Users browsing this forum: Ahrefs [Bot], Amazon [Bot], Claude [Bot] and 2 guests