Jump to content

Bot wont stop clicking!


Bigpoppa21

Recommended Posts

	case SPIN:
    		if (!player.isAnimating()){
    			if (SPIN_AREA.contains(player) && (inventory.contains("Flax"))){
    				objects.closest("Spinning wheel").interact("Spin");
    					sleep(random(200,600));
    					Inter.interactWithChild(459, 91, "Make X");
    					sleep(random(1000, 1500));
    					RS2Interface Inter = interfaces.get(118);
    					if (Inter.getMessage(118) != null){
    						keyboard.typeString("99");
    						sleep(random(2000,4000));
    					}else{
    						sleep(random(60000, 62000));
    					}
    			}
    		}
    	break;

Why does my bot keep clicking on the spinning wheel even when it starts to spin flax? I tried making it sleep(random(60000, 62000)) but that didn't work...huh.png

Link to comment
Share on other sites

	case SPIN:
    		if (!player.isAnimating()){
    			if (SPIN_AREA.contains(player) && (inventory.contains("Flax"))){
    				objects.closest("Spinning wheel").interact("Spin");
    					sleep(random(200,600));
    					Inter.interactWithChild(459, 91, "Make X");
    					sleep(random(1000, 1500));
    					RS2Interface Inter = interfaces.get(118);
    					if (Inter.getMessage(118) != null){
    						keyboard.typeString("99");
    						sleep(random(2000,4000));
    					}else{
    						sleep(random(60000, 62000));
    					}
    			}
    		}
    	break;

Jesus i cant read OP

 

 

Holy crap your sleeping for a minute l0l

Edited by Mysteryy
Link to comment
Share on other sites

Not getting any exceptions ?

 

Inter.interactWithChild(459, 91, "Make X");

^ Are you certain that 'Inter' is not null at this point?

 

Furthermore, when you call getMessage(118) on the interface, you're basically saying that both the parent and child interfaces have the same ID of 118. Are you certain that this is the case?

Edited by FrostBug
Link to comment
Share on other sites


// You should be checking you have flax to help redirect the programme to this case

case SPIN: {

// Check area first, and if true, assert objects valid

if (SPIN_AREA.contains(player) && !player.isAnimating()) {

// Declare the vars you want to discover

RS2Object spinningWheel = objects.closest("Spinning wheel");

RS2InterfaceChild interfaceChild = interfaces.get(459, 91);

RS2Interface xAmount = interfaces.get(118);

// Check each of them and act accordingly

if (xAmount != null) {

// Last result first

keyboard.typeString("99");

} else if (interfaceChild != null) {

interfaceChild.interact("Make X");

} else if (spinningWheel != null && spinningWheel.exists()) {

spinningWheel.interact("Spin");

} else {

//niqqua youu dun fuked up!

}

}

}

Link to comment
Share on other sites

What you guys don't understand is that spinning flax is like cooking food. You animate for a sec then stop for two seconds. I'm not sure why it doesn't sleep for a whole minute. like I said use a timer it will help

 

 

Yea in my scripts I have a multithreaded animation listener. At any time I can get the time since the player last animated. 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...