Tudo que FiNub postou
-
Tempo de respawn
@Rusherzin pode me dizer e me ensinar a como fazer uma raid que faz um bixo nascer um dia aleatoriamente? tipo, ele nasceu hoje e alguem matou ele, pra ele nascer de novo tem que esperar dias, semanas, meses?? é pq esse boss vai dropar itens donate e quando ele nascer avisar para todos do servidor que ele nasceu???
-
[AJUDA] COMO ARRUMAR O GM E SGM
eu nao sei se isso é normal ou é um bug, mais eu quero arrumar, tipo, os gm= GameMaster e sgm= Senior GameMaster nao conseguem pegar itens do chao, nao atacam bixo, eu queria arrumar isso possibilitando ele a pegar itens e atacar monstros, alguem sabe como fazer isso?
-
ALGUEM AJUDA PF Temple Position Is Wrong Contact The Administrator ...
@naysz brother, acabei de passar por isso entao eu posso te ajudar, vai no seu config lua na linha que fica as configuraçoes do account manneger em towerid voce coloca o id da cidade principal, para voce saber o id da cidade principal, voce vai no rme faz o atalho apertando as teclado CTRL + T e ver o id da cidade principal ao lado do nome dela
-
[AJUDA] TENTANDO MUDAR DE DISTRO
primeiramente desculpa pela qualidade das fotos, e agora vamos ao que me fez criar esse tópico de super importância... eu tentei mudar a versão da distro do meu servidor de 2.6 para 0.4 por que eu fiz isso? simples, a distro 2.6 que eu estava usando ela causava um erro quando eu tentava colocar o servidor para rodar em mysql, ela simplesmente fechava, vou deixar uma foto logo em baixo, então eu fiz um tópico pedindo a ajuda de como compilar a distro 2.6 para rodar em mysql e foi ae que eu descobri que ela ja estava compilada para rodar em mysql, entao eu baixei a distro 0.4 e tentei substituir a 2.6 pela 0.4 e com isso veio esses erros na nova distro, alguem sabe o que é e sabe como arrumar? por favor preciso muito que vocês me ajudem...
-
[AJUDA] COLOCANDO SERVIDOR EM MYSQL
@J.L ta bllz, voce conhece um server 8.6 bom com uma distro versao 0.4?
-
[AJUDA] COLOCANDO SERVIDOR EM MYSQL
@DboHere cara pf me explica pq minha distro ja esta compilada e nao esta rodando em mysql, ja esta tudo certo, esse é meu config.lua, e quando eu abro a distro acontece isso, eu mudei de xampp, entao eu acredito que a senha também resetou
-
[PEDIDO] COMPILAR DISTRO
eu poderia fazer isso sozinho se eu soubesse de alguma coisa, mais como eu nao sei eu queria saber se alguem poderia compilar uma distro versao 2.6 pra rodar tanto em sqlite quanto mysql para um servidor de tibia 8.60, eu tentei baixar uma distro ja compilada mais a versao nao era compativel com os scripts que meu servidor tinha e com isso com a distro nova dava muito erro em muita coisa, agradeço desde ja pra quem me ajudar também dou rep++ download da minha distro e as sources ->> http://www.mediafire.com/file/aejqdvp1pysxgsd/Soucer.rar eu nao sei colocar o scan foi mal ae
-
[AJUDA] DESBUGANDO WEBSITE
@Zzyzx ae man, vlw mermo salvo muito, mais voce sabe como compilar uma distro para rodar em mysql? tipo quando eu abro meu servidor sqlite em mysql a distro fecha sem mostrar nenhum erro nela eae quando eu pego uma distro de um servidor mysql que roda com site a distro pega mais vem bastente erro por causa dos scripts da distro que sao diferentes
-
[AJUDA] DESBUGANDO WEBSITE
- [AJUDA] DESBUGANDO WEBSITE
@Zzyzx aparece o site normal eu posso mexer nele normal mais esses erro ficam do lado, e em cima- [AJUDA] DESBUGANDO WEBSITE
galera me ajuda a desbugar meu site?? é de grande importancia pra mim, agradeço desde ja e dou rep++ eu sei que é pedir de mais, mais eu preciso muito mesmo... eu vou deixar o site upado em winrar para que se voces quiserem baixar para me ajudar download do meu site >> http://www.mediafire.com/file/8a4ialpbr14uh2u/Site Do Emanueldk Tibiaking.rar eu nao sei como bota o scan dos download, desculpa Notice: Undefined index: sqliteDatabase in C:\xampp\htdocs\config-and-functions.php on line 30Notice: Undefined variable: file_data in C:\xampp\htdocs\config-and-functions.php on line 455Notice: Undefined index: action in C:\xampp\htdocs\index.php on line 14Notice: Undefined index: account_login in C:\xampp\htdocs\index.php on line 36Notice: Undefined index: password_login in C:\xampp\htdocs\index.php on line 37Notice: Undefined variable: group_id_of_acc_logged in C:\xampp\htdocs\accountmanagement.php on line 2Notice: Undefined variable: main_content in C:\xampp\htdocs\accountmanagement.php on line 9 Notice: Undefined variable: news_content in C:\xampp\htdocs\layouts\tibiacom\layout.php on line 777Notice: Undefined index: sqliteDatabase in C:\xampp\htdocs\config-and-functions.php on line 30Notice: Undefined variable: file_data in C:\xampp\htdocs\config-and-functions.php on line 455Notice: Undefined index: action in C:\xampp\htdocs\index.php on line 14Notice: Undefined index: account_login in C:\xampp\htdocs\index.php on line 36Notice: Undefined index: password_login in C:\xampp\htdocs\index.php on line 37Notice: Undefined variable: main_content in C:\xampp\htdocs\createaccount.php on line 5 Notice: Undefined index: sqliteDatabase in C:\xampp\htdocs\ajax\check_account.php on line 49 Notice: Undefined variable: p in C:\xampp\htdocs\layouts\tibiacom\layout.phpon line 853Warning: count(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\layouts\tibiacom\layout.phpon line 853Notice: Undefined variable: group_id_of_acc_logged in C:\xampp\htdocs\layouts\tibiacom\layout.phpon line 866 Notice: Undefined index: sqliteDatabase in C:\xampp\htdocs\config-and-functions.php on line 30Notice: Undefined variable: file_data in C:\xampp\htdocs\config-and-functions.php on line 455Notice: Undefined index: action in C:\xampp\htdocs\index.php on line 14Notice: Undefined index: account_login in C:\xampp\htdocs\index.php on line 36Notice: Undefined index: password_login in C:\xampp\htdocs\index.php on line 37Notice: Undefined variable: main_content in C:\xampp\htdocs\latestnews.php on line 34Notice: Undefined variable: group_id_of_acc_logged in C:\xampp\htdocs\latestnews.php on line 197 Notice: Undefined index: sqliteDatabase in C:\xampp\htdocs\config-and-functions.php on line 30Notice: Undefined variable: file_data in C:\xampp\htdocs\config-and-functions.php on line 455Notice: Undefined index: action in C:\xampp\htdocs\index.php on line 14Notice: Undefined index: account_login in C:\xampp\htdocs\index.php on line 36Notice: Undefined index: password_login in C:\xampp\htdocs\index.php on line 37Notice: Undefined variable: main_content in C:\xampp\htdocs\downloads.php on line 2Notice: Undefined index: sqliteDatabase in C:\xampp\htdocs\config-and-functions.php on line 30Notice: Undefined variable: file_data in C:\xampp\htdocs\config-and-functions.php on line 455Notice: Undefined index: action in C:\xampp\htdocs\index.php on line 14Notice: Undefined index: account_login in C:\xampp\htdocs\index.php on line 36Notice: Undefined index: password_login in C:\xampp\htdocs\index.php on line 37Notice: Undefined index: name in C:\xampp\htdocs\characters.php on line 2Notice: Undefined variable: main_content in C:\xampp\htdocs\characters.php on line 4 Notice: Undefined index: sqliteDatabase in C:\xampp\htdocs\config-and-functions.php on line 30Notice: Undefined variable: file_data in C:\xampp\htdocs\config-and-functions.php on line 455Notice: Undefined index: action in C:\xampp\htdocs\index.php on line 14Notice: Undefined index: account_login in C:\xampp\htdocs\index.php on line 36Notice: Undefined index: password_login in C:\xampp\htdocs\index.php on line 37Notice: Undefined variable: main_content in C:\xampp\htdocs\whoisonline.php on line 94Notice: Undefined variable: cached in C:\xampp\htdocs\whoisonline.php on line 152 Notice: Undefined index: sqliteDatabase in C:\xampp\htdocs\config-and-functions.php on line 30Notice: Undefined variable: file_data in C:\xampp\htdocs\config-and-functions.php on line 455Notice: Undefined index: action in C:\xampp\htdocs\index.php on line 14Notice: Undefined index: account_login in C:\xampp\htdocs\index.php on line 36Notice: Undefined index: password_login in C:\xampp\htdocs\index.php on line 37Notice: Undefined index: list in C:\xampp\htdocs\highscores.php on line 2Notice: Undefined index: page in C:\xampp\htdocs\highscores.php on line 3Notice: Undefined index: world in C:\xampp\htdocs\highscores.php on line 55Notice: Undefined variable: idd in C:\xampp\htdocs\highscores.php on line 55Notice: Undefined variable: idd in C:\xampp\htdocs\highscores.php on line 57Notice: Undefined variable: world_n in C:\xampp\htdocs\highscores.php on line 58Notice: Undefined variable: main_content in C:\xampp\htdocs\highscores.php on line 73Notice: Undefined variable: show_link_to_next_page in C:\xampp\htdocs\highscores.php on line 112Notice: Undefined index: sqliteDatabase in C:\xampp\htdocs\config-and-functions.php on line 30Notice: Undefined variable: file_data in C:\xampp\htdocs\config-and-functions.php on line 455Notice: Undefined index: action in C:\xampp\htdocs\index.php on line 14Notice: Undefined index: account_login in C:\xampp\htdocs\index.php on line 36Notice: Undefined index: password_login in C:\xampp\htdocs\index.php on line 37Notice: Undefined variable: main_content in C:\xampp\htdocs\killstatistics.php on line 63 Notice: Undefined index: sqliteDatabase in C:\xampp\htdocs\config-and-functions.php on line 30Notice: Undefined variable: file_data in C:\xampp\htdocs\config-and-functions.php on line 455Notice: Undefined index: action in C:\xampp\htdocs\index.php on line 14Notice: Undefined index: account_login in C:\xampp\htdocs\index.php on line 36Notice: Undefined index: password_login in C:\xampp\htdocs\index.php on line 37Notice: Undefined variable: main_content in C:\xampp\htdocs\wars.php on line 8Notice: Undefined variable: stats in C:\xampp\htdocs\wars.php on line 90Notice: Undefined variable: invi in C:\xampp\htdocs\wars.php on line 165Notice: Undefined index: sqliteDatabase in C:\xampp\htdocs\config-and-functions.php on line 30Notice: Undefined variable: file_data in C:\xampp\htdocs\config-and-functions.php on line 455Notice: Undefined index: action in C:\xampp\htdocs\index.php on line 14Notice: Undefined index: account_login in C:\xampp\htdocs\index.php on line 36Notice: Undefined index: password_login in C:\xampp\htdocs\index.php on line 37Notice: Undefined variable: main_content in C:\xampp\htdocs\bans.php on line 6 Notice: Undefined index: sqliteDatabase in C:\xampp\htdocs\config-and-functions.php on line 30Notice: Undefined variable: file_data in C:\xampp\htdocs\config-and-functions.php on line 455Notice: Undefined index: action in C:\xampp\htdocs\index.php on line 14Notice: Undefined index: account_login in C:\xampp\htdocs\index.php on line 36Notice: Undefined index: password_login in C:\xampp\htdocs\index.php on line 37Notice: Undefined variable: main_content in C:\xampp\htdocs\guilds.php on line 29Notice: Undefined index: world in C:\xampp\htdocs\guilds.php on line 39 Notice: Undefined index: sqliteDatabase in C:\xampp\htdocs\config-and-functions.php on line 30Notice: Undefined variable: file_data in C:\xampp\htdocs\config-and-functions.php on line 455Notice: Undefined index: action in C:\xampp\htdocs\index.php on line 14Notice: Undefined index: account_login in C:\xampp\htdocs\index.php on line 36Notice: Undefined index: password_login in C:\xampp\htdocs\index.php on line 37Notice: Undefined variable: main_content in C:\xampp\htdocs\topguilds.php on line 4 Notice: Undefined index: sqliteDatabase in C:\xampp\htdocs\config-and-functions.php on line 30Notice: Undefined variable: file_data in C:\xampp\htdocs\config-and-functions.php on line 455Notice: Undefined index: action in C:\xampp\htdocs\index.php on line 14Notice: Undefined index: account_login in C:\xampp\htdocs\index.php on line 36Notice: Undefined index: password_login in C:\xampp\htdocs\index.php on line 37Notice: Undefined variable: main_content in C:\xampp\htdocs\calendario.php on line 3Notice: Undefined index: sqliteDatabase in C:\xampp\htdocs\config-and-functions.php on line 30Notice: Undefined variable: file_data in C:\xampp\htdocs\config-and-functions.php on line 455Notice: Undefined index: action in C:\xampp\htdocs\index.php on line 14Notice: Undefined index: account_login in C:\xampp\htdocs\index.php on line 36Notice: Undefined index: password_login in C:\xampp\htdocs\index.php on line 37Notice: Undefined variable: main_content in C:\xampp\htdocs\task.php on line 2Notice: Undefined index: sqliteDatabase in C:\xampp\htdocs\config-and-functions.php on line 30Notice: Undefined variable: file_data in C:\xampp\htdocs\config-and-functions.php on line 455Notice: Undefined index: action in C:\xampp\htdocs\index.php on line 14Notice: Undefined index: account_login in C:\xampp\htdocs\index.php on line 36Notice: Undefined index: password_login in C:\xampp\htdocs\index.php on line 37Notice: Undefined variable: main_content in C:\xampp\htdocs\boss.php on line 90Notice: Undefined index: sqliteDatabase in C:\xampp\htdocs\config-and-functions.php on line 30Notice: Undefined variable: file_data in C:\xampp\htdocs\config-and-functions.php on line 455Notice: Undefined index: action in C:\xampp\htdocs\index.php on line 14Notice: Undefined index: account_login in C:\xampp\htdocs\index.php on line 36Notice: Undefined index: password_login in C:\xampp\htdocs\index.php on line 37Notice: Undefined variable: main_content in C:\xampp\htdocs\team.php on line 15 Notice: Undefined variable: group_id_of_acc_logged in C:\xampp\htdocs\layouts\tibiacom\layout.phpon line 758Notice: Undefined index: sqliteDatabase in C:\xampp\htdocs\config-and-functions.php on line 30Notice: Undefined index: action in C:\xampp\htdocs\index.php on line 14Notice: Undefined index: account_login in C:\xampp\htdocs\index.php on line 36Notice: Undefined index: password_login in C:\xampp\htdocs\index.php on line 37Notice: Undefined variable: main_content in C:\xampp\htdocs\buypoints.php on line 6Notice: Undefined index: sqliteDatabase in C:\xampp\htdocs\config-and-functions.php on line 30Notice: Undefined variable: file_data in C:\xampp\htdocs\config-and-functions.php on line 455Notice: Undefined index: action in C:\xampp\htdocs\index.php on line 14Notice: Undefined index: account_login in C:\xampp\htdocs\index.php on line 36Notice: Undefined index: password_login in C:\xampp\htdocs\index.php on line 37Notice: Undefined variable: main_content in C:\xampp\htdocs\shopsystem.php on line 208Notice: Undefined index: vipdays in C:\xampp\htdocs\shopsystem.php on line 211Warning: count(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\shopsystem.php on line 211Notice: Undefined index: container in C:\xampp\htdocs\shopsystem.php on line 245Warning: count(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\shopsystem.php on line 245Notice: Undefined index: itemlogout in C:\xampp\htdocs\shopsystem.php on line 255Warning: count(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\shopsystem.php on line 255Notice: Undefined index: pacc in C:\xampp\htdocs\shopsystem.php on line 268Warning: count(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\shopsystem.php on line 268Notice: Undefined index: sqliteDatabase in C:\xampp\htdocs\config-and-functions.php on line 30Notice: Undefined variable: file_data in C:\xampp\htdocs\config-and-functions.php on line 455Notice: Undefined index: action in C:\xampp\htdocs\index.php on line 14Notice: Undefined index: account_login in C:\xampp\htdocs\index.php on line 36Notice: Undefined index: password_login in C:\xampp\htdocs\index.php on line 37Notice: Undefined variable: main_content in C:\xampp\htdocs\confirmacao.php on line 2 config-and-functons.php <?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.php"); exit; } //load server config $config['server'] = parse_ini_file($config['site']['server_path'].'config.lua'); if(isset($config['server']['mysqlHost'])) { //new (0.2.6+) ots config.lua file $mysqlhost = $config['server']['mysqlHost']; $mysqluser = $config['server']['mysqlUser']; $mysqlpass = $config['server']['mysqlPass']; $mysqldatabase = $config['server']['mysqlDatabase']; } elseif(isset($config['server']['sqlHost'])) { //old (0.2.4) ots config.lua file $mysqlhost = $config['server']['sqlHost']; $mysqluser = $config['server']['sqlUser']; $mysqlpass = $config['server']['sqlPass']; $mysqldatabase = $config['server']['sqlDatabase']; } $sqlitefile = $config['server']['sqliteDatabase']; $passwordency = ''; if(strtolower($config['server']['encryptionType']) == 'md5') $passwordency = 'md5'; if(strtolower($config['server']['encryptionType']) == 'sha1') $passwordency = '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 ###################### function isPremium($premdays, $lastday) { return ($premdays - (date("z", time()) + (365 * (date("Y", time()) - date("Y", $lastday))) - date("z", $lastday)) > 0); } //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['passwordency']; 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 = '".$player->getId()."';"); } 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 nick? function check_account_name($name)//sprawdza 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', 'god', 'tutor'); $first_words_blocked = array('gm ','cm ', '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_to_check) return false; foreach($GLOBALS['config']['site']['monsters'] as $word) if($word == $name_to_check) return false; foreach($GLOBALS['config']['site']['npc'] as $word) if($word == $name_to_check) 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)//sprawdza 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)//sprawdza haslo { $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)//sprawdza mail { $ok = "/[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\.[a-zA-Z]{2,4}/"; return (preg_match($ok, $email))? true: false; } function items_on_player($characterid, $pid) { global $SQL; $item = $SQL->query("SELECT `itemtype` FROM `player_items` WHERE `pid` = '".$pid."' AND `player_id` = '".$characterid."'")->fetch(); return '<img src="images/items/' . $item['itemtype'] . '.gif" />'; } function showCommentsCount( $date ) { global $SQL; $result = $SQL->query("SELECT COUNT(*) as `count` FROM `z_news_comments` WHERE `news_date` = " . (int)$date . ";")->fetch(); return (int)$result['count']; } 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() { if($GLOBALS['subtopic'] == "latestnews") { //add tickers to site - without it tickers will not be showed //$news .= $GLOBALS['news_content']; /* //featured article $layout_name = $GLOBALS['layout_name']; $news .= ' <div id="featuredarticle" class="Box"> <div class="Corner-tl" style="background-image:url('.$layout_name.'/images/content/corner-tl.gif);"></div> <div class="Corner-tr" style="background-image:url('.$layout_name.'/images/content/corner-tr.gif);"></div> <div class="Border_1" style="background-image:url('.$layout_name.'/images/content/border-1.gif);"></div> <div class="BorderTitleText" style="background-image:url('.$layout_name.'/images/content/title-background-green.gif);"></div> <img class="Title" src="'.$layout_name.'/images/strings/headline-featuredarticle.gif" alt="Contentbox headline" /> <div class="Border_2"> <div class="Border_3"> <div class="BoxContent" style="background-image:url('.$layout_name.'/images/content/scroll.gif);"> <div id=\'TeaserThumbnail\'><img src="'.$layout_name.'/images/news/features.jpg" width=150 height=100 border=0 alt="" /></div><div id=\'TeaserText\'><div style="position: relative; top: -2px; margin-bottom: 2px;" > <b>Tutaj wpisz tytul</b></div> tutaj wpisz tresc newsa<br> zdjecie laduje sie w <i>tibiacom/images/news/features.jpg</i><br> skad sie laduje mozesz zmienic linijke ponad komentarzem </div> </div> </div> </div> <div class="Border_1" style="background-image:url('.$layout_name.'/images/content/border-1.gif);"></div> <div class="CornerWrapper-b"><div class="Corner-bl" style="background-image:url('.$layout_name.'/images/content/corner-bl.gif);"></div></div> <div class="CornerWrapper-b"><div class="Corner-br" style="background-image:url('.$layout_name.'/images/content/corner-br.gif);"></div></div> </div>'; */ } return $news; } //set monster of week function logo_monster() { return str_replace(" ", "", trim(mb_strtolower($GLOBALS['layout_ini']['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('config/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($config['server']['ip'], $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]; } else { $config['status']['serverStatus_online'] = 0; $config['status']['serverStatus_players'] = 0; $config['status']['serverStatus_playersMax'] = 0; } $file = fopen("config/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 = "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; } // Parse smiley bbcode into HTML images function parsesmileys($message) { foreach(array( "/\:\)/si" => "<img src='images/smiley/smile.gif' title='Smile'>", "/\;\)/si" => "<img src='images/smiley/wink.gif' title='Wink'>", "/\:\(/si" => "<img src='images/smiley/sad.gif' title='Sad'>", "/\:\|/si" => "<img src='images/smiley/frown.gif' title='Frown'>", "/\:o/si" => "<img src='images/smiley/shock.gif' title='Shock'>", "/\:p/si" => "<img src='images/smiley/pfft.gif' title='Pfft!'>", "/b\)/si" => "<img src='images/smiley/cool.gif' title='Cool...'>", "/\:d/si" => "<img src='images/smiley/grin.gif' title='Grin'>", "/\:@/si" => "<img src='images/smiley/angry.gif' title='Angry'>", "/\:rol:/si" => "<img title='Rolleyes...' src='images/smiley/roll.gif'>", "/\:uhoh:/si" => "<img title='Uh-Oh!' src='images/smiley/uhoh.gif'>", "/\:no:/si" => "<img title='Nope' src='images/smiley/no.gif'>", "/\:shy:/si" => "<img title='Shy' src='images/smiley/shy.gif'>", "/\:lol:/si" => "<img title='Laugh' src='images/smiley/laugh.gif'>", "/\:rip:/si" => "<img title='Dead...' src='images/smiley/dead.gif'>", "/\:yes:/si" => "<img title='Yeah' src='images/smiley/yes.gif'>", "/\:mad:/si" => "<img title='Mad' src='images/smiley/mad.gif'>", "/\:bigeek:/si" => "<img title='Big eek!' src='images/smiley/bigeek.gif'>", "/\:bigrazz:/si" => "<img title='Big razz' src='images/smiley/bigrazz.gif'>", "/\:smilewinkgrin:/si" => "<img title='Smile-Wink-Grin' src='images/smiley/smilewinkgrin.gif'>", "/\:sourgrapes:/si" => "<img title='Sour Grapes' src='images/smiley/sourgrapes.gif'>", "/\:confused:/si" => "<img title='Confused?' src='images/smiley/confused.gif'>", "/\:upset:/si" => "<img title='Upset' src='images/smiley/upset.gif'>", "/\:sleep:/si" => "<img title='Sleep' src='images/smiley/sleep.gif'>", "/\:yupi:/si" => "<img title='Yupi!' src='images/smiley/jupi.gif'>" ) as $key => $img) $message = preg_replace($key, $img, $message); return $message; } // Parse bbcode into HTML code function parseubb($text) { global $account_logged; $text = preg_replace('#\[b\](.*?)\[/b\]#si', '<b>\1</b>', $text); $text = preg_replace('#\[i\](.*?)\[/i\]#si', '<i>\1</i>', $text); $text = preg_replace('#\[u\](.*?)\[/u\]#si', '<u>\1</u>', $text); $text = preg_replace('#\[s\](.*?)\[/s\]#si', '<s>\1</s>', $text); $text = preg_replace('#\[center\](.*?)\[/center\]#si', '<center>\1</center>', $text); $text = preg_replace('#\[url\]([\r\n\s]*)(http://|ftp://|https://|ftps://)([^\s\'\"\+\(\)]*?)([\r\n\s]*)\[/url\]#sie', "'<a href=\''.str_replace('<br>', '', '\\2\\3').'\' target=\'_blank\' title=\''.str_replace('<br>', '', '\\2\\3').'\'>\\2\\3</a>'", $text); $text = preg_replace('#\[url\] ([\r\n]*)([^\s\'\"\+\(\)]*?)([\r\n]*) \[/url\]#sie', "'<a href=\'http://'.str_replace('<br>', '', '\\2').'\' target=\'_blank\' title=\''.str_replace('<br>', '', '\\2').'\'>\\2</a>'", $text); $text = preg_replace('#\*)(http://|ftp://|https://|ftps://)([^\s\'\"\+\(\)]*?)\](.*?)([\r\n]*)\[/url\]#sie', "'<a href=\''.str_replace('<br>', '', '\\2\\3').'\' target=\'_blank\' title=\''.str_replace('<br>', '', '\\2\\3').'\'>\\4</a>'", $text); $text = preg_replace('#\*)([^\s\'\"\+\(\)]*?)\](.*?)([\r\n]*)\[/url\]#sie', "'<a href=\'http://'.str_replace('<br>', '', '\\2').'\' target=\'_blank\' title=\''.str_replace('<br>', '', '\\2').'\'>\\3</a>'", $text); $text = preg_replace('#\[mail\]([\r\n]*)([^\s\'\";:\+]*?)([\r\n]*)\[/mail\]#si', '<a href=\'mailto:\2\'>\2</a>', $text); $text = preg_replace('#\[mail=([\r\n]*)([^\s\'\";:\+]*?)\](.*?)([\r\n]*)\[/mail\]#si', '<a href=\'mailto:\2\'>\2</a>', $text); $text = preg_replace('#\[small\](.*?)\[/small\]#si', '<small>\1</small>', $text); $text = preg_replace('#\(.*?)\[/color\]#si', '<span style=\'color:\1\'>\2</span>', $text); if($account_logged) $text = preg_replace('#\[hide\](.*?)\[/hide\]#si', '\1', $text); $text = preg_replace('#\(.*?)\[/size\]#si', '<span style=\'font-size: \1;\'>\2</span>', $text); $text = preg_replace('#\[marquee\](.*?)\[/marquee\]#si', '<marquee>\1</marquee>', $text); $text = preg_replace('#\[marquee=(left|down|up|right)\](.*?)\[/marquee\]#si', '<marquee direction=\'\1\'>\2</marquee>', $text); $text = preg_replace('#\[marquee=(left|down|up|right):(scroll|slide|alternate)\](.*?)\[/marquee\]#si', '<marquee direction=\'\1\' behavior=\'\2\'>\3</marquee>', $text); $text = preg_replace('#\[flash width=([0-9]*?) height=([0-9]*?)\]([^\s\'\";:\+]*?)(\.swf)\[/flash\]#si', '<object classid=\'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\' codebase=\'http://active.macromedia.com/flash6/cabs/swflash.cab#version=6,0,0,0\' id=\'\3\4\' width=\'\1\' height=\'\2\'><param name=movie value=\'\3\4\'><param name=\'quality\' value=\'high\'><param name=\'bgcolor\' value=\'#ffffff\'><embed src=\'\3\4\' quality=\'high\' bgcolor=\'#ffffff\' width=\'\1\' height=\'\2\' type=\'application/x-shockwave-flash\' pluginspage=\'http://www.macromedia.com/go/getflashplayer\'></embed></object>', $text); $text = preg_replace("#\[img\]((http|ftp|https|ftps)://)(.*?)(\.(jpg|jpeg|gif|png|JPG|JPEG|GIF|PNG))\[/img\]#sie","'<img src=\'\\1'.str_replace(array('.php','?','&','='),'','\\3').'\\4\' style=\'border:0px\' alt=\'\'>'",$text); $qcount = substr_count($text, "- [AJUDA] SITE COM ERRO
linha > 498 function getOrder($arr, $order, $this) { linha > 499 // Function by Colandus! linha > 500 $type = 'asc'; linha > 501 if($orderBy = $arr[$this]) linha > 502 if(isset($_GET[$order])) { linha > 503 $v = explode('_', strrev($_GET[$order]), 2); linha > 504 if(strrev($v[1]) == $this) linha > 505 $type = (strrev($v[0]) == 'asc' ? 'desc' : 'asc'); linha > 506 } eu apaguei o $this e o site pegou mais ficou assim- [AJUDA] COLOCANDO SERVIDOR EM MYSQL
@KotZletY @DboHere @edusorcer eu achei o problema, é que minha distro nao ta compilado para rodar em mysql, eu baixei um servidor mysql, peguei a distro dele botei na pasta do meu e abri, veio um monte de erro quando abri mais deixo online, como eu faço para compilar a distro pra rodar em mysql?- [AJUDA] NPC JHONY PROMOTE
alguem configura meu npc jhony pra mim pf, eu quero que ele promova por um preço de 20k, precisa ser level 20, e pode ser promovido free account, nao precisa ser vip nao Id Da Vocaçao Druid 2 para Elder Druid 6 Id Da Vocaçao Knight 4 para Elite Knight 8 Id Da Vocaçao Sorcerer 1 para Master Sorcerer 5 Id Da Vocaçao Paladin 3 Para Royal Paladin 7 Johny.Lua local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Eu Posso Te Promover Por 20000 Moedas Azuis. Voce Quer Que Eu Te Promova?'}) node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, promotion = 1, text = 'Parabens! Voce Agora Esta Promovido.'}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Tudo Bem Entao, Volte Quando Estiver Pronto.', reset = true}) npcHandler:addModule(FocusModule:new()) Johny.Xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Johnny" script="data/npc/scripts/johnny.lua" walkinterval="0" floorchange="0"> <health now="100" max="100"/> <look type="133" head="20" body="39" legs="45" feet="7" addons="0"/> </npc> o meu que eu tenho nao ta fazendo isso que eu quero- [AJUDA] COLOCANDO SERVIDOR EM MYSQL
@KotZletY mais o problema é que eu esqueci a senha, nao tem um jeito de saber ou resetar ela nao?- NOVA MOEDA NAO COMPRA NADA
@peterson18 bllz, funcionou vlw mesmo, mais onde é que muda o troco? seila se isso é possivel, mais quando eu compro alguma coisa com essa nova moeda, vem um outra moeda que nao é mais dinheiro no meu servidor- [AJUDA] COLOCANDO SERVIDOR EM MYSQL
@KotZletY talvez deva ser isso mesmo, eu lembro de ter botado uma senha, mais eu nao lembro mais ela, nao tem como eu resetar a senha ou qualquer outra forma de mim mudar a senha ou tirar ela? no xampp versao 1.7.3 quando eu ligo o apache e o mysql quando eu clico no apache admin da esse erro- [AJUDA] COLOCANDO SERVIDOR EM MYSQL
@edusorcer boa cara, eu baixei um tfs de um baiak e botei no meu, mais agora ta mostrando esse erro na distro, os outros erros sao apenas so para implementar nesse para que se voce souber de algo me ajudar, vlw por td @KotZletY- [AJUDA] CONFIGURAR EVENTOS
galera, eu nunca consegui achar o arquivo que tem o script que faz os portais dos eventos aparecer em tal posição, alguem poderia mim dizer onde que fica esse arquivo de cada evento? os meus eventos estao nascendo em lugares que eu nao sei, meu servidor tem o evento, Battle Field, Fire Storm, Team Battle, Desert War, Capture The Flang, Zombie e SnowBall- (Resolvido)Pedido NPC Cassino
@Pandawan. entao, o meu ta dando erro, tipo, o npc aparece normalmente mais ele nao fala comigo e nao pega a grana, eu ja configurei a posiçao 3 vezes ta tudo certo. eu jogo o dinheiro e falo l L low Low LOW h H high HIGH mais ele nao faz nada e nao da nenhum erro na distro, meu servidor é 8.6 distro 2.6 The OTX Server Version: (2.6) - Codename: (SCARETALE) Compiled with GNU C++ version 3.4.5 (mingw special) for arch 32 Bits at Nov 21 2016 17:47:43- Sistema: Cassino Slots.
@Adriano SwaTT nao brother, queria saber do seu script se tem como adicionar uma coisinha nesse script? tipo, voce escolheu o item da sorte, voce apostou, independente se voce ganhou ou perdeu tem como voce adicionar uma posiçao que teleporta voce para um determinado luga dps de ganhar ou perder? pf- Sistema: Cassino Slots.
@Vodkart entao, eu nao sei se tu me fez uma pergunta se esse script usa esses comandos para funcionar ou se voce afirmou que os comandos sao esses, se for esse o caso, nao pega nao eu falo de tudo mais o npc nao me responde e nem pega o dinheiro @Adriano SwaTT cara voce poderia adicionar uma coisinha nesse script? tipo, voce escolheu o item da sorte, voce apostou, independente se voce ganhou ou perdeu tem como voce adicionar uma posiçao que teleporta voce para um determinado luga dps de ganhar ou perder? pf- Sistema: Cassino Slots.
@Adriano SwaTT brother eu sei que esse nao é seu topico, mais voce poderia me da uma ajuda com esse script de npc cassino? ele aparece certinho, mais ele nao fala comigo nem pega a grana que eu joguei no dp, eu ja configurei tudo certinho a posição do dp do npc e a table do meio onde o dinheiro é jogado mais nada aconteceu local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local function delayMoneyRemoval(item, pos) doRemoveItem(getTileItemById(pos, item).uid) return true end local function placeMoney(amount, table_middle_pos) local remain = amount local crystal_coins = 0 local platinum_coins = 0 if (math.floor(amount / 10000) >= 1) then crystal_coins = math.floor(amount / 10000) remain = remain - crystal_coins * 10000 end if ((remain / 100) >= 1) then platinum_coins = remain / 100 end addEvent(doCreateItem, 550, 2152, platinum_coins, table_middle_pos) addEvent(doCreateItem, 600, 2160, crystal_coins, table_middle_pos) end local function rollDice(roll, cc_count, pc_count, table_left_pos, table_middle_pos, npc) local dice_ids = {5792, 5793, 5794, 5795, 5796, 5797} local random_rollval = math.random(1,6) local total_g = (10000 * cc_count) + (100 * pc_count) local prize_percent = 0.8 -- 80% if ((total_g) <= 300000 and (total_g) >= 5000) then doSendMagicEffect(table_left_pos, CONST_ME_CRAPS) for _, itemId in pairs(dice_ids) do if(getTileItemById(table_left_pos, itemId).uid > 0) then doTransformItem(getTileItemById(table_left_pos, itemId).uid, dice_ids[random_rollval]) end end if (roll == 1 and random_rollval <= 3) then placeMoney(total_g + (total_g * prize_percent), table_middle_pos) addEvent(doSendMagicEffect, 400, table_left_pos, CONST_ME_SOUND_GREEN) addEvent(doSendMagicEffect, 700, table_left_pos, CONST_ME_SOUND_GREEN) addEvent(doCreatureSay, 500, npc, "You win!", TALKTYPE_SAY, false, 0) elseif (roll == 2 and random_rollval >= 4) then placeMoney(total_g + (total_g * prize_percent), table_middle_pos) addEvent(doSendMagicEffect, 400, table_left_pos, CONST_ME_SOUND_GREEN) addEvent(doSendMagicEffect, 700, table_left_pos, CONST_ME_SOUND_GREEN) addEvent(doCreatureSay, 500, npc, "You win!", TALKTYPE_SAY, false, 0) else addEvent(doSendMagicEffect, 400, table_left_pos, CONST_ME_BLOCKHIT) addEvent(doSendMagicEffect, 700, table_left_pos, CONST_ME_BLOCKHIT) addEvent(doCreatureSay, 500, npc, "Better luck next time.", TALKTYPE_SAY, false, 0) end doCreatureSay(npc, string.format("%s rolled a %d.", getCreatureName(npc), random_rollval), TALKTYPE_ORANGE_1, false, 0, table_left_pos) else addEvent(doCreateItem, 100, 2160, cc_count, table_middle_pos) addEvent(doCreateItem, 150, 2152, pc_count, table_middle_pos) doCreatureSay(npc, "The minimum wager is 5K and the maximum wager is 300K.", TALKTYPE_SAY, false, 0) end return true end function creatureSayCallback(cid, type, msg) -- NPC userdata instance local npc = getNpcCid() -- Participating player userdata instance local position = {x = getNpcPos().x+2, y = getNpcPos().y, z = getNpcPos().z} position.stackpos = STACKPOS_TOP_CREATURE local player_uid = getThingfromPos(position).uid -- Game table position userdata instances local table_left_pos = {x = 490, y = 141, z = 6} local table_middle_pos = {x = 490, y = 140, z = 6} -- Search for coins on the left and middle tables and create item userdata instances local table_middle_cc = getTileItemById(table_middle_pos, 2160) local table_middle_pc = getTileItemById(table_middle_pos, 2152) -- Other variables local cc_count = 0 local pc_count = 0 local ROLL, LOW, HIGH = 0, 1, 2 if (player_uid ~= 0) then if ((msgcontains(string.lower(msg), 'high') or msgcontains(string.lower(msg), 'h')) and (isPlayer(player_uid) and player_uid == cid)) then ROLL = HIGH elseif ((msgcontains(string.lower(msg), 'low') or msgcontains(string.lower(msg), 'l')) and (isPlayer(player_uid) and player_uid == cid)) then ROLL = LOW else return false end if (table_middle_cc.uid ~= 0) then cc_count = table_middle_cc.type doTeleportThing(table_middle_cc.uid, table_left_pos) addEvent(delayMoneyRemoval, 300, 2160, table_left_pos) end if (table_middle_pc.uid ~= 0) then pc_count = table_middle_pc.type doTeleportThing(table_middle_pc.uid, table_left_pos) addEvent(delayMoneyRemoval, 300, 2152, table_left_pos) end addEvent(rollDice, 500, ROLL, cc_count, pc_count, table_left_pos, table_middle_pos, npc) else return false end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)- Sistema: Cassino Slots.
- [AJUDA] COLOCANDO SERVIDOR EM MYSQL
@KotZletY Nao, @edusorcer Bllz, vou tentar aqui e qlqr coisa eu te falo - [AJUDA] DESBUGANDO WEBSITE
Informação Importante
Confirmação de Termo