Ahh, I guess you could use it this way straightCan you show me how having 2-3 different NPCs would look like? All I do is NPC script so when it comes to packets I'm clueless.
// I don't know what npc id, but oh well..
PHP:
public static final int[] npcId = {123, 456, 789};
public static final String[] desc = {"Hi, I'm 123", "456 npc here", "789"};
public static MaplePacket setNPCScriptable() {
MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.SET_NPC_SCRIPTABLE.getValue());
mplew.write(Constants.npcId.length); // following structure is repeated n times
for (int i = 0; i < Constants.npcId.length; i++) {
mplew.writeInt(Constants.npcId[i]);
mplew.writeMapleAsciiString(Constants.desc[i]);
mplew.writeInt(0); // start time
mplew.writeInt(Integer.MAX_VALUE); // end time
}
return mplew.getPacket();
}
Oh and, you can't script it with status I guess. you only can edit the text of the npcs with default text. Basically a sendOk/sendNext