本文整理汇总了PHP中Shadowfunc::displayNuyen方法的典型用法代码示例。如果您正苦于以下问题:PHP Shadowfunc::displayNuyen方法的具体用法?PHP Shadowfunc::displayNuyen怎么用?PHP Shadowfunc::displayNuyen使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Shadowfunc
的用法示例。
在下文中一共展示了Shadowfunc::displayNuyen方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onNPCQuestTalkB
public function onNPCQuestTalkB(SR_TalkingNPC $npc, SR_Player $player, $word, array $args = NULL)
{
$ny = Shadowfunc::displayNuyen(self::REWARD_NUYEN);
switch ($word) {
case 'shadowrun':
$npc->reply($this->lang('sr1'));
$npc->reply($this->lang('sr2'));
$npc->reply($this->lang('sr3', array($this->getNeededAmount())));
// $npc->reply('Yo chummer, I have another important mission for you.');
// $npc->reply('A contractor needs to get some ElectronicParts stolen from a ship delivery in the harbor.)');
// $npc->reply(sprintf('You would need to bring me %s ElectronicParts to get the job done. What do you say?', $this->getNeededAmount()));
break;
case 'confirm':
// $npc->reply(sprintf('I will pay you %s for this run.', $ny));
// break;
// $npc->reply(sprintf('I will pay you %s for this run.', $ny));
// break;
case 'yes':
// $npc->reply(sprintf('See you around, chummer.'));
// break;
// $npc->reply(sprintf('See you around, chummer.'));
// break;
case 'no':
// $npc->reply(sprintf('See you around, chummer.'));
$npc->reply($this->lang($word));
break;
}
return true;
}
示例2: onNPCQuestTalkB
public function onNPCQuestTalkB(SR_TalkingNPC $npc, SR_Player $player, $word, array $args = NULL)
{
switch ($word) {
case 'shadowrun':
$npc->reply($this->lang('sr1'));
$npc->reply($this->lang('sr2', array($this->getNeededAmount())));
$npc->reply($this->lang('sr3'));
// $npc->reply('Yo chummer, we need to get rid of Killers first, before we can get into business.');
// $npc->reply(sprintf('Please kill %s killers and come back.', $this->getNeededAmount()));
// $npc->reply('Do you accept?');
break;
case 'confirm':
$ny = Shadowfunc::displayNuyen(self::REWARD_NUYEN);
$npc->reply($this->lang('confirm', array($ny)));
// $npc->reply(sprintf('I will pay you %s for this run.', $ny));
break;
case 'yes':
$npc->reply($this->lang('yes'));
// $npc->reply(sprintf('See you around, chummer.'));
break;
case 'no':
$npc->reply($this->lang('no'));
// $npc->reply(sprintf('See you around, chummer.'));
break;
}
return true;
}
示例3: on_sleep
public function on_sleep(SR_Player $player, array $args)
{
$bot = Shadowrap::instance($player);
$party = $player->getParty();
$price = $this->calcPrice($player);
if (!$party->needsToRest()) {
return $bot->rply('1137');
// return $bot->reply('You don`t need to rest.');
}
if (false === $player->pay($price)) {
return $bot->rply('1063', array(Shadowfunc::displayNuyen($price), $player->displayNuyen()));
// return $bot->reply(sprintf('To rent a room for your party, you need %s. You only got %s!', Shadowfunc::displayNuyen($price), $player->displayNuyen()));
}
if ($price > 0) {
$player->msg('5143', array($price));
// $player->message(sprintf('You pay %s nuyen.', $price));
}
$b = chr(2);
$party->pushAction(SR_Party::ACTION_SLEEP);
// foreach ($party->getMembers() as $member)
// {
// $member instanceof SR_Player;
// $member->effectsReset();
// }
return $party->ntice('5182');
// $party->notice("The party goes to sleep. You go to your {$b}own{$b} bedroom.");
}
示例4: onNPCQuestTalkB
public function onNPCQuestTalkB(SR_TalkingNPC $npc, SR_Player $player, $word, array $args = NULL)
{
$ny = Shadowfunc::displayNuyen(self::REWARD_NUYEN);
switch ($word) {
case 'shadowrun':
$npc->reply($this->lang('sr1'));
$npc->reply($this->lang('sr2'));
$npc->reply($this->lang('sr3', array($this->getNeededAmount(), $ny)));
$npc->reply($this->lang('sr4'));
// $npc->reply('Yo chummer, I have an important application from a big contractor.');
// $npc->reply('The Renraku coorparation got a security breach and needs to collect their stolen IDCards ... "lol" right?');
// $npc->reply(sprintf('Please bring me %s IDCards and I will pay you %s.', $this->getNeededAmount(), $ny));
// $npc->reply('Do you accept?');
break;
case 'confirm':
$npc->reply($this->lang('confirm', array($ny)));
// $npc->reply(sprintf('I will pay you %s for this run.', $ny));
break;
case 'yes':
$npc->reply($this->lang('yes'));
// $npc->reply(sprintf('See you around, chummer.'));
break;
case 'no':
$npc->reply($this->lang('no'));
// $npc->reply(sprintf('See you around, chummer.'));
break;
}
return true;
}
示例5: checkQuest
public function checkQuest(SR_NPC $npc, SR_Player $player)
{
if ($this->isDone($player)) {
return false;
}
$need = $this->getNeededAmount();
$have = $this->getAmount();
$have = $this->giveQuesties($player, $npc, 'Tenugui', $have, $need);
$this->saveAmount($have);
if ($have >= $need) {
$ny = Shadowfunc::displayNuyen(self::REWARD_NUYEN);
$xp = self::REWARD_XP;
$npc->reply($this->lang('thx1'));
$npc->reply($this->lang('thx2', array($ny)));
$player->message($this->lang('thx3', array($ny, $xp)));
// $npc->reply('Haha, great! You are the best. This might have been a lesson for them.');
// $npc->reply(sprintf('I am still a bit short on money. But you can have %s.', $ny));
// $player->message(sprintf('The smith hands you %s. You also gain %s XP.', $ny, $xp));
$player->giveNuyen(self::REWARD_NUYEN);
$player->giveXP($xp);
$this->onSolve($player);
$npc->reply($this->lang('thx4'));
// $npc->reply('You know what ... I will teach you how to use lockpicking.');
$player->alterField('lockpicking', 1);
$player->message($this->lang('thx5'));
// $player->message(sprintf('Your lockpicking skill has increased by 1.'));
} else {
$npc->reply($this->lang('more', array($need - $have)));
// $npc->reply(sprintf('Please bring me another %d Tenugui. I will reward you well.', $need-$have));
}
return true;
}
示例6: 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;
}
示例7: 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;
}
示例8: onNPCQuestTalkB
public function onNPCQuestTalkB(SR_TalkingNPC $npc, SR_Player $player, $word, array $args = NULL)
{
switch ($word) {
case 'confirm':
$npc->reply($this->lang('confirm'));
// $npc->reply('It would be so great if you could help me again, yes?');
break;
case 'shadowrun':
$npc->reply($this->lang('shadowrun1'));
$npc->reply($this->lang('shadowrun2'));
$npc->reply($this->lang('shadowrun3', array(self::NEED_LEG, self::NEED_ARMOR, self::NEED_HELMET)));
$npc->reply($this->lang('shadowrun4', array(Shadowfunc::displayNuyen(self::REWARD_NUYEN))));
// $npc->reply('Thanks to you I have some runes now, and the customers are already coming.');
// $npc->reply('However, I need Chain armory for the Arena and I have no time to smith it.');
// $npc->reply(sprintf('Could you bring me %s ChainLegs, %s ChainBodies and %s ChainHelmets?', self::NEED_LEG, self::NEED_ARMOR, self::NEED_HELMET));
// $npc->reply(sprintf('I can pay you %s for that job! Yes?', Shadowfunc::displayNuyen(self::REWARD_NUYEN)));
break;
case 'yes':
$npc->reply($this->lang('yes'));
// $npc->reply(sprintf('Thank you so very much. Please hurry. The Arena frequently needs melee armory.'));
break;
case 'no':
$npc->reply($this->lang('no'));
// $npc->reply('Anyway check out my offers!');
break;
}
return true;
}
示例9: 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));
}
示例10: onQuestSolve
public function onQuestSolve(SR_Player $player)
{
$xp = $this->getRewardXP();
$nuyen = $this->getRewardNuyen();
$player->message($this->lang('reward', array(Shadowfunc::displayNuyen($nuyen), $xp)));
// $player->message(sprintf('You hand Reginald his wifes bracelett. He cheers and hands you %s. You also gained %dXP.', Shadowfunc::displayNuyen($nuyen), $xp));
// $player->giveNuyen($nuyen);
// $player->giveXP($xp);
}
示例11: 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();
}
示例12: onQuestSolve
public function onQuestSolve(SR_Player $player)
{
$xp = $this->getRewardXP();
$ny = $this->getRewardNuyen();
$player->message($this->lang('solved', array(Shadowfunc::displayNuyen($ny), $xp)));
// $player->message(sprintf('The dwarf cheers and hands you %s. You also gained %s XP.', Shadowfunc::displayNuyen($ny), $xp));
// $player->giveXP($xp);
// $player->giveNuyen($ny);
$quest2 = SR_Quest::getQuest($player, 'Redmond_AresDwarf_II');
$quest2 instanceof Quest_Redmond_AresDwarf_II;
if ($quest2->isDone($player)) {
$quest2->onSolveDuo($player);
}
}
示例13: onEventWallet
public function onEventWallet(SR_Party $party)
{
foreach ($party->getMembers() as $member) {
$member instanceof SR_Player;
if ($member->isHuman()) {
$percent = 0.05;
$luck = $member->get('luck');
$percent += $luck / 200;
if (Shadowfunc::dicePercent($percent)) {
$nuyen = rand(100, 1000);
$member->message(sprintf('You found a wallet with %s in it.', Shadowfunc::displayNuyen($nuyen)));
$member->giveNuyen($nuyen);
}
}
}
}
示例14: onPayOwner
public function onPayOwner(SR_Player $buyer, $amt)
{
$price = $this->getVar('sr4ba_price') * $amt;
$pname = $this->getVar('sr4ba_pname');
if (false === ($seller = Shadowrun4::getPlayerByName($pname))) {
if (false === ($seller = SR_Player::getByLongName($pname))) {
return false;
}
}
if (false === $seller->giveBankNuyen($price)) {
return false;
}
$iname = $this->getVar('sr4ba_iname');
$seller->msg('5035', array(Shadowfunc::displayNuyen($price), $amt, $iname, $buyer->getName()));
// $seller->message(sprintf('%s have been booked to your bank account for selling %s %s to %s.', Shadowfunc::displayNuyen($price), $amt, $iname, $buyer->getName()));
return true;
}
示例15: execute
public static function execute(SR_Player $player, array $args)
{
$bot = Shadowrap::instance($player);
$party = $player->getParty();
$members = $party->getMembers();
$format = Shadowrun4::lang('fmt_sumlist');
$total = 0;
$back = '';
foreach ($members as $member) {
$member instanceof SR_Player;
$ny = $member->getBase('nuyen');
$total += $ny;
$back .= sprintf($format, $member->getEnum(), $member->getName(), Shadowfunc::displayNuyen($ny));
}
$bot->reply(Shadowrun4::lang('5008', array(Shadowfunc::displayNuyen($total), ltrim($back, ',; '))));
// $bot->reply(sprintf('Your party has %s: %s.', Shadowfunc::displayNuyen($total), substr($back, 2)));
return true;
}