Conversion of scripts to one client?

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

Moderator: Phades

Conversion of scripts to one client?

Postby Shakey » Thu Aug 09, 2012 8:33 am

To keep this thread on topic, the goals of this thread are to:
1. Convert all of the .bot scripts into Groovy for use with Ender
2. Discover a way to make the KT (Ender client) updated and work with scripts
3. Produce, share and fix scripts for all users.

As this thread goes on, a credit list will appear to anyone contributing to this.

The first questions of the project would include:

1. How do we rewrite the .bot scripts to work with Groovy sys?

Changing the sys file protocol differences would be a start, I assume that all scripts can be rewritten if the Void protocols of sys.bot are switched to Class and Static protocls of sys.groovy?

Can anyone with .bot knowledge try to rewrite a simple .bot to .groovy to confirm if this works?

2. I have not checked myself in Arksu to Enders clients, but are the class files different?

Me and Foomanchu are looking for a way to make crafting work in a sequence, but .bot uses different codes to craft items then .Groovy so we have no start coding to base scripts off of ; How is it possible to find out the coding of clicking on the craft button? I assume that is client side?

3. Maybe only Ender could explain this or do this himself, but, What in the class files change when you update the client? Is it possible the class files were rewritten entirely or is something breaking the loading of scripts for instance?
4. How to add scripts into script tab?
All of us would love to know how to do this.
5. To be edited: A lost of all working script actions I have(know of)(Not the bot name):

1. Filling water barrels
2. Brick making
3. Building houses and cupboards
4. Destroying cave ins, and harvesting Cellar stones
5. Making cheese racks
6. Collecting fibres and wheat off ground, determined load by inventory space.
7. Crafting linen, but is a .bot file that we can't seem to convert. Here is script if anyone can figure it out:
Code: Select all
import static sys.*
int CHEST_ID = 0;
int
LOOM_ID = 0;


void main(){
   
   
open_inventory_window();
   
CHEST_ID = input_get_object("select chest, please");
   sleep(400);
   
LOOM_ID = input_get_object("select loom, please");
   sleep(400);
   
   
   
take_fibre_from_chest();
   
   
do_click(LOOM_ID, MOUSE_RIGHT_BUTTON, NO_MOD);
   wait_move();
   
sleep(200);
   
send_action("craft","linencloth");
   
   
wait_craft_window();
   sleep(200);
   
craft(1);
   wait_hourglass();
   
   
put_everything_to_the_chest();
   

}



void take_fibre_from_chest(){
   
do_click(CHEST_ID, MOUSE_RIGHT_BUTTON, NO_MOD);
   
wait_move();
   
   
set_inventory("Inventory");
   
int i = 0;
   
   
set_inventory("Chest");
   
   
while (next_item()){
       
if (is_item_name("flaxfibre")) {
         
if (i < 5){
            
item_click("transfer");
            
sleep(100);
            
i++;
         
}
       
}
   
}

}


void put_everything_to_the_chest(){
   
do_click(CHEST_ID, MOUSE_RIGHT_BUTTON, NO_MOD);
   
wait_move();
   
   

set_inventory("Inventory");
   
   
while (next_item()){
       
item_click("transfer");
       
sleep(100);
   
}

}

 
void wait_craft_window(){
   
int craftReady = 0;
   
do {
      
sleep(100);
      
craftReady = check_craft("Linen Cloth");
   
}
while(craftReady != 1);
 }
 
 
void wait_for_end_of_crafting(){
   
set_inventory("Inventory");
   
int first_amount = get_items_count();
   
int amount = first_amount;
   
reset_inventory();
   
if (amount){
      
do {
         
sleep(1000);
         
reset_inventory();
         
amount = get_items_count();
      
}
while (first_amount == amount);
   
}

 
}
 


8. Put curds into cheese trays
9. Collect dreams
10. Starving/Drink water/ Eating
11. Harvest by selection of tiles and replant by selection of retiles
12. Wine making : Harvest, presses, puts juice in barrel
*would like to figure out how to add by selection of tiles to the farming and replanting after collecting seeds
13. Log cutting from a starting point/Hearth fire or Village
14. Cooking mussels
15. Lighting industry objects
16. Cutting stumps
*IIRC does not store logs
17. Patrolling walls
18. Paving (.Bot script)
19. Dropping all seeds/ Throw away 8 worst (.Bot) / Keep 23 best (.bot)
20. Mining (Straight line and snaking)
21. Transfer leaves
22. Filling troughs/Coops
23. Moving items from chest to cupboard

More to be added.

Credit:
Client creators: Enders, Ken, Arksu
Foomanchu for scripting work
Vigilance wrote:You forgot to make kill a past-tense and precede it with "get"

Vigilance to Waffles

Vigilance wrote:Phaen he's like a little me, except not as sexy right?

Vigilance talking about me
Shakey
 
Posts: 212
Joined: Wed Jan 25, 2012 10:33 pm

Re: Conversion of scripts to one client?

Postby ydex » Thu Aug 09, 2012 3:36 pm

wow, lot's of questions. i know some answers (i think);

