Thread: I screwed up :o

Results 1 to 3 of 3
  1. #1 I screwed up :o 
    Registered Member shoopdawhoop's Avatar
    Join Date
    Apr 2009
    Posts
    685
    Thanks given
    10
    Thanks received
    19
    Rep Power
    57
    I tried to make Vengeance+recoil+deflect smoother but something went wrong...
    only npcs that are using melee can hit me now
    can anyone spot the problem?
    Code:
    if(plr.recoil1 > 0.0 || plr.recoil2 > 0.0 || plr.recoil3 > 0.0){
    												plr.hitDiff = (int)(hitDiff * (plr.recoil1+plr.recoil2+plr.recoil3)); // Simple math, 100 divided by 1.30, and you get 76.
    npcs[NPCID].HP -= (int)(hitDiff * (plr.recoil1+plr.recoil2+plr.recoil3));
    plr.refreshSkills();
    npcs[NPCID].hitDiff = plr.hitDiff;
    npcs[NPCID].updateRequired = true;
    npcs[NPCID].hitUpdateRequired = true;
    npcs[NPCID].hit = true;
    						if(plr.vengTimer == 1 && plr.inCombat){
    						plr.plrText = "Taste vengeance!"; // This says it in itself.
    plr.plrTextUpdateRequired = true; // Make sure the txt4 will update.
    }
    if(System.currentTimeMillis() - plr.vengDelay == 20000){
    plr.plrText = "Taste vengeance!"; // This says it in itself.
    plr.plrTextUpdateRequired = true; // Make sure the txt4 will update.
    }
    //npcs[NPCID].Killing[server.playerHandler.players[Player].playerId] += hitDiff;
    //npcs[NPCID].appearanceUpdateRequired = true; // So the hit will append to you.
    if(npcs[NPCID].HP < 1){
    npcs[NPCID].IsDead = true;
    }
    }
    						if(plr.DeflectMelee == true && npcs[NPCID].melee == 1 || plr.DeflectMelee == true && npcs[NPCID].melee == 2 || plr.DeflectMelee == true && npcs[NPCID].melee == 3 || plr.DeflectRange == true && npcs[NPCID].melee == 5 || plr.DeflectMage == true && npcs[NPCID].melee == 4){
    						plr.recoil2 = 0.5;
    }						else if(plr.DeflectMelee == false && npcs[NPCID].melee == 1 || plr.DeflectMelee == false && npcs[NPCID].melee == 2 || plr.DeflectMelee == false && npcs[NPCID].melee == 3 || plr.DeflectRange == false && npcs[NPCID].melee == 5 || plr.DeflectMage == false && npcs[NPCID].melee == 4){
    						plr.recoil2 = 0.0;
    }
    						if(plr.vengTimer == 1 && plr.inCombat){
    plr.recoil3 = 0.75;
    plr.vengon = false;
    plr.vengTimer = 0;
    plr.plrText = "Taste vengeance!"; // This says it in itself.
    plr.plrTextUpdateRequired = true; // Make sure the txt4 will update.
    plr.toX = plr.absX;
    plr.toY = plr.absY;
    plr.recoil3 = 0.0;
    }
    if(System.currentTimeMillis() - plr.vengDelay == 20000){
    plr.recoil3 = 0.75;
    plr.vengon = false;
    plr.vengTimer = 0;
    plr.plrText = "Taste vengeance!"; // This says it in itself.
    plr.plrTextUpdateRequired = true; // Make sure the txt4 will update.
    plr.toX = plr.absX;
    plr.toY = plr.absY;
    plr.recoil3 = 0.0;
    }
    						if(plr.playerEquipment[plr.playerRing] == 2550){
    plr.recoil1 = 0.1;
    }
    						if(plr.playerEquipment[plr.playerRing] != 2550){
    plr.recoil1 = 0.0;
    }
    if(npcs[NPCID].melee == 1 && npcs[NPCID].meleeAtk >= randstab){
    hitDiff = hitDiff;
    }
    else if(npcs[NPCID].melee == 2 && npcs[NPCID].meleeAtk >= randslash){
    hitDiff = hitDiff;
    }
    else if(npcs[NPCID].melee == 3 && npcs[NPCID].meleeAtk >= randcrush){
    hitDiff = hitDiff;
    }
    else if(npcs[NPCID].melee == 4 && npcs[NPCID].mageAtk >= randmage){
    hitDiff = hitDiff;
    }
    else if(npcs[NPCID].melee == 5 && npcs[NPCID].rangeAtk >= randrange){
    hitDiff = hitDiff;
    }
    else if(npcs[NPCID].melee == 1 && npcs[NPCID].meleeAtk < randstab){
    hitDiff = 0;
    }
    else if(npcs[NPCID].melee == 2 && npcs[NPCID].meleeAtk < randslash){
    hitDiff = 0;
    }
    else if(npcs[NPCID].melee == 3 && npcs[NPCID].meleeAtk < randcrush){
    hitDiff = 0;
    }
    else if(npcs[NPCID].melee == 4 && npcs[NPCID].mageAtk < randmage){
    hitDiff = 0;
    }
    else if(npcs[NPCID].melee == 5 && npcs[NPCID].rangeAtk < randrange){
    hitDiff = 0;
    }
    														if(plr.ProtMelee == true || plr.DeflectMelee == true){
    						hitDiff -= npcs[NPCID].meleeHit;
    						}
    						else if(plr.ProtRange == true || plr.DeflectRange == true){
    						hitDiff -= npcs[NPCID].rangeHit;
    						}
    						else if(plr.ProtMage == true || plr.DeflectMage == true){
    						hitDiff -= npcs[NPCID].mageHit;
    						}
    						npcs[NPCID].animUpdateRequired = true;
    						npcs[NPCID].updateRequired = true;
    						if(hitDiff < 0){
    						hitDiff = 0;
    						}
    if(WomanLocation != Kitchen)
    {
    DivideByZero();
    }
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Apr 2010
    Posts
    309
    Thanks given
    0
    Thanks received
    3
    Rep Power
    2
    hang on ill ask my mate
    Reply With Quote  
     

  3. #3  
    Registered Member shoopdawhoop's Avatar
    Join Date
    Apr 2009
    Posts
    685
    Thanks given
    10
    Thanks received
    19
    Rep Power
    57
    Quote Originally Posted by Razulo View Post
    hang on ill ask my mate
    either you lied or he couldn't help
    if(WomanLocation != Kitchen)
    {
    DivideByZero();
    }
    Reply With Quote  
     


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
  •