I kinda need help with a tanning script i wrote, whenever I launch it via OSbot i get a couple of error messages and since im new to this all info and help would be accepted, thanks in advance.
package tanHide;
import java.awt.Graphics;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.api.Bank;
import org.osbot.rs07.api.Inventory;
import org.osbot.rs07.api.map.Area;
import org.osbot.rs07.api.model.NPC;
import org.osbot.rs07.api.model.Player;
import org.osbot.rs07.script.ScriptManifest;
@ScriptManifest(author = "Andrey", info = "Tans hides(osrs_f2p)", logo = "kek", name = "Hide_tanner", version = 0.1)
public class TanHide extends Script {
//executes code
final Area BANK_AREA = new Area(3272,3173,3269,3161);
final Area TAN_AREA = new Area(3270,3189,3277,3194);
final int BANK_BOOTH_ID=396;
final int ELLIS_ID=3231;
public void onStart(){
}
//code executed at end
public void onExit(){
}
Inventory inven = client.getMethods().getInventory();
Player player = client.getMethods().myPlayer();
Bank bank = client.getMethods().getBank();
//code in loop, goes into bank, takes hide, goes to tanner and back
public int onLoop() throws InterruptedException {
//banker interaction
if(inven.isEmptyExcept(995)){
if(BANK_AREA.contains(player)){
NPC banker = npcs.closest(BANK_BOOTH_ID);
if(bank.isOpen()){
bank.withdrawAll(1739);
}else{
if(banker!=null){
if(banker.isVisible()){
banker.interact("Bank");
sleep(random(700,800));
}
}
}
}else{
getLocalWalker().walk(BANK_AREA,true);
}
}else{
//tanner interaction
getLocalWalker().walk(TAN_AREA,true);
NPC ellis = npcs.closest(ELLIS_ID);
NPC banker = npcs.closest(BANK_BOOTH_ID);
if(ellis!=null){
if(ellis.isVisible()){
ellis.interact("Trade");
sleep(random(700,800));
ellis.getMethods().getWidgets().getWidgetContainingText("Hard Leather").interact("All");
getLocalWalker().walk(BANK_AREA,true);
if(banker!=null){
if(banker.isVisible()){
banker.interact("Bank");
sleep(random(700,800));
bank.depositAllExcept(995);
}
}
}
}
}
return 50;
}
//paint
public void onPaint(Graphics g){
}
}