Jump to content

Botre

Members
  • Posts

    5883
  • Joined

  • Last visited

  • Days Won

    18
  • Feedback

    100%

Everything posted by Botre

  1. .... The problem we're facing here is statements like In Java, Objects are passed by reference, and primitives are passed by value. This is half incorrect. Everyone can easily agree that primitives are passed by value; there's no such thing in Java as a pointer/reference to a primitive. However, Objects are not passed by reference. A correct statement would be Object references are passed by value. This may seem like splitting hairs, bit it is far from it. There is a world of difference in meaning. The following examples should help make the distinction. ... Interesting article: http://javadude.com/articles/passbyvalue.htm
  2. struct GUI { int valueA; int valueB; }; int main() // Your script { struct GUI MyGUI; // > Load GUI and set values here < int valueA = MyGUI.valueA; int valueB = MyGUI.valueB; return 0; } Think of a class as a struct with more functionality (crude definition but might help you).
  3. http://www.programmingsimplified.com/java/source-code/java-program-multiple-classes
  4. Fair enough. Still, the firemaking one was explosive.
  5. Laughter is my way of dealing with sadness. Funerals are awkward for me. Edit of the edit: Edit: edited by the edit of the edit
  6. We scripters have debates almost on a daily basis in our private section, sometimes with polls and stuff like that. The thing is, this is not a democracy AT ALL, we have no say AT ALL, and there's pretty much nothing we can do in order to obtain what the majority of us wants. Polls get closed down or ignored, favoritism reigns, threads get locked, the people in charge just won't listen to us let alone join the debate'. I guess we could go on a strike, but I don't see that happening AT ALL either.
  7. If you make it a store buyer and sell would that bypass the rule ?
  8. Acquire the right ones for you ASAP (regular / efficient / personalized).
  9. Be very careful. If you didn't acquire any study habits (or even the proper tools to study efficiently at all) or school discipline you're in for trouble. Go talk with someone at your school asap
  10. (Not written in an IDE, whatever) /* Global variables. */ private Optional<Entity> stall = Optional.empty(); private Position position = new Position(0, 0, 0); // Set this to the position of your stall. private Predicate<Entity> predicate = p -> p != null && p.exists() && p.getName().equals("Silk stall") && p.getPosition().equals(position); private Comparator<Entity> comparator = new Comparator<Entity>() { @Override public int compare(Entity a, Entity b) { return bs.getMap().distance(a.getPosition()) - bs.getMap().distance(b.getPosition()); } } /* Loop. */ @Override public int onLoop() { if(!stall.isPresent() || !predicate.test(stall.get()) { stall = getObjects().getAll().stream().filter(predicate).min(comparator); } else { stall.get().interact("Steal-from"); } return 1337; }
  11. You are passing an array to a method that only takes a String parameter. Possible solution: for(String f; food) { if(!getBank().contains(f)) continue; else { getBank().withdrawAll(f); break; } }
  12. Call an ambulance you might be suffering an attack of extreme retardation.
  13. I really really like this tbh, I would probably prefer G2D buttons instead of the regular Swing ones (they look so 90s...), but I'm deffo going to give it a thorough look-through when I get some time ;)
  14. Looks neato. However... Alpha-based animations Don't go there. Your CPU will thank me.
  15. Botre

    POH Locations

    Java won't ever remove primitives. Objects waste space, primitives don't, easy as that x) But at this level it probably doesn't matter.
  16. Botre

    POH Locations

    You can use lambdas with the Filter class. Filter<RS2Object> lambda = o -> o != null && o.exists(); Filtering a Stream with a Predicate is more efficient than using a Filter on a List, hence the ew. Lambdas are just a matter of reducing verbosity :p Also, why are you boxing the ints ? Oo
  17. Botre

    POH Locations

    The Filter interface? ew.
  18. Dang that account still alive ? Going strong much
  19. Botre

    NEED YO HELP!

    "No lootski from otherskis brochachos, mucho sorry :s"
  20. Tony Soprano and Neil deGrasse Tyson are my friends shutup I can't even get started without the potential risk of opening something kinky "by accident". Downloading porn just ruins the whole experience. (I had to remove a lot of :doge:s sorry ) I wouldn't ever judge you for dressing up as @Mysteryy.
×
×
  • Create New...