public function ai_goal(SR_RealNPC $npc) { echo __CLASS__ . __FUNCTION__ . ': ' . $npc->getClassName(); if ($npc->ai_can('sell')) { foreach ($npc->getInventorySorted() as $i => $items) { if ($npc->realnpcfunc('needs_item', array($item)) < 5000) { } } } }
public function ai_goal(SR_RealNPC $npc) { echo __CLASS__ . __FUNCTION__ . ': ' . $npc->getClassName(); $cityname = $this->getCityname(); $currcity = $npc->getParty(false)->getCity(); if ($currcity === $cityname) { if (self::canExplore($cityname)) { SR_AIGoal::addGoal($npc, 'explore', new SR_AIGoal('exp')); } } }
public function ai_goal(SR_RealNPC $npc) { echo __CLASS__ . __FUNCTION__ . ': ' . $npc->getClassName(); parent::ai_goal($npc); }
public function ai_on_whisper(SR_RealNPC $npc, array $args) { echo ":Ochatter.ai_on_whisper(): {$npc->getClassName()}\n"; return self::onChatResponse($npc, $args); }
public function pushChatTree(SR_RealNPC $npc, $word) { $classname = $npc->getClassName(); return $this->chat_tree[$classname][] = $word; }