Jump to content

jca

Members
  • Posts

    390
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    100%

Posts posted by jca

  1. 29 minutes ago, kramnik said:

    Well yeah, but as Jiggles said your mules are rarely getting banned. I always used one of my mules with whole farm on same Ip/Pc around 100 accounts good banned but mule is alive

    Why ask the question then? 

  2. 16 minutes ago, kramnik said:

    Nice to hear that. Not everyone had this luck. Also want to ask, you are probably using auto muling system, I will try to do that soon and wonder wether this mule most likely to get banned if it rolls on same ip with farm?

    Never use the same IP with your mules. 

  3. 10 hours ago, xakingas said:

    Thank you, the inventory was probably breaking it up, works fine now, THANKS!

    FYI it was breaking because you're calling getInventory() before the inventory is available. Most API functions should be saved for your onLoop() as they require the game to be loaded / an account logged in to work correctly. 

  4. 2 hours ago, WhyCry said:

    Hey jca!

    Beautiful work on this project! I have a question I hope you could help me with! You said you botted your accs to 99 fishing with this script. I was wondering how long did you bot for each day and whether lower ban rates can be correlated with your mouse movement implementations? 

    Thank you for your time and effort on this project and I wish you lots of success! 

    Thanks! Maybe, maybe not. It probably helps. Botting times were random, sometimes 8-12 hours, sometimes less than 5.

    But I was doing other skills in between, mainly farming runs. I’ve also achieved 99 woodcutting and cooking with similar script. 

  5. Look at using the stored rocks position and writing a condition that finds the same rock on that position and checks if it doesn’t have ore, rather than checking the referenced rock. 

    private boolean checkRockHasOreAtPosition(Position p){
    
        RS2Object rock = getObjects().getAll()
          .stream()
          .filter(obj -> obj.getPosition().equals(p) && Rock.CLAY.hasOre(obj))
          .findFirst()
          .orElse(null);
    
        return rock != null;
    
    }

    Something like that 

  6. 7 hours ago, NoxMerc said:

    You can't have two events trigger simultaneously if they're both blocking (synchronous) events, and there's really no reason to make a LoginHandler asynchronous, so you should be good to go.

    If they are asynchronous just execute them in your onStart or a function that is guaranteed to run once and you’ll also be fine. 

  7. 5 minutes ago, Malcolm said:

    Yeah I'm not waiting that long. I'll have to see what I can do to actually have that going for that long.

    Is the NPC mage already set by the time you reach the condition? In the Boolean function call 

    NPC mage = getNpcs().closest(“mage”); 

    before returning. That may help... 

  8. 14 minutes ago, Mephisto said:

    Hi!

    I'm trying to write my first script & have some questions.

    I want my script to check if my bot's inventory has some items I selected & teleport if all the items are in its inventory.

    So I made this:

    
    if (getInventory().contains("Tinderbox","Falador teleport","Varrock teleport","Lumbridge teleport","Steel pickaxe")){ 
    inventory.getItem("Lumbridge teleport").interact();
    log("Teleporting to Lumbridge");
    }else{
        log("We don't have all the items we need");
    }
    

    The bot now teleports when it has one of these items instead of all of them.  (So if one item is missing  the getInventory().contains() statement is still true)

    Do I have to write a long list "Ifs & elses" containing every item seperatley to make it work or are there other solutions that are less messy & less work?

    Thanks in Advance!


     

    inventory#contains will check if any item in the provided array is in the inventory. 

    There's probably a better way, but I use a separate function 

    private boolean inventoryContainsAllItems(String... items){
    	for( String item : items ){
    		if ( !getInventory().contains(item) )
            		return false; 
    	}
    	return true; 
    }

     

    • Like 1
  9. 6 minutes ago, dreameo said:

    You made it sound like it's an issue when you said the area is large. Which I said, you don't need to actually define an area.. you just need 2 coordinates.

    You're doing the same with with a region that you would with an area. Idk why you're hard stuck on regions.

    Ah I’m not really, I just wondered if there was a way. Again, theoretically dealing with a large area feels like it should be handled by region checking. 

    But I can stick with areas, thanks for your thoughts and @Eliot

  10. 3 minutes ago, dreameo said:

    You don't need to define the area. Since it's big just get the bottom left and top right coordinates and that's all you need to check and see if you're within an area.

    That’s still defining an area... it’s not an issue. Just if there was an option with regions it feels better to use. But maybe it’s not possible. 

  11. 6 minutes ago, Eliot said:

    Why not just use areas?

     

    
    if (area.contains(myPlayer()) {
         ...
    }

     

    Yeah... well that’s one option. 

    The area I need to check is huge (the size of the region, basically 104x104). My logic is if it’s already defined as a region and I could check that then it makes more sense then defining a massive area. 

    But if there’s not really a better way then areas will have to do. 

  12. Good job on the release... I would try and refactor your code a little to be more maintainable. Rather than have a giant onLoop() you can break it down to functions and boolean checks. 

    if ( ! myPlayer().isAnimating() ){
      if ( !getInventory().isFull() ){
        fish(); 
      } else {
        if ( shouldBank() ){
          bank(); 
        } else { 
          cook(); 
        }
      }
    } else { 
      // Wait as we are fishing or cooking
    } 

    Also wrap your interactions in conditionals

    if ( fishingSpot.interact("Lure") ){
      status = "Fishing"; 
      //handle post interaction logic
    }

    This ensures you can check for interaction success / failure. 

    Look into walking#walkPath as you shouldn't need to use webWalk for this.  

    • Like 1
  13. Haven’t found a clean solution to check what region my player is in. 

    At the moment using getMap().getBaseX() and getMap().getBaseY() but this varies slightly depending on how my player accessed the position in the region.

    With a rough calc I’m able to work it out, but as I said it’s a bit dirty. Are there any cleaner solutions? 

  14. Not sure if there is a method in the Skills API, I can't seem to find one, but you could do something like this... 

    int totalLevel = 0;
    
    for( Skill skill : Skill.values() ){
    	totalLevel += getSkills().getStatic(skill);
    }
    
    log("My total level is " + totalLevel); 

     

×
×
  • Create New...