Jump to content

Doout

Members
  • Posts

    184
  • Joined

  • Last visited

  • Feedback

    100%

Posts posted by Doout

  1. I'm logged in, at catherby range, with my raw lobsters in my inventory. Is that not a supported spot? 

     

    edit: I just tried lumbridge too, didn't work. I start it with my bank open, lobsters in first spot of bank, with raw in my inventory. it closes out of my bank and spams the logs with errors etc. 

     

    go to Rogues Den and start the script

  2. here the code to get the xp to the level, you can do the rest

        public int experienceForLevel(int level) {
    
    		double total = 0;
    		for (int i = 1; i < level; i++) {
    			total += Math.floor(i + 300 * Math.pow(2, i / 7.0));
    		}
    
    		return (int) Math.floor(total / 4);
    	}
    
     public int getExpToNextLevel(Skill s) {
            return experienceForLevel(script.client.getSkills().getLevel(s) + 1)
                    - script.client.getSkills().getExperience(s);
        }
    
    
  3. or you can try to use this

       public NPC getNPC(int... ids) {
    		List<NPC> npcs = client.getLocalNPCs();
    		int d = 999;
    		NPC temp = null;
    		for (NPC n : npcs) {
    			if (n != null) {
    				for (int id : ids) {
    					if (n.getId() == id) {
    						if (distance(n) < 15 && !n.isUnderAttack()
    								&& distance(n) < d) {
    							d = .distance(n);
    							temp = n;
    						}
    					}
    				}
    			}
    		}
    		return temp;
    	}
    	
    
  4. I do not see the point in this,

    If apple is good then he should have got script writer.
    Apple can ask laz or maxi for a review of his script to get him the rank.

     

    But, getting the full rank is not as easy as people think

     

  5. when the bot class was not obfuscated we could do bot.getKeyboard().sendKey(blabla).

     

    they just need to add a method on client/script to call this one tongue.png

     

    I try to look for it in the bot class and fail

  6. Will love to have key event in the script,
    If this is in the API, can you plz tell me where. I try to look under bot class and client and found nothing

  7. Random event you mean? I think the random event solver may be causing that as your script pauses when a Random event take a place. Correct me if im wrong.

     

    when ever the script try to click  something that moving, it try to move by using the minimap even thought the npc/entily is on the screen.

     

    My script do not use the built-in method for the entily.interact("");, Also, my script stop if it out of the areas.

     

     

     

  8. None of my script use the bult-in interact(""), but when ever i get in a random, it spam click the minimap when it try to click an entity

    Here is the method that I use, you can use it if you like

     

    
    	public static boolean interact(Entity entity, Script script, String str)
    			throws InterruptedException {
    		if (entity.getPosition().isVisible(script.bot)) {
    			MouseDestination loc = entity.getMouseDestination();
    			script.client.moveMouse(loc, false);
    			if (loc.destinationReached(script.client.getMousePosition())) {
    				click(script, str);
    			}
    		} else if (isTileOnMiniMap(entity.getPosition(), script.bot)) {
    			// script.walking.walk(entity.getPosition(), true); Use what ever
    			// walking method you like here, Pm if you like my
    			script.sleep(1000);
    		}
    		return false;
    	}
    
    	private static int ySetOff = 18;
    	private static int indexOffSet = 14;
    
    	public static boolean isTileOnMiniMap(final Position tile, Bot bot) {
    		return !org.osbot.script.rs2.utility.Utilities.getMinimapScreenCoordinate(bot,
    				tile.getX(), tile.getY()).equals(new Point(-1, -1));
    	}
    
    	public static boolean click(Script methods, String str) throws InterruptedException {
    		if (contains(methods, str)) {
    			if (methods.client.getMenu().get(0).action.contains(str)) {
    				methods.client.clickMouse(false);
    				return true;
    			} else {
    				if (!methods.client.isMenuOpen())
    					methods.client.clickMouse(true);
    				if (methods.client.isMenuOpen()) {
    					int i = getIndex(methods, str);
    					MouseDestination click = new RectangleDestination(new Rectangle(
    							methods.client.getMenuX(), methods.client.getMenuY()
    									+ ySetOff + (i * indexOffSet + 1),
    							methods.client.getMenuWidth(), indexOffSet));
    					methods.client.moveMouse(click, false);
    					methods.sleep(100);
    					if (click.destinationReached(methods.client.getMousePosition())) {
    						methods.client.clickMouse(false);
    						return true;
    					}
    				}
    			}
    		}
    		return false;
    	}
    
    	public static int getIndex(Script methods, String str) {
    		List<Option> s = methods.client.getMenu();
    		for (int i = 0; i < s.size(); i++) {
    			if (s.get(i).action.contains(str)) {
    				return i;
    			}
    
    		}
    		return -1;
    	}
    
    	public static boolean contains(Script methods, String str) {
    		for (Option n : methods.client.getMenu()) {
    			if (n.action.contains(str))
    				return true;
    		}
    		return false;
    	}
    
    
×
×
  • Create New...