Jump to content

NPC - Click question


system64

Recommended Posts

It's my first script; I'm trying to make a range guild script.

 

 

What should i use to talk to the Range judge?

 

 

I currently have:

 

 

 

 

import org.osbot.rs07.api.map.Position;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
 
import org.osbot.rs07.utility.Area;
 
import java.awt.*;
 
@ScriptManifest(author = "system64", info = "range guild", name = "SmartGuild", version = 0, logo = "")
public class Guild extends Script {
 
private static final int[] Judge_ID = { 6070 }; // competition judge
 
private Position[] path = {
    new Position(2659, 3437, 0),
    new Position(2660, 3436, 0),
    new Position(2662, 3434, 0),
    new Position(2664, 3431, 0),
    new Position(2666, 3426, 0),
    new Position(2670, 3418, 0),
    
};
 
 
Edited by system64
Link to comment
Share on other sites

NPC judge = getNpcs().closest("Judge");

if(judge != null){

judge.interact("Talk-to");

}

 

I would suggest not using ids for NPCs or RS2Objects because they are subject to change on every RS update. Also you have an array of integers, which is unnecessary.

 

private static final int JUDGE_ID = 0;

NPC judge = getNpcs().closest("Judge");

if(judge != null){

judge.interact("Talk-to");

}

 
 
use that instead of NPCS/RS2objects? 
 
 
Edited by system64
Link to comment
Share on other sites

  • 2 weeks later...
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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