示例#1
0
文件: Arena.php 项目: sinfocol/gwf3
 public function on_challenge(SR_Player $player, array $args)
 {
     # No fight with party:
     if ($player->isInParty()) {
         $player->msg('1099');
         // 			$player->message("You can't fight here when you are in a party. Use #part to leave your party.");
         return false;
     }
     # Get current enemy
     $key = 'SEATTLE_ARENA_N';
     if (!$player->hasConst($key)) {
         $player->setConst($key, 1);
     }
     $n = $player->getConst($key);
     # Possible flags/enemies in Arena:
     $enemies = array(array("Seattle_AToughGuy", $this->lang($player, 'e1')), array("Seattle_ASecOrk", $this->lang($player, 'e2')), array("Seattle_AToughTroll", $this->lang($player, 'e3')), array("Seattle_AMagician", $this->lang($player, 'e4')), array("Seattle_AElite", $this->lang($player, 'e5')));
     # No more fights:
     if ($n > count($enemies)) {
         // 			$player->message("Sorry. You fought all the enemies here. Try #fight <player> then :P");
         $player->msg('1098');
         return false;
     }
     $n--;
     $enemy = $enemies[$n];
     $player->msg('5141', array($enemy[1]));
     // 		$player->message("The Arena-Guy leads you to the locker room. After a few minutes you were guided into the arena and see your enemy: ".$enemy[1].". " );
     SR_NPC::createEnemyParty($enemy[0])->fight($player->getParty(), true);
     return true;
 }
示例#2
0
文件: redmond.php 项目: sinfocol/gwf3
 public static function execute(SR_Player $player, array $args)
 {
     if ($player->isInParty()) {
         $player->msg('1099');
         # You cannot do this when you are in a party.
         return false;
     }
     if (!$player->isIdle()) {
         $player->msg('1033');
         # Your party is moving. Try this command when idle.
         return false;
     }
     if (count($args) === 1 && $args[0] === 'i_am_sure') {
         self::beamToRedmond($player);
     } else {
         $player->msg('5298', array(self::BEAM_TARGET));
         # Use "#redmond i_am_sure" to take some of your XP and beam you back to Redmond_Hotel.
     }
     return true;
 }