Jump to content

dreameo

Scripter II
  • Posts

    410
  • Joined

  • Last visited

  • Days Won

    2
  • Feedback

    100%

Everything posted by dreameo

  1. For furnace, you would want to cond sleep when widget are null or no longer visible. You want to interact with furnace if you been idle for x seconds private boolean idleFor(int millis){ if(myPlayer().isAnimating()) { timeSinceAnimation = System.currentTimeMillis(); } else { timeSinceIdle = System.currentTimeMillis(); } return timeSinceAnimation + millis < timeSinceIdle; } variables are global
  2. getMagic().castSpellOnEntity(NormalSpells.TELEGRAB, item)
  3. using equals method is best suited for strings, it's not good to compare objects otherwise like that. String s = new String("hello"); String p = new String("hello"); s.equals(p) // true s == p // false;
  4. dreameo

    Gold bracelet

    The interact would only be "Make-X", or like "Make-10". Other then that, make sure you have the right widgets.
  5. public boolean hasItem(String itemName){ return getInventory.contains(itemName); } You just create methods to reduce any duplicate code. Example: I can call this method whenver i need to see if i have I have an item in my inventory. For more practical use, the methods you invoke will have larger pieces of code inside them.
  6. Yea I agree Apa completly. But relative to the code by op, names of items are constant ;), regardless of how he sets up the code. I get what you mean however.
  7. Easier way to get tree area; Area yewArea = new Area(3203, 3506, 3225, 3497); Area oakArea = new Area(3171, 3425, 3159, 3399); Area areaToChop = getSkills().getDynamic(Skills.WOODCUTTING) >= 60 ? yewArea : oakArea;
  8. This comes from Oracles code convention. Not sure what you're saying at the end lol.
  9. Somewhat, you can create your own methods and then call them in the onLoop. When interacting with NPCs or Entitys, you need the references to those objects updated (i.e within the loop). Constants can be global as you have them (Strings, areas), the rest you should do within methods ;)
  10. how he used string is good, if you put it in a method, you would be creating a string object everytime. Note, anything final should be left in uppercase (final string NAME = "")
  11. yea, think it's missing an ! at the if ;o
  12. Yes, however there is a case when you click, and are moving, a feather either disappears or is already taken. Yet the bot continues towards the feather that is no longer there.
  13. I thought of this too. Can check that current tile to see if it no longer has a grounditem called feather. ;)
  14. If you want to understand it, read what he did and do your own version of a timer. This one is somewhat unique to avg timer classes.
  15. Hmm.. Inside MoveMouseEvent is a seperate Vector class. I'm guessing the construction of the vector class is what initializes the speed of mouse.
  16. dreameo

    Stealth Quester

    nice script, can i get auth? Is there a particular order you can do f2p quests to ensure you have all the req for every next quest?
  17. dreameo

    useOn()

    I understand alek may have posted explaining but, you still haven't given me a valid reason. Saying that its more 'bot like' doesn't prove anything. And yes, I keep behavior strictly to what the method does. Same as the interact method in osbot, you must first check to see if an entity is not null and visible before you interact, it's not the responsibility of the interact method to do that. Simply creating a method to check beforehand is what you're looking for. I never rejected your criticism, i'm asking for clarification.
  18. np, how was the implementation of inv listener? forgot: make sure to stop thread onExit
  19. Credits: Modified source for osbot: Implementation:
  20. dreameo

    useOn()

    I'm not aiming for the SDN, however, it is allowed. IS NOT ALLOWED: Which does not apply
  21. dreameo

    useOn()

    The purpose of sleep is to avoid instantaneous reaction. Otherwise, explain your reasoning. The behavior of the method is to interact, not check. As mentioned, overloading is doable.
  22. dreameo

    useOn()

    Didn't see an interact method between item and entity. Here's an example (can overload to accept String) : Does not check for item Does not check for entity returns true on interaction between item and entity
×
×
  • Create New...