Ejemplo n.º 1
0
 public function onNPCTalk(SR_Player $player, $word, array $args)
 {
     $c = Shadowrun4::SR_SHORTCUT;
     $b = chr(2);
     switch ($word) {
         case 'yes':
         case 'no':
         case 'hand':
             $quest = SR_Quest::getQuest($player, 'Delaware_Seraphim1');
             $quest instanceof Quest_Delaware_Seraphim1;
             return $quest->onDoctorTalk($this, $player, $word);
         case 'heal':
             // 				$this->reply("We can heal you for some nuyen. Just use {$c}heal here.");
             // 				break;
         // 				$this->reply("We can heal you for some nuyen. Just use {$c}heal here.");
         // 				break;
         case 'cyberware':
             // 				$this->reply("We have the best Renraku Cyberware available. Use {$c}view, {$c}implant and {$c}unplant to manage your accesoires.");
             // 				break;
             return $this->rply($word);
         case 'hello':
         default:
             $this->rply('default');
             // 				$this->reply("Hello chummer, need some {$b}heal{$b} or {$b}cyberware{$b}?");
             $player->giveKnowledge('words', 'Cyberware', 'Yes', 'No');
             return true;
     }
 }
Ejemplo n.º 2
0
 public function onNPCTalk(SR_Player $player, $word, array $args)
 {
     $b = chr(2);
     if ($this->onNPCQuestTalk($player, $word)) {
         return true;
     }
     $quest1 = SR_Quest::getQuest($player, 'Renraku_I');
     $quest2 = SR_Quest::getQuest($player, 'Renraku_II');
     switch ($word) {
         case 'experiment':
         case 'experiments':
             $this->rply('experiments');
             // 				$this->reply("I am sure in the upper floors of the Renraku building we can find out what exactly happend.");
             if (!$quest2->isAccepted($player)) {
                 $quest2->accept($player);
             }
             return true;
         case 'renraku':
         default:
             if ($quest1->isInQuest($player)) {
                 $this->rply('renraku1');
                 // 					$this->reply("Thank you for your help. Me and some friends will soon break into the Renraku office, and find out more.");
                 $this->rply('renraku2');
                 // 					$this->reply("We know there are a lot of people involved in the {$b}experiments{$b}, and they do everything to keep it secret.");
                 $this->rply('renraku3');
                 // 					$this->reply("Almost none of the victims remember anything. Some of them got serious brain damage, or even died.");
                 $quest1->onSolve($player);
             } else {
                 $this->rply('renraku4');
             }
             // 				$this->reply("I hope we will soon find out what happened in their {$b}experiments{$b}!");
             return true;
     }
 }
Ejemplo n.º 3
0
 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;
 }
Ejemplo n.º 4
0
 public function onNPCTalk(SR_Player $player, $word, array $args)
 {
     if (true === SR_Quest::getQuest($player, 'Chicago_OwlJohnsonRoundtrip')->onRoundtripShow($player, $this)) {
         return true;
     }
     // 		$b = chr(2);
     if ($this->onNPCQuestTalk($player, $word)) {
         return true;
     }
     switch ($word) {
         case 'bounty':
             if ($this->onNPCBountyTalk($player, $word, $args)) {
                 return true;
             }
             return $this->rply('bounty');
             // 				return $this->reply('Yeah, become a bountyhunter!');
         // 				return $this->reply('Yeah, become a bountyhunter!');
         case 'malois':
             return $this->rply('malois');
             // 				return $this->reply('I am very busy this evening.');
         // 				return $this->reply('I am very busy this evening.');
         default:
             $this->rply('default');
             // 				$this->reply("Hello chummer. Looking for a job? Maybe you wanna become a {$b}bounty{$b}hunter");
             $player->giveKnowledge('words', 'Bounty');
             return true;
     }
 }
Ejemplo n.º 5
0
 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;
 }
Ejemplo n.º 6
0
 public function getNPCLoot(SR_Player $player)
 {
     SR_Quest::getQuest($player, 'Delaware_MCGuest12')->onKill($player);
     SR_Quest::getQuest($player, 'Delaware_MCGuest22')->onKill($player);
     SR_Quest::getQuest($player, 'Delaware_MCJohnson1')->onKillHipster($player);
     return array();
 }
