Jump to content

how do you interact with objects such as furnaces


Recommended Posts

Posted (edited)

thanks!

 

one more question, how do i check if the player is currently performing the action stated by the widget, ie. if i smelt 10 bars how can i check if the action was completed?, or if the player is currently smelting ( i could simply make a routine to count for the items created in the inventory but is there an easier way?)

 

edit: ill just store in a boolean to see if the player is currently smelting for now

Edited by senpai jinkusu
Posted

thanks!

 

one more question, how do i check if the player is currently performing the action stated by the widget, ie. if i smelt 10 bars how can i check if the action was completed? ( i could simply make a routine to count for the items created in the inventory but is there an easier way?)

I think this would help

http://osbot.org/forum/topic/80839-isanimating/

try to put the two things together :)

Posted

I think this would help

http://osbot.org/forum/topic/80839-isanimating/

try to put the two things together smile.png

ill give that a try, however the widget doesn't seem to be working, this is my code for steel bars

 

 

RS2Widget smeltMenu = widgets.get(311,30);
if(smeltMenu != null && smeltMenu.isVisible())
 smeltMenu.interact("Smelt 10");
 
i can successfully interact with the furnace, however it doesn't interact with the steel bar widget, is there anything I could be missing?
Posted

 

ill give that a try, however the widget doesn't seem to be working, this is my code for steel bars

 

 

RS2Widget smeltMenu = widgets.get(311,30);
if(smeltMenu != null && smeltMenu.isVisible())
 smeltMenu.interact("Smelt 10");
 
i can successfully interact with the furnace, however it doesn't interact with the steel bar widget, is there anything I could be missing?

 

make sure you got the correct widget #'s

Posted (edited)

Ye you could do that. I remember this was discussed somewhere and there might be a better solution.

i don't know where this was discussed, also not even this seems to work so i think all hope is lost for this method lol.

 

for now i will stick with the following code 

 

  mouse.move(260,410);
       mouse.click(true);
       mouse.click(253,460,false);
       isSmelting = true;
Edited by senpai jinkusu
Posted

 

i don't know where this was discussed, also not even this seems to work so i think all hope is lost for this method lol.

 

for now i will stick with the following code 

 

  mouse.move(260,410);
       mouse.click(true);
       mouse.click(253,460,false);
       isSmelting = true;

 

Oh well it really should work. If you post some of your code I can take a look at it.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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