Jump to content

What are the characters that appear randomly and how do you interact with them?


trainux

Recommended Posts

These characters appear randomly, I assume, which are part of the bot detection.
I have captured some IDs as I have developed the code.
Before trying the code that I try to do, first, to "dismiss" said characters, I would like to know:

Sorry if my question is a bit absurd, but I confuse a few types of statements.

The code that I have so far is:

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) {
	if(npc.isVisible()) {
		npc.interact("Dismiss");
	}
}


I assume that the error in what I have code is if the NPC or objecto nose digire to me.


First of all, Thanks.

 

osbot npc.jpg

Link to comment
Share on other sites

Looks like the lads above answered your question, but just for future reference: As a general rule of thumb, if you have to use an id for something, there's probably a better solution. Try and filter objects based on static features which are unlikely to change, for example name or interaction options. This is better practice and will mean your script is unlikely to break following game updates. It's also mandatory to avoid the use of ids if you wish to submit a script to the SDN.

If you have any further questions, don't hesitate to let me know / drop me a PM. I'm always happy to help :)

Best

Apa

  • Like 1
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...