purpose: to make all zones nonwild, besides the actuel wild. And a fix for wild.
difficulty: 1/10
classes modified: client.java
------------------------------------------------------------
making only the wild a PvP place
search for
Code:
public boolean nonwild
and replace your's with mine.
Code:
public boolean nonWild() {
if((absX <= 2943) || (absX >= 3365) || (absY <= 3519) || (absY >= 4000) ||
heightLevel > 0)
return true;
else
return false;
}
this makes everyplace but the wild a safezone.
---------------------------------------------------------------
fix for wilderness levels
search for
Code:
sendQuest("Level: "+WildyLevel, 199);
replace that with
Code:
if(nonWild())
{
sendQuest("@gre@SafeZone", 199);
}
if(!nonWild()) {
sendQuest("Level: "+WildyLevel, 199);
}
Now, for making the wild levels only come in use if you are in the wild(if you dont have wild levels, this will add them)
search for:
scroll down until you see
Code:
if(!CheckWildRange(plz.combat)){
IsAttacking = false;
teleportToX = absX;
teleportToY = absY;
sendMessage("Your level differance is too great!");
sendMessage("You need to move further into the Wilderness.");
ResetAttack();
}else{
}
or something similar to that.
replace it with(note:if you dont have wild levels and you want them, add this)
Code:
if(!CheckWildRange(plz.combat) && !nonWild()){
IsAttacking = false;
teleportToX = absX;
teleportToY = absY;
sendMessage("Your level differance is too great!");
sendMessage("You need to move further into the Wilderness.");
ResetAttack();
}else{
}
next, search for
scroll down until you see
Code:
if(!CheckWildRange(pl2.combat)){
sendMessage("Your level differance is too great!");
sendMessage("You need to move further into the Wilderness.");
ResetAttack();
}else
or something similar(again, if you dont have wild levels and want them, add this)
replace that with
Code:
if(!CheckWildRange(pl2.combat) && !nonWild()){
sendMessage("Your level differance is too great!");
sendMessage("You need to move further into the Wilderness.");
ResetAttack();
}else
also, if you wanted wild levels, add this boolean
Code:
public boolean CheckWildRange(int pcombat)
{
if(((combat + WildyLevel >= pcombat) && (pcombat >= combat)) || ((combat - WildyLevel <= pcombat) && (pcombat <= combat)))
{
return true;
}
else
{
return false;
}
}
save, close, compile.
You now have only wild a PvP zone, it only says "level: blah" if you are in the wild, else it will say "safezone" and if you did not have it, you now have wilderness levels(ex. You are level 100 and a lvl 126 tries to attack you and you are in level 20 wild he cant until you are in 26 wild)
enjoy
~hood