Jump to content

Script Help Please


nickb95x

Recommended Posts

Hey, I know the bot doesn't currently support eating since there is no health support, but is there a way the bot could click an item id in the inventory after x amount of seconds so say I have inventory full of lobbies make it click a lobster after x amount of seconds and also make it log out when it's out of food (no item id left in inventory), this would be great! If anyone could help me and tell me what i need to add to my script (the exact code) that would be great! smile.png

 

and p.s. I'd obviously want the combat script running while the script does all of this. :P

Edited by nickb95x
Link to comment
Share on other sites

Hey, I know the bot doesn't currently support eating since there is no health support, but is there a way the bot could click an item id in the inventory after x amount of seconds so say I have inventory full of lobbies make it click a lobster after x amount of seconds and also make it log out when it's out of food (no item id left in inventory), this would be great! If anyone could help me and tell me what i need to add to my script (the exact code) that would be great! smile.png

There is a way to make it click yes.

If this is groovy, I have the code:

selectInventoryOption(spot (0-27), "action", true)

Then to make it wait I guess return 30000? 30 seconds

 

Did this help?

Edited by Speakmore
Link to comment
Share on other sites

There is a way to make it click yes.

If this is groovy, I have the code:

selectInventoryOption(spot (0-27), "action", true)

Then to make it wait I guess return 30000? 30 seconds

 

Did this help?

 

nope I wanted it to click an item id in inventory every x seconds as in a different inventory space every time because it will be clicking food.. then when there is no more of the item id in inventory log out... this just clicks set inventory spaces witch could maybe work as long as it logs out x amount of seconds after clicking the 27th inventory space....

Link to comment
Share on other sites

nope I wanted it to click an item id in inventory every x seconds as in a different inventory space every time because it will be clicking food.. then when there is no more of the item id in inventory log out... this just clicks set inventory spaces witch could maybe work as long as it logs out x amount of seconds after clicking the 27th inventory space....

 

Make it eat spot 1, then wait xxxxx amount of time, then eat spot 2? Just copy and past teh line, but change the uhhh inven spot.

Link to comment
Share on other sites

As far as I know there is no way you can do this simply...

 

Because if I understand correctly you want it to eat every lets just say 20 seconds, but you still want the script to run normally....

However, you can try this, not guaranteed it will work but still:

 

 private final int timeToWait = 10; //In seconds;private int startTime;private int runTime; @Overridepublic void onStart(){  startTime = System.currentTimeMillis();  //Set the start time for first time..} @Overridepublic void onPaint(Graphics g){  updateInfo();								  //Update the runTime every second, There might be a better way but idk what it is.} @Overridepublic int onLoop(){  if(runTime > timeToWait){                              //Checks if the run time passed the wait time    eatFood();                                           	   //Some method... You will have to make this I wont spoon feed you.    startTime = System.currentTimeMillis();	  //Resets the startTime.  }} private void updateInfo(){  runTime = (System.currentTimeMillis() - startTime) / 1000;  //Basicaly takes the current time and subtracts from time started then finds it in seconds.}
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...