Anemone Client

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

Moderator: Phades

lolpokemon123321
Posts: 15
Joined: Tue Jan 10, 2012 9:50 pm

Re: Anemone Client

Post by lolpokemon123321 »

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?
User avatar
vatas
Posts: 5250
Joined: Fri Apr 05, 2013 8:34 am
Location: Suomi Finland Perkele

Re: Anemone Client

Post by vatas »

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.)
ado
Posts: 19
Joined: Mon Jul 18, 2011 9:52 am

Re: Anemone Client

Post by ado »

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
User avatar
romovs
Posts: 1472
Joined: Sun Sep 29, 2013 9:26 am
Location: The Tabouret

Re: Anemone Client

Post by romovs »

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.
ado
Posts: 19
Joined: Mon Jul 18, 2011 9:52 am

Re: Anemone Client

Post by ado »

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!
User avatar
romovs
Posts: 1472
Joined: Sun Sep 29, 2013 9:26 am
Location: The Tabouret

Re: Anemone Client

Post by romovs »

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

Re: Anemone Client

Post by dafels »

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
Lordtimo
Posts: 437
Joined: Wed Jun 01, 2011 12:00 pm

Re: Anemone Client

Post by Lordtimo »

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

Re: Anemone Client

Post by dafels »

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
Lordtimo
Posts: 437
Joined: Wed Jun 01, 2011 12:00 pm

Re: Anemone Client

Post by Lordtimo »

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 :)

Return to “The Wizards' Tower”