1. How do we rewrite the .bot scripts to work with Groovy sys?

Changing the sys file protocol differences would be a start, I assume that all scripts can be rewritten if the Void protocols of sys.bot are switched to Class and Static protocls of sys.groovy?


this asumption is incorrect because groovy and bot atm are using diferent context even in actual commands (most of the commands exists howeveer so ofc u can re-make the scripts, it's just not that easy). so how to do it; spend lot's of work and time.

2. I have not checked myself in Arksu to Enders clients, but are the class files different?
yes they are. the class files are located in haven.jar and in all custom clients these class files are different.

Me and Foomanchu are looking for a way to make crafting work in a sequence, but .bot uses different codes to craft items then .Groovy so we have no start coding to base scripts off of ; How is it possible to find out the coding of clicking on the craft button? I assume that is client side?

this in not client sided but it may not be included in the classfiles of groovy client (haven't looked so idk). if it isn't try to look in the class files ( in haven.jar etc.).

3. Maybe only Ender could explain this or do this himself, but, What in the class files change when you update the client? Is it possible the class files were rewritten entirely or is something breaking the loading of scripts for instance?

when u update to a new ender's version for instance u usally copy pase the haven.jar. this replaces all the class-files that were previously in that jar to those of the update, meaning some are lost and others just replaced. the bot-classes and functions are not in ender's so you will always lose them on such an update.

Therefor;
Therefor you will need a boting client that does not utilize the haven.jar (or other game files) as it's source for storing bot class files. one "client" that does this is the maid-bot. (however that one wasn't complete and/or abandonded iirc?) in order to be able to use the latest enders update with a script engine.

hope some of this answered somethings lol
bold
User avatar
ydex
 
Posts: 747
Joined: Mon Apr 11, 2011 4:08 pm

Re: Conversion of scripts to one client?

Postby ark_su » Sun Sep 09, 2012 5:39 am

you want to do really BIG work....
ark_su
 
Posts: 16
Joined: Mon Nov 15, 2010 5:40 am

Re: Conversion of scripts to one client?

Postby Shakey » Sun Sep 09, 2012 9:19 am

more or less, I just want a scipt that can farm an amount of hemp, then make the cloths and stop. we simply can't get the crafting function to work, that or we can't figure out how to make a script in the arksu format, etc. we just want one client, that has the features of updated enders, BUT, we can't figure out why we can't add those to KT (updates).
Vigilance wrote:You forgot to make kill a past-tense and precede it with "get"

Vigilance to Waffles

Vigilance wrote:Phaen he's like a little me, except not as sexy right?

Vigilance talking about me
Shakey
 
Posts: 212
Joined: Wed Jan 25, 2012 10:33 pm

Re: Conversion of scripts to one client?

Postby ydex » Thu Sep 13, 2012 4:19 pm

Shakey wrote:more or less, I just want a scipt that can farm an amount of hemp, then make the cloths and stop. we simply can't get the crafting function to work, that or we can't figure out how to make a script in the arksu format, etc. we just want one client, that has the features of updated enders, BUT, we can't figure out why we can't add those to KT (updates).


in arksu format u need to open the crafting window manually and leave it open while the script runs as far as i know. should be a script out there that does wheat and then makes flour of the seeds dropped (or might be two scripts). from those u should easily be able to make one script that harvests hemp and instead of picking seeds and clicking quern, picks up fibers and clicks a loom. (if loom is inside u can also add so it clicks the door of the mansion (waypointer to said mansion if needed) checks if inside and if loom (otherwise go upstairs where the loom is) etc.etc.) arksu can do most things.

u'd need the maid-bot up and running to get latest enders tho. i have made some changes to maid and have it somewhat working with current ender's version (had to change the haven.jar for the stamina and/or health checks iirc).
bold
User avatar
ydex
 
Posts: 747
Joined: Mon Apr 11, 2011 4:08 pm

Re: Conversion of scripts to one client?

Postby foomanchu » Tue Sep 18, 2012 5:47 am

arksu can do crafting without presetting what to craft

ie. send_action("craft","linencloth");
craft(#)

problem is.. im spoiled with enders and kt

now only if kt could do gumps like union..... :cry:
foomanchu
 
Posts: 121
Joined: Wed Jun 29, 2011 6:13 am

Re: Conversion of scripts to one client?

Postby Oddity » Tue Sep 18, 2012 11:23 am

What are gumps?
jadamkaz wrote:ah i remember my run in with odditown they are good ppl im sure the only reason they killed ME is because they are troll hunters and i was a troll
User avatar
Oddity
 
Posts: 1979
Joined: Sun Jun 20, 2010 12:04 am
Location: BC, Canadia

Re: Conversion of scripts to one client?

Postby foomanchu » Tue Sep 18, 2012 6:20 pm

graphical user menu pop-up
foomanchu
 
Posts: 121
Joined: Wed Jun 29, 2011 6:13 am


Return to The Wizards' Tower

Who is online

Users browsing this forum: Ahrefs [Bot], Claude [Bot], PetalBot [Bot] and 0 guests