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;