Jump to content

interacting with interface


alkku15

Recommended Posts

 i looked up some posts but still couldnt get it to work

case CRAFT:
			if (!smeltarea.contains(myPlayer().getPosition())) {
				getWalking().webWalk(smeltarea);
			} else {	
				RS2Object Furnace = getObjects().closest("Furnace");
				RS2Widget smeltinterface = widgets.get(446, 1);
				if (smeltinterface != null && smeltinterface.isVisible()) {
					smeltinterface.interact("Make-All");
				} else {
					if (Furnace != null && Furnace.exists()) {
						Furnace.interact("Smelt");
					}
				}
			}
			break;

then i tried something like "RS2Object kek = widgets.getWidgetContainingText("Make-All")"

then kek.interact("Make-All" etc etc doesnt work.... (IM TRYING TO SMELT GOLD BARS INTO GOLD RINGS IN AL-KHARID"

Link to comment
Share on other sites

1 hour ago, Deceiver said:

add the 2 classes, just copy n paste them.

then follow the example tom put and change it to what ur doing when u interact with the furnace :)

okay! added them like this: 

https://ibb.co/ebdOx7

then got this: 

https://ibb.co/iJxDVS

and in the actual .java file where my script is written i get this:

https://ibb.co/mxXGH7

.......................................... 

why doesn't this interaction work? why is all this shittt needed

				RS2Widget smeltinterface = widgets.get(446, 1);
				smeltinterface.interact("Make-All");

 

Edited by alkku15
Link to comment
Share on other sites

2 hours ago, alkku15 said:

okay! added them like this: 

https://ibb.co/ebdOx7

then got this: 

https://ibb.co/iJxDVS

and in the actual .java file where my script is written i get this:

https://ibb.co/mxXGH7

.......................................... 

why doesn't this interaction work? why is all this shittt needed


				RS2Widget smeltinterface = widgets.get(446, 1);
				smeltinterface.interact("Make-All");

 

idk man i tried it myself too before i added it  and its like it doesnt exist really

 

edit; for the fix change it to this in utilwidget;

public static RS2Widget getWidget(Script i, String action, String spellName) {
        List<RS2Widget> widg = i.getWidgets().filter(new WidgetActionFilter(action), new WidgetSpellFilter(spellName));
        if (widg != null) {
            return widg.get(0);
        }
        return null;
    }

 

Edited by Deceiver
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...