public function getNPCS(SR_Player $player) { if ($player->hasConst('RESCUED_MALOIS')) { return array('talk' => 'Chicago_StoreMalois'); } return array(); }
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; }
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.'); } }
private function susanChecksYourID(SR_Player $player) { if ($player->hasConst(self::CONST_ID)) { $player->setTemp(self::TEMP_VIS, 1); $player->giveKnowledge('places', 'Prison_VisitorsRoom'); return $this->reply("Alright Mr. Peltzer, please goto the visitors room, we will call for your brother any minute."); } else { $b = chr(2); return $this->reply("Oh ... only family members may visit imprisoners ... unless you have a {$b}fakeid{$b} ^^ just kidding."); } }
public function on_heat(SR_Player $player, array $args) { if ($player->hasConst(self::KEY)) { $player->unsetConst(self::KEY); return $player->message($this->lang($player, 'heat_off')); // return $player->message('You have totally turned off the heating in this building.'); } else { $player->setConst(self::KEY, 1); return $player->message($this->lang($player, 'heat_on')); // return $player->message('You have totally turned on the heating in this building.'); } }
private function buyPermission(SR_Player $player) { if ($player->hasConst("SEATTLE_BM", 1)) { return $player->message($this->langNPC('already')); // $player->message("You already have permission to enter the blackmarket in Seattle."); // return ; } $nuyen = $player->getNuyen(); if ($nuyen < $this->price) { return $player->message($this->langNPC('poor', array($this->price, $nuyen))); // $player->message("The salesman is shaking his head...\"No!\", he says, \"I want $this->price, not $nuyen\"."); // return; } $player->giveNuyen(-$this->price); $player->message($this->langNPC('give', array($this->price))); // $player->message("You give $this->price Nuyen to the salesman..."); $player->setConst("SEATTLE_BM", 1); return $this->rply('purchase'); // $this->reply('Ok, here is your permission to enter the blackmarket. And you don\'t know me!'); }