Thread: Hmm, need help.

Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1 Paying $3 to help 
    Aaduria
    Guest
    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
    Reply With Quote  
     

  2. #2  
    Aaduria
    Guest
    ~ Still haven't fixed without removing the timer altogether ~
    Reply With Quote  
     

  3. #3  
    Aaduria
    Guest
    Now paying $3 to fix.
    Reply With Quote  
     

  4. #4  
    Banned

    Join Date
    May 2009
    Posts
    1,387
    Thanks given
    21
    Thanks received
    14
    Rep Power
    0
    Not too sure but:

    Code:
    client killerz = (client) server.playerHandler.players[KillerId];
    in where your PVP method starts.
    Reply With Quote  
     

  5. #5  
    Aaduria
    Guest
    Quote Originally Posted by Kenny View Post
    Not too sure but:

    Code:
    client killerz = (client) server.playerHandler.players[KillerId];
    in where your PVP method starts.
    I don't owe you $3 for that lol, I don't even know what you're trying to tell me.
    Reply With Quote  
     

  6. #6  
    Banned

    Join Date
    May 2009
    Posts
    1,387
    Thanks given
    21
    Thanks received
    14
    Rep Power
    0
    Quote Originally Posted by Aaduria View Post
    I don't owe you $3 for that lol, I don't even know what you're trying to tell me.
    I told you what you need to add and where to add it. There isn't anything else to say.
    Reply With Quote  
     

  7. #7  
    Aaduria
    Guest
    ... I didn't know you wanted me to add it...

    I've already got it anyhow
    Reply With Quote  
     

  8. #8  
    Banned

    Join Date
    May 2009
    Posts
    1,387
    Thanks given
    21
    Thanks received
    14
    Rep Power
    0
    Quote Originally Posted by Aaduria View Post
    ... I didn't know you wanted me to add it...

    I've already got it anyhow
    Yeah, so you obviously added that to fix it.

    Don't offer money to people to fix things for you if you aren't going to pay it.
    Reply With Quote  
     

  9. #9  
    Aaduria
    Guest
    Quote Originally Posted by Kenny View Post
    Yeah, so you obviously added that to fix it.

    Don't offer money to people to fix things for you if you aren't going to pay it.

    Dude I've already got that, I'm not paying you for something I already had in my code, as soon as someone finds the fix I'll send the money straight through to paypal, this is what I already had, I've also got it in many other methods : -


    Code:
    if(attacknpc == -1) {
    			client killerz = (client) server.playerHandler.players[KillerId];
    killerz.pvpdrop(playerName, playerId);
    if(killerz.playerId != playerId) {
    
      if(killerz.lastKill == playerId) {
      killerz.sM("Repeating or false kill detected, you will not recieve any points or title.");
      } else {
    if(killerz.rampage == 0) {
    killerz.rampage = 1;
    } else if(killerz.rampage == 1) {
    killerz.rampage = 2;
    yell(""+killerz.playerName+" is on a DOUBLE KILL rampage!");
    } else if(killerz.rampage == 2) {
    killerz.rampage = 3;
    yell(""+killerz.playerName+" is on a MULTI KILL rampage!");
    } else if(killerz.rampage == 3) {
    killerz.rampage = 4;
    yell(""+killerz.playerName+" is on a ULTRA KILL rampage!");
    } else if(killerz.rampage >= 4) {
    killerz.rampage += 1;
    yell(""+killerz.playerName+" is on a KILLING SPREE, beware!");
    }
    Reply With Quote  
     

  10. #10  
    Banned

    Join Date
    May 2009
    Posts
    1,387
    Thanks given
    21
    Thanks received
    14
    Rep Power
    0
    I said to add it into your PVP method which is at the top but whatever, lmao.
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •