Jump to content

Search the Community

Showing results for tags 'solved'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • OSBot
    • News & Announcements
    • Community Discussion
    • Bot Manager
    • Support Section
    • Mirror Client VIP
    • Script Factory
  • Scripts
    • Official OSBot Scripts
    • Script Factory
    • Unofficial Scripts & Applications
    • Script Requests
  • Market
    • OSBot Official Voucher Shop
    • Currency
    • Accounts
    • Services
    • Other & Membership Codes
    • Disputes
  • Graphics
    • Graphics
  • Archive

Product Groups

  • Premium Scripts
    • Combat & Slayer
    • Money Making
    • Minigames
    • Others
    • Plugins
    • Agility
    • Mining & Smithing
    • Woodcutting & Firemaking
    • Fishing & Cooking
    • Fletching & Crafting
    • Farming & Herblore
    • Magic & Prayer
    • Hunter
    • Thieving
    • Construction
    • Runecrafting
  • Donations
  • OSBot Membership
  • Backup

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


MSN


Website URL


ICQ


Yahoo


Skype


Location:


Interests

Found 7 results

  1. Trying to make my 1st script and having issues identifying an amount of item in my inventory by the ID. I read the API and found the getAmount() method but I cant seem to properly pass it the correct parameters. Ive been able to get it to successfully take the correct item ID (I think) but I cant seem to get it to interact with the correct container. long copperAmount = 0; public long getAmount(int... ids){ return copperAmount; } public final String copperOreAmount(final long ms){ long amt = getAmount(436); return String.format("%02d", amt); } I have code in my onPaint() that prints out the result of copperAmount that looks like this to debug the results g.drawString(copperOreAmount(getAmount()), 300, 300); It will only print out 0 even though I have the item in my inventory and i'm worried that my print statement may be incorrect or that i may be inputting the parameters of getAmount() incorrectly or if my return statement is incorrect or something im missing entirely. ive also tried typing it is Inventory.getAmount() to ensure it was pulling from the inventory container and not just interacting with nothing but it gave me an error about a static method interacting with a non static method but when i made everything static it would just throw the same error.
  2. I'm currently following Explv's tutorials on scripting and was following his paint tutorial and I was having issues when it came to uploading a background image. When i had the code in a normal script no background image would be uploaded but I wouldn't get any errors so to try and trouble shoot i created a script containing only the paint code to try and upload the background image but it wont even register as a script when i export it to the osbot script folder. I would really appreciate if someone can point out what I may be doing wrong. Using Eclipse IDE here's what i wrote: package core; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.io.IOException; import javax.imageio.ImageIO; import org.osbot.rs07.script.Script; public class BackgroundTest extends Script { BufferedImage background; @Override public void onStart() { try { background = ImageIO.read(BackgroundTest.class.getResourceAsStream("/resources/background.png")); } catch(IOException e) { log(e); } } @Override public final int onLoop() throws InterruptedException { // TODO Auto-generated method stub return 0; } public void onPaint(Graphics2D g) { if(background != null) { g.drawImage(background, null, 300, 300); } } }
  3. I'm having trouble running more than two clients at the same time on mirror mode. After my first two clients open, the third has a "unable to create ad" message. How do i fix this? i use proxifier and have more than three proxies. I also followed the guide for setting proxifier but no luck. HELP PLz
  4. Yo i'm trying to organize my script a bit so i have made multiple classes. There is a class for banking with the method doBank and a constructor that takes the item and the bank location. But this is where the problem starts. When i call my constructor and fill in the parameters everything seems to work till he actually calls the method do bank. There bank will always be null and i cant seem to get it to not be null. I have tried a ton of things and when i call the method from the same class everything seems to work. So am i making mistakes in my parameters ? This is the code: This part is in my banking class. Area bankingArea; String itemToWithdraw; public void doBbank() throws InterruptedException { if (bankingArea.contains(myPlayer())) { //here is where the error shows in the logger when i start the script bankking area = null, ive tried doing // if(bankingArea == null) { (log"Bank is null")} but everything still crashes getWalking().webWalk(bankingArea); } else if (!getBank().isOpen()) { getBank().open(); new ConditionalSleep(5000, 500) { @Override public boolean condition() throws InterruptedException { return getBank().isOpen(); } }.sleep(); } else if (!getInventory().isEmpty()) { getBank().depositAll(); } if (getBank().contains(itemToWithdraw) && !getInventory().contains(itemToWithdraw)) { getBank().withdraw(itemToWithdraw, 1); } else { log("bank does not contain " + itemToWithdraw + " Ending script."); stop(false); //stopping script } } public Banking(String itemToWithdraw, Area bankingArea) { this.itemToWithdraw = itemToWithdraw; this.bankingArea = bankingArea; } } i have tried passing multiple parameters for the bank but nothing seems to work. This is in my mining script. Banking banking = new Banking(pickaxe,faladorEastBank); if (!getInventory().contains(pickaxe)){ banking.doBbank(); } //here is the error I had a method in my mining class which is as good as the same as the one in my banking class and that works fine. But i wane use my banking class for multiple scripts so id like to figure out how to get it to work. Any help is appreciated.
  5. My timer is resetting after 5 seconds, and I'm not sure why. private long startTime; public void onStart() { startTime = System.currentTimeMillis(); } public final String formatTime(final long ms) { long s = ms / 1000, m = s / 60, h = m / 60; s %= 6; m %= 60; h %= 24; return String.format("%02d:%02d:%02d", h, m, s); } public void onPaint(Graphics2D g) { long runTime = System.currentTimeMillis() - startTime; g.drawString("Run Time :" + formatTime(runTime), 10, 290); } I put all the important bits down.
  6. Hi everyone, sorry for the noob question. But I'm simply trying to get other classes to work from the main class. I can't figure out what I'm doing wrong.. Once the code runs it thows an error when trying to send a log in the Tester class. Main: public Tester g = new Tester(); public String stateT; @Override public void onStart() { log("test1"); } private enum State { TEST, WAIT }; private State getState() { if (1 == 1) return State.TEST; return State.WAIT; } @Override public int onLoop() throws InterruptedException { switch (getState()) { case TEST: log("test2"); g.logTest(); case WAIT: break; } return random(200, 300); } @Override public void onExit() { log(""); } @Override public void onPaint(Graphics2D g) { } } Tester Class: public class Tester { private MethodProvider ggg; public Tester(MethodProvider ggg) { this.ggg = ggg; } public Tester() { } public void logTest() { ggg.log("test222222222222"); NPC rGuide = ggg.npcs.closest("RuneScape Guide"); ggg.log(rGuide); } } Thanks in advance for any help!
  7. Hi I can't seem to get walking.walk to move exactly one tile like I want it to. I can't find any other posts on this, so sorry for the nooby question(??). It seems to work just fine when moving 4+ tiles Thanks in advance for the help! Position oneTile = new Position((myPlayer().getX() + 1), myPlayer().getY(), myPlayer().getZ()); walking.walk(oneTile);
×
×
  • Create New...