Ejemplo n.º 7
0
 public function onNPCTalk(SR_Player $player, $word, array $args)
 {
     $b = chr(2);
     $quest = SR_Quest::getQuest($player, 'Seattle_GJohnson3');
     switch ($word) {
         case 'employee':
         case 'employees':
             return $this->rply('employee');
             // 				return $this->reply('Ìf you are not an employee you are supposed to leave. Else, how can I help you?');
         // 				return $this->reply('Ìf you are not an employee you are supposed to leave. Else, how can I help you?');
         case 'renraku':
             return $this->rply('renraku');
             // 				return $this->reply("The office is only for {$b}employee{$b}.");
         // 				return $this->reply("The office is only for {$b}employee{$b}.");
         default:
             if ($quest->isInQuest($player) && $quest->getAmount() == 0) {
                 $this->rply('please');
                 // 					$this->reply('Hello. Please deliver the package to the bureau. The floor to the left. Room 0104.');
                 $player->giveKnowledge('places', 'Renraku_Bureau');
                 return true;
             } else {
                 return $this->rply('default');
                 // 					return $this->reply('Hello, how can I help you.');
             }
     }
 }
Ejemplo n.º 8
0
 public function onNPCTalk(SR_Player $player, $word, array $args)
 {
     if (true === SR_Quest::getQuest($player, 'Chicago_OwlJohnsonRoundtrip')->onRoundtripShow($player, $this)) {
         return true;
     }
     if ($this->onNPCQuestTalk($player, $word)) {
         return true;
     }
     // 		$b = chr(2);
     switch ($word) {
         case 'bounty':
             if ($this->onNPCBountyTalk($player, $word, $args)) {
                 return true;
             }
             return $this->rply('bounty');
             // 				return $this->reply('You want to become a bountyhunter?');
         // 				return $this->reply('You want to become a bountyhunter?');
         case 'renraku':
             return $this->rply('renraku');
             // 				return $this->reply('I think we are currently not contracting with Renraku.');
         // 				return $this->reply('I think we are currently not contracting with Renraku.');
         case 'malois':
             return $this->rply('malois');
             // 				return $this->reply('Listen chummer, it is not your business, and i would not put my hands in corp business like Renraku.');
         // 				return $this->reply('Listen chummer, it is not your business, and i would not put my hands in corp business like Renraku.');
         default:
             return $this->rply('default');
             // 				$this->reply("Yo chummer");
             // 				return true;
     }
 }
Ejemplo n.º 9
0
 public function getNPCLoot(SR_Player $player)
 {
     $quest = SR_Quest::getQuest($player, 'Redmond_Orks');
     if ($quest->isInQuest($player)) {
         return array('Reginalds_Bracelett');
     }
     return array();
 }
Ejemplo n.º 10
0
 public function getNPCQuests(SR_Player $player)
 {
     $quest = SR_Quest::getQuest($player, 'Seattle_Malois2');
     if (false === $quest->isDone($player)) {
         return array();
     }
     return array('Chicago_HotelWoman1', 'Chicago_HotelWoman2');
 }
Ejemplo n.º 11
0
 public function getNPCLoot(SR_Player $player)
 {
     $quest = SR_Quest::getQuest($player, 'Chicago_ShrineMonksRevenge');
     if ($quest->isInQuest($player)) {
         $quest->onKilled($player, 2);
     }
     return array();
 }
Ejemplo n.º 12
0
 public function getNPCLoot(SR_Player $player)
 {
     $quest = SR_Quest::getQuest($player, 'Delaware_DallasJ2');
     if ($quest->isInQuest($player)) {
         $quest->onKill($player);
     }
     return array();
 }
Ejemplo n.º 13
0
 public function getNPCLoot(SR_Player $player)
 {
     $quest = SR_Quest::getQuest($player, 'Redmond_Johnson_1');
     if ($quest->isInQuest($player)) {
         $quest->increaseAmount(1);
         $player->message(sprintf('Now you killed %d Lamers for Mr.Johnson.', $quest->getAmount()));
     }
     return array();
 }
Ejemplo n.º 14
0
 public function getNPCLoot(SR_Player $player)
 {
     $quest = SR_Quest::getQuest($player, 'Seattle_Ranger');
     $quest instanceof Quest_Seattle_Ranger;
     if ($quest->isInQuest($player)) {
         $quest->increaseAmount(1);
     }
     return array();
 }
Ejemplo n.º 15
0
 public function getNPCLoot(SR_Player $player)
 {
     $quest = SR_Quest::getQuest($player, 'Delaware_DallasJ3');
     $quest instanceof Quest_Delaware_DallasJ3;
     if ($quest->isInQuest($player)) {
         $quest->onKillTroll($player);
     }
     return array();
 }
Ejemplo n.º 16
0
 public function getNPCLoot(SR_Player $player)
 {
     $quest = SR_Quest::getQuest($player, 'Chicago_RazorBarkeeper1');
     if ($quest->isInQuest($player)) {
         $quest->increase('sr4qu_amount', 1);
         $player->message(sprintf('Now you killed %d/%d bums for the Razor barkeeper.', $quest->getAmount(), $quest->getNeededAmount()));
     }
     return array();
 }
