So i'm trying to test this script. And it won't load. Doesn't show anything in the logger either. Any suggestions? Thanks!
import org.osbot.rs07.api.map.Area;
import org.osbot.rs07.api.model.Player;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import java.awt.*;
@ScriptManifest(author = "Chambo", name = "Chambo's SMC", version = 1, logo = "")
public class main extends Script {
public long pCash = inventory.getAmount(995);
public long tradeCash = pCash - 300000;
public Area veBank = new Area(3250, 3420, 3257, 3423);
@[member=Override]
public void onStart() {
log("Welcome to Chambo's SMC!");
}
private enum State {
TRADE, WAIT, WALK
};
private State getState() {
Player m = getPlayers().closest("username");
if (m != null && veBank.contains(myPlayer()))
return State.TRADE;
if (m == null && veBank.contains(myPlayer()))
return State.WAIT;
if (!veBank.contains(myPlayer()))
return State.WALK;
return null;
}
@[member=Override]
public int onLoop() throws InterruptedException {
switch (getState()) {
case TRADE:
Player m = getPlayers().closest("username");
if(inventory.contains(995) && pCash >= 300001){
if (m != null) {
m.interact("Trade");
sleep(random(4980, 5632));
if(trade.isCurrentlyTrading() == true){
if (trade.getOtherPlayer() == "username"){
//do the trade
trade.offer(995, (int) tradeCash); //if this doesn't work then use trade.offerAll(995) then put trade.remove(995, 300000)
trade.acceptTrade();
log("1st trade window accepted!");
sleep(random(500, 700));
trade.acceptTrade();
log("2nd trade window accepted!");
} else {
trade.declineTrade();
}
} else {
sleep(random(10280, 16024));
}
}
}
break;
case WAIT:
sleep(random(1213, 3611));
//add more stuff here for anti-ban (click stats, move camera, etc)
break;
case WALK:
sleep(random(500, 700));
//walk to Varrock East Bank
settings.setRunning(true);
walking.webWalk(veBank);
break;
}
return random(200, 300);
}
@[member=Override]
public void onExit() {
log("Thanks for using Chambo's SMC!");
}
@[member=Override]
public void onPaint(Graphics2D g) {
}
}