Jump to content

vladbuff

Members
  • Posts

    13
  • Joined

  • Last visited

  • Feedback

    0%

Profile Information

  • Gender
    Male

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

vladbuff's Achievements

Newbie

Newbie (1/10)

1

Reputation

  1. realized i was being an idiot and just not using it correctly looked through other threads in this section
  2. 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.
  3. I AM AN IDIOT THANK YOU I appreciate you letting me figure it out a bit it has been solved
  4. alright so i commented out the old BufferedImage code and implemented this into my onstart method but it doesnt let me use the value of image in my onPaint method am i putting everything into the right spot of my code or do i need to change the typing on my onStart or onPaint from void to something else? package core; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; @ScriptManifest(name = "BackgroundTest", author = "VladBuff", info = "", version = 0.1, logo = "") public class BackgroundTest extends Script { //BufferedImage background; public static File imageFile = new File(System.getProperty("user.home") + File.separator + "OSBot" + File.separator + "Data" + File.separator + "background.png"); @Override public void onStart() { try { BufferedImage image = ImageIO.read(imageFile); } catch (IOException e) { e.printStackTrace(); } /* 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(image != null) { g.drawImage(image, null, 0, 0); } } }
  5. changing the x coords didnt seem to affect the outcome there isnt an image printing and i do have the same background.png saved in osbot/data/ unfortunately i might just try changing the image im trying to use as as a background image and see if that helps
  6. https://gyazo.com/6fa217daea890867e9591e369da18e31 this is a screenshot of where the resources folder is located and the image inside of it if that's relevant, i also looked at another thread with a seemingly similar problem where the solution was to verify that the image is getting exported correctly which it is will try that now!
  7. okay that's huge i can actually launch the script now but it still doesn't draw an imagine onto the screen is there something else I need to do to actually get a background image to show up?
  8. found another work around so I no longer have to try and make it work with the jagex launcher but when thats no longer an option I appreciate the info nonetheless
  9. 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); } } }
  10. What version of OSBot do you use? v2.7.11 What JAVA version do you use? jdk 8 Which plan do you use? VIP/Monthly/Lifetime VIP Are you launching trough CLI or GUI? GUI Can you send a screenshot of the menu you are having issues in and the logger output whenever possible. (Cover your credentials) not sure how to open logger and i can send a screenshot if necessary Describe the issue status staying at passive even after my pc clock has passed the schedule time bot never launches What are the steps - and in what order - to replicate the issue? (Adding account -> adding proxy etc) I created a new schedule for the same day and added a task to the scheduled time then added that schedule to a bot and started it a few hours before the schedule time. once the time passed the status would just stay at passive and the bot wont ever launch
  11. When trying to log into the jagex launcher with a proxy on it often never opens other than in the system tray and if i double click to expand from the systems tray its just a white screen. wondering how other people have gotten past this and are able to use the launcher with a proxy on.
×
×
  • Create New...