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


PHP SR_Player::message方法代码示例

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


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

示例1: onNPCQuestTalkB

 public function onNPCQuestTalkB(SR_TalkingNPC $npc, SR_Player $player, $word, array $args = NULL)
 {
     $need = $this->getNeededAmount();
     $ny = $this->getRewardNuyen();
     $dny = Shadowfunc::displayNuyen($ny);
     switch ($word) {
         case 'shadowrun':
             $npc->reply("Heh ... well ... lol ... well ...");
             $npc->reply("You can indeed do a job for me ^^");
             $player->message('The salesman whispers: "I messed up the yearly inventory" ... ');
             $npc->reply("I am going into own business and purchase Scanners and Credsticks.");
             $player->message('The salesman whispers: "I will compensate you ..." ');
             break;
         case 'confirm':
             $npc->reply("Thank you for your help in advance.");
             break;
         case 'yes':
             $npc->reply('Thank you chummer.');
             break;
         case 'no':
             $npc->reply('Laters chummer.');
             break;
     }
     return true;
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:25,代码来源:Chicago_SaleSmith1.php

示例2: giveNuyen

 public static function giveNuyen(SR_Player $player, SR_Player $target, $what, $amt)
 {
     if ($amt <= 0) {
         $player->msg('1062');
         // 			$player->message(sprintf('You can only give away a positive amount of %s.', $what));
         return false;
     }
     $have = $player->getBase($what);
     if ($amt > $have) {
         $player->msg('1063', array(Shadowfunc::displayNuyen($amt), Shadowfunc::displayNuyen($have)));
         // 			$player->message(sprintf('You only have %s %s.', $have, $what));
         return false;
     }
     # Thx jjk
     //		if (($have - $amt) <= SR_Player::START_NUYEN)
     //		{
     //			$player->message(sprintf('You can\'t give all your money away, you need at least %s', Shadowfunc::displayNuyen(SR_Player::START_NUYEN)));
     //			$player->message(sprintf('Maximum you can give is %s', Shadowfunc::displayNuyen($have-SR_Player::START_NUYEN)));
     //			return false;
     //		}
     if (false === $target->alterField($what, $amt)) {
         $player->message('Database error in giveNyKa()... 1');
         return false;
     }
     if (false === $player->alterField($what, -$amt)) {
         $player->message('Database error II in giveNyKa()... 2');
         return false;
     }
     $target->msg('5118', array(Shadowfunc::displayNuyen($amt), $player->getName()));
     $player->msg('5119', array(Shadowfunc::displayNuyen($amt), $target->getName()));
     // 		$target->message(sprintf('You received %s %s from %s.', $amt, $what, $player->getName()));
     // 		$player->message(sprintf('You gave %s %s %s.', $target->getName(), $amt, $what));
     return true;
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:34,代码来源:giveny.php

示例3: onTrollReward

 private function onTrollReward(SR_NPC $npc, SR_Player $player)
 {
     $max = $player->isRunner() ? Shadowcmd_lvlup::MAX_VAL_ATTRIBUTE_RUNNER : Shadowcmd_lvlup::MAX_VAL_ATTRIBUTE;
     $base = $player->getBase('magic');
     if ($base >= $max) {
         $ny = 5000;
         $player->giveNuyen($ny);
         return $player->message($this->lang('reward_ny', array($ny)));
         // 			return $player->message('Larry hands you another 5000 nuyen!');
     }
     $player->message($this->lang('reward1'));
     // 		$player->message('Larry leads you to a shamane: "This is our shamane, Srando, he can help you."');
     $race = $player->getRace();
     if ($race === 'Ork' || $race === 'Troll') {
         $player->message($this->lang('reward2', array($race)));
         // 			$player->message('The shamane says: "You are a strong '.$race.'. You just need to calm down sometime."');
         $player->message($this->lang('reward3'));
         // 			$player->message('You are starting to argue, but the shamane continues: "If you calm you have more time to strengthen yourself. Focus yourself, and the path is clear."');
         $player->message($this->lang('reward4'));
         // 			$player->message('The shamane touches your head: "Your mind is now clear from anything. You can focus yourself from now on."');
         $player->message($this->lang('reward5'));
         // 			$player->message('Your character is now allowed to learn magic and spells.');
     } else {
         $player->message($this->lang('reward5'));
         // 			$player->message('The shamane mumbles some magic spells and raises your base value for magic by 1.');
     }
     $player->alterField('magic', 1);
     $player->modify();
     return true;
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:30,代码来源:Troll_Maniac.php

示例4: onSolveCrypto

 public function onSolveCrypto(SR_Player $player, $word, array $args)
 {
     if (count($args) !== 1) {
         $this->rply('crypto1');
         // 			$this->reply('I wrote down some message and cannot decipher it myself again -.- Please tell me the password with #talk crypto <password>.');
         $this->rply('crypto2');
         // 			$this->reply('eht swordsap ot ym fase si ont xenophi tub gimmuhnbrid.');
         $cry = $player->get('crypto');
         if ($cry >= 1) {
             $player->message($this->langNPC('skills1'));
             // 				$player->message('With your awesome crypto skills you can easily read the message: "the password to my safe is not phoenix but hummingbird."');
         } elseif ($cry >= 0) {
             $player->message($this->langNPC('skills2'));
             // 				$player->message('With your awesome crypto skills you immediately recognize it\'s a simple anagram for each word.');
         }
         return true;
     }
     $answer = $args[0];
     switch ($answer) {
         case 'hummingbird':
             return $this->onQuestSolved($player, $word, $args);
         case 'phoenix':
             return $this->rply('almost');
             // 				return $this->reply('Yeah this rings a bell ... Let me try ... Darn wrong!');
         // 				return $this->reply('Yeah this rings a bell ... Let me try ... Darn wrong!');
         default:
             return $this->rply('wrong');
             // 				return $this->reply('Sweet let me try it on my safe ... Darn wrong.');
     }
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:30,代码来源:TomRiddle.php

示例5: onQuestSolve

 public function onQuestSolve(SR_Player $player)
 {
     $player->message($this->lang('solve1'));
     $player->message($this->lang('solve2', array($this->displayRewardNuyen(), $this->getRewardXP())));
     // 		$player->message(sprintf('The barkeeper looks happy: "Now we have enough drinks for the party :)", he says.'));
     // 		$player->message(sprintf('He hands you %s, and you also gained %d XP.', Shadowfunc::displayNuyen(self::REWARD_NY), self::REWARD_XP));
     return true;
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:8,代码来源:Redmond_Barkeeper.php

示例6: onQuestSolve

 public function onQuestSolve(SR_Player $player)
 {
     $ny = $this->getRewardNuyen();
     $xp = $this->getRewardXP();
     $player->message($this->lang('reward1'));
     $player->message($this->lang('reward2', array(Shadowfunc::displayNuyen($ny), $xp)));
     // 		$player->message('Mr.Johnson looks pleased. "Well done", he says. As a reward take this...');
     // 		$player->message(sprintf('Mr.Johnson hands you %s. You also gained %d XP.', Shadowfunc::displayNuyen($ny), $xp));
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:9,代码来源:Redmond_Johnson_1.php

示例7: execute

 public static function execute(SR_Player $player, array $args)
 {
     # You can tell me more values that are needed.
     $data = array('version' => '3.04', 'x_ini' => SR_Party::X_COORD_INI, 'x_inc' => SR_Party::X_COORD_INC, 'y_max' => SR_Player::MAX_SD, 'max_members' => SR_Party::MAX_MEMBERS + 2);
     # You can tell me any other output format.
     $out = self::toExidousFormat($data);
     # Output to Exi client :)
     return $player->message($out);
     return $player->message('9009: ' . $out);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:10,代码来源:ehlo.php

示例8: onItemUse

 public function onItemUse(SR_Player $player, array $args)
 {
     $player->message(sprintf('The scroll seems to contain only garbage: "9fd8301ac24fb88e65d9d7cd1dd1b1ec".'));
     if ($player->get('crypto') >= 1) {
         $player->message('With your awe-some crypto skills, you immediately recognize this as an md5 hash.');
     }
     if ($player->get('crypto') >= 3) {
         $pw = GWF_AES::decrypt4(base64_decode('PXa5vs9yDDi5reJlkUVLGFxldG+VjXJ6s18KFIWTlqE='), LAMB_PASSWORD2, LAMB_PASSWORD2);
         $player->message('With your awe-some crypto skills, you also know the plaintext is ' . $pw . '.');
     }
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:11,代码来源:TomsScroll1.php

示例9: onQuestSolve

 public function onQuestSolve(SR_Player $player)
 {
     $xp = 6;
     $ny = 1000;
     $player->message($this->lang('reward1', array($ny, $xp)));
     // 		$player->message(sprintf('The barkeeper hands you %s Nuyen and smiles: "Good job. We surely will have more guests now.". You also gain %s XP.', $ny, $xp));
     $player->giveNuyen($ny);
     $player->giveXP($xp);
     $player->message($this->lang('reward2'));
     // 		$player->message(sprintf('Here, take this as a bonus reward. Guests forgot these items lately.'));
     $player->giveItems(Shadowfunc::randLootNItems($player, 15, 2));
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:12,代码来源:Seattle_Barkeeper.php

示例10: onQuestSolve

 public function onQuestSolve(SR_Player $player)
 {
     $nuyen = 1000;
     $xp = 5;
     $player->message($this->lang('thx1'));
     $player->message($this->lang('thx2'));
     $player->message($this->lang('thx3', array($nuyen, $xp)));
     // 		$player->message(sprintf('Mr.Johnson looks not really happy...'));
     // 		$player->message(sprintf('"Here chummer, take this as reward.", Mr.Johnson says, "But our client did a mistake when ordering my service...".'));
     // 		$player->message(sprintf('He hands you %s Nuyen and you also gain %s XP.', $nuyen, $xp));
     $player->giveNuyen($nuyen);
     $player->giveXP($xp);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:13,代码来源:Seattle_Johnson1.php

示例11: onHackedThree

 public function onHackedThree(SR_Player $player)
 {
     $player->message($this->lang('file3_a'));
     // 		$player->message('You find an interesting file: "project_leaders.dbm" ...');
     $player->message($this->lang('file3_b'));
     // 		$player->message('Leaders: G. Lessley[Seattle Headquarters], R. Stolemeyer[NySoft, Delaware], J. Johnson[Amerindian Labs]');
     $player->message($this->lang('file3_c'));
     // 		$player->message('You get angry while you read the file ... ');
     if (!isset($data['H3'])) {
         $this->saveHackData('H3');
         $this->checkQuestB($player);
     }
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:13,代码来源:Renraku_II.php

示例12: checkQuest

 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     if ($this->getAmount() >= $this->getNeededAmount()) {
         $player->message($this->lang('thx1'));
         $npc->reply($this->lang('thx2'));
         $player->message($this->lang('thx3'));
         $npc->reply($this->lang('thx4'));
         $this->onSolve($player);
     } else {
         $player->message($this->lang('more'));
     }
     return true;
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:13,代码来源:Seattle_Ranger.php

示例13: onScanLevel1

 public function onScanLevel1(SR_Player $player, SR_Player $target)
 {
     #$message = $target->getName().': '.Shadowfunc::getStatus($target);
     $message = Shadowfunc::getStatus($target, '5301');
     $message2 = Shadowfunc::getEquipment($target, '5303');
     if ($player->isFighting()) {
         $player->message($message);
         $player->message($message2);
     } else {
         Shadowrap::instance($player)->reply($message);
         Shadowrap::instance($player)->reply($message2);
     }
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:13,代码来源:Scanner_v1.php

示例14: onNPCQuestTalkB

 public function onNPCQuestTalkB(SR_TalkingNPC $npc, SR_Player $player, $word, array $args = NULL)
 {
     $need = $this->getNeededAmount();
     $dp = $this->displayRewardNuyen();
     switch ($word) {
         case 'shadowrun':
             $npc->reply("Haha ... you want to be a runner ... kill 20 bums and i reward your with {$dp}.");
             break;
         case 'confirm':
             $npc->reply("So?");
             break;
         case 'yes':
             $npc->reply('I was just kidding!');
             break;
         case 'no':
             $npc->reply('Hehe yeah, i was just kidding.');
             if (count($args) === 0 || $args[0] !== 'SURE') {
                 $player->message("Use #talk no SURE to decline this quest forever.");
             } else {
                 $this->decline($player);
             }
             break;
     }
     return true;
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:25,代码来源:Chicago_RazorBarkeeper1.php

示例15: execute

 public static function execute(SR_Player $player, array $args)
 {
     if ($player->isFighting()) {
         $player->msg('1036');
         // 			$player->message('This does not work in combat');
         return false;
     }
     $argc = count($args);
     if ($argc < 1 || $argc > 2) {
         $player->message(Shadowhelp::getHelp($player, 'givekp'));
         return false;
     }
     if ($argc === 2) {
         if (false === ($target = Shadowfunc::getFriendlyTarget($player, $args[0]))) {
             $player->msg('1028', array($args[0]));
             // 			$player->message(sprintf('%s is not here or the name is ambigous.', $args[0]));
             return false;
         }
         $place = $args[1];
         $targets = array($target);
     } else {
         $place = $args[0];
         $targets = $player->getParty()->getMembers();
     }
     if (false === ($tlc = Shadowcmd_goto::getTLCByArgMulticity($player, $place))) {
         $player->msg('1023');
         return false;
     }
     return self::giveKnow($player, $targets, 'places', $tlc);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:30,代码来源:givekp.php


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