Jump to content

Botre

Members
  • Posts

    5883
  • Joined

  • Last visited

  • Days Won

    18
  • Feedback

    100%

Everything posted by Botre

  1. Catch the wind and run after a shade. Then beat some loser up. Then catch the wind and run after a shade some more.
  2. Remove all scripts from the Scripts folder. Recompile. Open OSBot. Refresh scripts.
  3. If you use code tags and / or pastebin you'll greatly increase the odds of getting your question answered. Most of us aren't hieroglyph experts.
  4. players.inventory.contains() is not "wrong" at least it's not what's causing the compilation error. players is an instance of Players which is a subclass of MethodProvider. You can use players to access MethodProvider fields. inventory is a MethodProvider field. Therefore players.inventory is valid. @OP: What do you mean with "trouble compiling" ? I copy pasted the code in my IDE and had no trouble compiling it. Please provide a screenshot of your error.
  5. Nope. Mine is still faster, less expensive and safer. Thank you for playing, please try again!
  6. Optional<Item> glory = Arrays.stream(getBank().getItems()).filter(i -> i.getName().startsWith("Amulet of glory")).findFirst(); FTFY.
  7. Legendary script. Such gains much xp. Numero Uno.
  8. SF: make selecting things like widget much less painful. RSP: smooth resizing and editing of bounds of objects.
  9. I'd be that alpha male who beats you up every day.
  10. Class: package temp; import java.awt.BasicStroke; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.Observable; import javax.swing.Timer; public class MarchingAnts extends Observable { private BasicStroke stroke; private float dashPhase = 0f; private float dash[] = {5.0f,5.0f}; private ActionListener listener = new ActionListener() { @Override public void actionPerformed(ActionEvent ae) { dashPhase += 9.0f; stroke = new BasicStroke(1.5f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER, 1.5f, dash, dashPhase); setChanged(); notifyObservers(); } }; public MarchingAnts() { stroke = new BasicStroke(1.5f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER, 1.5f, dash, dashPhase); } private Timer timer = new Timer(40, listener); public BasicStroke getStroke() { return stroke; } public void startAnimation() { timer.start(); } public void stopAnimation() { timer.stop(); } } Example: //Declare private MarchingAnts ants = new MarchingAnts(); ... //Start animation ants.startAnimation(); ... //Add observers ants.addObserver((obj, obs) -> repaint()); //repaint() method from a painting component ... //Use stroke g2d.setStroke(ants.getStroke());
  11. Already had most of them on my special todo list Except these Optional snapping? (i.e when drawing a rectangle, it would snap to the various lines on the screen eg edge of chatbox. This could be optional tho A feature in the menu system which would allow you to import a rectangle which is the exact size of chatbox, in the exact correct position (and/or equivalent for inventory, map, mainscreen etc). Noice brachocho!
  12. Currently trying to make the selection and editing of existing objects as fluid as possible. I'm trying to mimic this behavior (currently creation requires re-clicking the tool button which is a pain in the ass)
  13. Indent your code blocks with 4 spaces. Two blank lines between top-level definitions, one blank line between method definitions.
  14. I don't like declaring multiple variables on the same line. It tires the eye imo. Because of completion OCD I occasionally will use a "this" where it's not necessary, or sometimes I'll just do it to improve readability. I will sometimes prefer snake_case over headlessCamelCase when the latter looks awkward. But yeah. Conventions.
  15. At first I was going to fix Easel, make it a bit more user friendly and more intuitive, add some undo functionality and stuff like that. But then I decompiled the source and it gave me full blow monkey aids. So I decided to rewrite the idea from scratch.
×
×
  • Create New...