Add this into PlayerAssistant.java
/*
*Vengeance
*/
public void castVeng() {
if(c.playerLevel[6] < 94) {
c.sendMessage("You need a magic level of 94 to cast this spell.");
return;
}
if(c.playerLevel[1] < 40) {
c.sendMessage("You need a defence level of 40 to cast this spell.");
return;
}
if(!c.getItems().playerHasItem(9075, 4) || !c.getItems().playerHasItem(557, 10) || !c.getItems().playerHasItem(560, 2)) {
c.sendMessage("You don't have the required runes to cast this spell.");
return;
}
if(System.currentTimeMillis() - c.lastCast < 30000) {
c.sendMessage("You can only cast vengeance every 30 seconds.");
return;
}
if(c.vengOn) {
c.sendMessage("You already have vengeance casted.");
return;
}
c.startAnimation(905);
highGFX(666);//Just use c.gfx100
c.getItems().deleteItem2(9075, 4);
c.getItems().deleteItem2(557, 10);//For these you need to change to deleteItem(item, itemslot, amount);.
c.getItems().deleteItem2(560, 2);
addSkillXP(112*Config.SKILL_EXP, 6);
refreshSkill(6);
c.vengOn = true;
c.lastCast = System.currentTimeMillis();
}
now go to player.java and add these
public long lastCast = 0;
public boolean vengOn = false;
In ClickingButtons.java Add this
case 118098:
c.getPA().castVeng();
break;
open client.java and find this
if(playerMagicBook == 0) {
setSidebarInterface(6, 1151); //modern
}else {
setSidebarInterface(6, 12855); // ancient
}
reaplace it with this
if(playerMagicBook == 0) {
setSidebarInterface(6, 1151); //modern
}else {if(playerMagicBook == 2) {
setSidebarInterface(6, 29999); //lunar
}else {
setSidebarInterface(6, 12855); // ancient
}
}
now go to actionhandler.java
search for case
6552
you sould see this
case 6552:
if (c.playerMagicBook == 0) {
c.playerMagicBook = 1;
c.setSidebarInterface(6, 12855);
c.sendMessage("An ancient wisdomin fills your mind.");
c.getPA().resetAutocast();
} else {
c.setSidebarInterface(6, 1151); //modern
c.playerMagicBook = 0;
c.sendMessage("You feel a drain on your memory.");
c.autocastId = -1;
c.getPA().resetAutocast();
}
break;
under that break add this
case 410:
if (c.playerMagicBook == 0) {
c.playerMagicBook = 2;
c.setSidebarInterface(6, 29999);
c.sendMessage("An Lunar t wisdomin fills your mind.");
c.getPA().resetAutocast();
} else {
c.setSidebarInterface(6, 1151); //modern
c.playerMagicBook = 0;
c.sendMessage("You feel a drain on your memory.");
c.autocastId = -1;
c.getPA().resetAutocast();
}
break;
now go to ObjectManager.java
search for this public void
loadCustomSpawns(Client c) {
under that add this
c.getPA().checkObjectSpawn(410, 3099, 3503, 1, 10);
Compile and your done!
And compile, and your done, many other tutorials of mine will be released too, so go check them out, and please REP.
[/b][/color]