Jump to content

HeyImJamie

Lifetime Sponsor
  • Posts

    1096
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by HeyImJamie

  1. Wat? public class Vars { private Vars() {} private static final Vars VARS = new Vars(); public static Vars get() { return VARS; } public String status; public int boneCount, deathCount; } Can then just call Vars.get().status and the instance is individual, while still having all my Variables are stored in one location. Constants are kept static like you said though.
  2. I create a Singleton class for my Variables and reset them on script start.
  3. A lot of what you're likely trying to do is already done for you with the OSBot API: https://osbot.org/api/ Have a look through that, and take a look at the script tutorials provided. Explv's is a good one, found here: Hope this helps!
  4. Tell me? I'll code it. @OP, I hand completed a tut account yesterday and as soon as I started up a bot it was banned. Crazy stuff.
  5. I'd be impressed without the daylight saving.
  6. I don't think RHR is the best way to determine your fitness level. There's multiple factors that go into it, one of which could be disease.
  7. If webwalking works there, yes. In regards to your second question, I can't remember if osbot has an isInBank method but if it doesn't, why would you need to check the area. Just check a bank object like a booth or a banker exists.
  8. HeyImJamie

    PAINT SHOP

    It'd help if you posted your discord.
  9. My bad, I didn't see the edit. Happy scripting!
  10. It's neat, I had a personal 'price grabber' already but it didn't use JSON, so if I had too many requests it'd struggle.
  11. String itemName = i.getName(); if (itemName != null){ wornItems.add(itemName); } If you can't figure out how to implement a null check though having an equipment handler seems a little out of your depth for now.
  12. Probably need to null check getName(), show me what line 113 is and I'll tell you
  13. private ArrayList<String> wornItems = new ArrayList<>(); private void grabEquipment() { Item[] items = getEquipment().getItems(); // Grabs our equipment for (Item i : items) { // for each item in the items array, loop wornItems.add(i.getName()); // add the item to the array log("Equipment Item Added: " + i.getName()); } } It's been a while since I've used the OSBot API, but this should do. Just put the grabEquipment() method in your onStart and store your wornItems as a variable somewhere.
  14. You could've literally googled an answer and found the solution within the time it would've taken you to create this thread. For that reason, I don't see the need to spoon feed you the snippet. I will give you a hint though, Java has a Date class.
  15. Looking for a Script Paint as well as 5 simple images w/ text that I can implement into my GUI. Looking for these ASAP so HMU if you can do! My discord is: HeyImLit#3244
  16. Grab your equipment when you start the script and then cache it so you can check it later. Then in your loop, you can check if that equipment is equipped and if it's not, assume you're dead and handle regearing.
  17. Bans happen bro, just test away. The thought of waiting 30 minutes to test every minor part of a script kills me.
  18. There was a Config previously that allowed you to check whether or not your account was a Member, so I expect it was reliant on that. That has since been removed.
  19. It's clear that the method you've posted returns an Integer, so you'd check getCurrentDrinkLevel() > 100. The fact you can't figure that out though suggests to me you need to go and read up a little bit more on basic variables / methods.
  20. Wut the Feck you find MouseDestination and ClickMouseEvent but not Widgets?
  21. Or it could just be, as Alek said, Java is an imperative language. https://i.gyazo.com/d1e24e70af533c4c49b3ad8dc04d1131.mp4
×
×
  • Create New...