Пример #1
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     if (false === ($auris = $player->getInvItemByName('Auris'))) {
         return $npc->reply($this->lang('aww1'));
         // 			return $npc->reply('Oh, you don\'t have an Auris for me?');
     }
     if (!$this->rightInTime($player)) {
         return $npc->reply($this->lang('aww2'));
         // 			return $npc->reply('You got the Auris? :) ... Oh, it turned to stone already :(');
     }
     $auris->useAmount($player, 1);
     $player->message($this->lang('hand'));
     // 		$player->message('You hand the pot of fluid Auris to the gnome ...');
     $npc->reply($this->lang('thx1'));
     // 		$npc->reply('Wow. Thank you so very very much.');
     $npc->reply($this->lang('thx2'));
     // 		$npc->reply('You surely earned a special reward now ... Let me think ...');
     $npc->reply($this->lang('thx3'));
     // 		$npc->reply('Right ... I will teach you the teleportii spell. It is quite powerful!');
     $player->levelupSpell('teleportii');
     $player->message($this->lang('learned'));
     // 		$player->message('You learned a new spell: teleportii');
     $this->onSolve($player);
     return true;
 }
Пример #2
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     $have = $this->getAmount();
     $need = $this->getNeededAmount();
     $give = 0;
     foreach ($player->getInventory() as $item) {
         if ($item instanceof SR_Rune) {
             $player->deleteFromInventory($item);
             $have++;
             $give++;
             if ($have >= $need) {
                 break;
             }
         }
     }
     if ($give > 0) {
         $this->increase('sr4qu_amount', $give);
         $player->message($this->lang('gave', array($give, $npc->getName())));
         // 			$player->message(sprintf('You gave %s %s to %s.', $give, 'Runes', $npc->getName()));
     }
     if ($have >= $need) {
         $npc->reply($this->lang('thanks1'));
         // 			$npc->reply('Thank you very much my friend. Now I can also craft some equipment again.');
         $this->onSolve($player);
         $npc->reply($this->lang('thanks2', array(self::REWARD_RUNES)));
         // 			$npc->reply('As a reward I let you create '.self::REWARD_RUNES.' new runes via #reward.');
         $player->increaseConst(Seattle_Blacksmith::REWARD_RUNES, self::REWARD_RUNES);
     } else {
         $npc->reply($this->lang('more', array($have, $need)));
         // 			$npc->reply(sprintf('You gave me %s of %s Runes... Give me a few more and I will reward you greatly :)', $have, $need));
     }
 }
Пример #3
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     if ($player->hasConst('RESCUED_MALOIS')) {
         $npc->reply('I have heard of your brave actions, and i know you are involved into the same shit ... i cannot give you much as reward ... but take this please and thank you!');
         return $this->onSolve($player);
     } else {
         return $npc->reply('It was just an idea ... good luck.');
     }
 }
Пример #4
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     if (!SR_PlayerVar::getVal($player, '_SLQCHW1', 0)) {
         return $npc->reply('Nothing new? ok.');
     }
     $player->message('You tell her that husband is probably in prison...');
     $npc->reply('Oh i was afraid something happened to him ... thank you so very much ... i think i have to speak to the authorities then.');
     return $this->onSolve($player);
 }
Пример #5
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     if ($this->getAmount() >= $this->getNeededAmount()) {
         $npc->reply($this->lang('thx'));
         $this->onSolve($player);
     } else {
         $npc->reply($this->lang('more', array($this->getAmount(), $this->getNeededAmount())));
     }
 }
Пример #6
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     if ($this->getAmount() >= $this->getNeededAmount()) {
         $npc->reply('Dude i was just kidding ... well ... here you are -.-');
         $this->onSolve($player);
     } else {
         $npc->reply('Dude i was just kidding -.-');
     }
     return true;
 }
Пример #7
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     $data = $this->getQuestData();
     if (count($data) === 5) {
         $npc->reply('I have your quest confirmed, well done. Here is your payment.');
         return $this->onSolve($player);
     } else {
         return $npc->reply(sprintf('Your mission is not over?'));
     }
 }
