Exemple #1
0
     $attackee_msg = "DEATH: You have been killed by {$username} in combat and lost {$loot} gold on {$today}!";
     sendMessage($username, $attackee, $attackee_msg);
     $attacker_msg = "You have killed {$attackee} in combat and taken {$loot} gold on {$today}.";
     sendMessage($attackee, $username, $attacker_msg);
     echo "{$username} has killed {$attackee}!<br>\n";
     echo "<div class='ninja-notice'>\n\t\t\t\t{$attackee} is dead, you have proven your might";
     if ($killpoints == 2) {
         echo " twice over";
     } elseif ($killpoints > 2) {
         echo " {$killpoints} times over";
     }
     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);
Exemple #2
0
     $resultMessage = $result;
 }
 if (!$victim_alive) {
     // Target was killed by the item.
     if (!$self_use) {
         // *** SUCCESSFUL KILL, not self-use of an item ***
         $attacker_id = $player->hasStatus(STEALTH) ? "A Stealthed Ninja" : $username;
         if (!$gold_mod) {
             $gold_mod = 0.15;
         }
         $loot = round($gold_mod * get_gold($target_id));
         subtract_gold($target_id, $loot);
         add_gold($char_id, $loot);
         addKills($char_id, 1);
         $kill = true;
         $bountyMessage = runBountyExchange($username, $target);
         //Rewards or increases bounty.
     } else {
         $loot = 0;
         $suicide = true;
     }
     // Send mails if the target was killed.
     send_kill_mails($username, $target, $attacker_id, $article, $item->getName(), $today = null, $loot);
 } else {
     // They weren't killed.
     $attacker_id = $username;
 }
 if (!$self_use && $item_used) {
     if (!$targetResult) {
         error_log('Debug: Issue 226 - An attack was made using ' . $item->getName() . ', but no targetResult message was set.');
     }
     }
     if (!$victim_alive) {
         // Target was killed by the item.
         if (getStatus($username) && $target != $username) {
             // *** SUCCESSFUL KILL ***
             $attacker_id = $status_array['Stealth'] ? "A Stealthed Ninja" : $username;
             if (!$gold_mod) {
                 $gold_mod = 0.15;
             }
             $loot = round($gold_mod * getGold($target));
             subtractGold($target, $loot);
             addGold($username, $loot);
             addKills($username, 1);
             echo "You have killed {$target} with {$article} {$item->getName()}!<br>\n";
             echo "You receive {$loot} gold from {$target}.<br>\n";
             runBountyExchange($username, $target);
             //Rewards or increases bounty.
         } else {
             $loot = 0;
             echo "You have comitted suicide!<br>\n";
         }
         send_kill_mails($username, $target, $attacker_id, $article, $item->getName(), $today, $loot);
     } else {
         $attacker_id = $username;
     }
     if ($target != $username) {
         $target_email_msg = "{$attacker_id} has used {$article} {$item->getName()} on you at {$today} and caused you to {$result}.";
         sendMessage($attacker_id, $target, $target_email_msg);
     }
 }
 $turns_to_take = 1;
Exemple #4
0
     }
     addKills($attacker_id, $killpoints);
     // *** Attacker gains their killpoints. ***
     $target_player->death();
     if (!$simultaneousKill) {
         // This stuff only happens if you don't die also.
         $loot = round($gold_mod * get_gold($target_id));
         // Add the wrath health regain to the attacker.
         if (isset($wrath_regain)) {
             $attacking_player->changeHealth($wrath_regain);
         }
     }
     $target_msg = "DEATH: You've been killed by {$attacker} and lost {$loot} gold!";
     sendMessage($attacker, $target, $target_msg);
     // Stopped telling attackers when they win a duel.
     $bounty_result = runBountyExchange($attacker, $target);
     // *** Determines bounty for dueling. ***
 }
 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}.";