public void send(ipacket buffer) { send(buffer.toarray()); }
public void die(entity killer) { try { #region unique killer if (entityflag == entityflag.entity && killer.entityflag == entityflag.entity) { if (killer.mapid == 2014) { if (killer.mapid == 2014) { killer.owner.uniquepoints += 1; if (killer.owner.uniquepoints >= 20) { network.gamepackets.npcreply npc = new network.gamepackets.npcreply(6, "congratulations, you have now " + killer.owner.uniquepoints + " points you can claim your prize now!"); npc.optionid = 255; killer.owner.send(npc.toarray()); } else { network.gamepackets.npcreply npc = new network.gamepackets.npcreply(6, "you have now " + killer.owner.uniquepoints + " points congratz you still need " + (20 - killer.owner.uniquepoints) + " more!"); npc.optionid = 255; killer.owner.send(npc.toarray()); } } } #endregion
killer.addflag(network.gamepackets.update.flags.cursed);
killer.owner.send(update.toarray());
public byte[] toarray() { return buffer; }