Jump to content

How do I know that an NPC is interacting with me?


trainux

Recommended Posts

I have the following code:

final int[] npcsList = new int[] {
		5427, 6744, //Flippa
		312, 479, 2145, 3290, //Frog
		380, 2122, //Pillory Guard
		375, 376, //Rick Turpentine
		5510, //Sandwich lady
		5438, 5441, //Giles
		322, 2408, 2409, 2429, 4301, 4302, 4303, 4304, 4305, //Drunken Dwarf
};
final NPC npc = npcs.closest(npcsList);
if (npc != null) {
	sleep(random(7000,15000));
	interactCustom(npc, "Dismiss");
	cantNPCFound++;
}

With this code valid that there is an existing NPC and is visible then interact and dismiss it.

But how valid is the NPC for me and not for another user?

Link to comment
Share on other sites

1) I have no idea what you're asking

2) Why use IDs for NPCs? It looks horrible, is extremely unreadable (highlighted by the fact that you have comments) You can just use the names of the NPCs...

NPC npc = getNpcs().closest("Giles", "Sandwich Lady", "Rick Turpentine");

etc.

3) OSBot already has a random event dismisser, why are you writing your own?

Edited by Explv
Link to comment
Share on other sites

14 minutes ago, Cloxygen said:

u know there is a built in random event handler right?

I did not know it :(

13 minutes ago, Explv said:

1) I have no idea what you're asking

2) Why use IDs for NPCs? It looks horrible, is extremely unreadable (highlighted by the fact that you have comments) You can just use the names of the NPCs...


NPC npc = getNpcs().closest("Giles", "Sandwich Lady", "Rick Turpentine");

etc.

3) OSBot already has a random event dismisser, why are you writing your own?

1) An NPC appears but you can not identify if you want to interact with me or are interacting with another character.

2) The custom of programming of administrative systems I generate a compulsive obsecion of everything programmed by the identifiers (seriously, I do not joke xD)

3) I did not know it. What is it and how do I use it?

 

NOTE: I do not know if it is completely understood because I speak Spanish and use "Google Translate" to try to communicate my doubts.

Edited by trainux
Link to comment
Share on other sites

Are you asking how to know if random event is for you or for another player?

5 minutes ago, trainux said:

I did not know it :(

I did not know it. What is it and how do I use it?

You can just ignore them and they will go away. Or click on settings then tick "dismiss randoms".

Edited by Antonio Kala
Link to comment
Share on other sites

9 minutes ago, Antonio Kala said:

Are you asking how to know if random event is for you or for another player?

You can just ignore them and they will go away. Or click on settings then tick "dismiss randoms".

I do not know if I'll ask a stupid question, but ignoring all NPCs is not a bit obvious that it's a bot?
One playing dismisses 2/3 NPC ramdoms.

Link to comment
Share on other sites

11 minutes ago, trainux said:

I do not know if I'll ask a stupid question, but ignoring all NPCs is not a bit obvious that it's a bot?
One playing dismisses 2/3 NPC ramdoms.

by default the client should automatically dismiss random events you don't have to write any code for it to work. If its not doing it, you can enable it in the options

Link to comment
Share on other sites

35 minutes ago, Charlotte said:

Random events were phased out in rs3 as better anti-macro software was developed. Random events have no effect whatsoever and is not used to determine botters. You can either completely ignore it or use the built-in system to dismiss it.

yH6w6T2.png

Thank you very much.


And thank you all for answering.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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