Beispiel #1
0
     }
     echo "!</div>\n";
     if (!$simultaneousKill) {
         echo "You have taken {$loot} gold from {$attackee}.<br>\n";
     }
     runBountyExchange($username, $attackee);
     // *** Determines bounty for dueling. ***
 }
 if ($attackerHealthRemaining < 1) {
     // *** DEFENDER KILLS ATTACKER! ***
     $defenderKillpoints = 1;
     if ($duel) {
         // *** if they were dueling when they died ***
         $duel_log_msg = "{$username} has dueled {$attackee} and lost at {$today}.";
         sendMessage("SysMsg", "SysMsg", $duel_log_msg);
         sendLogOfDuel($username, $attackee, 0, $killpoints);
         // *** Makes a loss in the duel log. ***
     }
     addKills($attackee, $defenderKillpoints);
     // *** Adds a kill for the defender. ***
     subtractStatus($username, STEALTH + POISON + FROZEN + CLASS_STATE);
     if (!$simultaneousKill) {
         $loot = round($gold_mod * getGold($username));
         //Loot for defender if he lives.
         addGold($attackee, $loot);
         subtractGold($username, $loot);
     }
     $attackee_msg = "<div class='ninja-notice'>\n\t\t\t\tYou have killed {$username} in combat and taken {$loot} gold on {$today}.\n\t\t\t\t</div>";
     $attacker_msg = "DEATH: You have been killed by {$attackee} in combat and lost {$loot} gold on {$today}!";
     sendMessage($username, $attackee, $attackee_msg);
     sendMessage($attackee, $username, $attacker_msg);
Beispiel #2
0
     }
     if ($attackerHealthRemaining < 1) {
         // *** DEFENDER KILLS ATTACKER! ***
         if ($simultaneousKill = $attackerHealthRemaining < 1) {
             // *** If both died at the same time. ***
         } else {
             $victor = $target;
             $loser = $attacker;
         }
         $attacker_died = true;
         $defenderKillpoints = 1;
         if ($duel) {
             // *** if they were dueling when they died ***
             $duel_log_msg = "{$attacker} has dueled {$target} and lost at {$today}.";
             sendMessage("SysMsg", "SysMsg", $duel_log_msg);
             sendLogOfDuel($attacker, $target, 0, $killpoints);
             // *** Makes a loss in the duel log. ***
         }
         addKills($target_id, $defenderKillpoints);
         // *** Adds a kill for the defender. ***
         $attacking_player->death();
         if (!$simultaneousKill) {
             $loot = round($gold_mod * get_gold($attacker_id));
             //Loot for defender if he lives.
         }
         $target_msg = "You have killed {$attacker} in combat and taken {$loot} gold.";
         $attacker_msg = "DEATH: You've been killed by {$target} and lost {$loot} gold!";
         sendMessage($attacker, $target, $target_msg);
         sendMessage($target, $attacker, $attacker_msg);
     }
 }