- 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 :
Under it, add :
Example of an NPC Script :
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 !
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());
}
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();
}
}
Thanks to RMZero for the fix !
Thanks DrFusion for the innovative idea !
Last edited: