Ir para conteúdo

Natanael Beckman

Membro
  • Registro em

  • Última visita

Tudo que Natanael Beckman postou

  1. Natanael Beckman postou uma resposta no tópico em Suporte Tibia OTServer
    kkkkkkkkkkk Então sua database ainda não era sha1, estava funcionando com plain, qual site está usando?
  2. Natanael Beckman postou uma resposta no tópico em Suporte Tibia OTServer
    Executa isso no phpmyadmin: UPDATE accounts SET password=SHA1(password) WHERE id = 1 Altera seu config-and-functions.php pra esse e ver se funciona! <?PHP // ###################### CONFIG ######################## //load page config file $config['site'] = parse_ini_file('config/config.ini'); include('config/config.php'); //check install if($config['site']['install'] != "no") { header("Location: install/install.php"); exit; } //load server config $config['server'] = parse_ini_file($config['site']['server_path'].'config.lua'); if(isset($config['server']['sqlHost'])) { // ots config.lua file connect database $mysqlhost = $config['server']['sqlHost']; $mysqluser = $config['server']['sqlUser']; $mysqlpass = $config['server']['sqlPass']; $mysqldatabase = $config['server']['sqlDatabase']; } $sqlitefile = $config['server']['sqliteDatabase']; $encryptionType = ''; if(strtolower($config['server']['encryptionType']) == 'md5') $encryptionType = 'md5'; if(strtolower($config['server']['encryptionType']) == 'sha1') $encryptionType = 'sha1'; // loads #####POT mainfile##### include('pot/OTS.php'); // PDO and POT connects to database $ots = POT::getInstance(); if(strtolower($config['server']['sqlType']) == "mysql") { //connect to MySQL database try { $ots->connect(POT::DB_MYSQL, array('host' => $mysqlhost, 'user' => $mysqluser, 'password' => $mysqlpass, 'database' =>$mysqldatabase) ); } catch(PDOException $error) { echo 'Database error - can\'t connect to MySQL database. Possible reasons:<br>1. MySQL server is not running on host.<br>2. MySQL user, password, database or host isn\'t configured in: <b>'.$config['site']['server_path'].'config.lua</b> .<br>3. MySQL user, password, database or host is wrong.'; exit; } } elseif(strtolower($config['server']['sqlType']) == "sqlite") { //connect to SQLite database $link_to_sqlitedatabase = $config['site']['server_path'].$sqlitefile; try { $ots->connect(POT::DB_SQLITE, array('database' => $link_to_sqlitedatabase)); } catch(PDOException $error) { echo 'Database error - can\'t open SQLite database. Possible reasons:<br><b>'.$link_to_sqlitedatabase.'</b> - file isn\'t valid SQLite database.<br><b>'.$link_to_sqlitedatabase.'</b> - doesn\'t exist.<br><font color="red">Wrong PHP configuration. Default PHP does not work with SQLite databases!</font>'; exit; } } else { echo 'Database error. Unknown database type in <b>'.$config['site']['server_path'].'config.lua</b> . Must be equal to: "<b>mysql</b>" or "<b>sqlite</b>". Now is: "<b>'.strtolower($config['server']['sqlType']).'"</b>'; exit; } $SQL = POT::getInstance()->getDBHandle(); $layout_name = "layouts/".$layout_name = $config['site']['layout'];; $layout_ini = parse_ini_file($layout_name.'/layout_config.ini'); foreach($layout_ini as $key => $value) $config['site'][$key] = $value; //###################### FUNCTIONS ###################### header('Cache-control: private'); // IE 6 FIX if(isSet($_GET['lang'])) { $lang = $_GET['lang']; $_SESSION['lang'] = $lang; setcookie('lang', $lang, time() + (3600 * 24 * 30)); } else if(isSet($_SESSION['lang'])) { $lang = $_SESSION['lang']; } else if(isSet($_COOKIE['lang'])) { $lang = $_COOKIE['lang']; } else { $lang = 'en'; } // force / potegi function force($podstawa, $wykladnik) { $wynik = $podstawa; $i = 1; while ($i++ < $wykladnik) $wynik *= $podstawa; return $wynik; } //save config in ini file function saveconfig_ini($config) { $file = fopen("config/config.ini", "w"); foreach($config as $param => $data) { $file_data .= $param.' = "'.str_replace('"', '', $data).'" '; } rewind($file); fwrite($file, $file_data); fclose($file); } //return password to db function password_ency($password) { $ency = $GLOBALS['encryptionType']; if($ency == 'sha1') return sha1($password); elseif($ency == 'md5') return md5($password); elseif($ency == '') return $password; } //delete player with name function delete_player($name) { $SQL = $GLOBALS['SQL']; $player = new OTS_Player(); $player->find($name); if($player->isLoaded()) { try { $SQL->query("DELETE FROM player_skills WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error){} try { $SQL->query("DELETE FROM guild_invites WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error){} try { $SQL->query("DELETE FROM player_items WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error){} try { $SQL->query("DELETE FROM player_depotitems WHERE player_id = '".$player->getId()."';"); } catch(PDOException$error) {} try { $SQL->query("DELETE FROM player_spells WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error){} try { $SQL->query("DELETE FROM player_storage WHERE player_id = '".$player->getId()."';"); } catch(PDOException$error) {} try { $SQL->query("DELETE FROM player_viplist WHERE player_id = '".$player->getId()."';"); } catch(PDOException$error) {} try { $SQL->query("DELETE FROM player_deaths WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error){} try { $SQL->query("DELETE FROM player_deaths WHERE killed_by = '".str_replace("'", "\'", $player->getName())."';"); }catch(PDOException $error) {} $rank = $player->getRank(); if(!empty($rank)) { $guild = $rank->getGuild(); if($guild->getOwner()->getId() == $player->getId()) { $rank_list = $guild->getGuildRanksList(); if(count($rank_list) > 0) { $rank_list->orderBy('level'); foreach($rank_list as $rank_in_guild) { $players_with_rank = $rank_in_guild->getPlayersList(); $players_with_rank->orderBy('name'); $players_with_rank_number = count($players_with_rank); if($players_with_rank_number > 0) { foreach($players_with_rank as $player_in_guild) { $player_in_guild->setRank(); $player_in_guild->save(); } } $rank_in_guild->delete(); } $guild->delete(); } } } $player->delete(); return TRUE; } } //delete guild with id function delete_guild($id) { $guild = new OTS_Guild(); $guild->load($id); if($guild->isLoaded()) { $rank_list = $guild->getGuildRanksList(); if(count($rank_list) > 0) { $rank_list->orderBy('level'); foreach($rank_list as $rank_in_guild) { $players_with_rank = $rank_in_guild->getPlayersList(); if(count($players_with_rank) > 0) { foreach($players_with_rank as $player_in_guild) { $player_in_guild->setRank(); $player_in_guild->save(); } } $rank_in_guild->delete(); } } $guild->delete(); return TRUE; } else return FALSE; } //is it valid nick? function check_name($name)//sprawdza name { $temp = strspn("$name", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM- [ ] '"); if ($temp != strlen($name)) return false; else { $ok = "/[a-zA-Z ']{1,25}/"; return (preg_match($ok, $name))? true: false; } } // is it valid account name function check_account_name($name) { $temp = strspn("$name", "QWERTYUIOPASDFGHJKLZXCVBNM0123456789"); if ($temp != strlen($name)) return false; if(strlen($name) > 32) return false; else { $ok = "/[A-Z0-9]/"; return (preg_match($ok, $name))? true: false; } } //is it valid nick for new char? function check_name_new_char($name)//sprawdza name { $name_to_check = strtolower($name); //first word can't be: //names blocked: $names_blocked = array('gm', 'cm', 'adm', 'account', 'manager', 'god', 'tutor'); $first_words_blocked = array('gm ', 'adm', 'account', 'manager', 'god ','tutor ', "'", '-'); //name can't contain: $words_blocked = array('gamemaster', 'game master', 'game-master', "game'master", '--', "''","' ", " '", '- ', ' -', "-'", "'-", 'fuck', 'sux', 'suck', 'noob', 'tutor'); foreach($first_words_blocked as $word) if($word == substr($name_to_check, 0, strlen($word))) return false; if(substr($name_to_check, -1) == "'" || substr($name_to_check, -1) == "-") return false; if(substr($name_to_check, 1, 1) == ' ') return false; if(substr($name_to_check, -2, 1) == " ") return false; foreach($names_blocked as $word) if($word == $name) return false; for($i = 0; $i < strlen($name_to_check); $i++) if($name_to_check[$i-1] == ' ' && $name_to_check[$i+1] == ' ') return false; foreach($words_blocked as $word) if (!(strpos($name_to_check, $word) === false)) return false; for($i = 0; $i < strlen($name_to_check); $i++) if($name_to_check[$i] == $name_to_check[($i+1)] && $name_to_check[$i] == $name_to_check[($i+2)]) return false; for($i = 0; $i < strlen($name_to_check); $i++) if($name_to_check[$i-1] == ' ' && $name_to_check[$i+1] == ' ') return false; $temp = strspn("$name", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM- "); if ($temp != strlen($name)) return false; else { $ok = "/[a-zA-Z ']{1,25}/"; return (preg_match($ok, $name))? true: false; } } // is rank name valid? function check_rank_name($name) { $temp = strspn("$name", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789-[ ] "); if ($temp != strlen($name)) { return false; } else { $ok = "/[a-zA-Z ]{1,60}/"; return (preg_match($ok, $name))? true: false; } } // is guild name valid? function check_guild_name($name) { $temp = strspn("$name", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789- "); if ($temp != strlen($name)) { return false; } else { $ok = "/[a-zA-Z ]{1,60}/"; return (preg_match($ok, $name))? true: false; } } // is it valid password? function check_password($pass) { $temp = strspn("$pass", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890"); if ($temp != strlen($pass)) { return false; } else { $ok = "/[a-zA-Z0-9]{1,40}/"; return (preg_match($ok, $pass))? true: false; } } // is it valid e-mail? function check_mail($email) { $ok = "/[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\.[a-zA-Z]{2,4}/"; return (preg_match($ok, $email))? true: false; } // check if is acoount have premium time function isPremium($premdays, $lastday) { return ($premdays - (date("z", time()) + (365 * (date("Y", time()) - date("Y", $lastday))) - date("z", $lastday)) > 0); } // get name bans function getReason($reasonId) { switch($reasonId) { case 0: return "Offensive Name"; case 1: return "Invalid Name Format"; case 2: return "Unsuitable Name"; case 3: return "Name Inciting Rule Violation"; case 4: return "Offensive Statement"; case 5: return "Spamming"; case 6: return "Illegal Advertising"; case 7: return "Off-Topic Public Statement"; case 8: return "Non-English Public Statement"; case 9: return "Inciting Rule Violation"; case 10: return "Bug Abuse"; case 11: return "Game Weakness Abuse"; case 12: return "Using Unofficial Software to Play"; case 13: return "Hacking"; case 14: return "Multi-Clienting"; case 15: return "Account Trading or Sharing"; case 16: return "Threatening Gamemaster"; case 17: return "Pretending to Have Influence on Rule Enforcement"; case 18: return "False Report to Gamemaster"; case 19: return "Destructive Behaviour"; case 20: return "Excessive Unjustified Player Killing"; case 21: return "Invalid Payment"; case 22: return "Spoiling Auction"; default: break; } return "Unknown Reason"; } //################### DISPLAY FUNCTIONS ##################### //return shorter text (news ticker) function short_text($text, $chars_limit) { if (strlen($text) > $chars_limit) return substr($text, 0, strrpos(substr($text, 0, $chars_limit), " ")).'...'; else return $text; } //return text to news msg function news_place() { return $news; } // set monster of week function logo_monster() { return str_replace(" ", "", trim(mb_strtolower($GLOBALS['config']['site']['logo_monster']))); } $statustimeout = 1; foreach(explode("*", str_replace(" ", "", $config['server']['statusTimeout'])) as $status_var) if($status_var > 0) $statustimeout = $statustimeout * $status_var; $statustimeout = $statustimeout / 1000; $config['status'] = parse_ini_file('cache/serverstatus'); if($config['status']['serverStatus_lastCheck']+$statustimeout < time()) { $config['status']['serverStatus_checkInterval'] = $statustimeout+3; $config['status']['serverStatus_lastCheck'] = time(); $info = chr(6).chr(0).chr(255).chr(255).'info'; $sock = @fsockopen("127.0.0.1", $config['server']['statusPort'], $errno, $errstr, 1); if ($sock) { fwrite($sock, $info); $data=''; while (!feof($sock)) $data .= fgets($sock, 1024); fclose($sock); preg_match('/players online="(\d+)" max="(\d+)"/', $data, $matches); $config['status']['serverStatus_online'] = 1; $config['status']['serverStatus_players'] = $matches[1]; $config['status']['serverStatus_playersMax'] = $matches[2]; preg_match('/uptime="(\d+)"/', $data, $matches); $h = floor($matches[1] / 3600); $m = floor(($matches[1] - $h*3600) / 60); $config['status']['serverStatus_uptime'] = $h.'h '.$m.'m'; preg_match('/monsters total="(\d+)"/', $data, $matches); $config['status']['serverStatus_monsters'] = $matches[1]; preg_match('/npcs total="(\d+)"/', $data, $matches); $config['status']['serverStatus_npcs'] = $matches[1]; } else { $config['status']['serverStatus_online'] = 0; $config['status']['serverStatus_players'] = 0; $config['status']['serverStatus_playersMax'] = 0; $config['status']['serverStatus_monsters'] = 0; $config['status']['serverStatus_uptime'] = 0; $config['status']['serverStatus_npcs'] = 0; } $file = fopen("cache/serverstatus", "w"); foreach($config['status'] as $param => $data) { $file_data .= $param.' = "'.str_replace('"', '', $data).'" '; } rewind($file); fwrite($file, $file_data); fclose($file); } //PAGE VIEWS COUNTER $views_counter = "cache/usercounter.dat"; // checking if the file exists if (file_exists($views_counter)) { // het bestand bestaat, waarde + 1 $actie = fopen($views_counter, "r+"); $page_views = fgets($actie, 9); $page_views++; rewind($actie); fputs($actie, $page_views, 9); fclose($actie); } else { // the file doesn't exist, creating a new one with value 1 $actie = fopen($views_counter, "w"); $page_views = 1; fputs($actie, $page_views, 9); fclose($actie); } function makeOrder($arr, $order, $default) { // Function by Colandus! $type = 'asc'; if(isset($_GET['order'])) { $v = explode('_', strrev($_GET['order']), 2); if(count($v) == 2) if($orderBy = $arr[strrev($v[1])]) $default = $orderBy; $type = (strrev($v[0]) == 'asc' ? 'desc' : 'asc'); } return 'ORDER BY ' . $default . ' ' . $type; } function getOrder($arr, $order, $this) { // Function by Colandus! $type = 'asc'; if($orderBy = $arr[$this]) if(isset($_GET[$order])) { $v = explode('_', strrev($_GET[$order]), 2); if(strrev($v[1]) == $this) $type = (strrev($v[0]) == 'asc' ? 'desc' : 'asc'); } return $this . '_' . $type; } // class EQShower class EQShower { function item_info($val,$attributes) { $EQShower=new EQShower; $cl=$EQShower->item_grade($attributes); empty($val[1])?$desc_str="":$desc_str="<br /><br />".$val[1]; empty($val[2])?$arm_str="":$arm_str="Armor: ".$val[2]."<br />"; empty($val[4])?$size_str="":$size_str="Size: ".$val[4]." slots"; empty($val[5])?$att_str="":$att_str="Attack: ".$val[5]."<br />"; empty($val[6])?$sp_str="":$sp_str="Speed: + ".$val[6]."<br />"; empty($val[13])?$def_a="":$def_a="+ ".$val[13]; empty($val[7])?$def_str="":$def_str="Defense: ".$val[7]." $def_a<br />"; if(!empty($val[8])){$el_str="Fire: ".$val[8]."<br />";} if(!empty($val[9])){$el_str="Ice: ".$val[9]."<br />";} if(!empty($val[10])){$el_str="Earth: ".$val[10]."<br />";} if(!empty($val[11])){$el_str="Energy: ".$val[11]."<br />";} empty($val[12])?$ran_str="":$ran_str="Range: ".$val[12]."<br />"; empty($val[14])?$sk_sh="":$sk_sh="Shielding: + ".$val[14]."<br />"; empty($val[15])?$sk_mag="":$sk_mag="Magic: + ".$val[15]."<br />"; empty($val[16])?$eb_all="":$eb_all="Protection All: ".$val[16]."%<br />"; empty($val[17])?$charg_str="":$charg_str="Charges: ".$val[17]."<br />"; empty($val[18])?$sk_dist="":$sk_dist="Distance: + ".$val[18]."<br />"; empty($val[19])?$eb_fire="":$eb_fire="Protection fire: ".$val[19]."%<br />"; empty($val[20])?$eb_earth="":$eb_earth="Protection earth: ".$val[20]."%<br />"; empty($val[21])?$eb_ice="":$eb_ice="Protection ice: ".$val[21]."%<br />"; empty($val[22])?$eb_ene="":$eb_ene="Protection energy: ".$val[22]."%<br />"; empty($val[23])?$eb_dth="":$eb_dth="Protection death: ".$val[23]."%<br />"; empty($val[24])?$eb_hol="":$eb_hol="Protection holy: ".$val[24]."%<br />"; empty($val[25])?$eb_pys="":$eb_pys="Protection physical: ".$val[25]."%<br />"; empty($val[26])?$sk_axe="":$sk_axe="Axe: + ".$val[26]."<br />"; empty($val[27])?$sk_club="":$sk_club="Club: + ".$val[27]."<br />"; empty($val[28])?$sk_sword="":$sk_sword="Sword: + ".$val[28]."<br />"; empty($val[29])?$dura="":$dura="Duration: ".$val[29]." minutes.<br />"; empty($val[30])?$sk_fist="":$sk_fist="Fist: + ".$val[30]."<br />"; empty($val[31])?$eb_mana="":$eb_mana="Protection manadrain: ".$val[31]."%<br />"; empty($val[32])?$eb_life="":$eb_life="Protection lifedrain: ".$val[32]."%<br />"; empty($val[33])?$eb_drop="":$eb_drop="Protection drop: ".$val[33]."%<br />"; empty($val[34])?$hit_ch="":$hit_ch="Hit chance: ".$val[34]."%<br />"; empty($val[35])?$sh_type="":$sh_type="Element: ".$val[35]."<br />"; if(empty($val[8]) AND empty($val[9]) AND empty($val[10]) AND empty($val[11])){$ele_str="";} $str="<div class=\'$cl\'>".$val[0]."</div><font class=\'attr\'>$arm_str $sp_str $sh_type $att_str $ran_str $def_str $hit_ch$sk_sh $sk_sword $sk_axe $sk_club $sk_fist $sk_mag $sk_dist $eb_all $eb_drop $eb_mana $eb_life $eb_fire $eb_earth $eb_ice $eb_ene$eb_dth $eb_hol $eb_pys $el_str $charg_str $dura Weight: ".$val[3]." oz $desc_str</font>"; return $str; } function item_grade($attributes) { require('config/config.php'); if($attributes<=$config['normal']['attributes']){return $config['class']['normal'];} if($attributes==$config['rare']['attributes']){return $config['class']['rare'];} if($attributes==$config['epic']['attributes']){return $config['class']['epic'];} if($attributes>=$config['legendary']['attributes']){return $config['class']['legendary'];} } function table_exists ($table, $db) { $tables = mysql_list_tables ($db); while (list ($temp) = mysql_fetch_array ($tables)) { if ($temp == $table) { return TRUE; } } return FALSE; } } ?>
  3. Natanael Beckman postou uma resposta no tópico em Suporte Tibia OTServer
    Já configurou isso aqui mano? -- Database -- NOTE: sqlFile is used only by sqlite database, and sqlKeepAlive by mysql database. -- To disable sqlKeepAlive such as mysqlReadTimeout use 0 value. -- encryptionType can be plain, md5, sha1, sha256, sha512. sqlType = "mysql" sqlHost = "localhost" sqlPort = 3306 sqlUser = "root" sqlPass = "" sqlDatabase = "" sqlFile = "theforgottenserver.s3db" sqlKeepAlive = 0 mysqlReadTimeout = 6000 mysqlWriteTimeout = 6000 mysqlReconnectionAttempts = 3 encryptionType = "sha1" Porque o erro ai é falta de atenção reveja tudo novamente.
  4. É chato você fazer um trabalho e disponibilizar pra todos e não obter no mínimo um agradecimento. 90% apenas utilizam o que foi postado e não se dar o trabalho de pelo menos clicar em gostei, muitas vezes alguns postam em seu tópico só porque teve um problema ou alguma duvida só isso!Galera, vamos pelos menos clicar em gostei, eu não cliquei porque excedeu o limite.
  5. Parabéns pelo esforço, vai ajudar muitos!
  6. Tenta isso: <globalevent name="Server Save" interval="60000" script="serversave.lua" /> local shutdownAtServerSave = false local cleanMapAtServerSave = false local function serverSave() if shutdownAtServerSave then Game.setGameState(GAME_STATE_SHUTDOWN) else Game.setGameState(GAME_STATE_CLOSED) if cleanMapAtServerSave then cleanMap() end Game.setGameState(GAME_STATE_NORMAL) end end local function secondServerSaveWarning() broadcastMessage("Server is saving game in one minute. Please logout.", MESSAGE_STATUS_WARNING) addEvent(serverSave, 60000) end local function firstServerSaveWarning() broadcastMessage("Server is saving game in 3 minutes. Please logout.", MESSAGE_STATUS_WARNING) addEvent(secondServerSaveWarning, 120000) end function onThink(interval) broadcastMessage("Server is saving game in 5 minutes. Please logout.", MESSAGE_STATUS_WARNING) Game.setGameState(GAME_STATE_STARTUP) addEvent(firstServerSaveWarning, 120000) return not shutdownAtServerSave end
  7. Me manda o link do servidor onde baixou pra mim verificar, esse tfs 1.0 é uma merda cheio de dificuldades.
  8. Sim Kaique, agradeço!
  9. Mano tem que ver qual é realmente o seu problema, o que você realmente quer, explique!
  10. Tenta: local config = { broadcast = {120, 30}, flags = 13, delay = 120, events = 30 } local function executeSave(seconds) if(isInArray(config.broadcast, seconds)) then doBroadcastMessage("Server save within " .. seconds .. " seconds, please mind it may freeze!") end if(seconds > 0) then addEvent(executeSave, config.events * 1000, seconds - config.events) else doSaveServer(config.flags) end end function onThink(interval) if(table.maxn(config.broadcast) == 0) then doSaveServer(config.flags) else executeSave(config.delay) end return true end
  11. kkkkkkkkkkkk suporte aqui ta de boa!
  12. Mano você viu a imagem? Oo Tem certeza que aquilo é martel? Leia veja....
  13. De boa mano só a sua intenção já valeu!
  14. Obrigado pela intenção de ajuda, mais não é isso que eu quero, e isso eu já sabia, mais obrigado pela intenção.
  15. Corrigido, desculpa!
  16. Galera quero essa mesma imagem, com essa fonte, tudo igual, só muda o nome que vai ser Get VIP Time. Obrigado
  17. Resolvido Max, perfeito. Muito obrigado!
  18. Quando eu botei 2 player ele não obedeceu a regra de 10 players, executou o evento e deu o premio ao ultimo sobrevivente e foram tp normal. Quando eu botei 1 player ele não executou o evento e teleportou pro templo coisa que não fazia!
  19. Quando o evento não inicia por falta de player o evento é desativado, o problema é que os players que já estão na arena não sao teleportados pro templo ficam la. -- CONFIG ZE_DEFAULT_NUMBER_OF_PLAYERS = 10 ZE_ACCESS_TO_IGNORE_ARENA = 3 -- POSITIONS ZE_blockEnterItemPosition = {x= 31993, y=32353, z=6} ZE_enterPosition = {x = 31987, y = 32378, z = 7} ZE_kickPosition = {x=32369, y=32241, z=7} ZE_spawnFromPosition = {x = 31968, y = 32376, z = 7} ZE_spawnToPosition = {x = 32010, y = 32376, z = 7} -- ITEM IDS ZE_blockEnterItemID = 2555 -- STORAGES -- - player ZE_isOnZombieArea = 34370 -- - global ZE_STATUS = 34370 -- =< 0 - off, 1 - waiting for players, 2 - is running ZE_PLAYERS_NUMBER = 34371 ZE_ZOMBIES_TO_SPAWN = 34372 ZE_ZOMBIES_SPAWNED = 34373 -- FUNCTION function setZombiesEventPlayersLimit(value) doSetStorage(ZE_PLAYERS_NUMBER, value) end function getZombiesEventPlayersLimit() return getStorage(ZE_PLAYERS_NUMBER) end function addPlayerToZombiesArea(cid) doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT) doTeleportThing(cid, ZE_enterPosition, true) doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT) if(getPlayerAccess(cid) < ZE_ACCESS_TO_IGNORE_ARENA) then setPlayerZombiesEventStatus(cid, os.time()) end end function kickPlayerFromZombiesArea(cid) doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT) doTeleportThing(cid, ZE_kickPosition, true) doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT) setPlayerZombiesEventStatus(cid, 0) end function getPlayerZombiesEventStatus(cid) return getCreatureStorage(cid, ZE_isOnZombieArea) end function setPlayerZombiesEventStatus(cid, value) doCreatureSetStorage(cid, ZE_isOnZombieArea, value) end function getZombiesEventPlayers() local players = {} for i, cid in pairs(getPlayersOnline()) do if(getPlayerZombiesEventStatus(cid) > 0) then table.insert(players, cid) end end return players end function getZombiesCount() return getStorage(ZE_ZOMBIES_SPAWNED) end function addZombiesCount() doSetStorage(ZE_ZOMBIES_SPAWNED, getStorage(ZE_ZOMBIES_SPAWNED)+1) end function resetZombiesCount() doSetStorage(ZE_ZOMBIES_SPAWNED, 0) end function getZombiesToSpawnCount() return getStorage(ZE_ZOMBIES_TO_SPAWN) end function setZombiesToSpawnCount(count) doSetStorage(ZE_ZOMBIES_TO_SPAWN, count) end function addZombiesEventBlockEnterPosition() if(getTileItemById(ZE_blockEnterItemPosition, ZE_blockEnterItemID).uid == 0) then doCreateItem(ZE_blockEnterItemID, 1, ZE_blockEnterItemPosition) end end function removeZombiesEventBlockEnterPosition() local item = getTileItemById(ZE_blockEnterItemPosition, ZE_blockEnterItemID) if(item.uid ~= 0) then doRemoveItem(item.uid) end end function spawnNewZombie() local posx = {} local posy = {} local posz = {} local pir = {} for i=1, 5 do local posx_tmp = math.random(ZE_spawnFromPosition.x ,ZE_spawnToPosition.x) local posy_tmp = math.random(ZE_spawnFromPosition.y ,ZE_spawnToPosition.y) local posz_tmp = math.random(ZE_spawnFromPosition.z ,ZE_spawnToPosition.z) local pir_tmp = 0 local spec = getSpectators({x=posx_tmp, y=posy_tmp, z=posz_tmp}, 3, 3, false) if(spec and #spec > 0) then for z, pid in pairs(spec) do if(isPlayer(pid)) then pir_tmp = pir_tmp + 1 end end end posx[i] = posx_tmp posy[i] = posy_tmp posz[i] = posz_tmp pir[i] = pir_tmp end local lowest_i = 1 for i=2, 5 do if(pir[i] < pir[lowest_i]) then lowest_i = i end end local ret = (type(doCreateMonster("Zombie Event", {x=posx[lowest_i], y=posy[lowest_i], z=posz[lowest_i]}, false)) == 'number') if(ret) then addZombiesCount() end return retend function onTime(interval, lastExecution) local players_on_arena_count = #getZombiesEventPlayers() local function start() if players_on_arena_count <= 1 then doBroadcastMessage("Zombie Couldn't Start Because there was few numbers ona rena") doSetStorage(ZE_STATUS, 0) addZombiesEventBlockEnterPosition() return true end setZombiesEventPlayersLimit(players_on_arena_count) addZombiesEventBlockEnterPosition() doSetStorage(ZE_STATUS, 2) doBroadcastMessage("Zombie Arena Event started") return true end setZombiesEventPlayersLimit(10) doBroadcastMessage("Zombie Event Is Waiting For 10 Players To Join.Zombie Will Start In 8 Minutes") removeZombiesEventBlockEnterPosition() addEvent(start,8*60*1000) doSetStorage(ZE_STATUS, 1) return true end
  20. Utilize este tutorial abaixo, está mais atualizado! http://www.tibiaking.com/forum/topic/32118-compilar-otserver-em-linux-ubuntu-1004-o-melhor/
  21. Cara tem que ver o erro, esse distro é o que te passei em outro tópico né? Se for cara, esse distro é muito bom já tive server global, que possou mais de 11 dias online sem cair, com mais de 150 player, pode ser erro da sua data, pode ser a configurações da sua vps que não suporta e killa o processo do .exe, pode ser varias coisas, mais uma te garanto não é problema do distro.
  22. Utiliza esse programa: LaatiDo Veja instalação:
  23. @Rodrigo0lg Veja os links abaixo talvez lhe ajude: Detalhe usando esse .exe é necessário usar as libs que contém na pasta data e o item.xml, mais antes teste com os seus pode ser compatíveis. Console TFS + WAR SYSTEM INCLUIDO NA COMPILAÇÃO DATA / CONFIG.LUA DLLS
  24. Te aconselho utilizar esse rev que tem no meu tutorial, porque dificilmente vai encontrar uma com tantos ajustes pra 8.60, pode confiar.

Informação Importante

Confirmação de Termo