i dont even know if your joking around or serious.
Code:
import org.osbot.script.Script;
import org.osbot.script.ScriptManifest;
import org.osbot.script.rs2.utility.Area;
@ScriptManifest(name = "", author = "", version = 1D, info="")
public class hi extends Script {
//your variable
//bankArea
//tree area
//tree ints
//anything else you need
enum State {
CutTree, WalkToBank, Bank;
}
private State state;
public static Area bankArea = new Area(0, 0, 0, 0);//add your area with in here
public static Area treeArea = new Area(0, 0, 0, 0);// add your area here
public void onStart(){
if (client.getInventory().isFull()){
state = State.WalkToBank;
}
else if (myPlayer().isInArea(treeArea)){
state = State.CutTree;
}
}
public int onLoop() throws InterruptedException{
switch (state){
case CutTree:
return first();
case WalkToBank:
return second();
case Bank:
return third();
}
return random(10, 20);
}
int first() throws InterruptedException {
if (myPlayer().isInArea(treeArea)) {
//Cut trees
//and any other code you want to put here
}
return 500;
}
int second() throws InterruptedException{
if (client.getInventory().isFull()){
if (!myPlayer().isInArea(bankArea)){
walk(bankArea);
}
else if (myPlayer().isInArea(bankArea)){
//interact with bank and so on
}
else if (client.getBank().isOpen()){
state = State.Bank;
}
}
return 200 + random(100,500);
}
int third() throws InterruptedException{
if (client.getBank().isOpen() && client.getInventory().isFull()){
//deposit all or what ever
}
else if (client.getBank().isOpen() && !client.getInventory().isFull()){
// close bank and do what ever you want.
}
else if (!client.getBank().isOpen() && client.getInventory().isFull()){
state = State.WalkToBank;
}
return 100;
}
}