Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • 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/Crypto gold? You can purchase vouchers from other users
  • Mad Cow Loco Low 1.1


    cronoxliker

    Recommended Posts

    Im about to see if this works pseudo, that is exactly what I was looking for. so if that doesn't work for whatever reason and I want to add more checks to the filter do I just separate by &&?

     

    I really appreciate it bro :P

    Pretty much, let me know if you run into any problems. And no problem.

    Link to comment
    Share on other sites

    Pretty much, let me know if you run into any problems. And no problem.

    I'm glad you're willing to help.

     

    So here is my current line: public static final Filter<NPC> SEAGULL_FILTER = npc -> npc != null && npc.getName().equals(SEAGULL) && !npc.isHealthBarVisible() && !npc.isInCombat() && !npc.isInteractedWith() && !npc.isAnimating();

     

    It's still attacking NPC's in combat with what I have above. Any ideas of what else I can do?

     

    if I write it the way you posted with the extra parentheses the last bit says ; is expected even though I already have it there : NPC npc = getNpcs().closest(o -> o != null && o.getName().contains("name") && !o.isInCombat() && !o.isInteractedWith());

    Link to comment
    Share on other sites

    I'm glad you're willing to help.

     

    So here is my current line: public static final Filter<NPC> SEAGULL_FILTER = npc -> npc != null && npc.getName().equals(SEAGULL) && !npc.isHealthBarVisible() && !npc.isInCombat() && !npc.isInteractedWith() && !npc.isAnimating();

     

    It's still attacking NPC's in combat with what I have above. Any ideas of what else I can do?

     

    if I write it the way you posted with the extra parentheses the last bit says ; is expected even though I already have it there : NPC npc = getNpcs().closest(o -> o != null && o.getName().contains("name") && !o.isInCombat() && !o.isInteractedWith());

     

    try running it with an if statement 

     

    i'm not at home to look at it correctly but i think you can use an if and be okay 

    Link to comment
    Share on other sites

    try running it with an if statement 

     

    i'm not at home to look at it correctly but i think you can use an if and be okay 

    I'll try it and let you know if it works, Ill take any help I can get. Thanks guys.

    Link to comment
    Share on other sites

    There could very well be multiple things going on here. You could be getting the NPC before it's in combat and then trying to attack it after the fact. I think we'd need to see things in action and run through it piece by piece to truly see where the problem lies.

     

    You should also do the same. Make sure you're getting the NPC directly before you try to attack it so that you're not trying to attack an outdated NPC. Try running logs or paint info that highlights the current tile of the NPC and outputs whether or not that NPC is in combat, interacted with, health bar visible, etc etc etc.

    Link to comment
    Share on other sites

    the tutorial wasn't very clear on this aspect: You're supposed to attack/interact with the cow filter, not the actual cow. (How are you going to use the filter if you're interacting with the cow and not the filter?)

     

    ^^if you're trying to use the filter from Rickk's video.

     

    Fixed 90 percent of my problems.

     

    #CreditToHashTagForMakingMeLookLikeAnAss

     

    Now to get through this level up message with the right line, Npc retreats and leaves my guy hanging after leveling up sometimes :P

    Link to comment
    Share on other sites

     

     

     

     

    Now to get through this level up message with the right line, Npc retreats and leaves my guy hanging after leveling up sometimes :P

     

    You could fix that by checking:

    if (getDialogues().canContinue()) {

    getDialogues().clickContinue();

    Link to comment
    Share on other sites

    You could fix that by checking:

    if (getDialogues().canContinue()) {

    getDialogues().clickContinue();

    Trying now, thanks G.

     

    I tried this but it didn't work:

    }else{

    WidgetChild clickTOcontinueWidg = getWidgets().getWidgetChild(233, 2);

    if(clickTOcontinueWidg != null && clickTOcontinueWidg.isVisible()){

    clickTOcontinueWidg.interact("Click here to continue");

    Link to comment
    Share on other sites

    Trying now, thanks G.

     

    I tried this but it didn't work:

    }else{

    WidgetChild clickTOcontinueWidg = getWidgets().getWidgetChild(233, 2);

    if(clickTOcontinueWidg != null && clickTOcontinueWidg.isVisible()){

    clickTOcontinueWidg.interact("Click here to continue");

    u dont need to use widgets for it

    https://dreambot.org/javadocs/org/dreambot/api/methods/dialogues/Dialogues.html

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.