本文整理汇总了PHP中SR_Player::giveNuyenEvent方法的典型用法代码示例。如果您正苦于以下问题:PHP SR_Player::giveNuyenEvent方法的具体用法?PHP SR_Player::giveNuyenEvent怎么用?PHP SR_Player::giveNuyenEvent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SR_Player
的用法示例。
在下文中一共展示了SR_Player::giveNuyenEvent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onQuestSolve
public function onQuestSolve(SR_Player $player)
{
$player->message($this->lang('impressed'));
// $player->message("The monk smiles. I am very impressed my $son. May the spirit of Buddah guide your path...");
if ($player->hasSkill('searching')) {
$player->message($this->lang('strong'));
// $player->message('The monk says: "You are really strong my '.$son.', please take this donation as a sign of deep respect to your greatful skills and patience."');
$player->message($this->lang('nyward', array(300)));
$player->giveNuyenEvent(300);
// $player->message('You received a donation of 300 nuyen.');
} else {
$player->message($this->lang('reward1'));
// $player->message('The monk says: "I will now teach you a real skill, the skill of seeing the invisible and finding the hidden paths."');
$player->levelupFieldTo('searching', 0);
$skillname = Shadowfunc::translateVariable($player, 'searching');
$player->message($this->lang('reward2', array($skillname)));
// $player->message('You have learned the skill "searching".');
}
}
示例2: onSolveDuo
public function onSolveDuo(SR_Player $player)
{
$this->msg('solve2a');
$this->msg('solve2b');
// $player->message('The dwarfs look very pleased.');
// $player->message('"Thank you so much", Aron says, "For your help we have thought of a special reward..."');
$max = $player->isRunner() ? Shadowcmd_lvlup::MAX_VAL_SKILL_RUNNER : Shadowcmd_lvlup::MAX_VAL_SKILL;
if ($player->getBase('melee') > $max) {
$this->msg('solve2c', array(Shadowfunc::displayNuyen(5000)));
$player->giveNuyenEvent(5000);
// $player->message('You received another 5000 nuyen!');
} else {
$this->msg('solve2d');
// $player->message('Your melee skill has increased by 1.');
$player->levelupField('melee', 1);
// $player->modify();
}
return true;
}