Esempio n. 1
0
 /**
  * @version 0.1.3
  * @since 0.0.6
  * @param string $name Monster name.
  * @return OTS_Monster Monster data.
  * @throws E_OTS_NotLoaded If monsters list is not loaded.
  * @deprecated 0.1.3 Use POT::getMonstersList()->getMonster().
  */
 public function getMonster($name)
 {
     if (isset($this->monsters)) {
         return $this->monsters->getMonster($name);
     }
     throw new E_OTS_NotLoaded();
 }
Esempio n. 2
0
                 $main_content .= '<TD>' . $spell['spell_type'] . '</TD>';
             }
             $main_content .= '<TD>' . $spell['mana'] . '</TD><TD>' . $spell['lvl'] . '</TD><TD>' . $spell['mlvl'] . '</TD><TD>' . $spell['soul'] . '</TD><TD>' . $spell['pacc'] . '</TD></TR>';
         }
     }
     $main_content .= '</TABLE><br/><center><form action="?subtopic=adminpanel" METHOD=post><div class="BigButton" style="background-image:url(' . $layout_name . '/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url(' . $layout_name . '/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="' . $layout_name . '/images/buttons/_sbutton_back.gif" ></div></div></form></center>';
 }
 //INSTALL MONSTERS
 if ($action == "install_monsters") {
     try {
         $SQL->query("DELETE FROM " . $SQL->tableName('z_monsters') . ";");
     } catch (PDOException $error) {
     }
     $main_content .= '<h2>Reload monsters.</h2>';
     $main_content .= '<h2>All records deleted from table \'z_monsters\' in database.</h2>';
     $allmonsters = new OTS_MonstersList($config['site']['server_path'] . "data/monster/");
     //$names_added must be an array
     $names_added[] = '';
     //add monsters
     foreach ($allmonsters as $lol) {
         $monster = $allmonsters->current();
         //load monster mana needed to summon/convince
         $mana = $monster->getManaCost();
         //load monster experience
         $exp = $monster->getExperience();
         //load monster name
         $name = ucwords($monster->getName());
         //load monster health
         $health = $monster->getHealth();
         //load monster speed and calculate "speed level"
         $speed_ini = $monster->getSpeed();