Moderator: Phades
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?
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?
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.
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();
bucket = maid.getItems(inv, "bucket-water");
Users browsing this forum: Claude [Bot] and 0 guests