Code:
public void sendCutscene(int id) {
OutputStream stream = new OutputStream();
stream.writePacketVarShort(player, 142);
stream.writeShort(id);
stream.writeShort(20); // xteas count
for (int count = 0; count < 20; count++)
// xteas
for (int i = 0; i < 4; i++)
stream.writeInt(0);
byte[] appearence = player.getAppearence().getAppeareanceData();
stream.writeByte(appearence.length);
stream.writeBytes(appearence);
stream.endPacketVarShort();
session.write(stream);
}
This is the cutscene packet. I'm unsure how to close the cutscene though after its finished. Does anybody know how to close the cutscene when its finished?
You will be credited on the thread for your help!
EDIT: Fixed. You need to load the map region to reset the cutscene.
Code:
player.loadMapRegions();
Credits to walied yassen