Ejemplo n.º 17
0
 public function getNPCMeetPercent(SR_Party $party)
 {
     foreach ($party->getMembers() as $player) {
         $quest = SR_Quest::getQuest($player, 'Seattle_Ranger');
         if ($quest->getAmount() > 0) {
             return 90;
         }
     }
     return 0;
 }
Ejemplo n.º 18
0
 public function getNPCLoot(SR_Player $player)
 {
     $quest = SR_Quest::getQuest($player, 'Seattle_Johnson1');
     $quest instanceof Quest_Seattle_Johnson1;
     $quest->onKilled($player);
     if (rand(1, 3) === 1) {
         return array('IDCard');
     }
     return array();
 }
Ejemplo n.º 19
0
 public function getNPCLoot(SR_Player $player)
 {
     $quest = SR_Quest::getQuest($player, 'Redmond_Blacksmith');
     if ($quest->isInQuest($player)) {
         if (rand(0, 2) === 0) {
             return array('SmithHammer');
         }
     }
     return array();
 }
Ejemplo n.º 20
0
 public function getNPCLoot(SR_Player $player)
 {
     $quest = SR_Quest::getQuest($player, 'Seattle_GJohnson1');
     if ($quest->isInQuest($player)) {
         $quest->increase('sr4qu_amount', 1);
         $player->message($quest->lang('kill', array($quest->getAmount(), $quest->getNeededAmount())));
         // 			$player->message(sprintf('Now you killed %d Killers for Mr.Johnson.', $quest->getAmount()));
     }
     return array();
 }
Ejemplo n.º 21
0
 public function getNPCLoot(SR_Player $player)
 {
     $quest = SR_Quest::getQuest($player, 'Seattle_Archery');
     if ($quest->isInQuest($player)) {
         $quest->increase('sr4qu_amount', 1);
         $player->message($quest->lang('kill', array($quest->getAmount(), $quest->getNeededAmount())));
         // 			$player->message(sprintf('Now you killed %d Angry Elves for the Archery Quest.', $quest->getAmount()));
     }
     return array();
 }
Ejemplo n.º 22
0
 public function onHacked(SR_Player $player, $hits)
 {
     $quest = SR_Quest::getQuest($player, 'Delaware_DallasJ4');
     $quest instanceof Quest_Delaware_DallasJ4;
     $quest->onGetFile($player);
     $this->msg($player, 'file1a');
     $this->msg($player, 'file1b');
     // 		$player->message('You find a file: "results2.dbm"');
     // 		$player->message('You get the file and store it on your headcomputer.');
 }
Ejemplo n.º 23
0
 public function isExitAllowed(SR_Player $player)
 {
     if (!SR_Quest::getQuest($player, 'Renraku_I')->isAccepted($player)) {
         if ($player->isHuman()) {
             $player->message(Shadowhelp::getHelp($player, 'first_talk'));
             return false;
         }
     }
     return true;
 }
Ejemplo n.º 24
0
 public function getNPCS(SR_Player $player)
 {
     $back = array();
     $back['talk'] = 'Delaware_SecondHandDwarf';
     $quest = SR_Quest::getQuest($player, 'Delaware_Seraphim2');
     if ($quest->isDone($player)) {
         $back['ttt'] = 'Delaware_SecondHandTroll';
     }
     return $back;
 }
Ejemplo n.º 25
0
 public function getNPCLoot(SR_Player $player)
 {
     $quest = SR_Quest::getQuest($player, 'Seattle_BD4');
     if ($quest->isInQuest($player)) {
         if (rand(1, 3) === 1) {
             return array('Tenugui');
         }
     }
     return array();
 }
Ejemplo n.º 26
0
 public function checkQuestB(SR_Player $player)
 {
     if ($this->isDone($player)) {
         return;
     }
     $data = $this->getQuestData();
     if (isset($data['H1']) && isset($data['H2']) && isset($data['H3'])) {
         $this->onSolve($player);
         $quest3 = SR_Quest::getQuest($player, 'Renraku_III');
         $quest3->accept($player);
     }
 }
Ejemplo n.º 27
0
 public function getNPCLoot(SR_Player $player)
 {
     $quest = SR_Quest::getQuest($player, 'Seattle_Farmer');
     if ($quest->isInQuest($player)) {
         $quest->increaseAmount(1);
         $quest->msg('kills', array($quest->getAmount(), $quest->getNeededAmount()));
         if ($quest->getAmount() === 2) {
             return array('KylesAmulet');
         }
     }
     return array();
 }
