Runescape: Adding Christmas Crackers to PI – Game Hack Tutorial

Credits to: Sokka for this hack tutorial

This will allow you to add Christmas Crackers to the game client. It takes a little basic text editing, which can be done in notepad, editplus, or a similar text only editor. Note, do not use wordpad or another document editor as it will add other characters and break the game and game hack.

Master Evony

Master Evony, the easy way

Go to server/model/players/packets and open up ItemOnPlayer.java

You should see something like this:

package server.model.players.packets;

import server.model.players.Client;
import server.model.players.PacketType;
import server.model.players.PlayerHandler;

public class ItemOnPlayer implements PacketType {

	@override
	public void processPacket(Client c, int packetType, int packetSize) {
		int fromInterface = c.getInStream().readUnsignedWordA();
		int otherPlayerId = c.getInStream().readUnsignedWord();
		int useItemId = c.getInStream().readUnsignedWord();
		int useItemSlot = c.getInStream().readSignedWordBigEndian();
		if(c.playerRights > 2) {
			System.out.println("Player: "+c.playerId+" used  item: "+useItemId+" Slot: "+useItemSlot+" Interface: "+fromInterface);
		}
		if((c.playerItems[useItemSlot]-1) != useItemId) {
			return;
		}
		switch(useItemId) {
		}

	}

}

Under:

switch(useItemId) {

add this:

			case 962:
				c.gfx0(176);
				c.startAnimation(451);
				c.sendMessage("You pull the Christmas Cracker...");
				o.sendMessage("You pull the Christmas Cracker...");
				c.getItems().deleteItem(useItemId, 1);
				if(Misc.random(1) == 1) {
					o.forcedText = "Yay I got the Cracker!";
					o.forcedChatUpdateRequired = true;
					o.getItems().addItem((1038 + Misc.random(5)*2), 1);
				} else {
					c.forcedText = "Yay I got the Cracker!";
					c.forcedChatUpdateRequired = true;
					c.getItems().addItem((1038 + Misc.random(5)*2), 1);
				}
				c.turnPlayerTo(o.absX, o.absY);
				break;

Enjoy!

Page Views: 5

One Response to Runescape: Adding Christmas Crackers to PI – Game Hack Tutorial

  1. zerodelocke says:

    I haven’t played Runescape in a very long time so I may be asking a stupid question but what exactly is Runescape PI?

    View Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

css.php
X

Forgot Password?

Join Us