Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Getting an equipped item has actions of inventory item


    distraction

    Recommended Posts

    (Edited to be much shorter now that we have an answer) Getting an item with `getEquipment().get((item) -> item != null && item.getName().contains("glory("));` does not have the teleport actions that show up if you right click the equipped item (for a charged glory they would be "Edgeville", "Draynor Village", etc..). It still has the actions that it would have as if it were in the inventory (Like "Rub").


    Edit: From Nezz in discord scripter chat "Whether the item is in the inventory or in equipment, the actions of the item itself are the same. In the RS cache it's the same item". 

    Link to comment
    Share on other sites

    (Edited to be much shorter now that we have an answer) Getting an item with `getEquipment().get((item) -> item != null && item.getName().contains("glory("));` does not have the teleport actions that show up if you right click the equipped item (for a charged glory they would be "Edgeville", "Draynor Village", etc..). It still has the actions that it would have as if it were in the inventory (Like "Rub").

    Edit: From Nezz in discord scripter chat "Whether the item is in the inventory or in equipment, the actions of the item itself are the same. In the RS cache it's the same item". 

    Did you try messing with widgets?

    Link to comment
    Share on other sites

    Did you try messing with widgets?

    Yeah, I had it working using widgets if the glory was in the inventory (right click rub, then widget pops up over chat). The reason I ran into this issue is because I had a function that would return the item I was going to use to teleport.The function would first check for an equipped item to teleport with, and if it didn't find one then it would check the inventory. So when I get the item back I was using `item.hasAction("Edgeville")` to check if it was an equipped glory. I ended up just separating my functions so that its implicit where it came from. Thanks for the suggestion!

     

    In the end, you can still do `item.interact("Edgeville")` if it is equipped. It just won't show "Edgeville" as an action.

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.