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
  • how to get object we are interacting with?


    Jewlz

    Recommended Posts

    Looked at API, only seems to be this for characters or NPCS, not game objects such as trees, rocks etc..

     

    Instead of NPC, replace it with GameObject, it has been a while since I have actually written anything so I can't give you specifics but it is just a matter of replacing it with GameObject.

    Link to comment
    Share on other sites

    Instead of NPC, replace it with GameObject, it has been a while since I have actually written anything so I can't give you specifics but it is just a matter of replacing it with GameObject.

    According to the API it wont return anything that isnt a character

     

    public Character getCharacterInteractingWithMe()

    Gets the Character currently interacting with this Character. If none interacting, returns null.
    Link to comment
    Share on other sites

    The interacting with is a hook in the gamepack, but only works for npc/player.

    If you want the game object you'll have to get your orientation, and get the tile you're facing (assuming you're standing next to it)

    Otherwise like Baller said, save it as a variable when you start interacting with it.

    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.