예제 #1
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));
     }
 }
예제 #2
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())));
     }
 }
예제 #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('Dude i was just kidding ... well ... here you are -.-');
         $this->onSolve($player);
     } else {
         $npc->reply('Dude i was just kidding -.-');
     }
     return true;
 }
예제 #6
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?'));
     }
 }
예제 #7
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())));
     }
 }
예제 #8
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));
     }
 }
예제 #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)
 {
     $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));
     }
 }
예제 #11
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?');
     }
 }
예제 #12
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));
     }
 }
예제 #13
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;
 }
예제 #14
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;
 }
예제 #15
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;
 }
예제 #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)
 {
     $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));
     }
 }
예제 #18
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));
     }
 }
예제 #19
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;
 }
예제 #20
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]));
     }
 }
예제 #21
0
파일: Kitchen.php 프로젝트: sinfocol/gwf3
 public function onEnter(SR_Player $player)
 {
     if (parent::onEnter($player)) {
         SR_NPC::createEnemyParty('TrollHQ_ChiefCook')->fight($player->getParty());
     }
     return true;
 }
예제 #22
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;
 }
예제 #23
0
파일: TrollsInn.php 프로젝트: sinfocol/gwf3
 public function onEnter(SR_Player $player)
 {
     $p = $player->getParty();
     if ($p->getMin('level', true) < 1) {
         $this->partyMessage($player, 'afraid', array(1));
         // 			$p->notice('You are too afraid to go in there. (Each party member needs a minimum level of 1)');
         return true;
     }
     foreach ($p->getMembers() as $member) {
         $member instanceof SR_Player;
         if ($member->isHuman()) {
             $quest = SR_Quest::getQuest($member, 'Renraku_I');
             $quest instanceof Quest_Renraku_I;
             if (false === $quest->checkOrk($player)) {
                 $this->partyMessage($player, 'angryork');
                 // 					$p->notice('A big angry Ork shouts to you: "You not welcome here!" - The Ork attacks you with a tbs-pocket-knife.');
                 SR_NPC::createEnemyParty('Redmond_Ork')->fight($p, true);
                 return true;
             }
         }
     }
     parent::onEnter($player);
     // 		$p->pushAction(SR_Party::ACTION_INSIDE);
     $b = chr(2);
     $c = Shadowrun4::SR_SHORTCUT;
     $this->partyMessage($player, 'enter1');
     $this->partyMessage($player, 'enter2');
     // 		$p->notice('The guys in there stare quiet at their drinks when you enter the Trolls\' Inn.');
     // 		$p->notice('You see a barkeeper, a suspicious person in a dark corner, a soldier and some guests, mostly orks and trolls. One of the guests greets and beckons you.');
     $this->partyHelpMessage($player, 'help');
     // 		$p->help("Use {$b}{$c}ttb{$b}(arkeeper), {$b}{$c}ttg{$b}(uest), {$b}{$c}ttj{$b}(ohnson) and {$b}{$c}tts{$b}(oldier) to talk to the persons.");
     return true;
 }
예제 #24
0
파일: ExitGuard.php 프로젝트: sinfocol/gwf3
 private function bribingTheGuard(SR_Player $player, $word, array $args)
 {
     $b = chr(2);
     $price = rand(2000, 8000);
     $price = Shadowfunc::calcBuyPrice($price, $player);
     if (!isset($args[0])) {
         $this->reply('Every person has it\'s <price> parameter.');
         $player->help('Use #talk bribe <amt> to try to bribe the guard.');
         return true;
     }
     $amt = (int) $args[0];
     if ($amt < $price) {
         $this->reply("{$b}Security !!!!{$b}");
         $p = $player->getParty();
         $p->pushAction(SR_Party::ACTION_OUTSIDE, 'Prison_Block2');
         $ep = SR_NPC::createEnemyParty('Prison_Ward', 'Prison_Ward', 'Prison_Ward', 'Prison_Guard', 'Prison_Guard');
         $p->fight($ep, true);
     } else {
         if (!$player->hasNuyen($amt)) {
             $this->reply('The idea of a bribe is usually that you can pay it ...');
         } else {
             $party = $player->getParty();
             $this->reply('Every bride has her pride ...');
             $this->reply('Ok buddy ... He is in cell 5, do quick, i will release the alarm as late as possible. Good luck ... ');
             $player->giveNuyen(-$amt);
             $party->pushAction(SR_Party::ACTION_OUTSIDE, 'PrisonB2_Exit');
         }
     }
     return true;
 }
