Jump to content

MightySir2

Members
  • Posts

    10
  • Joined

  • Last visited

  • Feedback

    0%

Profile Information

  • Gender
    Male

Recent Profile Visitors

876 profile views

MightySir2's Achievements

Newbie

Newbie (1/10)

0

Reputation

  1. THANK YOOOUUUU!!!111!!!!1!!!
  2. i have a script for tanning, but when character trades with NPC there is huge(5 sec) delay in which the character doesnt tan hides : any help would be appreciated conditions: if (inventory.isEmptyExcept(995)) //just withdraws hides to initiate script return State.BANK; if(inventory.contains(1743)&&bank.isOpen()) //if there is tanned hides and bank is open it deposits them/ withdraws untanned hides return State.BANKB; if(inventory.contains(1743)) //returns to bank from tanner to open it return State.BACK; if(ellis!=null&&inventory.contains(1739)) //tans hides when at tanner return State.TAN; if(inventory.contains(1739)) //goes to tanner from bank return State.WALK; tan action: case TAN: NPC ellis = npcs.closest("Ellis"); ellis.interact("Trade"); sleep(random(10, 15)); getWidgets().getWidgetContainingText("Hard leather").interact("Tan All"); sleep(random(50, 200)); break;
  3. Takes bot a while to withdraw items and closes windows without withdrawing. Any solutions? if (inventory.isEmptyExcept(995)) return State.BANK; case BANK: NPC banker = npcs.closest("Banker"); banker.interact("Bank"); sleep(random(500, 700)); bank.withdrawAll(1739); break;
  4. another question, , how do i go about interacting(al kharid ellis tanner in my case) a widget? and finally how do improve my walking and interacting code to prevent ban?
  5. Thanks, I realized what I did wrong, anyways I started a new script from scratch using state/enum, and everything is functional so far.
  6. Oh yeah another thing, it tells me Failed to start script [insertscripthere] regardless of what i execute
  7. 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").in teract("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){ } } Would this help?
  8. 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){ } }
×
×
  • Create New...