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


PHP SR_Player::giveXP方法代码示例

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


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

示例1: 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

示例2: 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


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