Пример #8
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     $npc instanceof SR_TalkingNPC;
     if ($this->getAmount() >= $this->getNeededAmount()) {
         $npc->reply($this->lang('solved'));
         return $this->onSolve($player);
     } else {
         return $npc->reply($this->lang('more', array($this->getAmount(), $this->getNeededAmount())));
     }
 }
Пример #9
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     if ($this->getAmount() >= $this->getNeededAmount()) {
         $npc->reply($this->lang('well_done'));
         // 			$npc->reply('I see you have done a great job. Well done!');
         return $this->onSolve($player);
     } else {
         $npc->reply($this->lang('more', array($this->getAmount(), $this->getNeededAmount())));
         // 			$npc->reply(sprintf('I see you have told %d/%d citizens about the temple. Do some more work please.', $this->getAmount(), $this->getNeededAmount()));
     }
 }
Пример #10
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     if ($this->getAmount() >= $this->getNeededAmount()) {
         $npc->reply($this->lang('thx'));
         // 			$npc->reply('Thanks friend!');
         return $this->onSolve($player);
     } else {
         return $npc->reply($this->lang('more'));
         // 			$npc->reply('You too weak?');
     }
     // 		return false;
 }
Пример #11
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     if ($this->isConvinced($player)) {
         $npc->reply($this->lang('thx'));
         // 			$npc->reply('Thank you so very very much. This will help me to get my business running.');
         $this->onSolve($player);
     } else {
         $npc->reply($this->lang('more'));
         // 			$npc->reply(sprintf('Sad to hear you could not convince him yet.'));
     }
     return true;
 }
Пример #12
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     if ($player->getConst(self::KEY)) {
         $npc->reply($this->lang('thx'));
         // 			$npc->reply('Yes better.');
         return $this->onSolve($player);
     } else {
         $npc->reply($this->lang('more'));
         // 			$npc->reply('Still cold.');
     }
     return false;
 }
Пример #13
0
 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;
 }
Пример #14
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     $have = $this->getAmount();
     $need = $this->getNeededAmount();
     if ($have >= $need) {
         $npc->reply($this->lang('thx'));
         // 			$npc->reply('Hell yeah!');
         return $this->onSolve($player);
     } else {
         return $npc->reply($this->lang('more', array($need - $have)));
         // 			return $npc->reply(sprintf("Please kill %d more %s.", $need-$have, self::EMO_TYPE));
     }
 }
Пример #15
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     $have = $this->getAmount();
     $need = $this->getNeededAmount();
     if ($have >= $need) {
         $npc->reply($this->lang('thx'));
         // 			$npc->reply('Well done chummer. Take your reward.');
         return $this->onSolve($player);
     } else {
         return $npc->reply($this->lang('more', array($need - $have)));
         // 			return $npc->reply(sprintf('Please kill %d more Trolls.', $need-$have));
     }
 }
Пример #16
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     $have = $this->getAmount();
     $need = $this->getNeededAmount();
     if ($have >= $need) {
         $npc->reply($this->lang('thx'));
         // 			$npc->reply('The client will be very happy. Good job.');
         return $this->onSolve($player);
     } else {
         return $npc->reply($this->lang('more'));
         // 			return $npc->reply("Please bring us the data.");
     }
 }
Пример #17
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     $data = $this->getKillData();
     list($hg, $ho, $ht) = $data;
     $ng = self::$NEED[0] - $hg;
     $no = self::$NEED[1] - $ho;
     $nt = self::$NEED[2] - $ht;
     if ($ng <= 0 && $no <= 0 && $nt <= 0) {
         $npc->reply('We thank you very much in the name of our little shrine.');
         return $this->onSolve($player);
     } else {
         return $npc->reply(sprintf('You punished %d/%d Goblins, %d/%d Orks and %d/%d Trolls. More!', $hg, self::$NEED[0], $ho, self::$NEED[1], $ht, self::$NEED[2]));
     }
 }
Пример #18
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     $data = $this->getQuestData();
     if (isset($data['WORKER'])) {
         $name = $data['WORKER'];
         $npc->reply($this->lang('thx1', array($name)));
         // 			$npc->reply(sprintf('Thank you so very very much. %s is doing a good job :)', $name));
         $npc->reply($this->lang('thx2'));
         // 			$npc->reply(sprintf('He found a used Scanner_v4 too. I guess you can have it!'));
         $this->onSolve($player);
     } else {
         $npc->reply($this->lang('more'));
         // 			$npc->reply(sprintf('Sad to hear you could not find anybody yet.'));
     }
     return true;
 }
