Jump to content

how do you interact with objects such as furnaces


senpai jinkusu

Recommended Posts

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
Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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?
Link to comment
Share on other sites

 

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

 

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.

Link to comment
Share on other sites

try using something like..

List<RS2Widget> smeltOpts = getWidgets().containingText("Smelt 10");if(!smeltOpts.isEmpty()) {    RS2Widget opt = smeltOpts.get(0);    getMouse().click(new WidgetDestination(getBot(), opt));}
Nifty, I will look further into this when I get the chance Edited by senpai jinkusu
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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