Jump to content

Chatbox right click, choose all.


DankFish

Recommended Posts

Use Widgets smile.png

int parent = 200;
int child = 85;
RS2Widget child = script.getWidgets().get(parent, child);

if(child!= null && child.isVisible()){
   String action = "Make 10";
   child.interact(action);
}

Should be something like this ^

Enable the widgets debugger to find the parent,child id's biggrin.png

 

Khaleesi

Edited by Khaleesi Scripts
Link to comment
Share on other sites

Use Widgets smile.png

int parent = 200;
int child = 85;
RS2Widget child = script.getWidgets().get(200, 85);

if(child!= null && child.isVisible()){
   String action = "Make 10";
   child.interact(action);
}

Should be something like this ^

Enable the widgets debugger to find the parent,child id's biggrin.png

 

Khaleesi

 

 

Shouldn't be creating a string object everytime the code is ran,

child.interact("Make 10"); is going to be more efficient in this situation, 

 

http://examples.javacodegeeks.com/core-java/lang/string/java-string-pool-example/

could work both ways though, i just see less lines being better

Link to comment
Share on other sites

Shouldn't be creating a string object everytime the code is ran,

child.interact("Make 10"); is going to be more efficient in this situation, 

 

http://examples.javacodegeeks.com/core-java/lang/string/java-string-pool-example/

could work both ways though, i just see less lines being better

 

Doesn't really matter though smile.png

Compiler will do the rest.

 

I just did this to show him an example with the names(Parent, child and action).

makes it a bit more clear then just inputting numbers in a function ^^

 

but you're right, you can just put the numbers/text in the function instead of creating an variable or an object smile.png

 

If(!this.getInventory().contains(ammo name here))

stop();

On phone so please excuse typos etc.

 

Phone coding OP, took me 5 min to typ the code above lol -_-

The auto correct is so stronk -_-

Edited by Khaleesi Scripts
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...