Пример #19
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     if (false == ($cards = $player->getInvItemByName('IDCard'))) {
         return;
     }
     if ($cards->getAmount() < 3) {
         return;
     }
     $cards->useAmount($player, 3);
     $player->message($this->lang('hand'));
     $npc->reply($this->lang('thx1'));
     $npc->reply($this->lang('thx2'));
     // 		$player->message('You hand 3 IDCards to Malois.');
     // 		$npc->reply('Thank you very much. Now we sneak into Renraku and find out what they did to us.');
     // 		$npc->reply('By the way... I remember you from the experiments there...');
     $this->onSolve($player);
 }
Пример #20
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     $data = $this->getKillData();
     $kh = $data['H'];
     $kg = $data['G'];
     $ke = $data['E'];
     if ($kh >= self::KILLS_NEEDED && $kg >= self::KILLS_NEEDED && $ke >= self::KILLS_NEEDED) {
         $npc->reply($this->lang('thx'));
         // 			$npc->reply('You are doing a good job, chummer.');
         return $this->onSolve($player);
     } else {
         $nh = Common::clamp(self::KILLS_NEEDED - $kh, 0);
         $ng = Common::clamp(self::KILLS_NEEDED - $kg, 0);
         $ne = Common::clamp(self::KILLS_NEEDED - $ke, 0);
         return $npc->reply($this->lang('more', array($nh, $ne, $ng)));
         // 			return $npc->reply(sprintf('Please kill %d more Hipster, %d more Emo and %d more Goth, then we talk again.', $nh, $ne, $ng));
     }
 }
Пример #21
0
 private function checkQuestJohnson(SR_NPC $npc, SR_Player $player)
 {
     $data = $this->getQuestData();
     if (!isset($data['gave'])) {
         $npc->reply($this->lang('notyet'));
         // 			$npc->reply('It seems like you did not deliver the package yet.');
         return false;
     }
     // 		$xp = 6;
     // 		$ny = 750;
     $npc->reply($this->lang('reward1'));
     $player->message($this->lang('reward2', array($this->getRewardNuyen(), $this->getRewardXP())));
     // 		$npc->reply('I have heard you delivered the package. Thank you chummer.');
     // 		$player->message('Mr. Johnson hands you '.$ny.' Nuyen. You also gained '.$xp.' XP.');
     // 		$player->giveXP($xp);
     // 		$player->giveNuyen($ny);
     return $this->onSolve($player);
 }
Пример #22
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     if ($player->getBase('bad_karma') > 0) {
         $npc->reply($this->lang('thx1'));
         // 			$npc->reply('Excellent ... let me try to free you from your sins ...');
         $player->message($this->lang('thx2'));
         // 			$player->message('The shamane is praying and mumbling ... and you feel better!');
         $player->increaseField('bad_karma', -1);
         $npc->reply($this->lang('thx3'));
         // 			$npc->reply('It seems like i get better and better doing this ... let me teach you something!');
         $player->levelupSpell('bunny', 1);
         $player->message($this->lang('thx4'));
         // 			$player->message('You have learned the bunny spell, which allows you to flee from combats.');
         return $this->onSolve($player);
     } else {
         return $npc->reply($this->lang('more'));
         // 			return $npc->reply('You still have not enough bad karma.');
     }
 }
Пример #23
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     $need = $this->getNeededAmount();
     $have = $this->getAmount();
     if ($have >= $need) {
         $this->onSolve($player);
     } else {
         $npc->reply($this->lang('friday'));
         // 			$npc->reply('Please invite more guests. The party is on friday. Which rockband should I take?');
     }
 }
Пример #24
0
 public function onTryInvite(SR_NPC $npc, SR_Player $player)
 {
     if (!$this->isInQuest($player)) {
         return $npc->reply($this->lang('no_quest_' . $npc->getGender()));
     }
     if ($npc->getGender() === 'male') {
         return $npc->reply($this->lang('oops_male'));
     }
     $key2 = 'Vegas_Citizen_Invite_' . $player->getID();
     if (!$npc->hasTemp($key2)) {
         $npc->setTemp($key2, rand(1, 4));
     }
     $key = $npc->getTemp($key2);
     $npc->reply($this->lang('i_' . $key));
     if ($key == 4) {
         $this->onInviteCitizen($npc, $player, $npc->getParty()->getMemberCount());
         $npc->setTemp($key2, 5);
     }
     return true;
 }
