[Release] New openNpc Function
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 !
Re: [Release] New openNpc Function
Oops forgot a [Release] tag. Edited.
Sorry for double post.
Comments please tq.
Re: [Release] New openNpc Function
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
Re: [Release] New openNpc Function
Re: [Release] New openNpc Function
Quote:
Originally Posted by
YaNdAoGM
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.
Re: [Release] New openNpc Function
guess u took it from zf source again ;o
Re: [Release] New openNpc Function
Quote:
Originally Posted by
nejevoli
guess u took it from zf source again ;o
what?
*Edit* I don't think zf source even has this. Especially not the leaked version. And what do you mean again? I havent took anything from zf source.
Re: [Release] New openNpc Function
well you have the leaked version you know very well tho , yeah w/e. have fun on the release of other's work.
Re: [Release] New openNpc Function
Wadeva. Your arrogance won't bring you far.
Re: [Release] New openNpc Function
Quote:
Originally Posted by
iFLON
putain je suis votre fille
Why do you keep posting random stuff o.O
Re: [Release] New openNpc Function
xazerrx, leeching wont neither bring you far. singaporean? im also singaporean :) i know how singaporean boast about their work tho. have fun.
Re: [Release] New openNpc Function
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.
Re: [Release] New openNpc Function
Re: [Release] New openNpc Function
Quote:
Originally Posted by
nejevoli
o i c . ok
lol? I expected a harsh reply. Anyways, have fun too, considering you stepped down from Alcove o.O
Re: [Release] New openNpc Function
Pretty good release. i think many people including me had that idea but you just do it :D