private static function checkKillProtection(SR_Player $player, SR_Party $ep) { $p = $player->getParty(); // $ep = $p->getEnemyParty(); if (SR_KillProtect::isKillProtectedRealNPCParty($ep)) { return false; } if (SR_KillProtect::isKillProtectedPartyLevel($p, $ep, $player, true)) { return false; } if (false !== ($time = SR_KillProtect::isKillProtectedParty($p, $ep))) { $wait = GWF_Time::humanDuration($time - Shadowrun4::getTime()); self::rply($player, '1060', array($wait)); // $player->message(sprintf('You cannot attack this party again. Please wait %s.', $wait)); return false; } SR_BadKarma::onFight($player, $ep); return true; }
private function onStealCombat(SR_Player $player, $itemname) { $bot = Shadowrap::instance($player); $bot->rply('5196'); // $bot->reply('You are out of luck ... the shop owner silently called the cops ...'); SR_BadKarma::addBadKarma($player, self::BAD_KARMA_STEAL_COMBAT); $p = $player->getParty(); $p->kickUser($player); $np = SR_Party::createParty(); $np->addUser($player, true); $np->cloneAction($p); $np->clonePreviousAction($p); $np->fight(SR_NPC::createEnemyParty('Prison_GrayOp', 'Prison_GrayOp', 'Prison_GrayOp')); return true; }
public function talk(SR_Party $party, $announce = true) { if ($party->getMemberCount() === 0) { Dog_Log::error('Cannot talk to empty party!'); return false; } Shadowcmd_bye::onPartyMeet($party, $this); $this->pushAction(self::ACTION_TALK, $party->getID(), 0); $party->pushAction(self::ACTION_TALK, $this->getID(), 0); $this->setContactEta(60); $party->setContactEta(60); $this->initFightBusy(1); $party->initFightBusy(-1); if ($announce === true) { $this->ntice('5096', array($party->displayMembers(true, true), SR_Bounty::displayBountyParty($party), SR_BadKarma::displayBadKarmaParty($party))); $party->ntice('5096', array($this->displayMembers(true, true), SR_Bounty::displayBountyParty($this), SR_BadKarma::displayBadKarmaParty($this))); // $this->notice(sprintf('You meet %s.%s%s', $party->displayMembers(false, true), SR_Bounty::displayBountyParty($party), SR_BadKarma::displayBadKarmaParty($party))); // $party->notice(sprintf('You meet %s.%s%s', $this->displayMembers(false, true), SR_Bounty::displayBountyParty($this), SR_BadKarma::displayBadKarmaParty($this))); } // $this->setMemberOptions(SR_Player::PARTY_DIRTY, true); // $party->setMemberOptions(SR_Player::PARTY_DIRTY, true); }