Ejemplo n.º 1
0
 private static function displayStats(SR_Player $player, array $quests)
 {
     $done = 0;
     $open = 0;
     $total = SR_Quest::getTotalQuestCount();
     $failed = 0;
     $declined = 0;
     $unknown = $total - count($quests);
     foreach ($quests as $quest) {
         $quest instanceof SR_Quest;
         if ($quest->isInQuest($player) === true) {
             $open++;
         } elseif ($quest->isDone($player) === true) {
             $done++;
         } elseif ($quest->isDeclined($player) === true) {
             $declined++;
         } elseif ($quest->isFailed($player) === true) {
             $failed++;
         } else {
             $unknown++;
         }
     }
     $message = Shadowrun4::lang('5010', array($open, $done, $declined, $failed, $unknown, $total));
     // 		$message = sprintf(
     // 			'Quest stats: %d open, %d accomplished, %d rejected, %d failed, %d unknown from a total of %d.',
     // 			$open, $done, $declined, $failed, $unknown, $total
     // 		);
     self::reply($player, $message);
 }
Ejemplo n.º 2
0
 public static function execute(SR_Player $player, array $args)
 {
     return self::rply($player, '5241', array(SR_NPC::$NPC_COUNTER, Shadowrun4::getCityCount(), SR_Location::$LOCATION_COUNT, SR_Item::getTotalItemCount(), SR_Spell::getTotalSpellCount(), SR_Quest::getTotalQuestCount(), Shadowcmd::translate('stats')));
     // 		$bot = Shadowrap::instance($player);
     // 		$message = sprintf('In Shadowlamb v3 there are: %s different NPC in %s Areas with %s Locations. %s Items, %s Spells and %s Quests. Try #stats to show how many are playing.', SR_NPC::$NPC_COUNTER, Shadowrun4::getCityCount(), SR_Location::$LOCATION_COUNT, SR_Item::getTotalItemCount(), SR_Spell::getTotalSpellCount(), SR_Quest::getTotalQuestCount());
     // 		return $bot->reply($message);
 }