[Release] New openNpc Function

Experienced Elementalist
Joined
Jul 26, 2008
Messages
280
Reaction score
0
Before you think that this is another leech of Xerixe's @opennpc command, its not. Read everything properly first cause this isnt even a command !

This NPC function opens another NPC with an NPC. No flaming please. Other than that, happy leeching ~
Saves space in FM rather than putting up so many NPCs making your FM messy. Putting one NPC that opens up other NPCs would be better.

In NPCConversationManager.java :

Ctrl + F and search :
Code:
public void openShop(int id) {
		MapleShopFactory.getInstance().getShop(id).sendShop(getClient());
	}
Under it, add :
Code:
public void openNpc(int id) {
               dispose();
		NPCScriptManager.getInstance().start(getClient(), id);
	}

Example of an NPC Script :
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) {
	if (selection == 0) {
       cm.openNpc(2100); //Sera NPC id
	} else if (selection == 1) {
	cm.openNpc(9030000); //Fredrick NPC id
	} else if (selection == 2) {
	cm.openNpc(9200000); //Cody NPC id
	} else if (selection == 3) {
	cm.openNpc(9010009); //Duey NPC id
	} else if (selection == 4) {
	cm.openNpc(9201001); //NaNa(H) NPC id
	} else {
	cm.dispose();
	}
}
Credits to me. This is not a leech for the last time tq >.<
Thanks to RMZero for the fix !
Thanks DrFusion for the innovative idea !
 
Last edited:
nice function maybe it could make sera more nice like opening the shops for them to buy things then after that return them 2 henesys juz my ideas hahas i will try it lata xD
 
nice function maybe it could make sera more nice like opening the shops for them to buy things then after that return them 2 henesys juz my ideas hahas i will try it lata xD
idk what you are talking about but openShop is a different function.
 
well you have the leaked version you know very well tho , yeah w/e. have fun on the release of other's work.
 
xazerrx, leeching wont neither bring you far. singaporean? im also singaporean :) i know how singaporean boast about their work tho. have fun.
 
you don't judge the general by one you know. and how would I be able to leech if I don't even have access to zf's source ? I admit I do have a copy of the leaked source and I am 100% positive this isn't in it.
 
nice function :)
idk why people keep on blaming you on leeching , you are so not a leecher :)
 
Back