当前位置: 首页>>代码示例>>PHP>>正文


PHP SR_Player::getConst方法代码示例

本文整理汇总了PHP中SR_Player::getConst方法的典型用法代码示例。如果您正苦于以下问题:PHP SR_Player::getConst方法的具体用法?PHP SR_Player::getConst怎么用?PHP SR_Player::getConst使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SR_Player的用法示例。


在下文中一共展示了SR_Player::getConst方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: on_challenge

 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;
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:29,代码来源:Arena.php

示例2: getNPCLoot

 public function getNPCLoot(SR_Player $player)
 {
     $nuyen = 1200;
     $key = 'SEATTLE_ARENA_N';
     $player->setConst($key, $player->getConst($key) + 1);
     $player->msg('5125', array(Shadowfunc::displayNuyen($nuyen)));
     // 		$player->message("The fight is over. The director hands you $nuyen Nuyen.");
     $player->giveNuyen($nuyen);
     return array();
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:10,代码来源:AToughTroll.php

示例3: checkQuest

 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     if ($player->getConst(self::KEY)) {
         $npc->reply($this->lang('thx'));
         // 			$npc->reply('Yes better.');
         return $this->onSolve($player);
     } else {
         $npc->reply($this->lang('more'));
         // 			$npc->reply('Still cold.');
     }
     return false;
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:12,代码来源:Troll_Intro.php

示例4: rightInTime

 public function rightInTime(SR_Player $player)
 {
     $eta = $player->getConst('__AURIS_TIMEOUT');
     $player->unsetConst('__AURIS_TIMEOUT');
     return Shadowrun4::getTime() < $eta;
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:6,代码来源:Delaware_Exams5.php


注:本文中的SR_Player::getConst方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。