

valoren
-
Posts
1 -
Joined
-
Last visited
-
Feedback
0%
valoren's Achievements

Newbie (1/10)
0
Reputation
-
Explv,
Being really new to scripting, I threw this together - no errors...
but the execution is off...
It walks from a nearby hunting ground, with a full inv, to the edgeville bank...dumps all loot then hangs trying to walk back.
What I don't understand is that I am using the same walking method:getWalking().walk(BLAH)
it behaves as if the banking position never gets flushed before going to hunting position.Would ya take a look?
It's prolly something stupid.
-Val
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
import java.awt.Graphics2D;
//import org.osbot.rs07.api.map.Area;
import org.osbot.rs07.api.map.Position;
import org.osbot.rs07.api.model.RS2Object;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
@ScriptManifest(author = "Valoren", info = "", logo = "", name = "", version = 0.1)public class BarbFish extends Script{
final Position bankpos = new Position(3094, 3489, 0);
final Position huntpos = new Position(3109, 3432, 0);
public int onLoop() throws InterruptedException {bank();
this.bank.close();
sleep(random(200, 300));hunt();
return 50;
}
public int bank() throws InterruptedException {
getWalking().walk(bankpos);
RS2Object bankBooth = this.objects.closest("Bank booth");
if(bankBooth != null); {
bankBooth.interact("Bank");
while(!this.bank.isOpen());{
sleep(random(10, 15));
}
}
this.bank.depositAll();
return (random(300,700));
}
public int hunt() throws InterruptedException {
getWalking().walk(huntpos);//do stuff
return(random(300,700));
}
public void onStart() {
}
public void onExit() {
}
public void onPaint(Graphics2D g) {
}
}