Paying $3 to fix
Well I'm running a PVP server and I've got a problem with the PVP timers. The PVP timer counts down from 10 seconds once you enter a safe-zone and if you're in combat. The problem is that when I kill an NPC the PVP timer appears, and pvpmode = true, and also if you attack an NPC and then step away the PVP timer also counts down. It used to be as soon as you atttack an npc the PVP timer would appear but I fixed that by adding "attacknpc == -1"
Heres the code :
Code:
if(isInPvP(absX, absY, 1)) {
if(secs == 0 && inCombat && attacknpc == -1 && deathStage == 0) {
pvpmode = true;
secs = 20;
int timed = secs/2;
if(multiCombat()) {
multitime = true;
outStream.createFrame(208);
outStream.writeWordBigEndian_dup(197);
sendQuest("@or2@"+timed+"", 199);
} else {
multitime = false;
outStream.createFrame(208);
outStream.writeWordBigEndian_dup(197);
sendQuest("@or1@"+timed+" ", 199);
}
} else {
if(secs == 0 && deathStage == 0) {
pvpmode = false;
setInterfaceWalkable(4535);
sendFrame126("@whi@TEST SCAPE ", 4536);
} else {
int timed = secs/2;
if(multiCombat()) {
multitime = true;
outStream.createFrame(208);
outStream.writeWordBigEndian_dup(197);
sendQuest("@or2@"+timed+"", 199);
} else {
multitime = false;
outStream.createFrame(208);
outStream.writeWordBigEndian_dup(197);
sendQuest("@or1@"+timed+" ", 199);
}
}
}
} else {
if(!isInPvP(absX, absY, 1)) {
pvpmode = true;
if(multiCombat()) {
multitime = true;
outStream.createFrame(208);
outStream.writeWordBigEndian_dup(197);
sendQuest("@or2@ALL", 199);
} else {
multitime = false;
outStream.createFrame(208);
outStream.writeWordBigEndian_dup(197);
int lowerlevel = combatLevel - 25;
int higherlevel = combatLevel + 25;
if(higherlevel > 126) {
higherlevel = 126;
}
sendQuest("@or1@"+lowerlevel+" - "+higherlevel+" ", 199);
}
}
}
Summary : I need a way so when I step away after clicking an NPC the pvp timer dosen't appear, or once you've killed an npc the pvp timer dosent appear
Paying $3 USD if you can fix, sorry its not much but all I have