PDA

View Full Version : How to make a Funpk or pk place.



cloudyscape
October 17th, 2010, 21:00
this is very easy

ok first go into client.java and look for this code.


// If killed apply dead
or this one

//If killed apply dead
( might have space or not...)

ok once found you might see this


if (IsDead == true && NewHP <= 1) {
ApplyDead();
}


now this is where you add that spot.

Keep the code above and paste this Next one ( down) under it.


This will be the code your going to use.

// If killed apply dead
if ((absX >= xxxx1 && absX <= xxxx2 && absY >= yyyy2 && absY <= yyyy1 && IsDead == true && NewHP <= 1)) {
NewHP = getLevelForXP(playerXP[3]);
setSkillLevel(3, getLevelForXP(playerXP[3]),
playerXP[playerHitpoints]);
playerLevel[3] = getLevelForXP(playerXP[3]);
refreshSkills();
updateRequired = true;
appearanceUpdateRequired = true;
teleportToX = xxxx;
teleportToY = yyyy;
sendMessage("After they die, you insert text here.");
}


else if (IsDead == true && NewHP <= 1) {
refreshSkills();
ApplyDead();
}

(You can copy and paste this if you want)

now ill tell you what to do with this code.

This Code:

if ((absX >= xxxx1 && absX <= xxxx2 && absY >= yyyy2 && absY <= yyyy1 && IsDead == true && NewHP <= 1)) {

xxxx1 and yyyy1 Northeast cords, xxxx2 and yyyy2 are the southeast

This code:

teleportToX = xxxx;
teleportToY = yyyy;

The place they go after they die, I suggest your home cords

This code:

sendMessage("After they die, you insert text here.");

Insert a message after they die here.

These are the basic things you have to change for a Pk Area. :D;)

X Pwner X
October 17th, 2010, 23:42
looks awesome definatly gonna try it out :)

Ant Man
October 21st, 2010, 02:13
Looks fine, but why would people want to add "Funpk"?

There are minigames to be done.

Mystic
October 22nd, 2010, 15:47
Good Job.