예제 #25
0
파일: Arena.php 프로젝트: sinfocol/gwf3
 public function on_challenge(SR_Player $player, array $args)
 {
     # No fight with party:
     if ($player->isInParty()) {
         $player->msg('1099');
         // 			$player->message("You can't fight here when you are in a party. Use #part to leave your party.");
         return false;
     }
     # Get current enemy
     $key = 'SEATTLE_ARENA_N';
     if (!$player->hasConst($key)) {
         $player->setConst($key, 1);
     }
     $n = $player->getConst($key);
     # Possible flags/enemies in Arena:
     $enemies = array(array("Seattle_AToughGuy", $this->lang($player, 'e1')), array("Seattle_ASecOrk", $this->lang($player, 'e2')), array("Seattle_AToughTroll", $this->lang($player, 'e3')), array("Seattle_AMagician", $this->lang($player, 'e4')), array("Seattle_AElite", $this->lang($player, 'e5')));
     # No more fights:
     if ($n > count($enemies)) {
         // 			$player->message("Sorry. You fought all the enemies here. Try #fight <player> then :P");
         $player->msg('1098');
         return false;
     }
     $n--;
     $enemy = $enemies[$n];
     $player->msg('5141', array($enemy[1]));
     // 		$player->message("The Arena-Guy leads you to the locker room. After a few minutes you were guided into the arena and see your enemy: ".$enemy[1].". " );
     SR_NPC::createEnemyParty($enemy[0])->fight($player->getParty(), true);
     return true;
 }
예제 #26
0
파일: Hideout.php 프로젝트: sinfocol/gwf3
 public function onEnter(SR_Player $player)
 {
     $party = $player->getParty();
     $dice = rand(0, 6);
     if ($dice < 2) {
         $this->partyMessage($player, 'lucky');
         // 			$party->notice('You silently search the door and windows for an entrance. You were lucky and sneak in...');
         $this->teleportInside($player, 'Hideout_Exit');
     } else {
         if ($dice < 4) {
             $this->partyMessage($player, 'noluck');
             // 			$party->notice('You silently search the door and windows for an entrance. You have no luck, everything\'s closed.');
         } else {
             if ($dice < 6) {
                 $this->partyMessage($player, 'fight2');
                 // 			$party->notice('You silently search the door and windows for an entrance. Two punks notice you and attack!');
                 SR_NPC::createEnemyParty('Redmond_Cyberpunk', 'Redmond_Cyberpunk')->fight($party, true);
             } else {
                 $this->partyMessage($player, 'fight4');
                 // 			$party->notice('You take a look through the doors keyhole. A party of four punks opens the door and surprises you.');
                 SR_NPC::createEnemyParty('Redmond_Cyberpunk', 'Redmond_Cyberpunk', 'Redmond_Pinkhead', 'Redmond_Lamer')->fight($party, true);
             }
         }
     }
 }
예제 #27
0
파일: Bathroom.php 프로젝트: sinfocol/gwf3
 public function onEnter(SR_Player $player)
 {
     parent::onEnter($player);
     $party = $player->getParty();
     SR_NPC::createEnemyParty('Redmond_Ork')->fight($party, true);
     return true;
 }
예제 #28
0
파일: Villa.php 프로젝트: sinfocol/gwf3
 public function onEnter(SR_Player $player)
 {
     $p = $player->getParty();
     # We know the mafia :)
     $quest = SR_Quest::getQuest($player, 'HiJack');
     if ($quest->isAccepted($player)) {
         return parent::onEnter($player);
     }
     # Check how many guards have been killed in total
     $killed = 0;
     foreach ($p->getMembers() as $member) {
         $member instanceof SR_Player;
         $killed += SR_PlayerVar::getVal($member, 'mgkills', 0);
     }
     if ($killed >= 6) {
         return parent::onEnter($player);
     }
     # Guarded!
     foreach ($p->getMembers() as $member) {
         $member instanceof SR_Player;
         $member->message($this->lang($member, 'guarded'));
     }
     $guards = array();
     for ($i = 0; $i < 6; $i++) {
         $guards[] = 'Vegas_MafiaGuard';
     }
     SR_NPC::createEnemyParty($guards)->fight($p);
     return false;
 }
예제 #29
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);
 }
예제 #30
0
파일: Room1.php 프로젝트: sinfocol/gwf3
 public function onEnter(SR_Player $player)
 {
     if (parent::onEnter($player)) {
         $party = $player->getParty();
         SR_NPC::createEnemyParty('Redmond_Cyberpunk', 'Redmond_Cyberpunk', 'Redmond_Cyberpunk')->fight($party, true);
     }
     return true;
 }