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
  • Automatically pass obstacles


    xVril

    Recommended Posts

    Hi, 

    I have been trying to figure this out.

    I have two entities:

    1. The local player.
    2. A moving NPC

    I want the local player to walk to the moving NPC, my issue is there may be obstacles. Normally in the past I have handled these obstacles individually. My issues here is these obstacles are dynamic game objects, so adding a specific tile is useless, they are passable.

    I have tried to add them as Passable Obstacles but still when walking to the NPC it makes no attempt to pass them.

    In Pseudo code I am assuming it would be something like this:

    if ( ObstacleExistsBetweenPointAandPointB)

    PassObstacle();

    Else 

    WalkToNPC() && InteractNPC();

    Any help would be much appreciated

     

     

     

     

    Link to comment
    Share on other sites

    You could have an array of names/ids for your objects, then in your walking logic have a break clause if within X tiles of an object to deal 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.