Description : To add a lunar spell onto your server. It will be charge , so make sure that spell is available for you.
Difficulty : 3/10
Files used : Client.java
What to know : Where to add certain things.
All credit goes to King ownage from Frugooscape.net
1. Open client.java and look for the code
Code:
public class client extends Player implements Runnable {
After you find it , should be near the top of client.java hit enter twice and add this code (Part of Vengence)
Code:
public boolean vegeance = false;
public int vengtimer = 0;
public int waittimer = 0;
public boolean wait = false;
public void vegeance()
{
if(vegeance == false && vengtimer <= 0 && waittimer <= 0 && playerLevel[6] >= 94) {
vegeance = true;
vengtimer = 20;
addAnimation(1914);
stillgfx(465, absX, absY);
sendMessage("You gain the vegeance power!");
} else {
sendMessage("You can cast this spell ones a 30 seconds!");
}
}
public void castvegeance()
{
if(vengtimer <= 0 && vegeance == true && PlayerHandler.players[AttackingOn] != null) {
txt4 = "Taste vegeance!";
string4UpdateRequired = true;
PlayerHandler.players[AttackingOn].hitDiff = misc.random(40);
PlayerHandler.players[AttackingOn].updateRequired = true;
PlayerHandler.players[AttackingOn].hitUpdateRequired = true;
waittimer = 30;
vengtimer = 0;
vegeance = false;
} else {
//If player doesnt have target .. Else nullPoint error
}
}
public int VenganceTimer = 0;
It allows you to attack a player and adds send Message and Texting as you can see.
2. Save , close , open client.java up again and look for the code
Code:
if (isGhost == false)
{
isNpc = false;
updateRequired = true;
appearanceUpdateRequired = true;
}
After that , under it add
Code:
if(vengtimer == 0) {
castvegeance();
}
After that just scroll down a little until you see
Code:
if (RCTimer > 0) {
RCTimer -= 1;
}
Under that add :
Code:
if (vengtimer > 0) {
vengtimer -= 1;
}
Then save , close and open up client.java again.
3. Add this code with your other commands.
Code:
if(command.startsWith("vegeance")) {
vegeance();
}
Save and close , and re-open Client.java again =.=
4. Search for
Code:
if (magicID == 1160 && playerLevel[3] >= 1) { // Wind bolt
ProjectileSpell(117, 118, 119, absY, absX, offsetY, offsetX, npcIndex, EnemyY2, EnemyX2, 12, 1, 566, 558, 2, 1);
}
and above that add
Code:
if(magicID == 1193 && playerLevel[3] >= 94) {
castvegeance();
}
Save , close , re-open for the last time!
5. Search for
Code:
case 14067: // Char design accept button
RemoveAllWindows();
break;
Under that add
Code:
case 4169:
vegeance();
break;
Enjoy