Jump to content

FearMe

Members
  • Posts

    652
  • Joined

  • Last visited

  • Feedback

    100%

Posts posted by FearMe

  1.  

    Yeah, you had it figured out precisely.

     

    Here's a custom snippet (Credits go to Toph): 

    	public boolean selectMenuOption(String action, String noun) throws InterruptedException
    	{
    		if (!s.client.isMenuOpen()) return false;
    		boolean found = false;
    		int index = 0;
    		List<Option> menu = s.client.getMenu();
    		for (; index < menu.size(); index++)
    		{
    			if (menu.get(index).action.equals(action) && menu.get(index).noun.contains(noun))
    			{
    				found = true;
    				break;
    			}
    		}
    		if (found)
    		{
    			int x = s.client.getMenuX();
    			int y = s.client.getMenuY() + 21 + index * 14;
    			return s.client.moveMouseTo(new RectangleDestination(x, y, s.client.getMenuWidth(), 10), false, true, false);
    		}
    		s.moveMouseOutsideScreen();
    		return false;
    	}
    
    

     

    It's + 19 + index * 15 actually.

    • Like 1
  2. No dude i mean like this: 

    if ((script.client.getRunEnergy() > MethodProvider.random(25, 40) && !script.isRunning() || script.myPlayer().isUnderAttack())
    && !script.isRunning()) {
    

    For every || you have you have to declare any existing logic, it doesn't carry over by itself

    That's checking it twice..  It works fine like this, there's nothing wrong with that lol.

  3. With your current code it will click running on/off even if it is running due to your first statement so just add the !script.isRunning() before you handle the under attack part 

    It's there...

    GWcUdg1.png

  4. Only suggestion is here : 7BeiI.png

     

    add:

    !script.client.getRunEnergy() > MethodProvider.random(25,40) && !script.isRunning() || 
    

    That's probably the only thing i can see wrong, cos if its under attack and above the run energy it will just keep clicking run on/off

    I did that because I want the character to run when it's being attacked so the monster can't keep up. It's not in the code I'm running right now and it's still doing the standing still..

  5. Edit: Can't see anything wrong with the walker off the bat, try printing out your states and see if you're in the walking state still ?

    Yeah, it happens in the middle of the path, I always print out the state when I'm testing my script :P. I've had this issue before but I sorted it out.

  6. It's starting to really annoy me, I have to walk through an area where there's aggressive monsters and the walker sometimes just stands still, meaning I get to half health...

    I don't see where the problem is, sometimes it works perfectly fine but sometimes it stands still for no reason.

     

    public void walkPath(Position[] path, int startIndex, boolean reverse)
    throws InterruptedException {
    if (script.myPlayer().getPosition()
    .distance(path[reverse ? 0 : path.length - 1]) <= 3
    || script.myPlayer().getPosition().distance(path[startIndex]) > 100)
    return;
    if (!reverse) {
    for (int i = startIndex; i < path.length; i++) {
    if (!walkTile(path[i], 3))
    i--;
    }
    } else {
    for (int i = startIndex; i >= 0; i--) {
    if (!walkTile(path[i], 3))
    i++;
    }
    }
    }
     
    public int getPathStartIndex(Position[] path, boolean reverse) {
    int closestIndex;
    int closest;
    if (!reverse) {
    closest = script.myPlayer().getPosition().distance(path[0]);
    closestIndex = 0;
    for (int i = 1; i < path.length; i++) {
    if (script.myPlayer().getPosition().distance(path[i]) <= closest) {
    closest = script.myPlayer().getPosition().distance(path[i]);
    closestIndex = i;
    }
    }
    } else {
    closest = script.myPlayer().getPosition()
    .distance(path[path.length - 1]);
    closestIndex = path.length - 1;
    for (int i = path.length - 1; i >= 0; i--) {
    if (script.myPlayer().getPosition().distance(path[i]) <= closest) {
    closest = script.myPlayer().getPosition().distance(path[i]);
    closestIndex = i;
    }
    }
    }
    return closestIndex;
    }
     
    public boolean walkTile(Position p, int margin) throws InterruptedException {
    if (script.myPlayer().getPosition().distance(p) <= margin)
    return true;
    else if (script.myPlayer().getPosition().distance(p) > margin)
    script.client.moveMouseTo(
    new MinimapTileDestination(script.bot, p), false, true,
    false);
     
    int failsafe = 0;
    while (failsafe < 10
    && script.myPlayer().getPosition().distance(p) > margin) {
    if ((script.client.getRunEnergy() > MethodProvider.random(25, 40) || script.myPlayer().isUnderAttack())
    && !script.isRunning()) {
    script.client.getInterface(548).getChild(93).interact();
    script.sleep(MethodProvider.random(500, 700));
    }
    script.sleep(100);
    failsafe++;
    if (script.myPlayer().isMoving())
    failsafe = 0;
    }
     
    return script.myPlayer().getPosition().distance(p) <= margin;
    }
  7. http://osbot.org/tos.html

     

    11. The Website may not be used by minors under the age of 18 years of age. 
    You may not use this Website if you are under 18 years of age. Before being able to download OSBot software, you must confirm that you are over 18 years of age. You warrant that you will not give such confirmation unless you are over 18 years of age.
    • Like 1
  8. No one is forcing you to script here, we appreciate you scripting here, but if you don't like the process you are free to script else where and see if your script does better at a client that charges you 15 dollars to even open, or a client that only allows non vips to bot for 1-2 hours, basically eliminating 99% of the community like this..

     

    People are also not forced to pay $10 a month, yet they still get better treatment than scripters even though they don't contribute to the community as a whole.

     

    inb4theykeepthewebsiterunning

    So the logical way to tell if someone gets SDN Scripter is if they have the knowledge to maintain their script?  If they bought the script and have no java knowledge, than obviously they won't do that.  Things break and need fixing.  I can't see how someone buying a script worth for the SDN just to get VIP would go through the process of making sure the script doesn't break.  Too much work IMO

    Also, what is the point in buying a script source instead of buying VIP? You pay for both, and you're gonna have to maintain it somehow.

    • Like 1
×
×
  • Create New...