[Release] New openNpc Function

nice function :)
idk why people keep on blaming you on leeching , you are so not a leecher :)
Sadly, yes I noticed.

c is a variable not a class

So imports wouldnt do anything

However c is in NPCConversationManager's superclass, AbstractPlayerInteraction, which offers getClient() to have access to c
Alright thanks updated. Guess that should show that I didn't leech.
 
nice and yeah i can see the difference between yours and xerxie.

xerxie = open npc with command. @cody @fredrick etc.
yours = open npc command with a NPC. =)

nice.
 
Code:
function start() {
	cm.sendSimple ("Welcome ! I am the All-In-One NPC. Select one of these NPCs you want to open. \r\n#L0##bSera#k #l\r\n#L1##bFredrick#k #l\r\n#L2##bCody#k #l\r\n#L3##bDuey#k #l\r\n#L4##bNaNa(H)#k #l");
}
function action(mode, type, selection) {
	switch (selection) {

	case 0:
	cm.dispose();
        cm.openNpc(2100); //Sera NPC id
	break;

	case 1:
        cm.dispose();
	cm.openNpc(9030000); //Fredrick NPC id
	break;
	
 	case 2:
        cm.dispose();
	cm.openNpc(9200000); //Cody NPC id
	break;
	
	case 3:
        cm.dispose();
	cm.openNpc(9010009); //Duey NPC id
	break;
	
	case 4:
        cm.dispose();
	cm.openNpc(9201001); //NaNa(H) NPC id
        break;
	
	default: 
	cm.dispose();
	}

}
i like this more xd
 
what he said ^


try

Code:
public void openNpc(int id) {
		dispose();
		NPCScriptManager.getInstance().start(getClient(), id);
	}
 
yeh this was originally from fantims, xarezx was working on something then came up with this, so this is 100% not leeched :)
 
DrFusion... I just wonder how u understand most java stuff...
 
Back