Jump to content

How to get npc location


Recommended Posts

Posted

Hello there guys i want to create my own sorc garden winter course bot for leveling few farming lvl's so as thieving, but i can't understand how to make my script determine whenever to go.Currenly i'm using area's but that's not the most effective way of doing it :( so i'f sombody could help that would be fantastic ;) 

 

 

 

  • 2 weeks later...
Posted (edited)
     //If you are using it to get the position + closest npc for a fighter script or so
          NPC name = npcs.closest("npc name");
          name.getPosition();

     //if you want to use it for a position only then
          NPC name = npcs.closest("npc name").getPosition();

      //however you can do that to get the x and y coords
          name.getPosition().getX();
          name.getPosition().getY();

I hope i have helped, Enjoy ;)

Edited by Mr Pro Pop

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...