Ejemplo n.º 28
0
 public function getNPCLoot(SR_Player $player)
 {
     $quest = SR_Quest::getQuest($player, 'Redmond_Punks');
     if ($quest->isInQuest($player)) {
         $quest->onKilledPunk($player);
     }
     $quest = SR_Quest::getQuest($player, 'Redmond_AresDwarf_II');
     if ($quest->isInQuest($player)) {
         return array('PunkScalp');
     }
     return array();
 }
Ejemplo n.º 29
0
 public function onNPCTalk(SR_Player $player, $word, array $args)
 {
     $key = 'Seattle_Citizen_Hire_' . $player->getID();
     $key2 = 'Seattle_Citizen_Invite_' . $player->getID();
     $b = chr(2);
     switch ($word) {
         case 'shadowrun':
             if ($this->getGender() === 'male') {
                 $this->rply('job_male');
                 $player->giveKnowledge('words', 'Hire');
             } else {
                 $this->rply('job_female');
             }
             return true;
         case 'no':
             return $this->rply('no_' . $this->getGender());
         case 'hire':
             if ($this->getGender() === 'female') {
                 return $this->rply('hire_female');
             }
             $ch = $player->get('charisma');
             $re = $player->get('reputation');
             if ($player->getParty()->hasHireling()) {
                 $this->rply('two_hirelings');
             } elseif ($this->hasTemp($key) || rand(0, 32) > $ch + $re) {
                 $this->rply('not_skilled');
                 $this->setTemp($key, 1);
             } else {
                 $this->rply('lets_go');
                 $time = 400 + $ch * 40 + $re * 20;
                 $p = $this->getParty();
                 $p->kickUser($this, true);
                 $this->onHireC($player, $time);
                 $p->popAction(true);
                 $player->getParty()->popAction(true);
             }
             return true;
         case 'invite':
             $quest = SR_Quest::getQuest($player, 'Vegas_Voices');
             $quest instanceof Quest_Vegas_Voices;
             $quest->onTryInvite($this, $player);
             break;
         default:
         case 'hello':
             $this->rply('hello' . $this->getGender());
             $player->giveKnowledge('words', 'Yes');
             $player->giveKnowledge('words', 'No');
             $player->giveKnowledge('words', 'Shadowrun');
             break;
     }
     return true;
 }
Ejemplo n.º 30
0
 public function onNPCTalk(SR_Player $player, $word, array $args)
 {
     $quest1 = SR_Quest::getQuest($player, 'Redmond_AresDwarf_I');
     $num = $quest1->getNeededAmount();
     $has1 = $quest1->isInQuest($player);
     $done1 = $quest1->isDone($player);
     if ($player->hasTemp('Redmond_AresDwarf_I_sr')) {
         if ($word === 'yes') {
             $this->rply('accept');
             // 				$this->reply('Haha ok chummer... I will wait for your delivery.');
             $quest1->accept($player);
             $player->unsetTemp('Redmond_AresDwarf_I_sr');
         } else {
             if ($word === 'no') {
                 $player->unsetTemp('Redmond_AresDwarf_I_sr');
                 $this->rply('laters');
                 // 				$this->reply('Well, if you change your mind.. Come back later.');
             } else {
                 $this->rply('confirm');
                 // 				$this->reply('Do you accept the quest, chummer?');
             }
         }
         return true;
     }
     if ($word === 'shadowrun') {
         if ($has1 || $done1) {
             $this->checkQuest1($player, $quest1);
         } else {
             $this->rply('quest1');
             $this->rply('quest2');
             $this->rply('quest3', array($num));
             $this->rply('quest4');
             $this->rply('quest5');
             // 				$this->reply('You are a newbie runner, eh?');
             // 				$this->reply('Chummer... Listen... We regulary get robbed by the cyberpunks.');
             // 				$this->reply("The worst thing is they keep robbing even cheap things, like unstatted knifes. If you can help us and bring me $num unstatted knifes I would be very happy, as I plan to master the skill of knife-throwing.");
             // 				$this->reply("You can remove stats from an item at the local blacksmith.");
             // 				$this->reply('If you could help help us we will reward you gracefully.');
             $player->setTemp('Redmond_AresDwarf_I_sr', true);
         }
     } else {
         if ($has1 === true) {
             $this->checkQuest1($player, $quest1);
         } elseif ($word === 'yes' || $word === 'no') {
             $this->rply('default2');
             // 				$this->reply('We have the finest weapons and utilities. Low prices and high damage =)');
         } else {
             $this->rply('default1');
             // 				$this->reply("Hello my friend, are you interested in fine Ares armoury?");
         }
     }
 }