thirkle
July 27th, 2010, 18:03
FUNPK AREA TUTORIAL
100% CREDZ TO ME
Classes Modified; Client.java
Difficulty; 4/10
Tested On Delta
__________________
Stage 1: Asigning the Co-ordinates
Find:
public boolean validClient(int index) {
client p = (client) handler.players[index];
if ((p != null) && !p.disconnected) {
return true;
}
return false;
}
And underneath it Add
public boolean inFunPk() {
if(absX >= XXHH && XXLL <= 3166 && absY >= YYHH && absY <= YYLL) {
return true;
} else {
return false;
}
}
Replace "XXHH" With the X Co-Ord that it must be higher than.
Replace "XXLL" With the X Co-Ord that it must be lower than.
Replace "YYHH" With the Y Co-Ord that it must be higher than.
Replace "YYLL" With the Y Co-Ord that it must be lower than.
__________________
Stage 2: Making the place Attackable
Find
public boolean isInWilderness(int coordX, int coordY, int Type) {
if (Type == 1) {
if ((coordY >= 3523) && (coordY <= 3967) && (coordX <= 3392) && (coordX >= 2942) || absY <= 9474 && absY >= 9405 && absX >= 2687 && absX <= 2755 || absX >= 3220 && absX <= 3299 && absY >= 3520 && absY <=3548 || absX >= 2250 && absX <= 2296 && absY >= 4676 && absY <=4715 || absX >= 2980 && absX <= 2993 && absY >= 2629 && absY <= 2645 || absX >= 3371 && absX <= 3381 && absY >= 3225 && absY <= 3239) {
return true;
}
} else if (Type == 2) {
if ((coordY >= 3512) && (coordY <= 3967) && (coordX <= 3392)
&& (coordX >= 2942)) {
return true;
}
}
return false;
}
And after
(coordY >= 3523) && (coordY <= 3967) && (coordX <= 3392) && (coordX >= 2942) ||
Add
inFunPK ||
__________________
Stage 3: Asigning the FunPK Text
Find
if (isInWilderness(absX, absY, 1) && !inRogueArea())
{
if (!hasWildySign)
{
hasWildySign = true;
outStream.createFrame(208);
outStream.writeWordBigEndian_dup(197);
sendQuest("", 199);
}
int level = ((absY - 3520) / 8) + 1;
if (level != wildyLevel)
{
wildyLevel = level;
sendQuest("Level: " + wildyLevel, 199);
}
}
Under it add
if(inFunPk()) {
hasWildySign = true;
outStream.createFrame(208);
outStream.writeWordBigEndian_dup(197);
sendQuest("Fun PK", 199);
}
__________________
Stage 4: Asigning the Death
Find
if (deathStage == 2 && System.currentTimeMillis() - deathTimer >= 2500 && !isInPitGame() && !IsInFightCave()) {
And you should see under it.. Things like
if(!inFunPK()){
youdied();
removeAllItems();
}
Find somewhere below that something like
removeAllItems();
toX = 3088;
toY = 3490;
heightLevel = 0;
sM("Oh dear! You died!");
hitDiff = 0;
updateRequired = true;
appearanceUpdateRequired = true;
And change it all to
if(!inFunPK()){
removeAllItems();
toX = 3088;
toY = 3490;
heightLevel = 0;
sM("Oh dear! You died!");
hitDiff = 0;
updateRequired = true;
appearanceUpdateRequired = true;
}else{
toX = XXXX;
toY = YYYY;
sM("Oh dear! You died in FunPK!");
hitDiff = 0;
updateRequired = true;
appearanceUpdateRequired = true;
}
Change "XXXX" to the X Co-Ord you want to respawn at.
Change "YYYY" to the Y Co-Ord you want to respawn at.
Save & Compile!
Goodluck!
100% CREDZ TO ME
Classes Modified; Client.java
Difficulty; 4/10
Tested On Delta
__________________
Stage 1: Asigning the Co-ordinates
Find:
public boolean validClient(int index) {
client p = (client) handler.players[index];
if ((p != null) && !p.disconnected) {
return true;
}
return false;
}
And underneath it Add
public boolean inFunPk() {
if(absX >= XXHH && XXLL <= 3166 && absY >= YYHH && absY <= YYLL) {
return true;
} else {
return false;
}
}
Replace "XXHH" With the X Co-Ord that it must be higher than.
Replace "XXLL" With the X Co-Ord that it must be lower than.
Replace "YYHH" With the Y Co-Ord that it must be higher than.
Replace "YYLL" With the Y Co-Ord that it must be lower than.
__________________
Stage 2: Making the place Attackable
Find
public boolean isInWilderness(int coordX, int coordY, int Type) {
if (Type == 1) {
if ((coordY >= 3523) && (coordY <= 3967) && (coordX <= 3392) && (coordX >= 2942) || absY <= 9474 && absY >= 9405 && absX >= 2687 && absX <= 2755 || absX >= 3220 && absX <= 3299 && absY >= 3520 && absY <=3548 || absX >= 2250 && absX <= 2296 && absY >= 4676 && absY <=4715 || absX >= 2980 && absX <= 2993 && absY >= 2629 && absY <= 2645 || absX >= 3371 && absX <= 3381 && absY >= 3225 && absY <= 3239) {
return true;
}
} else if (Type == 2) {
if ((coordY >= 3512) && (coordY <= 3967) && (coordX <= 3392)
&& (coordX >= 2942)) {
return true;
}
}
return false;
}
And after
(coordY >= 3523) && (coordY <= 3967) && (coordX <= 3392) && (coordX >= 2942) ||
Add
inFunPK ||
__________________
Stage 3: Asigning the FunPK Text
Find
if (isInWilderness(absX, absY, 1) && !inRogueArea())
{
if (!hasWildySign)
{
hasWildySign = true;
outStream.createFrame(208);
outStream.writeWordBigEndian_dup(197);
sendQuest("", 199);
}
int level = ((absY - 3520) / 8) + 1;
if (level != wildyLevel)
{
wildyLevel = level;
sendQuest("Level: " + wildyLevel, 199);
}
}
Under it add
if(inFunPk()) {
hasWildySign = true;
outStream.createFrame(208);
outStream.writeWordBigEndian_dup(197);
sendQuest("Fun PK", 199);
}
__________________
Stage 4: Asigning the Death
Find
if (deathStage == 2 && System.currentTimeMillis() - deathTimer >= 2500 && !isInPitGame() && !IsInFightCave()) {
And you should see under it.. Things like
if(!inFunPK()){
youdied();
removeAllItems();
}
Find somewhere below that something like
removeAllItems();
toX = 3088;
toY = 3490;
heightLevel = 0;
sM("Oh dear! You died!");
hitDiff = 0;
updateRequired = true;
appearanceUpdateRequired = true;
And change it all to
if(!inFunPK()){
removeAllItems();
toX = 3088;
toY = 3490;
heightLevel = 0;
sM("Oh dear! You died!");
hitDiff = 0;
updateRequired = true;
appearanceUpdateRequired = true;
}else{
toX = XXXX;
toY = YYYY;
sM("Oh dear! You died in FunPK!");
hitDiff = 0;
updateRequired = true;
appearanceUpdateRequired = true;
}
Change "XXXX" to the X Co-Ord you want to respawn at.
Change "YYYY" to the Y Co-Ord you want to respawn at.
Save & Compile!
Goodluck!