Example #1
0
 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) {
             }
         }
     }
 }
Example #2
0
 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'));
         }
     }
 }
Example #3
0
 public function ai_goal(SR_RealNPC $npc)
 {
     echo __CLASS__ . __FUNCTION__ . ': ' . $npc->getClassName();
     parent::ai_goal($npc);
 }
Example #4
0
 public function ai_on_whisper(SR_RealNPC $npc, array $args)
 {
     echo ":Ochatter.ai_on_whisper(): {$npc->getClassName()}\n";
     return self::onChatResponse($npc, $args);
 }
Example #5
0
 public function pushChatTree(SR_RealNPC $npc, $word)
 {
     $classname = $npc->getClassName();
     return $this->chat_tree[$classname][] = $word;
 }