public function on_buy(SR_Player $player, array $args, $max_amt = false, $confirm = true) { if (false === parent::on_buy($player, $args, 1, true)) { return false; } return $this->removeSecondHandItem($player, $this->getSecondsHandArgID($player)); }
public function getHelpText(SR_Player $player) { if ($this->isMaloisHere($player)) { // return parent::getHelpText($player)." Use #talk to talk to Malois."; return parent::getHelpText($player) . ' ' . $this->lang($player, 'help'); } else { return parent::getHelpText($player); } }
public function getCommands(SR_Player $player) { $cmds = parent::getCommands($player); $recipes = $this->getRecipes($player); if (count($recipes) > 0) { $cmds[] = 'recipes'; $cmds[] = 'recipe'; } return $cmds; }
public function onEnter(SR_Player $player) { $p = $player->getParty(); $names = array(); foreach ($p->getMembers() as $member) { if (!$member->hasConst('SEATTLE_BM')) { $names[] = $member->getName(); } } if (count($names) === 0) { return parent::onEnter($player); } $this->partyMessage($player, 'oops', array(GWF_Array::implodeHuman($names))); return false; }
public function onEnter(SR_Player $player) { $p = $player->getParty(); $names = array(); foreach ($p->getMembers() as $member) { if (!$member->hasConst('SEATTLE_BM')) { $names[] = $member->getName(); } } if (count($names) === 0) { return parent::onEnter($player); } $this->partyMessage($player, 'nonono', array(GWF_Array::implodeHuman($names))); return false; // $p->notice(sprintf('One of the guards come to you. Seems like %s lack(s) the permission to enter. You decide to turn around and leave.', GWF_Array::implodeHuman($names))); }
public function getHelpText(SR_Player $player) { return parent::getHelpText($player) . ' ' . $this->lang($player, 'help'); }