Anemone Client

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

Moderator: Phades

Re: Anemone Client

Postby lolpokemon123321 » Sun May 11, 2014 2:16 pm

i cant seem to find the run.bat file anywhere and when i try to run the haven-res nothing pops up, can you help me?
lolpokemon123321
 
Posts: 15
Joined: Tue Jan 10, 2012 9:50 pm

Re: Anemone Client

Postby vatas » Sun May 11, 2014 4:04 pm

lolpokemon123321 wrote:i cant seem to find the run.bat file anywhere and when i try to run the haven-res nothing pops up, can you help me?

You need to open file called "maid" altough I ran into problem that I get "Connection refused: connect" when trying to log in.

Edit: realised I need BAT file but can't make it work, I think I got java part working but how does it know where maid.jar is? Do I need to put its file loacation there too?

Edit2: I was complete moron, BAT file needs to be in the anemone client folder. I was trying to edit old Enders BAT from shortcut, thought it wouldnt matter where file was.
Haven and Hearth Wiki (Maintained by volunteers - test/verify when practical. Forum thread

Basic Claim Safety (And what you’re doing wrong
TL:;DR: Build a Palisade with only Visitor gates.)

Combat Guide (Overview, PVE, PVP) (Includes how to escape/minimize risk of getting killed.)
User avatar
vatas
 
Posts: 4903
Joined: Fri Apr 05, 2013 8:34 am
Location: Suomi Finland Perkele

Re: Anemone Client

Postby ado » Fri May 30, 2014 9:26 am

hi all

is there any way to pass parameter to called script

e.g. :bot farm carrots or bot farm wine and in farm.groovy script use that parameter?

cause now I made for each plant separate script, and maid diff (apart from picking byproducts) is name of the plant.
There is should be more elegant way instead of creating same 10+ scripts

thanks
ado
 
Posts: 19
Joined: Mon Jul 18, 2011 9:52 am

Re: Anemone Client

Postby romovs » Fri May 30, 2014 11:01 am

ado wrote:hi all
is there any way to pass parameter to called script
e.g. :bot farm carrots or bot farm wine and in farm.groovy script use that parameter?

Yup use this.args.
this.args[0] should contain "carrots" if you execute it like that.
User avatar
romovs
 
Posts: 1472
Joined: Sun Sep 29, 2013 9:26 am
Location: The Tabouret

Re: Anemone Client

Postby ado » Fri May 30, 2014 11:13 am

romovs wrote:
ado wrote:hi all
is there any way to pass parameter to called script
e.g. :bot farm carrots or bot farm wine and in farm.groovy script use that parameter?

Yup use this.args.
this.args[0] should contain "carrots" if you execute it like that.


cool, thanks a lot!
ado
 
Posts: 19
Joined: Mon Jul 18, 2011 9:52 am

Re: Anemone Client

Postby romovs » Sun Jun 01, 2014 3:53 pm

Bug fix update.

- Fixed auto-drinker stopping working occasionally.
- Fixed up/down keys not switching the opponent when combat action is in queue.
- Fixed rare crash in log-in screen.
User avatar
romovs
 
Posts: 1472
Joined: Sun Sep 29, 2013 9:26 am
Location: The Tabouret

Re: Anemone Client

Postby dafels » Fri Jun 06, 2014 10:23 am

Hi, I made this script

Code: Select all
import java.util.*;
import haven.*;


ui = MaidFrame.getCurrentSession().getUI();

void drinkWater(Inventory inv) {
   bucket = maid.getItems(inv, "bucket");


   flask = maid.getItems(inv, "waterflask");
   if(flask.size() == 0) {
      flask = maid.getItems(inv, "waterskin");
   }
      coord = maid.getCoord(bucket[0]);
      maid.doTake(bucket[0]);
      maid.waitForGrab();
      maid.doInteract(flask[0], 0);
      Thread.sleep(500);
      maid.doDrop(bucket[0], inv, coord);
      maid.waitForRelease();
      
      /*maid.doInteract(flask[0]);
      menu = maid.waitForFlowerMenu(1000);
      if(menu != null) {
         maid.doSelect(menu, "Drink");
         maid.waitForTask();
         Thread.sleep(3000);
      }   */
}

void main() {
   Inv = maid.getInventory();
   drinkWater(Inv);
}

main();



It picks a bucket and refills the waterflask OK. But there's a problem if you have multiple buckets and some of them are empty, it will try to refill the waterflask with the empty bucket. How can I add a check that will check if the bucket is empty, if the bucket is empty move to the next bucket in the inventory and check if the next bucket is empty, etc...
Also how can I check if the bucket has WATER in it, because it can pick a wine bucket for example.
User avatar
dafels
 
Posts: 3006
Joined: Sun Nov 14, 2010 7:49 pm

Re: Anemone Client

Postby Lordtimo » Fri Jun 06, 2014 11:09 am

Im not sure because i only coded with union engine yet, but over there its "buckete" for an empty bucket "bucket-water" for a water bucket and "bucket-wine" for a wine bucket, so you should change the line of your code into:

Code: Select all
bucket = maid.getItems(inv, "bucket-water");
User avatar
Lordtimo
 
Posts: 437
Joined: Wed Jun 01, 2011 12:00 pm

Re: Anemone Client

Postby dafels » Fri Jun 06, 2014 12:37 pm

Thanks for the idea, but bucket-water doesn't seem to exist, that would fix all the problems tho.
Maybe it has a different name?
User avatar
dafels
 
Posts: 3006
Joined: Sun Nov 14, 2010 7:49 pm

Re: Anemone Client

Postby Lordtimo » Fri Jun 06, 2014 12:54 pm

Yea propably, there is an autodrinker in this client if i remember correctly, maybe you can look into the client code to find out what you did wrong :)
User avatar
Lordtimo
 
Posts: 437
Joined: Wed Jun 01, 2011 12:00 pm

PreviousNext

Return to The Wizards' Tower

Who is online

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