• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Mutliple Bones On Altar

Initiate Mage
Joined
Oct 28, 2010
Messages
3
Reaction score
0
Cloudkane - Mutliple Bones On Altar - RaGEZONE Forums

Client.Java
~~~~~~~~~~~~~~~~~~~

Locate(ctrl+f)
Code:
private int somejunk;

Under it add

Code:
public int boneID;

UseItem.java
~~~~~~~~~~~~~~~~~~~~

Code:
case 409://alter id
	if (c.getPrayer().isBone(itemId))
	c.getDH().sendDialogues(594, 594);//ichose these #'s. you can chose w/e you want.
	c.boneID = itemId;
break;

If you already have something for case 409 then remove it and add this.

DialogueHandler.java
~~~~~~~~~~~~~~~~~~~~~~

Code:
case 594://must be the same # you selected in useitem
			sendOption3("Sacrifice Bone","Sacrifice 10 Bones", "Sacrifice All Bones");
			c.dialogueAction = 595;//I chose this.. chose w/e number you want that isnt already used.
		break;


ClickingButtons.java
~~~~~~~~~~~~~~~~~~~~~~~~

Code:
ClickingButtons.java
~~~~~~~~~~~~~~~~~~~~~~~

	case 9167:
		if(c.dialogueAction == 595) {//same number used in dialogue handler
			if (c.getItems().playerHasItem(c.boneID,1)) {
			c.getPrayer().bonesOnAltar(c.boneID);
			c.getPA().closeAllWindows();
			c.sendMessage("@red@The God's are pleased with your sacrifice.");
		}
	}
		break;
	case 9168:
		if(c.dialogueAction == 595) {//same number used in dialogue handler
			for (int i = 0; i < 10; i++) {
				if (c.getItems().playerHasItem(c.boneID,1)) {
				c.getPrayer().bonesOnAltar(c.boneID);
				c.getPA().closeAllWindows();
				c.sendMessage("@red@The God's are pleased with your sacrifice.");
			}
		}
	}
		break;
	case 9169:
		if(c.dialogueAction == 595) {//same number used in dialogue handler
			for (int i = 0; i < 28; i++) {
				if (c.getItems().playerHasItem(c.boneID,1)) {
				c.getPrayer().bonesOnAltar(c.boneID);
				c.getPA().closeAllWindows();
				c.sendMessage("@red@The God's are pleased with your sacrifice.");
			}
		}
	}
		break;

These cases may already be used and it's up to you to figure out how to add onto the used cases.. or you can just clear w/e you got and add this.

An example of adding onto the cases..

Code:
case 9167:
			if(c.dialogueAction == 13) {//same number used in dialogue handler
				if (c.getItems().playerHasItem(c.boneID,1)) {
				c.getPrayer().bonesOnAltar(c.boneID);
				c.getPA().closeAllWindows();
		}
	}
			if (c.dialogueAction == 14) { //MB
					c.getPA().startTeleport(2541, 4714, 0, "modern");
				}//THIS WHOLE PART WAS HERE BEFORE I ADDED THE PART FOR BONES.
			break;
 
Junior Spellweaver
Joined
Nov 18, 2007
Messages
173
Reaction score
5
For what base? what revision? ......

Obviously 317. Because 508 and any other version above that do not use client.java to edit the server source. 508's and above use files which are split into different sections like Server.java, Engine.java, Player.java e.d.
 
Newbie Spellweaver
Joined
Aug 13, 2012
Messages
31
Reaction score
0
When I get in game and try to click the option "Sacrifice all bones" it won't let me click it O_O. I'm positive I inserted everything right though.
 
Back
Top