Jump to content

Requst use item on object snippet


Recommended Posts

New to scripting on here, but ran into this problem whilst working on script for Black Dragons to use.

This worked for my scenario, but sure there is a better way:

// access inventory in your way here
 if(getInventory().interact("Use", "Raw chicken")) {
         for(RS2Object o : getObjects().getAll()) {
         if(o.getName().equalsIgnoreCase("Chicken Shrine")) {
                chicken_altar = o;
         if(chicken_altar != null) {
             sleep(random(500, 800));
...... (cutting code off here)
Edited by bob10
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.

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...