Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Make sure you have Java 8 installed
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
OSRS Gambling

Interested in advertising your business? Reach out today!

Download the DreamBot client today!

kamilo

Members
  • Content Count

    98
  • Joined

  • Last visited

About kamilo

  • Rank
    Newbie

Recent Profile Visitors

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

  1. okay ill add a boolean check in my walkTo() method; but how would i go about doing this recalculated method
  2. kamilo

    onPaint() help

    how is this suppose to work? so it should display the paint of hte script its running pretty much right? and the other script paint's should disappear if not active
  3. kamilo

    onPaint() help

    haha beautiful i was making this too this will help me out too !!
  4. okay but is there a way to disable opening doors from the getWalking() method???
  5. thats fine but how do i incorportate it with getWalking() because that method is autmatically opening doors or should i do Filter<GameObject> doorFilter = GameObject -> GameObject != null && GameObject.getName().equals("door") && !GameObject.hasOption("repair"); addObstacle(doorFilter,) etc..? and this will automatically focus on doors without "repair" options ^is that correct?
  6. whats the command for neglecting doors i know about addObstable but i see nothing like IgnoreObstacle or somthing similar
  7. hey guys since the walk method automatically opens doors, when you're in pest control, the door becomes damaged and so the bot tries to keep opening it in this case, it can't. and if the door is coempletely gone it will still try that 'open' option is there a way around it? i was thinking filtering any doors that have the action ("repair") on them and not open them can i do that?
  8. kamilo

    Timer

    got it!, what if i start a timer counting upwards, just new Timer();, for checking how long the script is run for how would i go about pausing that, cuz the code seems to be like a stop watch and counts down, but i want to count upwards (duration of the sript running), then pause (for break so its not included in total time ran), then resume choosing my own conditions
  9. kamilo

    Timer

    why are u doing new Timer(1000) instead of new Timer(); does it make a difference or does it set the increment in milliseconds
  10. kamilo

    Timer

    i love the brilliant people on this forum
  11. kamilo

    Timer

    also is the timer.elapsed() in milliseconds? i know its a long value but not sure its is ms
  12. kamilo

    Timer

    Creating my own break handler, so since i have a Timer timer = new Timer() running i was wondering how could pause this timer during the break; ofcourse i would manually disable login etc.. but i also want to pause/resume this Timer from dreambot api, but nothing in the api has a pause button etc.. can someone help
  13. Oh thank you! i thought i was doing something wrong by globally initializing static variables since i didn't see anyone else using them. if its a good practise, i'll definitely keep it up!
  14. So, when is it right to use static variables, because i am using them everywhere so no new objects are created everytime the code is ran; so if my script is a really long one all this pre=declared static variables should save SOME memory etc..
  15. I have gotten used to declaring static variables on top off the class to avoid creating new variables inside of a method (int i = 0). Because i heard new objects created is bad for cpu usage etc/garbage collector. example: private String getHighestHealingFood() { healthRestored = 0; // Declared on top of the class name = ""; // Declared on top of the class for (Item item : getInventory().all(getNormalFilter())) { for (Map.Entry<String, Integer> entry : getFoodMap().entrySet()) { if (item.getName().contains(entry.getKey()) && entry.getValue() > healthRestored) { healthRestored = entry.getValue(); name = entry.getKey(); } } } return name; } as you can see in the above method instead of initializing variables inside the method; i have initialized the variables outside (static variables); so no new ones need to be created and that makes a code a little more efficient; cuz of garbage collector etc But from some of the codes i've been reading on the forums; i am beginning to wonder why all the master scripters don't already do this, and it is a little more efficient even @Articron in his walkTo(); method: As you can see in his inLoop() method he is initializing the variable Tile, Dest; every time the loop runs. So i am wondering why is he doing that if creating new variables everytime he runs the onLoop instead of initializing them at the top; then they would just change inside loop without creating new objects? So you can see why i am confused, since he is a master scripter and he isn't even doing that am i doing something wrong? i want to become a better scripter so i want to learn the CORRECT practise ofcourse. please guide me
×
×
  • Create New...