RSCPacket
LSPacket
663664665666667668669670671672673
s.addByte((byte) player.getBank().maxSize()); for (InvItem i : player.getBank().getItems()) { s.addShort(i.id); s.addInt(i.amount); } packets.add(s.toPacket()); } /** * Show the bank window */
686687688689690691692693694695696
true)); s.addInt(Formulae.getPrice( shop.getItems().get(Formulae.getItemPos(shop, i.id)), shop, false)); } packets.add(s.toPacket()); } /** * Sends a system update message */
696697698699700701702703704705706
*/ public void startShutdown(int seconds) { RSCPacketBuilder s = new RSCPacketBuilder(); s.setID(172); s.addShort((int) (((double) seconds / 32D) * 50)); packets.add(s.toPacket()); } /** * Updates the id and amount of an item in the bank */
708709710711712713714715716717718
RSCPacketBuilder s = new RSCPacketBuilder(); s.setID(139); s.addByte((byte) slot); s.addShort(newId); s.addInt(amount); packets.add(s.toPacket()); } public void addPacket(RSCPacket packet) { packets.add(packet); }
99100101102103104105106107108109
updates.addByte((byte) p.getCombatLevel()); updates.addByte((byte) (p.isSkulled() ? 1 : 0)); updates.addByte((byte) (p.isAdmin() ? 3 : (p.isMod() ? 2 : (p .isPMod() ? 1 : 0)))); } return updates.toPacket(); } return null; } /**
4647484950515253545556
packet.addBits(offsets[0], 5); packet.addBits(offsets[1], 5); packet.addBits(n.getSprite(), 4); packet.addBits(n.getID(), 10); } return packet.toPacket(); } /** * Sets the player to update */
4546474849505152535455
for (Player pl : playerToUpdate.getViewArea() .getPlayersInView()) { if (pl.equals(playerToUpdate) || pl == playerToUpdate) continue; pl.getActionSender().addPacket(updatez.toPacket()); } } } for (Npc n : npcsNeedingHitsUpdate) { updates.addShort(n.getIndex());
4445464748495051525354
packet.addShort(o.getID()); packet.addByte(offsets[0]); packet.addByte(offsets[1]); packet.addByte((byte) o.getDirection()); } return packet.toPacket(); } return null; } /**
220221222223224225226227228229230
player.setSleeping(true); byte[] image = Captcha.generateCaptcha(player); RSCPacketBuilder s = new RSCPacketBuilder(); s.setID(206); s.addBytes(image, 0, image.length); packets.add(s.toPacket()); } /** * Updates the equipment status */
235236237238239240241242243244245
s.addShort(player.getWeaponAimPoints()); s.addShort(player.getWeaponPowerPoints()); s.addShort(player.getMagicPoints()); s.addShort(player.getPrayerBonus()); s.addShort(player.getRangePoints()); packets.add(s.toPacket()); } /** * Updates the fatigue percentage */