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


PHP SR_Player::setTemp方法代码示例

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


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

示例1: onNPCTalk

 public function onNPCTalk(SR_Player $player, $word, array $args)
 {
     $price = 800 - Common::clamp($player->get('negotiation'), 0, 10) * 10;
     $time = 1000 * $player->get('charisma') * 60;
     $b = chr(2);
     switch ($word) {
         case 'shadowrun':
             return $this->reply("I am in for a run, Do you want to {$b}hire{$b} my hacking skills?");
         case 'yes':
             return $this->reply("Yes, {$b}hire{$b} me and i'll aid you in combat and hacking.");
         case 'no':
             if ($player->hasTemp(self::MANIFESTO)) {
                 return $this->reply('Yes, no, what else?');
             } else {
                 $this->reply("This is our world now... The world of the electron and the switch, the beauty of the baud.");
                 $this->reply("We make use of a service already existing without paying for what could be dirt-cheap if it wasn't run by profiteering gluttons, and you call us criminals.");
                 $this->reply("We explore... And you call us criminals. We seek after knowledge... And you call us criminals. We exist without skin color, without nationality, without religious bias... And you call us criminals.");
                 $this->reply("You build atomic bombs, you wage wars, you murder, cheat, and lie to us and try to make us believe it's for our own good, yet we're the criminals.");
                 $this->reply("Yes, I am a criminal. My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like. My crime is that of outsmarting you, something that you will never forgive me for.");
                 $this->reply("I am a hacker, and this is my manifesto. You may stop this individual, but you can't stop us all... After all, we're all alike.");
                 $player->setTemp(self::MANIFESTO, 1);
                 return true;
             }
             break;
         case 'hire':
             return $this->reply($this->onHire($player, $price, $time));
         default:
             return $this->reply("Need a hacker?");
             break;
     }
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:31,代码来源:HireDecker.php

示例2: onNPCQuestTalkB

 public function onNPCQuestTalkB(SR_TalkingNPC $npc, SR_Player $player, $word, array $args = NULL)
 {
     echo "HERE\n";
     $temp = 'QT_LILLY';
     switch ($word) {
         default:
             $t = $player->getTemp($temp, 0);
             $player->setTemp($temp, $t + 1);
             echo "HERE {$t}\n";
             switch ($t) {
                 case 0:
                     $npc->reply($this->lang('sr1'));
                     $npc->reply($this->lang('sr2'));
                     return false;
                 case 1:
                     $npc->reply($this->lang('sr3'));
                     $npc->reply($this->lang('sr4'));
                     return false;
                 case 2:
                     $npc->reply($this->lang('sr5'));
                     $npc->reply($this->lang('sr6'));
                 default:
                     return $npc->reply($this->lang('confirm'));
             }
         case 'confirm':
             return $npc->reply($this->lang('confirm'));
         case 'yes':
             return $npc->reply($this->lang('yes'));
         case 'no':
             return $npc->reply($this->lang('no'));
     }
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:32,代码来源:Seattle_Florist1.php

示例3: onScrolls

 private function onScrolls(SR_Player $player)
 {
     $tmp = $player->getTemp(self::TMP_SCROLL, 0);
     if ($tmp === 0) {
         $this->reply('Ugah sent you to bring me scrolls?! ... Do you have some?');
         $player->setTemp(self::TMP_SCROLL, 1);
     } else {
         $this->reply('So? Do you have some scrolls?');
     }
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:10,代码来源:Alchemist_NPC.php

示例4: susanChecksYourID

 private function susanChecksYourID(SR_Player $player)
 {
     if ($player->hasConst(self::CONST_ID)) {
         $player->setTemp(self::TEMP_VIS, 1);
         $player->giveKnowledge('places', 'Prison_VisitorsRoom');
         return $this->reply("Alright Mr. Peltzer, please goto the visitors room, we will call for your brother any minute.");
     } else {
         $b = chr(2);
         return $this->reply("Oh ... only family members may visit imprisoners ... unless you have a {$b}fakeid{$b} ^^ just kidding.");
     }
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:11,代码来源:Secretary.php

示例5: on_wakeup

 public function on_wakeup(SR_Player $player, array $args)
 {
     if (!$player->hasTemp('HIDE_R2_ONCE')) {
         $player->setTemp('HIDE_R2_ONCE', 1);
         $party = $player->getParty();
         $this->partyMessage($player, 'wakeup');
         // 			$party->notice('You wake the three lamers kindly... As they realize what`s happening they attack.');
         SR_NPC::createEnemyParty('Redmond_Lamer', 'Redmond_Pinkhead', 'Redmond_Lamer')->fight($party, true);
     } else {
         $player->message($this->lang($player, 'no_wake'));
         // 			$player->message("There are no lamers to wake.");
     }
     return true;
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:14,代码来源:Room2.php

示例6: onNPCTalk

 public function onNPCTalk(SR_Player $player, $word, array $args)
 {
     $t = 'Redmond_Soldier_Hire';
     $price = 400 - Common::clamp($player->get('negotiation'), 0, 10) * 10;
     $time = 600 * $player->get('charisma') * 60;
     $b = chr(2);
     switch ($word) {
         case 'renraku':
             $msg = "I like their {$b}hardware{$b}, but they have too much influence to the market.";
             break;
         case 'hardware':
             $msg = "Yeah... Hardware and stuff. You don't know Renraku? Are you a crackhead?";
             break;
         case 'shadowrun':
             $msg = "You need to {$b}hire{$b} a runner?";
             break;
         case 'gizmore':
             $msg = "If you are here for a special quest, I can only say I have no idea. Is there a city full of you?";
             break;
         case 'hire':
             if ($player->getTemp($t)) {
                 $msg = "What do you say, chummer?";
             } else {
                 $msg = "I will follow you for a while for... Let's say... {$price} bucks.";
                 $player->setTemp($t, 1);
             }
             break;
         case 'yes':
             if ($player->hasTemp($t)) {
                 $msg = $this->onHire($player, $price, $time);
                 $player->unsetTemp($t);
             } else {
                 $msg = "Yes! Have a seat.";
             }
             break;
         case 'no':
             if ($player->getTemp($t)) {
                 $player->unsetTemp($t);
             }
             $msg = "Then not.";
             break;
         default:
             $msg = "What's up, chummer?";
             break;
     }
     $this->reply($msg);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:47,代码来源:Soldier.php

示例7: onNPCTalk

 public function onNPCTalk(SR_Player $player, $word, array $args)
 {
     $b = chr(2);
     $bm = 'Seattle_AresMan_BM';
     switch ($word) {
         case 'gizmore':
             return $this->rply('gizmore');
             #$msg = 'We have multiple gizmo and gadgets.'; break;
         #$msg = 'We have multiple gizmo and gadgets.'; break;
         case "blackmarket":
             if ($player->hasTemp($bm)) {
                 return $this->rply('bm1');
                 // 					$msg = "If someone asks, you did not get the permission from me, chummer. So you want one?";
             } else {
                 // 					$msg = "Hmm yes, I know the guys in the blackmarket. If you like I can give you a life-long permission for $this->price Nuyen, {$b}yes{$b}?";
                 $player->setTemp($bm, 1);
                 return $this->rply('bm2', array($this->price));
             }
         case 'yes':
             if ($player->hasTemp($bm)) {
                 $this->buyPermission($player);
                 $player->unsetTemp($bm);
                 return;
             } else {
                 return $this->rply('yes');
                 // 					$msg = "Yes, have a good day sir.";
             }
             break;
         case 'no':
             if ($player->hasTemp($bm)) {
                 $player->unsetTemp($bm);
             }
             return $this->rply('no');
             // 				$msg = "If life gives you lemons... You might be interested in a few fireweapons.";
             break;
         case 'malois':
             return $this->rply('malois');
             // 				$msg = 'Never heard of that.'; break;
         // 				$msg = 'Never heard of that.'; break;
         default:
             return $this->rply('default');
             // 				$msg = "Good day sir. How can I help you?"; break;
     }
     return $this->reply($msg);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:45,代码来源:AresMan.php

示例8: on_search

 public function on_search(SR_Player $player, array $args)
 {
     $key = $this->getTempKey();
     $attemp = $player->getTemp($key, 0);
     if ($attemp >= $this->getSearchMaxAttemps()) {
         $player->msg('1148');
         // 			$player->message('Not again.');
         return;
     }
     $attemp++;
     $player->setTemp($key, $attemp);
     $loot = array_merge(Shadowfunc::randLoot($player, $this->getSearchLevel(), array(), $this->getSearchChanceNone()), $this->getSearchLoot($player));
     if (count($loot) > 0) {
         $player->msg('5185', array($this->getName()));
         // 			$player->message(sprintf('You search the %s...', $this->getName()));
         $player->giveItems($loot, 'searching ' . $this->getName());
     } else {
         $player->msg('5186', array($this->getName()));
         // 			$player->message(sprintf('You search the %s... But find nothing.', $this->getName()));
     }
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:21,代码来源:SR_SearchRoom.php

示例9: onDoctorTalk

 public function onDoctorTalk(Delaware_Doctor $npc, SR_Player $player, $word)
 {
     $price = $this->displayRewardNuyen();
     $key = 'DLW_DOC_HAND';
     if (false === $player->hasTemp($key)) {
         $player->setTemp($key, 1);
     }
     $temp = $player->getTemp($key);
     switch ($word) {
         case 'yes':
             switch ($temp) {
                 case 1:
                     return $npc->reply($this->lang('doc_yes'));
                     // 						return $npc->reply('Yes');
                 // 						return $npc->reply('Yes');
                 case 2:
                     $player->setTemp($key, 1);
                     return $npc->reply($this->lang('doc_haha'));
                     // 						return $npc->reply('Hahahah ^^');
                 // 						return $npc->reply('Hahahah ^^');
                 case 3:
                     return $this->onConvince($npc, $player);
             }
         case 'no':
             switch ($temp) {
                 case 1:
                     break;
                 case 2:
                     $player->setTemp($key, $temp + 1);
                     return $npc->reply($this->lang('doc_ok', array($price)));
                     // 						return $npc->reply("Okok ... I will do it for {$price}.");
                 // 						return $npc->reply("Okok ... I will do it for {$price}.");
                 case 3:
                     $player->setTemp($key, 1);
                     return $npc->reply($this->lang('doc_haha_ok'));
                     // 						return $npc->reply("Haha ok :)");
             }
         case 'hand':
             switch ($temp) {
                 case 1:
                     $player->setTemp($key, $temp + 1);
                 default:
                     return $npc->reply($this->lang('doc_oh'));
                     // 						return $npc->reply("Haha, the old dwarf sent you? That's funny.");
             }
     }
     return $npc->reply($this->lang('doc_mh'));
     // 		return $npc->reply('Pardon?');
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:49,代码来源:Delaware_Seraphim1.php


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