H&H Groovy bot

Forum for alternative clients, mods & discussions on the same.

Moderator: Phades

foomanchu
Posts: 121
Joined: Wed Jun 29, 2011 6:13 am

Re: H&H Groovy bot

Post by foomanchu »

mvgulik wrote:
foomanchu wrote:kt and the groovy bot from this thread are quite different
what would work for groovy bot (cant remember if i tried it before) will not work for kt, and vice versa)
Bummer.
A "KT-Client Scripting" topic seems not a bad idea in that case.
and there is an example script for kt client that shows how to interact with signposts called buildwindow
heres a line from it for building a cupboard

findWindow('Cupboard')?.findButton("Build")?.click()
Yep. I know. But that's for 'after' creating the built sign.
The problem I'm having is how to get/select the item you like to start building. (so 'before' you actually create the built-sign.)
oh my bad.. misread and thought how to click build button
if you downloaded the clients from this forum, you should have some scripts already in your folder..
check out the cupboard building script

sendAction("bp","cupboard");
Thread.sleep(200);
mapPlace(0,1,1,0);
mvgulik
Posts: 4098
Joined: Fri May 21, 2010 2:29 am

Re: H&H Groovy bot

Post by mvgulik »

foomanchu wrote:oh my bad..
Naa, My question could have been more clear on that point.
if you downloaded the clients from this forum, you should have some scripts already in your folder..
check out the cupboard building script

sendAction("bp","cupboard");
Thread.sleep(200);
mapPlace(0,1,1,0);
Doh. Got it. Thanks. :)

Ps: Found that cupboard script in a large Panda Client download (which I never downloaded, until now.)
foomanchu
Posts: 121
Joined: Wed Jun 29, 2011 6:13 am

Re: H&H Groovy bot

Post by foomanchu »

i noticed in the latter half of this thread, the scripts posted seemed to be for kt and not the groovy originaly posted in this thread, so i figured id post here (kt = import static sys.*, groovy = import haven.ark_bot... among many others)

just wondering,
has anyone gotten crafting to work for the kt client?
i tried it out the other day, and it doesnt quite seem to work out for me
im trying to port as many scripts over to kt as I can (I dislike using 4 different clients but if i have to, i have to.. meh)
any example would be appreciated
thanks
opiemonster
Posts: 16
Joined: Thu Apr 21, 2011 5:16 am

Re: H&H Groovy bot

Post by opiemonster »

hey sry for such a nooby question but do i type the command in area chat?
if not where do i type it
User avatar
ArvinJA
Posts: 1255
Joined: Sun Mar 20, 2011 1:02 pm
Location: Sweden

Re: H&H Groovy bot

Post by ArvinJA »

opiemonster wrote:hey sry for such a nooby question but do i type the command in area chat?
if not where do i type it
If you type ":" (without quotation marks) while not focusing on the chat (basically, click somewhere in the game that is not some text box) tere will be a small prompt to write stuff in.
The low life has lost its appeal
And I'm tired of walking these streets
To a room with its cupboards bare
User avatar
XaoZLo
Posts: 64
Joined: Thu Apr 07, 2011 8:27 pm

Re: H&H Groovy bot

Post by XaoZLo »

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);
}
User avatar
dafels
Posts: 3071
Joined: Sun Nov 14, 2010 7:49 pm
Yahoo Messenger: davis

Re: H&H Groovy bot

Post by dafels »

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);
}

Can you give util.walker?
User avatar
borka
Posts: 9965
Joined: Thu Feb 03, 2011 7:47 pm
Location: World of Sprucecap

Re: H&H Groovy bot

Post by borka »

Afaik not in groovy bot nor arksu...

maybe have a look into kt - scripts\util ;)
Avatar by SacreDoom
Java 8 - manually downloads - good to check for actual versions url here:
viewtopic.php?f=42&t=40331
Remember what the dormouse said: Feed your head Feed your head
Bottest
Posts: 8
Joined: Thu Apr 25, 2013 12:34 pm

Re: H&H Groovy bot

Post by Bottest »

ey im pretty new to this, is there a script to mine straight without a cave in?

Thanx :)
Rador
Posts: 164
Joined: Tue May 18, 2010 2:51 pm

Re: H&H Groovy bot

Post by Rador »

Hey, can you make the paving bot that it automatically chips stones at a nearby sources when out of stone and continues the lay stone?

thanks :)

Return to “The Wizards' Tower”