Ejemplo n.º 1
0
 private function checkQuest1(SR_Player $player, SR_Quest $quest1)
 {
     if ($quest1->isDone($player)) {
         return $this->rply('thx2');
         // 			return $this->reply('We have enogh knifes now to play with. Thanks again for your help.');
     }
     $have = $quest1->getAmount();
     $need = $quest1->getNeededAmount();
     $have = $quest1->giveQuesties($player, $this, 'Knife', $have, $need, true);
     if ($have >= $need) {
         $quest1->onSolve($player);
     } else {
         $this->rply('pls', array($need - $have));
         // 			$this->reply(sprintf('Could you please bring me %d more knifes?', $need));
     }
     return true;
 }