Jump to content

dokato

Members
  • Posts

    129
  • Joined

  • Last visited

  • Feedback

    100%

Posts posted by dokato

  1. Clean your project, remove osbot from buildpath and re add it, restart eclipse.

     

     

    Acquire a better IDE boge.png

    #EclipseSux boge.png

     

     

    Okay thx, and should I implement it in onStart() or onLoop() ? Knowing that onStart() only gets executed after login.

  2. You can override shouldActivate to verify with your script whether or not now is a good time to start a break

    try {
        this.bot.getRandomExecutor().registerHook(new RandomBehaviourHook(RandomEvent.BREAK_MANAGER) {
            @Override
            public boolean shouldActivate() {
                return super.shouldActivate() && canStartBreak();
            }
        });
    } catch (Exception ex) {
        //Break manager is not enabled
        log("Failed to modify break handler");
    }
    

    It's up to you to implement the canStartBreak method

     

    I get this error if i try to do that:

    The type org.osbot.rs07.event.RandomExecutor cannot be resolved. It is indirectly referenced from required .class files

  3. Is there a way to disable the auto login?

     

    I want my script to perform breaks on its own, because the bot doesnt break well with combat scripts. If the bot logins automatically right after logout it wont work.

     

    Any way of overriding or changing something?

  4. I've noticed that my bot doesn't always break after a given period of time. Has this to do with the way my script is written? Or is it because I've checked the option to randomize the break time?

     

    It is really worrying me, because these break skips have resulted in some bans.

  5. This is in the scripting section lol...

    exacly, it really bothers me when random idiots come to me and reply with those stupid anwsers when they dont get the fucking point of the question, look at this message someone send me after i posted this topic:

     

    Hello,,

     

    you cant make accounts anymore with username login,

     

    but i got a few username accounts left without email registered,

     

    if you want, i can sell them.

     

     

    greetz,

     

    jappa

  6. i dont know the scenario, but if you have multiple accounts, set the name of the .txt document to the bot's name, so they can use their individual file

     

    I think osbot doesnt support the mysql driver thing and that's why i get the erorr.

    I'll just let the program run seperately so that it can write the database values into a txt file and then the osbot script will read from that txt file.

    That should work i think 

  7. write values to a .txt , booleans or whatever you like, and make the other script check the .txt

     

    also if you want to use a databse, don't you need something running 24/7? or pay for hosting?

     

    Ye i get your point, but what if you've got multiple remote servers where bots run on?

    And it's a free mysql hosting 24/7 thingy, so it's free, i dont need to pay anyhting, accept for the servers ofcourse.  

  8. why do you want to establish a connection to your sql databse in a runescape script?

     

    So that another account could see when that acc is rdy to trade its farm.

    It will update some values in the db and based on that the other account can see which acc it should trade when.

    I dont see any other way of making that possible without using a remote database. 

  9. Ok so i've made this class that interacts with my mysql db and it worx excellent in java. But when i try it out with the osbot script, the client gives me a nullpointerexception which shouldnt be there (cause it worked fine with another non bot script program) and it instanlty crashes. Now that's if i put it in the onLoop(), if I place it in the onStart() the script just stops, it says excited ...

     

    This is what I get: http://i.imgur.com/4szNNoY.png

    emote32342.png

    Am I doing something wrong?

    Plz help? 

  10. i meant use filters;

    NPC chicken = getNpcs().closest(new Filter<NPC>({
        @Override
        public boolean match(NPC npc){
           return npc.getName().equalsIgnoreCase("chicken") && !npc.isUnderAttack() && getMap().canReach(npc) && npc.getHealth() > 0;
        }
    });
    

    Don't copy and paste cos I wrote that with no code assist so the filter could be wrong. This in essence will return the closest chicken that you can attack, is reachable, has health > 0, not currently being attacked. Of course you can tweak the boolean as you wish but that's all you need really.

     

    Much more efficient/cleaner/easy to read & understand happy.png

    Wauwohmy.png ohmy.png ohmy.png , didnt know that, thank you man!!!

  11. @Botre

    it will sometimes click on another chicken while he's alrdy in combat with a chicken, and sometimes while he's fighting a chicken, it will reclick on the chicken, while it is alrdy fighting it.

    And after it has killed the chicken, it will keep clicking on it till it completely dissapears (the animation of one dying and dissapearing).


    Well firstly, you don't need to iterate the npc's in the region to get the best one you can just use filters for that and return the npc best suited based on the conditions you provide. 

     

    1) Get the instance of the NPC

    2) Check if your player is interacting with it

    3) If not attack if yes, sleep

     

    I would give you the code for it but then I don't think you would learn from it unless you familiarize yourself with the api by digging through it.

     

    "1) Get the instance of the NPC"

    if i do that, and the chicken is alrdy under attack by someone else, it will do nothing and wait till it's dead, while it should be looking for another one to kill, that can be located a bit further than the one in the instance. So basically it is wasting time while he could be attacking another one.

     

    Or do you mean something else, or did i misunderstand u?

  12. Ok, so I've tried out 100000 things to make my fighting scripts as good as possible but it still keeps dissapointing me.

    Currently I'm using this one, its an example that should kill chickens at the new chicken area in lumbridge:

    http://pastebin.com/xGX3bTfD

    And PLEASE, for those who have little to none expierence with fighting scripts, dont post obvious stuff like do this..., or you should better do that..., cuz the chance is big I've alrdy tried it lol. Or just dont post at all in that case. 

     

    Just a call out for help to those who have expierence with this kind of stuff.

×
×
  • Create New...