Пример #25
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     $have = $this->getAmount();
     $need = $this->getNeededAmount();
     if ($have >= $need) {
         return $this->onSolve($player);
     } else {
         return $npc->reply($this->lang('reports', array($have, $need)));
         // 			$npc->reply(sprintf('Our informants reported you have killed %d of %d punks yet... Kill some more!', $have, $need));
     }
 }
Пример #26
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     $have = $this->getAmount();
     $need = $this->getNeededAmount();
     if ($have >= $need) {
         $this->onSolve($player);
     } else {
         $npc->reply($this->lang('more', array($have, $need)));
         // 			$npc->reply(sprintf('My informants told me you only killed %s of %s TrollDeckers.', $have, $need));
     }
 }
Пример #27
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     $amt = $this->getAmount();
     $max = $this->getNeededAmount();
     $need = $max - $amt;
     if ($need <= 0) {
         $this->onSolve($player);
     } else {
         $npc->reply($this->lang('more', array($amt, $max, $need)));
         // 			$npc->reply(sprintf('My informants told me you killed %d of %d lamers so far. Now go and kill %d more, chummer.', $amt, $max, $need));
     }
 }
Пример #28
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     if ($this->isDone($player)) {
         return false;
     }
     $ny = $this->getNeededAmount();
     if ($player->hasNuyen($ny)) {
         $player->message($this->lang('give', array($this->displayNuyen())));
         // 			$player->message(sprintf('You hand Malois %s ...', $this->displayNuyen()));
         $player->giveNuyen(-$ny);
         $npc->reply($this->lang('thx1'));
         // 			$npc->reply('Thank you very much my friend. I think I can find out more now.');
         $player->giveXP(self::REWARD_XP);
         $this->onSolve($player);
         return true;
     } else {
         $npc->reply($this->lang('aww'));
         // 			$npc->reply('Oh, I see you don\'t have enough money :(');
         return true;
     }
 }
Пример #29
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     if ($this->isDone($player)) {
         return false;
     }
     if ($this->getAmount() > 0) {
         $npc->reply($this->lang('thx1'));
         // 			$npc->reply('Yes I confirm you have delivered the package. Good job. Here is your reward and a small bonus.');
         $ny = Shadowfunc::displayNuyen(self::REWARD_NUYEN);
         $xp = self::REWARD_XP;
         $player->message($this->lang('thx2', array($ny, $xp)));
         // 			$player->message(sprintf('Mr.Johnson hands you a couvert with %s. You also gain %s XP.', $ny, $xp));
         $player->giveNuyen(self::REWARD_NUYEN);
         $player->giveXP(self::REWARD_XP);
         $this->onSolve($player);
         return true;
     } else {
         $npc->reply($this->lang('more'));
         // 			$npc->reply(sprintf('Better deliver the package chummer.'));
         return true;
     }
 }
Пример #30
0
 public function checkQuest(SR_NPC $npc, SR_Player $player)
 {
     if (false === ($auris = $player->getInvItemByName('Auris'))) {
         return $npc->reply('Oh, you don\'t have more Auris for me?');
     }
     if (!$this->rightInTime($player)) {
         return $npc->reply('You got the Auris? :) ... Oh, it turned to stone already :(');
     }
     $have_before = $this->getAmount();
     $need = $this->getNeededAmount();
     $have = $this->giveQuesties($player, $npc, 'Auris', $have_before, $need);
     if ($have > $have_before) {
         $npc->reply('Thank you a lot, chummer.');
         $this->saveAmount($have);
     }
     if ($have >= $need) {
         $npc->reply('Wow ... You really earned a great reward now ... I will take my time and teach you the teleportiii spell!');
         $player->levelupSpell('teleportiii');
         return $this->onSolve($player);
     } else {
         return $npc->reply(sprintf('I still need %d fluid Auris for my experiments.', $need - $have));
     }
 }