I dont know if this has been posted before but here.
I WOULD LIKE SOME CONSTRUCTIVE CRITICISM PLEASE, I ACCEPT ALL THE HELP POSSIBLE TO IMPROVE =]
AND YES I KNOW THIS IS EASY(FOR THE NON BEGINNERS) BUT YAH I'M A BEGINNER
~ lets begin
1. create a new class called Prayer and add this to it.
Code:
/**
* Class Prayer
*
* Version 1.0
*
* Wednesday, Feb 12 , 2014
*
* Created by josue
**/
package palidino76.rs2.players.skills;
import palidino76.rs2.players.Player;
import palidino76.rs2.players.items.PlayerItems;
import palidino76.rs2.EventManager.*;
import palidino76.rs2.Engine;
public class Prayer {
PlayerItems pi = new PlayerItems();
public int [] bones = {526,532,534,536}; // other bones can be add here
public double [] exp = {4.5,15,30,72}; // exp here
public String [] boneNames = {"bone", "big bone", "baby dragon", "dragon"}; // bones name here
public void startBurying(final Player p, final int itemId){
EventManager.getSingleton().addEvent(250,new Event() {
public void execute(EventContainer c) {
for (int i = 0 ; i < bones.length; i++){
if (itemId == bones[i]){
Engine.playerItems.deleteItem(p, bones[i], pi.getItemSlot(p, bones[i]), 1);
p.requestAnim(827, 0);
p.addSkillXP(exp[i]*5, 5);// im doing my server base off rs but w/e rs give its x5 on my server
p.frames.sendMessage(p, "you dig a hole and bury the "+boneNames[i]+ " into the ground");
}
}
c.stop();
}
});
}
}
2. next in itemSelect add this
Code:
Prayer prayerObject = new Prayer();
3. Now in itemSelect under the switch add this.
Code:
case 526:
case 532:
case 534:
case 536:
prayerObject.startBurying(p,itemId);
break;
4. dont forget to import where ever u add the Prayer class