Jump to content

2 npc's with same name but different levels


Recommended Posts

Posted (edited)

id?

 

 

 

 

getCombatLevel()

 

 

 

I am no scripter at all but grab the ID and use the ID instead of the Name ? (Different Levels have different ID's)

You can get the ID under settings on the client. (Same is used if you want to interact with a door, inventory and so)

Edited by Oliver
  • Like 1
Posted

 

 

getCombatLevel()

 

That's what I did when making my thieving script compatible with guards on DMM. I'd shy away from using ids as Sentende mentioned, only because Jagex in the past has changed them and could easily do so again. Not a super big deal but it is annoying to have to go grab new ids to change your script.

  • Like 2
Posted

I am no scripter at all but grab the ID and use the ID instead of the Name ? (Different Levels have different ID's)

You can get the ID under settings on the client. (Same is used if you want to interact with a door, inventory and so)

 

Check Molly's post underneath. Using ID's to grab the correct NPC is like trying to kill someone with a plastic knife.

 

That's what I did when making my thieving script compatible with guards on DMM. I'd shy away from using ids as Sentende mentioned, only because Jagex in the past has changed them and could easily do so again. Not a super big deal but it is annoying to have to go grab new ids to change your script.

 

Haven't touched RS since december, but DMM guards don't have the "Pickpocket" option? Could you not just check npc.hasAction("Pickpocket")? Could always be wrong.

 

Also OP: seems as if getCombatLevel() isn't a thing; use getLevel()

  • Like 1
Posted (edited)

Check Molly's post underneath. Using ID's to grab the correct NPC is like trying to kill someone with a plastic knife.

 

 

Haven't touched RS since december, but DMM guards don't have the "Pickpocket" option? Could you not just check npc.hasAction("Pickpocket")? Could always be wrong.

 

Also OP: seems as if getCombatLevel() isn't a thing; use getLevel()

 

Honestly I don't recall if they have the pickpocket option, but yeah you could always check for action of course, assuming they don't.

Edited by Molly

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