Jump to content

Olá Tibiano! Notamos que você está com um adblocker ligado... 

Nós promovemos servidores dentro da comunidade, para que eles tenham visibilidade.

Por favor, nos ajude a continuar promovendo esses servidores. Adicione nosso domínio na whitelist de seu adblocker, ok? :)

Search the Community

Showing results for tags 'website'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • xTibia - Notícias e Suporte
    • Regras
    • Noticias
    • Soluções
    • Projetos Patrocinados
    • Tutoriais para Iniciantes
    • Imprensa
  • OTServ
    • Notícias e Debates
    • OTServlist
    • Recursos
    • Suporte
    • Pedidos
    • Downloads
  • OFF-Topic

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Sou

Found 65 results

  1. StrikersBR12

    Website

    Alguem sabe como troco esse botão http://prntscr.com/p8tpht por um botão flutuante que quando vc clica 1 vez vc tem que recarregar a pagina dnv pra comprar estilo pokebr @Ayron5
  2. Olá Galerinha do xtibia, Tudo Bem ??? Antes de mais nada peço que movam para a área de Tutoriais de Website pois quando fui tentar criar um novo tópico la não estava dando tentei em Envie Seu Tutorial e nada. Vamos ao que interessa, estou fazendo esse tutorial ensinando a colocar o SHOP em seu Modern AAC pois vejo que muitos tem dúvida nesse assunto e eu quero que essas dúvidas acabem Quando acabarem de ler o Tópico veras que não é uma coisa dificil. Então vamos la para que funcione corretamente faça como eu peço no Tópico. Primeiramente vamos colocar para que o Shop entregue os items ao comprar certo ?!?! É Bem facil vá na pasta data/globalevents/script e crie um arquivo chamado shop.lua e coloco o seguinte script abaixo dentro e salve. Agora vá em globalevents.xml e coloque a seguinte tag <globalevent name="Shop" interval="3000" event="script" value="shop.lua"/> Pronto a parte do shop entregar os items após a compra está feito agora vamos instalar o SHOP. Peço que baixem o seguinte arquivo abaixo. http://www.4shared.com/rar/LLcxJq-dba/shop.html? Após baixarem, extraem em seu dekstop será extraida uma pasta chamada shop, renomeem ela para gifts e a coloque dentro da pasta do seu site(htdocs), após fazerem isso vá na pasta system/pages e crie um arquivo chamado gifts.php e coloque o codigo abaixo dentro e salve. Após fazerem isso va no phpmyadmin entre em sua DB e execulte o shop.sql que se encontra dentro da pasta SeuSite/gifts/config e pronto agora só entrar no link e terá la as instruções para finalizar a instalação. http://linkdoseusite/index.php/p/v/gifts.php Pronto SHOP instalado agora vamos colocar a aba de SHOP em seu site caso não tenha ou esteja com outro url. Vá na pasta seusite/templates/seutemplate e abra o index.php e coloque o seguinte url na parte onde tem as urls das paginas <li><a href="{$path}/index.php/p/v/gifts">SHOP</a></li> E pronto salve e entre em seu site e veja a magica Em Breve estarei fazendo um tópico ensinando a colocar o sistema de pagseguro automatico ou seja a pagina de DONATE do Server. Obrigado pela atenção de todos e até a próxima Creditos: Pelo Tutorial Junior Silva
  3. Alguem sabe como eu altero o lvl inicial do player que cria conta no site @Ayron5 @Marshmello já arrumei pd fechar o topico
  4. StrikersBR12

    Ajuda Website

    eu n lembro onde edito essa parte alguém ajuda? @Ayron5 tu sabe como edito essa parte? e a parte inicial do site
  5. Bom dia, estou com uma duvida em questao ao meu gesior, meus charles males estão como female no top level do site, mas in-game eles tem a outfit normal. Se eu tento criar um char no site "male" a outfit dele aparece como female e se eu crio um char "female" ele aparece como female sem nenhum problema. o que posso fazer pra arrumar esse "bug"
  6. seguinte erro = Parse error: syntax error, unexpected 'case' (T_CASE) in D:\xampp\htdocs\account.php on line 465 || na linha 465 tem assim = #####CHANGE PASSWORD##### case "password": Vou postar o php todo não sei se pode qq coisa me avisa que removo , estou muito precisando da ajuda de vcs código disponível: <?php session_start(); include ('config.php'); $acc_logged = $_SESSION['account']; $pass_logged = $_SESSION['password']; if(!isset($_GET['page'])) { if ((!isset($acc_logged) && isset($pass_logged) && $acc_logged != null && $acc_logged != "" && $pass_logged != null && $pass_logged != "")) header("Location: index.php"); else { connect_db(); include ('top.inc.php'); $noguildid = 0; $empty = ""; $joinchar = $_POST['name']; echo "<script language=\"JavaScript\">\n"; echo "function askConfirm(txt,url) {\n"; echo "if (confirm(txt) == true) {\n"; echo "document.location=url\n"; echo "return true;\n"; echo "} \n"; echo "}\n"; echo "</script>"; if ($acc_logged != "" && $acc_logged != null && $pass_logged != "" && $pass_logged != null) { $login = $_GET['login']; if ($login == "true") { echo "<p>You have successfully logged in!</p>"; } $result = $_GET['result']; if (isset($result) && result != "" && result != null) { if ($result == "char_success") { echo "<h1>Congratulations!</h1><p>Your character was successfully created!</p>"; } } echo '<h1>Account Home:</h1>'; echo '<h2>Options:</h2>'; echo '<a href="account.php?page=char">Create new Character</a><br />'; echo '<a href="account.php?page=password">Change Password</a><br />'; $query2 = mysql_query("SELECT * FROM `accounts` WHERE (`accno` = '".mysql_escape_string($acc_logged)."') ") or die(mysql_error()); while($sql2 = mysql_fetch_array($query2)) { $ownguild_check = mysql_query("SELECT ownguild FROM players WHERE account = '".mysql_escape_string($acc_logged)."' AND ownguild = '1'") or die(mysql_error()); if(mysql_num_rows($ownguild_check) == 1){ echo '<a href="guild.php">Manage Guild</a><br />'; } else { if($sql2['premDays'] >= $guild_premdays) echo '<a href="guild.php?page=create">Create Guild</a><br />'; } if($sql2['hide'] == 1) { $hide = "Yes"; } else { $hide = "No"; } if($sql2['hidemail'] == 1) { $hidemail = "Yes"; } else { $hidemail = "No"; } if($sql2['type'] > 2) { echo '<a href="manager.php">SQL Manager</a><br />'; echo '<a href="news.php?act=post">Post News</a><br />'; } echo '<h2>Personal Information:</h2>'; echo '<table>'; echo '<tr><td>Name: </td><td>'.$sql2['rlname'].'</td></tr>'; echo '<tr><td>Location: </td><td>'.$sql2['location'].'</td></tr>'; echo '<tr><td>Email: </td><td>'.$sql2['email'].'</td></tr>'; echo '<tr><td>Hidden info: </td><td><a href="account.php?page=hide&type=2">'.$hide.'</a></td></tr>'; echo '<tr><td>Hidden email: </td><td><a href="account.php?page=hide&type=3">'.$hidemail.'</a></td></tr>'; } echo '</table><br />'; echo '<h1>Character information:</h1>'; echo '<table border="0" cellSpacing="0" cellpadding="2" width="500px">'; echo '<tr>'; echo '<td><b>Name:</b></td><td><b>Comment:</b></td><td><b>Hidden:</b></td><td><b>Access:</b></td><td><b>Level:</b></td><td><b>Guild:</b></td>'; echo '</tr>'; $query = mysql_query("SELECT * FROM `players` WHERE (`account` = '".mysql_escape_string($acc_logged)."') ") or die(mysql_error()); while($sql = mysql_fetch_array($query)) { if($sql['hide'] == 1) { $hidechar = "Yes"; } else { $hidechar = "No"; } $id=$i+1; echo ($i % 2) ? "<tr bgcolor=\"\">" : "<tr bgcolor=\"\">"; echo '<td><a href="info.php?act=players&char='.$sql['name'].'">'.$sql['name'].'</a></td>'; echo '<td><a href="account.php?page=comment&charname='.$sql['name'].'">Edit</a></td>'; echo '<td><a href="account.php?page=hide&char='.$sql['name'].'&type=1">'.$hidechar.'</a></td>'; echo '<td>'.$sql['level'].'</td>'; echo '<td>'; $guild_query = mysql_query("SELECT * FROM `guilds` WHERE (`guildid` = '".mysql_escape_string($sql['guildid'])."') "); while($guild_sql = mysql_fetch_array($guild_query)) { if($sql['guildid'] >= 1) { if($sql['ownguild'] >= 1) { echo "<a href=\"javascript:askConfirm('Do you want to delete " . htmlentities($guild_sql['guildname']) . "?','guild.php?page=leave&show=delete&id=".$sql['id']."&guildid=".$sql['guildid']."');\">Delete</a></center></td>"; } else { echo "<a href=\"javascript:askConfirm('Do you want to leave " . htmlentities($guild_sql['guildname']) . "?','guild.php?page=leave&show=leave&id=".$sql['id']."&guildid=".$sql['guildid']."');\">Leave</a></center></td>"; } } } echo '</tr>'; ++$i; } echo '</table>'; } } } switch($_GET['page']){ #####HIDE ACTIONS##### case "hide": $type = $_GET['type']; $char = $_GET['char']; if ((!isset($acc_logged) && isset($pass_logged) && $acc_logged != null && $acc_logged != "" && $pass_logged != null && $pass_logged != "" && $type != null)) header("Location: index.php"); else { connect_db(); switch($type){ case 1: $player_query = mysql_query("SELECT hide FROM players WHERE (`name` = '".mysql_escape_string($char)."') ") or die(mysql_error()); $player_sql = mysql_fetch_array($player_query); if(mysql_num_rows($player_query)==0) { echo "<h1>Error</h1><p>Please contact the webmaster.</p>"; } else { if($player_sql['hide'] == 1){ mysql_query("UPDATE players set `hide` = `hide`-1 WHERE name='".mysql_escape_string($char)."'") or die(mysql_error()); } else { mysql_query("UPDATE players set `hide` = `hide`+1 WHERE name='".mysql_escape_string($char)."'") or die(mysql_error()); } } break; case 2: $acc_logged_query = mysql_query("SELECT hide FROM `accounts` WHERE accno = '".mysql_escape_string($acc_logged)."'") or die(mysql_error()); $acc_logged_sql = mysql_fetch_array($acc_logged_query); if($acc_logged_sql['hide'] == 1){ mysql_query("UPDATE accounts set `hide` = `hide`-1 WHERE accno='".mysql_escape_string($acc_logged)."'") or die(mysql_error()); } else { mysql_query("UPDATE accounts set `hide` = `hide`+1 WHERE accno='".mysql_escape_string($acc_logged)."'") or die(mysql_error()); } break; case 3: $acc_logged_query = mysql_query("SELECT hidemail FROM `accounts` WHERE accno = '".mysql_escape_string($acc_logged)."'") or die(mysql_error()); $acc_logged_sql = mysql_fetch_array($acc_logged_query); if($acc_logged_sql['hidemail'] == 1){ mysql_query("UPDATE accounts set `hidemail` = `hidemail`-1 WHERE accno='".mysql_escape_string($acc_logged)."'") or die(mysql_error()); } else { mysql_query("UPDATE accounts set `hidemail` = `hidemail`+1 WHERE accno='".mysql_escape_string($acc_logged)."'") or die(mysql_error()); } break; } header("Location: account.php"); } break; #####DELETE CHARACTER##### case "delete": if ((!isset($acc_logged) && isset($pass_logged) && $acc_logged != null && $acc_logged != "" && $pass_logged != null && $pass_logged != "")) header("Location: index.php"); else { include ('top.inc.php'); connect_db(); $char = $_GET['charname']; $passin = $_POST['password']; $query = mysql_query("SELECT * FROM players WHERE (account = '".mysql_escape_string($acc_logged)."' AND name = '".mysql_escape_string($char)."')") or die(mysql_error()); $query_sql = mysql_fetch_array($query); $acc_logged_query = mysql_query("SELECT * FROM `accounts` WHERE (`accno` = '".mysql_escape_string($acc_logged)."') ") or die(mysql_error()); $acc_logged_sql = mysql_fetch_array($acc_logged_query); if($acc_logged_sql['password'] == $passin) { if(mysql_num_rows($query) == 0) { echo '<h2>Error</h2>'; echo '<p>This is not you char, or it does not exist.</p>'; include ('footer.inc.php'); die; } else { $query_sql['id'] = mysql_escape_string($query_sql['id']); $skills = "DELETE FROM skills where player = '" .mysql_escape_string($query_sql['id']). "'"; mysql_query($skills) or die(mysql_error()); $deaths = "DELETE FROM deathlist where player = '" .mysql_escape_string($query_sql['id']). "'"; mysql_query($deaths) or die(mysql_error()); $items = "DELETE FROM items where player = '" .mysql_escape_string($query_sql['id']). "'"; mysql_query($items) or die(mysql_error()); $Sql = "DELETE FROM players WHERE account='".mysql_escape_string($_SESSION['account'])."' AND id = '".mysql_escape_string($query_sql['id'])."'"; if (!$Result = mysql_query($Sql)){ echo "Error at updating.<br />\n"; echo "Error is: <b>" . mysql_error() . "</b><br/>\n"; echo "Error in SQL: <b>" . $Sql . "</b><br/>\n"; die(); } else { echo '<h1>Congratulations!</h1>'; echo '<p>You have now deleted ' .$query_sql['name']. ' from your account. <br />Please click <a href="account.php">here</a> to go back home!</p>'; include ('footer.inc.php'); die; } } } else { ?> <h1>Character deletion:</h1> <p>You want to delete: <a href="info.php?act=players&char=<? echo $char;?>"><? echo $char;?></a></p> <form action="account.php?page=delete&charname=<?=$char;?>" method="POST"> <p>Password: <input name="password" type="password" value="" class="textfield"></p> <input type="Submit" value="Delete Character"> <input type="Reset" value="Clear Form"> </form> <p><a href="account.php">Return home.</a></p> <?php } } break; #####LOGIN##### case "login": $acc_logged = $_REQUEST['account']; $pass_logged = $_REQUEST['password']; if (isset($acc_logged) && isset($pass_logged)) { connect_db(); $query = mysql_query("SELECT * FROM `accounts` WHERE (`accno` = '".mysql_escape_string($acc_logged)."' AND `password` = '".mysql_escape_string($pass_logged)."') "); if(mysql_num_rows($query) == 1) { $sql = mysql_fetch_array($query); $_SESSION["account"] = $acc_logged; $_SESSION["password"] = $pass_logged; header ("Location: account.php"); } else { header ("Location: index.php"); } } else { header ("Location: index.php"); } break; #####LOGOUT##### case "logout": session_unset(); header("Location: index.php"); break; #####REGISTER##### case "register": include ('top.inc.php'); connect_db(); $error = 0; $id = 0; $id++; $mail = $_POST['mail']; $acc_logged = $_POST['account']; $pass_logged = $_POST['password']; $hidemail = $_POST['hidemail']; $rlname = $_POST['rlname']; $location = $_POST['location']; $show = $_POST['hide']; $md = md5($acc_logged); if (isset($acc_logged) && isset($pass_logged) && $acc_logged != "" && $pass_logged != "") { if ($acc_logged == "111111" || $acc_logged == "1") { echo "<h1>Error!</h1><p>Due to safetey reasons this account number is blocked!</p><br />"; $error = 1; } if (strlen($acc_logged) < 6 || strlen($acc_logged) > 8 || strlen($pass_logged) < 3 || strlen($rlname) > 17 || strlen($location) > 25 || strlen($mail) > 40) { echo "<h1>Error!</h1><p>Please fill out the form correctly!</p>"; $error = 1; } else if (!is_numeric($acc_logged)) { echo "<h1>Error!</h1><p>Your account number must consist of 6 to 8 digits!</p>"; $error = 1; } else { $temp = strspn("$pass_logged", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890 "); if ($temp != strlen($pass_logged)) { echo "<h1>Error!</h1><p>Your password must consist of more then 2 letters or numbers (ABC, abc, 123 and blankspaces)!</p>"; $error = 1; } else { if ($rlname == '') { echo "<h1>Error!</h1><p>Please fill your real life name due to safety reasons.</p>"; $error = 1; } else { if ($location == '') { echo "<h1>Error!</h1><p>Please fill in your location due to safety reasons.</p>"; $error = 1; } else { if ($mail == '') { echo "<h1>Error!</h1><p>Please fill your email adress due to safety reasons.</p>"; $error = 1; } else { if ($error == 0) { $query = mysql_query('SELECT * FROM accounts WHERE (accno = '.mysql_escape_string($acc_logged).')'); if (mysql_num_rows($query) != 0) { echo("<h1>Error!</h1><p>This account number already exist. Please go <a href=\"account.php?page=register\">back</a> and refill the form.</p>"); include ('footer.inc.php'); die; } //$sql = "INSERT INTO accounts(id, accno, password, type, premDays, email, blocked, rlname, location, hide, hidemail) values(NULL,'$acc_logged','$pass_logged','1','0','$mail','0', '$rlname', '$location', '$show', '$hidemail')"; $__reg['account'] = mysql_escape_string($acc_logged); $__reg['pwd'] = mysql_escape_string($pass_logged); $__reg['mail'] = mysql_escape_string($mail); $__reg['rln'] = mysql_escape_string($rlname); $__reg['loc'] = mysql_escape_string($location); $__reg['show'] = mysql_escape_string($show); $__reg['hidemail'] = mysql_escape_string($hidemail); $sql = "INSERT INTO accounts(id, accno, password, type, premDays, " . "premEnd, email, blocked, rlname, location, hide, hidemail)" . " values(NULL,'$__reg[account]','$__reg[pwd]','1','0','0'," . "'$__reg[mail]','0', '$__reg[rln]', '$__reg[loc]', " . "'$__reg[show]', '$__reg[hidemail]')"; mysql_query($sql); session_unset(); ?> <h1>Congratulations!</h1><p>Your account were successfully created. Please login to create your first character.<br /></p> <? } } } } } } } else { if ($acc_logged != "") { ?> <h1>Error!</h1><p>Please fill in all fields.</p><br /><br /> <?php } } if ($created != true) { ?> <h1>Create account:</h1> <form action="account.php?page=register" method="post"> <p>Account Number:<br /> <input name="account" type="password" value="" class="textfield" maxlength="8" /><font color="red">* <i>(6-8 digits)</i></font></p> <p>Password:<br /> <input name="password" type="password" value="" class="textfield" /><font color="red">* <i>(at least 3 characters)</i></font></p> <h1>Real life information:</h1> <p>Real name:<br /> <input name="rlname" type="text" value="" class="textfield"></p> <p>Location:<br /> <input name="location" type="text" value="" class="textfield"></p> <p>Hide real life info?<br /> Yes <input type="radio" name="hide" value="1" style="border: 0;" checked /> No <input type="radio" name="hide" value="0" style="border: 0;"></p> <p>Email adress:<br /> <input name="mail" type="text" value="" class="textfield"></p> <p>Hide Email Adress?<br /> Yes<input type="radio" name="hidemail" value="1" style="border: 0;" checked /> No <input type="radio" name="hidemail" value="0" style="border: 0;"></p> <p><font color="red">Note: The real life information is a way for you to recieve your account again if it gets hacked. So please type it in.</font></p> <br /> <input type="submit" value="Create Account" /> <input type="reset" value="Clear Form" /> </form> <?php } mysql_close(); break; #####CHANGE PASSWORD##### case "password": if ((!isset($acc_logged) && isset($pass_logged) && $acc_logged != null && $acc_logged != "" && $pass_logged != null && $pass_logged != "")) header("Location: index.php"); else { include ('top.inc.php'); connect_db(); ob_start(); $query = mysql_query("SELECT * FROM accounts WHERE (accno = '".mysql_escape_string($_SESSION['account'])."' AND password = '".mysql_escape_string($_SESSION['password'])."')") or die(mysql_error()); if(mysql_num_rows($query) == 0) { echo '<h1>Unknown error.</h1><p>Please contact the webmaster.</p>'; include ('footer.inc.php'); die; } else $query2 = mysql_query("SELECT * FROM `accounts` WHERE (`accno` = '".mysql_escape_string($acc_logged)."') ") or die(mysql_error()); while($sql = mysql_fetch_array($query2)) { echo "<h1>Change Password:</h1>"; if($sql['password'] == $_POST['opass']) { $Sql = "UPDATE accounts SET password = '".mysql_escape_string($_POST['npass'])."' WHERE accno = '".mysql_escape_string($_SESSION['account'])."' AND password = '".mysql_escape_string($_SESSION['password'])."'"; if (!$Result = mysql_query($Sql)) { echo "Error at updateing.<br/>\n"; echo "Error is: <b>" . mysql_error() . "</b><br/>\n"; echo "Error in SQL: <b>" . $Sql . "</b><br/>\n"; die(); } else { echo "<p>Succesfully changed your password.</p>"; $_SESSION['password'] = $_POST['npass']; echo '<p><a href="account.php">Return home</a></p>'; include ('footer.inc.php'); die; } } echo ' <form method="post" action="account.php?page=password"> <p>Current Password:<br /><input type="password" name="opass" size="21"></p> <p>New Password:<br /><input type="password" name="npass" size="21"></p> <p><input type="submit" value="Submit" name="submit"></p> </form> <p><a href="account.php">Return home</a></p>'; } } break; #####COMMENT##### case "comment": if ((!isset($acc_logged) && isset($pass_logged) && $acc_logged != null && $acc_logged != "" && $pass_logged != null && $pass_logged != "")) header("Location: index.php"); else { include ('top.inc.php'); connect_db(); $comment = $_POST['comment']; $query = mysql_query("SELECT * FROM players WHERE (account = '".mysql_escape_string($_SESSION['account'])."' AND name = '".mysql_escape_string($_REQUEST['charname'])."')") or die(mysql_error()); if(mysql_num_rows($query) == 0) { echo "<h1>Error</h1><p>This is not you char, or it does not exist.</p>"; include ('footer.inc.php'); die; } // elseif(isset($_POST['form'])) if ($_SERVER['REQUEST_METHOD'] == "POST") { if(strlen($_POST['comment']) > 255) { echo '<h1>Error:</h1>'; echo '<p>Your comment is too big.</p>'; include ('footer.inc.php'); die; } else { $comment = $_POST['comment']; $comment = htmlentities($comment); $Sql = "UPDATE players SET comment = '".mysql_real_escape_string($comment)."' WHERE account = '".$_SESSION['account']."' AND name = '".$_REQUEST['charname']."'"; if (!$Result = mysql_query($Sql)) { echo "<h1>Error</h1>"; echo "<p>Error in: <b>" . mysql_error() . "</b></p>"; include ('footer.inc.php'); die(); } else { echo '<h1>Congratulations!</h1>'; echo '<p>Your comment has been changed.</p>'; } } } else { $sql = mysql_fetch_assoc($query); ?> <form action="account.php?page=comment&charname=<?= $_REQUEST['charname'];?>" method="POST"> <h1>Comment edit:</h1> <p> <textarea name="comment" cols="45" rows="10"> <?= stripslashes($sql['comment']); ?> </textarea> </p> <input type="Submit" value="Edit comment" name="form"> <input type="Reset" value="Clear Form"> </form> <? } echo '<p><a href="account.php">Return home</a></p>'; } break; #####CHARACTER CREATE FORM##### case "char": if ((!isset($acc_logged) && isset($pass_logged) && $acc_logged != null && $acc_logged != "" && $pass_logged != null && $pass_logged != "")) header("Location: index.php"); else { include ('top.inc.php'); connect_db(); $check = mysql_query('SELECT * FROM players WHERE (name = '.mysql_escape_string($namein).')'); $acc = ""; $pass = ""; $acc = $_SESSION['account']; $pass = $_SESSION['password']; $playername = $_POST['name']; echo '<h1>Create new character:</h1>'; echo '<form action="account.php?page=chargo" method="POST">'; echo '<h2>Name:</h2>'; echo '<input type="text" name="name" class="textfield" maxlength="'.$charlenght.'" /><br />'; echo '<br /><h2>Vocation:</h2>'; if ($chartype == 'rook') { echo '<input type="radio" name="voc" value="0" style="border: 0;" checked /> No Vocation<br />'; } else { echo '<input type="radio" name="voc" value="1" style="border: 0;" checked /> Sorcerer<br />'; echo '<input type="radio" name="voc" value="2" style="border: 0;" /> Druid<br />'; echo '<input type="radio" name="voc" value="3" style="border: 0;" /> Paladin<br />'; echo '<input type="radio" name="voc" value="4" style="border: 0;" /> Knight<br />'; } echo '<br /><h2>Sex:</h2>'; echo '<input type="radio" name="sex" value="1" style="border: 0;" checked /> Male<br />'; echo '<input type="radio" name="sex" value="0" style="border: 0;" /> Female<br />'; echo '<br />'; echo '<input type="submit" value="Create" />'; } break; #####CREATE CHARACTER ACTION##### case "chargo": if ((!isset($acc_logged) && isset($pass_logged) && $acc_logged != null && $acc_logged != "" && $pass_logged != null && $pass_logged != "")) header("Location: index.php"); else { include ('top.inc.php'); connect_db(); ob_start(); $error = 0; $namein = preg_replace('/\s\s+/', ' ', $_POST['name']); $vocin = (int)$_POST['voc']; $sexin = (int)$_POST['sex']; $check = mysql_query("SELECT * FROM players WHERE name = '".mysql_escape_string($namein)."' LIMIT 1") or die(mysql_error()); if ($sexin != 0 && $sexin != 1) { $error_msg = 'Invalid sex.'; $error++; } elseif( ( $vocin != 0 && $chartype == 'rook' ) || ( ( $vocin < 1 || $vocin > 4 ) && $chartype != 'rook' ) ) { $error_msg = 'Invalid vocation.'; $error++; } elseif ($namein == "" || $_POST['sex'] == "" || $_POST['voc'] == "") { $error_msg = 'You did not fill in all fields.'; $error++; } elseif(!preg_match("/^[a-zA-Z][a-zA-Z ]*[a-zA-Z]$/", $namein)) { $error_msg = 'Your name contains illegal characters.'; $error++; } elseif(preg_match("/[ ]{2,}/", $namein)) { $error_msg = 'Check the ammount of spaces in your nickname.'; $error++; } elseif(preg_match("/^gm/i", $namein)) { $error_msg = 'You may not create a Gamemaster.'; $error++; } elseif(preg_match("/^premium/i", $namein)) { $error_msg = 'You may not create a Gamemaster.'; $error++; } elseif(preg_match("/^prem/i", $namein)) { $error_msg = 'You may not create a Gamemaster.'; $error++; } elseif(preg_match("/^admin/i", $namein)) { $error_msg = 'You may not create a Gamemaster.'; $error++; } elseif(preg_match("/^vip/i", $namein)) { $error_msg = 'You may not create a Gamemaster.'; $error++; } elseif(preg_match("/^suport/i", $namein)) { $error_msg = 'You may not create a Gamemaster.'; $error++; } elseif(preg_match("/^account/i", $namein)) { $error_msg = 'You may not create a Gamemaster.'; $error++; } elseif(preg_match("/^adm/i", $namein)) { $error_msg = 'You may not create a Gamemaster.'; $error++; } elseif(preg_match("/^cm/i", $namein)) { $error_msg = 'You may not create a God.'; $error++; } elseif(preg_match("/^supote/i", $namein)) { $error_msg = 'You may not create a God.'; $error++; } elseif(preg_match("/^g o d/i", $namein)) { $error_msg = 'You may not create a God.'; $error++; } elseif(preg_match("/^g m/i", $namein)) { $error_msg = 'You may not create a God.'; $error++; } elseif(preg_match("/^npc/i", $namein)) { $error_msg = 'You may not create a God.'; $error++; } elseif(preg_match("/^lgm/i", $namein)) { $error_msg = 'You may not create a God.'; $error++; } elseif(preg_match("/^lgod/i", $namein)) { $error_msg = 'You may not create a God.'; $error++; } elseif(preg_match("/^norwa/i", $namein)) { $error_msg = 'You may not create a God.'; $error++; } elseif(preg_match("/^gud/i", $namein)) { $error_msg = 'You may not create a God.'; $error++; } elseif(preg_match("/^gamemaster/i", $namein)) { $error_msg = 'You may not create a Gamemaster.'; $error++; } elseif(preg_match("/^god/i", $namein)) { $error_msg = 'You may not create a God.'; $error++; } elseif(preg_match("/^god/i", $namein)) { $error_msg = 'You may not create a God.'; $error++; } elseif(mysql_num_rows($check) != 0) { $error_msg = 'The character name is taken. Please go <a href="create_character.php">back</a>.'; $error++; } elseif (strlen($namein) < 2 || strlen($namein) > $charlenght) { $error_msg = 'You may not have characters with more than '.$charlenght.' characters.'; $error++; } if ($error != 0) { echo '<h1>Error</h1><p>'.$error_msg.'</p>'; include ('footer.inc.php'); } else { $namein = mysql_escape_string($namein); // No voc settings. if($vocin == 0) { mysql_query("INSERT INTO players(name, access, account, level, vocation," . " cid, health, healthmax, direction, experience, lookbody, lookfeet, " . "lookhead, looklegs, looktype, maglevel, mana, manamax, manaspent, " . "masterpos, pos, speed, cap, maxdepotitems, food, sex, guildid, " . "guildrank, guildnick, lastlogin, lastip, save, redskulltime, redskull)" . " values('".$namein."','0','$acc_logged','$startlvl','0','675','" .$novoc['hp'] . "','" .$novoc['hp']. "','2','$startexp','116','116','116','116','128','" . $novoc['mag']. "','" .$novoc['mana']. "','" .$novoc['mana']. "','0','$templepos','$templepos','$startspeed','" .$novoc['cap']. "','$maxdepotitems','0','$sexin','0','','','0','0','1','0','0')") or die(mysql_error()); $query2 = mysql_query("SELECT * FROM `players` WHERE (`name` = '".$namein."') ") or die(mysql_error()); while($sql2 = mysql_fetch_array($query2)) { $playerid = $sql2['id']; } $item1 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','1','0','0','2461','0','0','0','','')"; $item2 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','2','0','0','2170','0','0','0','','')"; $item3 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','3','0','0','1988','0','0','0','','')"; $item4 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','4','0','0','2467','0','0','0','','')"; $item5 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','5','0','0','2512','0','0','0','','')"; $item6 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','6','0','0','2398','0','0','0','','')"; $item7 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','7','0','0','2649','0','0','0','','')"; $item8 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','8','0','0','2643','0','0','0','','')"; $item10 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','10','0','0','2120','0','0','0','','')"; $skills1 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','0','" .$novoc['fist']. "','0')"; $skills2 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','1','" .$novoc['club']. "','0')"; $skills3 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','2','" .$novoc['sword']. "','0')"; $skills4 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','3','" .$novoc['axe']. "','0')"; $skills5 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','4','" .$novoc['dist']. "','0')"; $skills6 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','5','" .$novoc['shield']. "','0')"; $skills7 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','6','" .$novoc['fish']. "','0')"; mysql_query($item1) or die(mysql_error()); mysql_query($item2) or die(mysql_error()); mysql_query($item3) or die(mysql_error()); mysql_query($item4) or die(mysql_error()); mysql_query($item5) or die(mysql_error()); mysql_query($item6) or die(mysql_error()); mysql_query($item7) or die(mysql_error()); mysql_query($item8) or die(mysql_error()); mysql_query($item10) or die(mysql_error()); mysql_query($skills1) or die(mysql_error()); mysql_query($skills2) or die(mysql_error()); mysql_query($skills3) or die(mysql_error()); mysql_query($skills4) or die(mysql_error()); mysql_query($skills5) or die(mysql_error()); mysql_query($skills6) or die(mysql_error()); mysql_query($skills7) or die(mysql_error()); } // Sorcerer settings. elseif($vocin == 1) { mysql_query("INSERT INTO players(name, access, account, level, vocation, cid, health, healthmax, direction, experience, lookbody, lookfeet, lookhead, looklegs, looktype, maglevel, mana, manamax, manaspent, masterpos, pos, speed, cap, maxdepotitems, food, sex, guildid, guildrank, guildnick, lastlogin, lastip, save, redskulltime, redskull) values('$namein','0','$acc_logged','$startlvl','1','675','" .$sorc['hp']. "','" .$sorc['hp']. "','2','$startexp','116','116','116','116','128','" .$sorc['mag']. "','" .$sorc['mana']. "','" .$sorc['mana']. "','0','$templepos','$templepos','$startspeed','" .$sorc['cap']. "','$maxdepotitems','0','$sexin','0','','','0','0','1','0','0')") or die(mysql_error()); $query2 = mysql_query("SELECT * FROM `players` WHERE (`name` = '".$namein."') ") or die(mysql_error()); while($sql2 = mysql_fetch_array($query2)) { $playerid = $sql2['id']; } $item1 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','1','0','0','2461','0','0','0','','')"; $item2 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','2','0','0','2170','0','0','0','','')"; $item3 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','3','0','0','1988','0','0','0','','')"; $item4 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','4','0','0','2467','0','0','0','','')"; $item5 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','5','0','0','2512','0','0','0','','')"; $item6 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','6','0','0','2190','0','0','0','','')"; $item7 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','7','0','0','2649','0','0','0','','')"; $item8 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','8','0','0','2643','0','0','0','','')"; $item10 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','10','0','0','2120','0','0','0','','')"; $skills1 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','0','" .$sorc['fist']. "','0')"; $skills2 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','1','" .$sorc['club']. "','0')"; $skills3 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','2','" .$sorc['sword']. "','0')"; $skills4 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','3','" .$sorc['axe']. "','0')"; $skills5 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','4','" .$sorc['dist']. "','0')"; $skills6 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','5','" .$sorc['shield']. "','0')"; $skills7 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','6','" .$sorc['fish']. "','0')"; mysql_query($item1) or die(mysql_error()); mysql_query($item2) or die(mysql_error()); mysql_query($item3) or die(mysql_error()); mysql_query($item4) or die(mysql_error()); mysql_query($item5) or die(mysql_error()); mysql_query($item6) or die(mysql_error()); mysql_query($item7) or die(mysql_error()); mysql_query($item8) or die(mysql_error()); mysql_query($item10) or die(mysql_error()); mysql_query($skills1) or die(mysql_error()); mysql_query($skills2) or die(mysql_error()); mysql_query($skills3) or die(mysql_error()); mysql_query($skills4) or die(mysql_error()); mysql_query($skills5) or die(mysql_error()); mysql_query($skills6) or die(mysql_error()); mysql_query($skills7) or die(mysql_error()); } // Druid settings. elseif($vocin == 2) { mysql_query("INSERT INTO players(name, access, account, level, vocation, cid, health, healthmax, direction, experience, lookbody, lookfeet, lookhead, looklegs, looktype, maglevel, mana, manamax, manaspent, masterpos, pos, speed, cap, maxdepotitems, food, sex, guildid, guildrank, guildnick, lastlogin, lastip, save, redskulltime, redskull) values('$namein','0','$acc_logged','$startlvl','2','675','" .$druid['hp']. "','" .$druid['hp']. "','2','$startexp','116','116','116','116','128','" .$druid['mag']. "','" .$druid['mana']. "','" .$druid['mana']. "','0','$templepos','$templepos','$startspeed','" .$druid['cap']. "','$maxdepotitems','0','$sexin','0','','','0','0','1','0','0')") or die(mysql_error()); $query2 = mysql_query("SELECT * FROM `players` WHERE (`name` = '".$namein."') ") or die(mysql_error()); while($sql2 = mysql_fetch_array($query2)) { $playerid = $sql2['id']; } $item1 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','1','0','0','2461','0','0','0','','')"; $item2 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','2','0','0','2170','0','0','0','','')"; $item3 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','3','0','0','1988','0','0','0','','')"; $item4 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','4','0','0','2467','0','0','0','','')"; $item5 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','5','0','0','2512','0','0','0','','')"; $item6 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','6','0','0','2182','0','0','0','','')"; $item7 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','7','0','0','2649','0','0','0','','')"; $item8 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','8','0','0','2643','0','0','0','','')"; $item10 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','10','0','0','2120','0','0','0','','')"; $skills1 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','0','" .$druid['fist']. "','0')"; $skills2 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','1','" .$druid['club']. "','0')"; $skills3 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','2','" .$druid['sword']. "','0')"; $skills4 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','3','" .$druid['axe']. "','0')"; $skills5 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','4','" .$druid['dist']. "','0')"; $skills6 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','5','" .$druid['shield']. "','0')"; $skills7 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','6','" .$druid['fish']. "','0')"; mysql_query($item1) or die(mysql_error()); mysql_query($item2) or die(mysql_error()); mysql_query($item3) or die(mysql_error()); mysql_query($item4) or die(mysql_error()); mysql_query($item5) or die(mysql_error()); mysql_query($item6) or die(mysql_error()); mysql_query($item7) or die(mysql_error()); mysql_query($item8) or die(mysql_error()); mysql_query($item10) or die(mysql_error()); mysql_query($skills1) or die(mysql_error()); mysql_query($skills2) or die(mysql_error()); mysql_query($skills3) or die(mysql_error()); mysql_query($skills4) or die(mysql_error()); mysql_query($skills5) or die(mysql_error()); mysql_query($skills6) or die(mysql_error()); mysql_query($skills7) or die(mysql_error()); } // Paladin settings. elseif($vocin == 3) { mysql_query("INSERT INTO players(name, access, account, level, vocation, cid, health, healthmax, direction, experience, lookbody, lookfeet, lookhead, looklegs, looktype, maglevel, mana, manamax, manaspent, masterpos, pos, speed, cap, maxdepotitems, food, sex, guildid, guildrank, guildnick, lastlogin, lastip, save, redskulltime, redskull) values('$namein','0','$acc_logged','$startlvl','3','675','" .$paladin['hp']. "','" .$paladin['hp']. "','2','$startexp','116','116','116','116','128','" .$paladin['mag']. "','" .$paladin['mana']. "','" .$paladin['mana']. "','0','$templepos','$templepos','$startspeed','" .$paladin['cap']. "','$maxdepotitems','0','$sexin','0','','','0','0','1','0','0')") or die(mysql_error()); $query2 = mysql_query("SELECT * FROM `players` WHERE (`name` = '".$namein."') ") or die(mysql_error()); while($sql2 = mysql_fetch_array($query2)) { $playerid = $sql2['id']; } $item1 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','1','0','0','2461','0','0','0','','')"; $item2 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','2','0','0','2170','0','0','0','','')"; $item3 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','3','0','0','1988','0','0','0','','')"; $item4 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','4','0','0','2467','0','0','0','','')"; $item5 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','5','0','0','2512','0','0','0','','')"; $item6 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','6','0','0','3964','0','0','0','','')"; $item7 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','7','0','0','2649','0','0','0','','')"; $item8 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','8','0','0','2643','0','0','0','','')"; $item10 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','10','0','0','2120','0','0','0','','')"; $skills1 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','0','" .$paladin['fist']. "','0')"; $skills2 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','1','" .$paladin['club']. "','0')"; $skills3 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','2','" .$paladin['sword']. "','0')"; $skills4 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','3','" .$paladin['axe']. "','0')"; $skills5 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','4','" .$paladin['dist']. "','0')"; $skills6 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','5','" .$paladin['shield']. "','0')"; $skills7 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','6','" .$paladin['fish']. "','0')"; mysql_query($item1) or die(mysql_error()); mysql_query($item2) or die(mysql_error()); mysql_query($item3) or die(mysql_error()); mysql_query($item4) or die(mysql_error()); mysql_query($item5) or die(mysql_error()); mysql_query($item6) or die(mysql_error()); mysql_query($item7) or die(mysql_error()); mysql_query($item8) or die(mysql_error()); mysql_query($item10) or die(mysql_error()); mysql_query($skills1) or die(mysql_error()); mysql_query($skills2) or die(mysql_error()); mysql_query($skills3) or die(mysql_error()); mysql_query($skills4) or die(mysql_error()); mysql_query($skills5) or die(mysql_error()); mysql_query($skills6) or die(mysql_error()); mysql_query($skills7) or die(mysql_error()); } // Knight settings. elseif($vocin == 4) { mysql_query("INSERT INTO players(name, access, account, level, vocation, cid, health, healthmax, direction, experience, lookbody, lookfeet, lookhead, looklegs, looktype, maglevel, mana, manamax, manaspent, masterpos, pos, speed, cap, maxdepotitems, food, sex, guildid, guildrank, guildnick, lastlogin, lastip, save, redskulltime, redskull) values('$namein','0','$acc_logged','$startlvl','4','675','" .$knight['hp']. "','" .$knight['hp']. "','2','$startexp','116','116','116','116','128','" .$knight['mag']. "','" .$knight['mana']. "','" .$knight['mana']. "','0','$templepos','$templepos','$startspeed','" .$knight['cap']. "','$maxdepotitems','0','$sexin','0','','','0','0','1','0','0')") or die(mysql_error()); $query2 = mysql_query("SELECT * FROM `players` WHERE (`name` = '".$namein."') ") or die(mysql_error()); while($sql2 = mysql_fetch_array($query2)) { $playerid = $sql2['id']; } $item1 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','1','0','0','2461','0','0','0','','')"; $item2 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','2','0','0','2170','0','0','0','','')"; $item3 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','3','0','0','1988','0','0','0','','')"; $item4 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','4','0','0','2467','0','0','0','','')"; $item5 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','5','0','0','2512','0','0','0','','')"; $item6 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','6','0','0','2409','0','0','0','','')"; $item7 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','7','0','0','2649','0','0','0','','')"; $item8 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','8','0','0','2643','0','0','0','','')"; $item10 = "INSERT INTO items(player, slot, sid, pid, type, number, actionid, decaystate, text, specialdesc) values('$playerid','10','0','0','2120','0','0','0','','')"; $skills1 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','0','" .$knight['fist']. "','0')"; $skills2 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','1','" .$knight['club']. "','0')"; $skills3 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','2','" .$knight['sword']. "','0')"; $skills4 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','3','" .$knight['axe']. "','0')"; $skills5 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','4','" .$knight['dist']. "','0')"; $skills6 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','5','" .$knight['shield']. "','0')"; $skills7 = "INSERT INTO skills(player, id, skill, tries) values('$playerid','6','" .$knight['fish']. "','0')"; mysql_query($item1) or die(mysql_error()); mysql_query($item2) or die(mysql_error()); mysql_query($item3) or die(mysql_error()); mysql_query($item4) or die(mysql_error()); mysql_query($item5) or die(mysql_error()); mysql_query($item6) or die(mysql_error()); mysql_query($item7) or die(mysql_error()); mysql_query($item8) or die(mysql_error()); mysql_query($item10) or die(mysql_error()); mysql_query($skills1) or die(mysql_error()); mysql_query($skills2) or die(mysql_error()); mysql_query($skills3) or die(mysql_error()); mysql_query($skills4) or die(mysql_error()); mysql_query($skills5) or die(mysql_error()); mysql_query($skills6) or die(mysql_error()); mysql_query($skills7) or die(mysql_error()); } echo '<h1>Congratulations</h1><p>Successfully created character '.$namein.'.<br />Please click <a href="account.php">here </a>to go back home.</p>'; } } break; ##### ACCOUNT RECOVERY ##### case "lost": include('top.inc.php'); connect_db(); echo '<h1>Lost account interface:</h1>'; if ($_POST['op'] == "recuperar") { if($_POST['tipo'] == "email") { if(isset($_POST['email']) && $_POST['email'] != "") { $acc_query = mysql_query("SELECT * FROM `accounts` WHERE (`email` = '" .mysql_escape_string($_POST['email']). "') LIMIT 1"); if(mysql_num_rows($acc_query)==0) { $error='Invalid e-mail.'; } while($acc_sql=mysql_fetch_array($acc_query)) { $rec_acc=$acc_sql['accno']; $rec_pass=$acc_sql['password']; $endereco=$acc_sql['email']; $nome=$acc_sql['rlname']; } } else { $error='You did not fill in the field.'; } if(empty($error)) { require("class.phpmailer.php"); $mail = new PHPMailer(); // To load the Portuguese version $mail->SetLanguage("br", "language/"); $mail->IsSMTP(); // set mailer to use SMTP $mail->Host = "ssl://smtp.gmail.com"; // specify main and backup server $mail->SMTPAuth = true; // turn on SMTP authentication $mail->Username = "[email protected]"; // SMTP username $mail->Password = "dohc2007"; // SMTP password $mail->From = "[email protected]"; $mail->FromName = "Viking Server"; $mail->AddAddress($endereco, $nome); // name is optional $mail->AddReplyTo("[email protected]", "Viking Server"); $mail->WordWrap = 50; // set word wrap to 50 characters $mail->IsHTML(true); // set email format to HTML $mail->Subject = "Account information"; $mail->Body = "<p>Dear Viking player,</p> <p>Here is your login information:</p> <p><b>Account number:</b> " .$rec_acc. "<br /> <b>Password:</b> " .$rec_pass. "</p> <br /><br /><p>See you in Viking Server!<br /> Your Viking Server Team</p>"; $mail->AltBody = "Account number: " .$rec_acc. " || Password: " .$rec_pass. ""; if(!$mail->Send()) { echo "The message cannot sended. <p>"; echo "Mailer Error: " . $mail->ErrorInfo; echo "</p><p>Inform the Viking-Server Suport about this error: [email protected]</p>"; exit; } echo "<p>Email sent successfully.</p>"; } else { echo '<p>' .$error. ' Please turn <a href="account.php?page=lost">back</a>.</p>'; } } else if($_POST['tipo'] == "account") { if(isset($_POST['account']) && $_POST['account'] != "") { $acc_query = mysql_query("SELECT * FROM `accounts` WHERE (`accno` = '" .mysql_escape_string($_POST['account']). "') LIMIT 1"); if(mysql_num_rows($acc_query)==0) { $error='Invalid account number.'; } while($acc_sql=mysql_fetch_array($acc_query)) { $rec_acc=$acc_sql['accno']; $rec_pass=$acc_sql['password']; $endereco=$acc_sql['email']; $nome=$acc_sql['rlname']; } } else { $error='You did not fill in the field.'; } if(empty($error)) { require("class.phpmailer.php"); $mail = new PHPMailer(); // To load the Portuguese version $mail->SetLanguage("br", "language/"); $mail->IsSMTP(); // set mailer to use SMTP $mail->Host = "ssl://smtp.gmail.com"; // specify main and backup server $mail->SMTPAuth = true; // turn on SMTP authentication $mail->Username = "[email protected]"; // SMTP username $mail->Password = "dohc2007"; // SMTP password $mail->From = "[email protected]"; $mail->FromName = "Viking Server"; $mail->AddAddress($endereco, $nome); // name is optional $mail->AddReplyTo("[email protected]", "Viking Server"); $mail->WordWrap = 50; // set word wrap to 50 characters $mail->IsHTML(true); // set email format to HTML $mail->Subject = "Account information"; $mail->Body = "<p>Dear Viking player,</p> <p>Here is your login information:</p> <p><b>Account number:</b> " .$rec_acc. "<br /> <b>Password:</b> " .$rec_pass. "</p> <br /><br /><p>See you in Viking Server!<br /> Your Viking Server Team</p>"; $mail->AltBody = "Account number: " .$rec_acc. " || Password: " .$rec_pass. ""; if(!$mail->Send()) { echo "The message cannot sended. <p>"; echo "Mailer Error: " . $mail->ErrorInfo; echo "</p><p>Inform the Viking-Server Suport about this error: [email protected]</p>"; exit; } echo "<p>Email sent successfully.</p>"; } else { echo '<p>' .$error. ' Please turn <a href="account.php?page=lost">back</a>.</p>'; } } } else { echo '<p>If you have forgotten your account number or password, you can request to have your account information emailed. Please fill in your registered email address or your account number.</p>'; echo '<table><tr><td align="center" width="50%"><form action="account.php?page=lost" method="post">'; echo '<br />Insert your e-mail:<br /><input type="text" class="textfield" name="email">'; echo '<input type="hidden" name="op" value="recuperar"><input type="submit" value="Send"><input type="hidden" name="tipo" value="email"></form></td>'; echo '<td align="center" width="50%"><form action="account.php?page=lost" method="post">'; echo '<br />Insert your account number:<br /><input type="text" class="textfield" name="account">'; echo '<input type="hidden" name="op" value="recuperar"><input type="submit" value="Send"><input type="hidden" name="tipo" value="account"></form></td></tr></table>'; } break; } include ('footer.inc.php'); ?>
  7. Fala ai mens, blz? Seguinte acabei de passar o site pra um host dedicado pra site(cpanel), ate ai tudo bem. Mas testando aqui vi que não tava criando as guilds, logo apos colocar o nome da guild e clickar em "create" o site envia para um pagina em branco. Mas isso não acontece no localhost ele vai normalmente. Segue as img abaixo Obs: o site tem ssl, não sei se influencia em algo relacionado a isso. Quem poder da uma moralzinha, a firma agradece ;)
  8. Bom dia, quero pedir ajuda a vcs, pois o shop entrega o item normal no char, já o addon ele nao entrega. Ao comprar qualquer item no site, e se o item nao for entregue ao player, ele fica parado em z_otcomun..., mais quando o player receb o item sai do z_ots.. e vai pro z_shophisotry, simplemente o addon fica parado no z_ots, ele nao e entregue,e as vezes ele da um de doido e acaba entregando pro player, mais o player nao ganha o addon, e como se tivesse comprado, sido entregue, e não recebe o addon. OTX BASED TFS 1.2
  9. Visualize o website Downloads Download Mega Scan Créditos: Shadowcores por disponibilizar @Daniel por postar
  10. Aí suave? Mostro aqui meu projetinho de web em modern aac. Tentei simplificar o máximo... Por favor, avaliem, idéias do que mudar ou acrescentar serão bem vindas! obrigado... imagens zoadas...?
  11. Olá, vou mostrar à vocês meus últimos layouts. 1 - Shinobi Adventures (já vendido) tanto a logo quanto o site foram feitos por mim. 2 - NoName (à venda) - Layout de pokémon.
  12. Este script carrega Spells.xml quando solicitado pelo usuário no painel admin, e cria um arquivo php salvando todas as magias em arrays. Ele tem opções de classificação exatamente como a página do Tibia. Ele funciona com ambas as distribuições 0.2 e 0.3. Preview: Vamos ao tutorial: Configuração: engine/function/general.php Em ?> Adicione function build_spells($xml, $display_groups) { $t_count = 0; $rune = array(); $string = '<?php'."\n".'#Generated spells file from admin panel'."\n".'#Edit at your own risk!'; $string .= "\n".'$show_spells_groups = '.($display_groups ? 'true' : 'false').';'."\n".'$spells = array('; foreach($xml as $key => $value) { if($value['lvl']) { if($key == 'rune') { if($display_groups) { if($value['group'] == NULL) { echo '<span style="color:orange;font-weight:bold">WARNING: Group not found at spell "'.$value['name'].'", set to "Attack".</span><br>'; } $rune[(string)$value['name']] = ($value['group'] == NULL) ? 'Attack' : $value['group']; } continue; } $t_count++; $string .= "\n\t".'array('; if($display_groups) { $string .= "\n\t\t".'"group" => '; { if($value['function'] == 'conjureRune') { $string .= '\''.ucfirst($rune[(string)$value['name']]).'\''; } else { if($value['group'] == NULL) { echo '<span style="color:orange;font-weight:bold">WARNING: Group not found at spell "'.$value['name'].'", set to "Attack".</span><br>'; } $string .= '\''.ucfirst(($value['group'] == NULL) ? 'Attack' : $value['group']).'\''; } } $string .= ','; } $string .= "\n\t\t".'"type" => '; if(config('TFSVersion') == 'TFS_02') { $string .= (($value['function'] == 'conjureRune') ? '\'Rune\'' : '\'Instant\''); } if(config('TFSVersion') == 'TFS_03') { $string .= (($value['value'] == 'conjureRune') ? '\'Rune\'' : '\'Instant\''); } $string .= ','; $string .= "\n\t\t".'"name" => "'.$value['name'].'",'; $string .= "\n\t\t".'"words" => \''.$value['words'].'\','; $string .= "\n\t\t".'"level" => '.$value['lvl'].','; $string .= "\n\t\t".'"mana" => '; $string .= (($value['mana'] == NULL) or ($value['mana'] == '')) ? '\'Var.\'' : $value['mana']; $string .= ','; $string .= "\n\t\t".'"premium" => '; if($value['prem']) { $string .= ($value['prem'] == 1) ? '\'yes\'' : '\'no\''; } else { $string .= '\'no\''; } $string .= ','; $vocs = array(); $string .= "\n\t\t".'"vocation" => array('; foreach($value->vocation as $vocation) { if(config('TFSVersion') == 'TFS_02') { $vocs[] = '\''.$vocation[0]['name'].'\''; } elseif(config('TFSVersion') == 'TFS_03') { if(strpos($vocation[0]['id'], ';') !== FALSE) { $array = explode(';', $vocation[0]['id']); foreach($array as $voc) { $vocs[] = '\''.vocation_id_to_name($voc).'\''; } } else { $vocs[] = '\''.vocation_id_to_name((int)$vocation[0]['id']).'\''; } } } if(count($vocs) < 1) foreach(config('vocations') as $id => $name) if($id > 0) $vocs[] = '\''.$name.'\''; $string .= implode(', ',$vocs).')'."\n\t".'),'; } } $string .= "\n".'); ?>'; echo('Loaded '. $t_count .' spells!<br>'); echo 'File "spell.php" '.(file_exists('spell.php') ? 'updated' : 'created').'!<br>'; $file = fopen('spell.php', 'w'); fwrite($file, $string); fclose($file); } admin.php Antes </ul> <?php include 'layout/overall/footer.php'; ?> Adicione <li> <b>Update spells from file:</b><br> <?php if (!isset($_POST['action'])) { $_POST['action'] = 'undefine'; } if ($_POST['action'] == 'upload') { $xml = $_FILES['file']; $_POST['action'] = 'undefine'; if($xml['tmp_name']) { if($xml['name'] == 'spells.xml') { $groups = (isset($_POST['show_groups']) && $_POST['show_groups'] == 'yes') ? true : false; echo 'Successfully fetched spells.xml!<br>'; echo 'Using temporal file: '. $_FILES['file']['tmp_name'] .'<br>'; build_spells(simplexml_load_file($xml['tmp_name']), $groups); } else { echo '<span style="color:red;font-weight:bold">ERROR: File "spells.xml" not found.</span>'; } } else { echo '<span style="color:red;font-weight:bold">ERROR: Upload failed.</span>'; } } ?> <form enctype='multipart/form-data' method='POST'> <input type='checkbox' name='show_groups' value='yes'> Show spells groups (Only for TFS 0.2.9+)<br> <input type='hidden' name='action' value='upload' /> <input type='file' name='file' /> <input type='submit' value='Submit' /> </form> </li> Crie o arquivo Spell.php e adicione dentro: <?php require_once 'engine/init.php'; include 'layout/overall/header.php'; echo '<h1>Spells</h1>'; if(file_exists('spell.php')) { require_once 'spell.php'; ?> <table> <tr class="yellow"> <td><b>Name</b></td> <?php if($show_spells_groups) echo '<td><b>Group</b></td>'; ?> <td><b>Type</b></td> <td><b>Exp Lvl</b></td> <td><b>Mana</b></td> <td><b>Premium</b></td> </span> </tr> <?php @$sort = $_REQUEST['sort']; if(!isset($sort)) $sort = 'name'; @$vocation = $_REQUEST['vocation']; if(!isset($vocation)) $vocation = 'vall'; if($show_spells_groups) { @$group = $_REQUEST['_group']; if(!isset($group)) $group = 'gall'; } @$type = $_REQUEST['_type']; if(!isset($type)) $type = 'tall'; @$premium = $_REQUEST['_premium']; if(!isset($premium)) $premium = 'pall'; $order = array(); foreach($spells as $key => $row) { $order[$key] = $row[$sort]; } array_multisort($order, SORT_ASC, $spells); foreach($spells as $spell) { if($vocation != 'vall') { if(!in_array($vocation, $spell['vocation'])) continue; } if($show_spells_groups && $group != 'gall') { if($spell['group'] != $group) continue; } if($type != 'tall') { if($spell['type'] != $type) continue; } if($premium != 'pall') { if($spell['premium'] != $premium) continue; } ?> <tr> <td><?php echo '<b>'.$spell['name'].'</b> ('.$spell['words'].')'; ?></td> <?php if($show_spells_groups) echo '<td>'.$spell['group'].'</td>'; ?> <td><?php echo $spell['type']; ?></td> <td><?php echo $spell['level']; ?></td> <td><?php echo $spell['mana']; ?></td> <td><?php echo $spell['premium']; ?></td> </tr> <?php } echo '</table>'; ?> <form action='spells.php' method='post'> <table> <tr class="yellow"> <td colspan=4><b>Spell Search</b></td></tr> <tr class="yellow"> <?php if($show_spells_groups) { echo'<td width=25%><b>vocation</b></td> <td width=25%><b>group</b></td> <td width=25%><b>type</b></td> <td width=25%><b>premium</b></td>';} else { echo'<td width=40%><b>vocation</b></td> <td width=30%><b>type</b></td> <td width=30%><b>premium</b></td>';}?> </tr> <tr> <td valign='top'> <input type='radio' name='vocation' value='vall' checked> all<br> <?php foreach(config('vocations') as $id => $vocation) { if($id > 0) { echo "<input type='radio' name='vocation' value='".$vocation."'> ".$vocation."<br>"; } } ?> </td> <?php if($show_spells_groups) echo" <td valign='top'> <input type='radio' name='_group' value='gall' checked> all<br> <input type='radio' name='_group' value='Attack'> attack<br> <input type='radio' name='_group' value='Healing'> healing<br> <input type='radio' name='_group' value='Support'> support</td>"; ?> <td valign='top'> <input type='radio' name='_type' value='tall' checked> all<br> <input type='radio' name='_type' value='Instant'> instant<br> <input type='radio' name='_type' value='Rune'> rune </td> <td valign='top'> <input type='radio' name='_premium' value='pall' checked> all<br> <input type='radio' name='_premium' value='no'> no<br> <input type='radio' name='_premium' value='yes'> yes </td> </tr> <tr> <td>sort by: <select name='sort'> <option value='name' selected>name <option value='words'>words <?php if($show_spells_groups) echo "<option value='group' >group"; ?> <option value='type' >type <option value='level' >exp lvl <option value='mana' >mana <option value='premium' >premium </select> </td> <td colspan='3'> <input type='submit' name='submit'> </td> </tr> </table> </form> <?php } else { echo 'This page has not been configured yet.'; }; include 'layout/overall/footer.php'; ?> Depois Adicionar o link da página ao seu layout layout padrão: /layout/menu.php Adicione na lista de páginas: <li><a href="spells.php">Spells</a></li> Fim do Tutorial ? Eu não posso garantir que ele vai trabalhar com todas as distros TFS. Lembre-se que você pode editar seu arquivo spell.php, principalmente necessário se você usar spells personalizadas. Créditos: cbrm(otland)
  13. BOAAS galera!!! Então, baixei um Gesior algum tempo atrás(não lembro onde), e vi que faltavam coisas interessantes nele, então resolvi tentar adicionar(tudo isso esse ano kkk) e CONSEGUI! Não quero enrolar, então vamos ao que interessa: Bom, algumas imagens: Latest News com Featured Article: Menu editado: Who is online? MOSTRANDO OUTFIT COM COR ATUAL!!!: Characters mostrando OUTFIT(COR ATUAL DO PLAYER), HP, MP, EXP, LEVEL e ITEMS!!!: Top guilds: Guild Wars: Downloads arrumados: Battlefield: Trade OFF: Zombie Event: Bom galera, eu adicionei: - Zombie Event page - Battlefield page - Trade Off - Arrumei a page Downloads - Featured Article - Top Guilds page - Guild Wars page - Modifiquei Who is online? e characters.php(outfit, mp, hp, exp, level) - Advanced Admin Panel - Background diferente - Menus novos - Arrumei o sistema de enviar e-mails no cadastro e lost account(falta apenas configurar) Download: https://github.com/s3kk/Gesior/archive/master.zip Scan: https://www.virustotal.com/pt/file/571b26e823c8b209daaf603313bee8d0a7dcfb962747e0c19f4f47dd42781e42/analysis/1452061171/ Database TOTALMENTE LIMPA E COMPATÍVEL: https://github.com/s3kk/Heromassa/blob/master/schemas/war_cast_mysql(gesior).sql Bugs: Obs.: Na página Downloads, se você possuir client próprio, edite em downloads.php o link para download do mesmo! Compátivel com OTS 8.6 e TFS 0.4. Créditos:
  14. O que é Tripeace? Tripeace é um site em código aberto para Tibia OT Server, sendo desenvolvido na linguagem C# .NET, principalmente para ser uma opção diferente aos sites existentes para OT Server em PHP. Tripeace é apenas o nome do projeto, nome de minha antiga guild no Tibia Global, mas será possível e fácil configurar o nome do site para o que você quiser. Quem é você, Striter?Me chamo Igor, tenho experiência profissional como desenvolvedor .NET por mais de 3 anos, principalmente como back-end. Também já trabalhei com automação de testes de sistemas e gestão de equipes de desenvolvimento. Atualmente estou desempregado. Meu GitHub: igorquintaes · GitHubMeu Portfólio: Igor Pauli QuintaesO que será necessário para hospedar o site? - Sistema operacional Windows com IIS e .NET Framework instalados e atualizados, ou Linux;- Atualizar o banco de dados do jogo com um arquivo .sql que é disponibilizado junto ao projeto;- Opcionalmente, ter o Visual Studio instalado caso queira alterar regras de negócio ou adicionar novas funcionalidades (back-end); Características e recursos - Suporte a mais de um idioma simultaneamenteO site tem uma linguagem padrão baseada no acesso do usuário, mas ele pode alterar para a linguagem que quiser em tempo real. É possível, também, adicionar facilmente novos idiomas ao projeto.- SegurançaProjetado em arquitetura em camadas, para prevenir acessos indesejados e injeções de dados. Também possui sistemas próprios de logins e criptografia, sistema de proteção a SQL Injection e de acessos não autorizados.- Multi-plataformaMesmo desenvolvido em C#, linguagem da microsoft, é possível hospedar o site tanto em um servidor Windows quanto em servidor Linux. É possível também hospedar em um local diferente ao do servidor do OT Server e do banco de dados.- ORM ao invés de consultas por SQLAcha chato trabalhar no back-end fazendo aqueles selects e updates utilizando linguagem de banco de dados? O Tripeace faz tudo isso baseado em variáveis. - Registre tudo o que aconteceA plataforma registra automaticamente o IP das pessoas, que páginas elas tentam acessar, a conta com a qual está conectada, tentativas de hack, tentativas de acessar páginas restritas, tentativas de explorar erros ou de enviar dados falsos. Tudo, e você ainda tem a opção de configurar para adicionar mais ou retirar algo que não deseja.- Painel administrativo para Gods e Game MastersCom informações sobre número de jogadores online, momentos de pico, edição de dados, bloqueio de contas, número de visitas e muito mais.- Template todo customizávelTendo conhecimento das linguagens utilizadas no front-end de um site (HTML, CSS, Javascript), é possível alterar todo o layout sem nem tocar no back-end do sistema, e nem mesmo ter o Visual Studio instalado. Dados dinâmicos para IFs, FORs, demais lógicas e variáveis estão em Razor Syntax, similar ao PHP mas sem precisar compilar com o back-end. - Sistema de postagems Para notícias, novidades, anúncios, enquetes. O que você quiser, e com comentários.- Sistema de E-mails Para anúncios, recuperação de conta, alertas, e mais!O que já está pronto? - Conexão ao banco de dados e mapeamento em variáveis;- Sistema para suporte a vários idiomas;- Sistema de registro de atividades;- Sistema seguro de login;- Criação de conta;- Criação de personagem;- Painel administrativo;- Gerenciamento de contas no painel administrativo (listar, bloquear/desbloquear acesso do site, editar, banir/desbanir do jogo);O que ainda será desenvolvido? - Gerenciamento de contas no painel administrativo (exclusão de conta);- Gerenciamento de personagens no painel administrativo;- Gerenciamento de configurações no painel administrativo;- Biblioteca- Forum (?)- Sistema de postagens;- Sistema de Guilds;- Ranking;- Sistema VIP e de pagamentos;- Formulário de contato;- E mais, muito mais!Quais ferramentas Tripeace usa? (útil para devs) - C# .NET Core as como linguagem e framework back-end;- HTML, CSS, Javascript/JQuery w Razor Syntaxe para front-end;- Entity Framework Core como ORM (trabalhar com SQL em variáveis);- NLOG para registrar atividades;- Cloudscribe para paginações;- AutoMapper para mapear e transferir objetos entre camadas;- .NET Core Identity para criar sistema de login mais seguro e à parte ao do jogo.Código fonte (Aberto, licença MIT)GitHub - igorquintaes/Tripeace: An open-source and free Open Tibia Website written in C# .NETDoações O projeto é grande, totalmente código aberto, e quem tá fazendo é um cara desempregado. Se você está curtindo o andamento das coisas, dê uma contribuição aí!Meu PayPal: [email protected]
  15. Olá galera do XTibia,venho por meio desse tópico disponibilizar um HTML que consiste em montar uma tabela para diversas utilidades. Eu tenho alguns HTML feito por min,talvez eu disponibilize aki no tk. Então sem enrrolação vamos lá. A tabela pode ser montada de diversos jeito,eu montei para uma lista de pokemon Shiny(Print da tabela feita https://imgur.com/a/HL91L ) Para adiciona-lo em seu site vá em htdocs>system>pages: Agora crie um arquivo .PHP e cole isso dentro <table border="1"> <tr> <th>Pokemon</th> <th>Forma Shiny</th> <th>Quantidade de Shiny stone</th> </tr> <tr> <td>Venusaur</td> <td>Shiny Venusaur</td> <td>7</td> Explicação: Venusaur:Nome do pokemon Shiny Venusaur:Transformação para shiny 7:Quantidade de Shiny stone Você pode usar essa tabela para outras coisas,não só para tabela de pokemons shinys,é só altera-la da maneira que você quiser. <table border="1"> <tr> <th>Primeira Tag</th> <th>Segunda tag</th> <th>Terceira tag</th> </tr> <tr> <td>Sequencia da primeira tag</td> <td>Sequencia da terceira tag</td> <td>Sequencia da terceira tag</td> Caso queira remover uma coluna Apague <th>Terceira tag</th> <td>Sequencia da terceira tag</td> Caso queira adicionar uma outra coluna <th>Quarta tag</th> <td>Sequencia da terceira tag</td> E assim por diante...
  16. Fala ae galera tava sem nada pra fazer entao decidir editar meu site, e tentei deixa parecido com do otpokemon Aea como ficou?
  17. Venho Mostrar um pouco do Meu Website(Poketibia) feito em Modern acc Por favor, avalie, dê idéias do que mudar ou acrescentar! obrigado...
  18. ola pessoal, estou tendo problema entre meu gifts.php e o meu shop.lua, fui procurar codigo para enviar o item para o personagem, coloquei o seguinte código function onThink(interval, lastExecution, thinkInterval) local result = db.getResult("SELECT * FROM shop_history WHERE `processed` = 0;") if(result:getID() ~= -1) then while(true) do cid = getCreatureByName(tostring(result:getDataString("player"))) product = tonumber(result:getDataInt("product")) itemr = db.getResult("SELECT * FROM shop_offer WHERE `id` = "..product..";") if isPlayer(cid) then local id = tonumber(itemr:getDataInt("item")) local tid = tonumber(result:getDataInt("id")) local count = tonumber(itemr:getDataInt("count")) local tipe = tonumber(itemr:getDataInt("type")) local productn = tostring(itemr:getDataString("name")) if isInArray({5,8},tipe) then if getPlayerFreeCap(cid) >= getItemWeightById(id, count) then if isContainer(getPlayerSlotItem(cid, 3).uid) then received = doAddContainerItem(getPlayerSlotItem(cid, 3).uid, id,count) if received then doPlayerSendTextMessage(cid,19, "Você Recebeu Uma >> "..productn.." << do Shop System") db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";") else doPlayerSendTextMessage(cid,19, "Desculpa, Você não tem espaço para receber o item >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Desculpa, Você não tem espaço para receber >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Desculpa, você não tem cap para receber >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)") end elseif isInArray({6,7},tipe) then if tipe == 6 then bcap = 8 bid = 1987 elseif tipe == 7 then bcap = 20 bid = 1988 end if isItemRune(id) then count = 1 end if getPlayerFreeCap(cid) >= (getItemWeightById(1987, 1) + getItemWeightById(id,count * bcap)) then local bag = doCreateItemEx(bid, 1) for i = 1,bcap do doAddContainerItem(bag, id, count) end received = doPlayerAddItemEx(getPlayerSlotItem(cid, 3).uid, bag) if received == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid,19, "You have received >> "..productn.." << from our shop system") db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";") else doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough space to receive >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough capacity to receive >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)") end end end itemr:free() if not(result:next()) then break end end result:free() end return true end fiz o teste, tem hora que ele funciona mandando infinitamente, só queria que ele envia-se 1 vez o item para bag do player, ou so desconta os points e nao recebe nada o player, minha table shop_offer tem mais q algumas colunas declaradas CREATE TABLE IF NOT EXISTS `shop_offer` ( `id` int(11) NOT NULL, `points` int(11) NOT NULL DEFAULT '0', `category` int(11) NOT NULL DEFAULT '1', `type` int(11) NOT NULL DEFAULT '1', `item` int(11) NOT NULL DEFAULT '0', `count` int(11) NOT NULL DEFAULT '0', `description` text NOT NULL, `name` varchar(256) NOT NULL alguem pode me ajudar?
  19. Boa tarde, vou tentar detalhar a minha dúvida. Deve ser idiota para alguns mas acredite, eu já quebrei a cabeça e não consegui. Atualmente eu possuo um otserver é um site hospedo na minha casa e estou melhorando aos poucos. Como todos que começam por baixo eu tbm não fui diferente, criei uma máscara no no-ip (wixglobal.sytes.net). Recebi uma ajuda de um amigo que resolveu me presentear com um domínio do godaddy, então ele comprou o wixglobal.com e me deu. A minha dor de cabeça está sendo a seguinte, todos os outros sites de OtServer aparecem assim: otserver.com/índex.php Ou seja o domínio máscara o ip do servidor deles mas permanece com a página. Já o meu, você pode clicar em qualquer página que sempre continuará na raiz aparecendo só o www.wixglobal.com Eu que estou fazendo errado ou hosts pelo Apache em casa não tem como essa configuração? Obrigado pelo atenção.
  20. Boa tarde, bom gostaria de saber se alguem sabe arrumar o erro do character, toda vez que faço um character novo ele deleta dai eu tenho que undeletar para jogar com o char
  21. Caros, Preciso de um website para o yourots 8.6 styller, baixei o Gesior, mas ele dá um erro alegando não ser TFS... Alguém poderia me ajudar?
  22. felipepcmv

    Ajuda !!!

    Galera onde posso baixar website compativel para tibia 10.97 , esta ai qual servidor que irei usar !!!
  23. Oi pessoal eu tenho um poketibia e pro site funcionar tive que modificar a porta e coloquei a :1900, porém a pessoa tem que usar o link: pokeshadow.servegame.com:1900 , alguém sabe algum jeito de retirar isso? fazer com que a pessoa acesse só por pokeshadow.servegame.com ou outro link sem a porta, e tem algum problema a porta ficar a amostra?
  24. Olá Xtibianos, tudo bem? então estou com o seguinte erro ao tentar entrar no meu site inclusive baixado aqui, trata-se do website do shadowcores postado pelo @Daniel estou com o seguinte erro Fatal error: Call to a member function fetch() on a non-object in C:\xampp\htdocs\shadow\classes\account.php on line 33 meu account.php <?php if(!defined('INITIALIZED')) exit; class Account extends ObjectData { const LOADTYPE_ID = 'id'; const LOADTYPE_NAME = 'name'; const LOADTYPE_MAIL = 'email'; public static $table = 'accounts'; public $data = array('name' => null, 'password' => null, 'premdays' => null, 'lastday' => null, 'email' => null, 'key' => null, 'create_ip' => null, 'creation' => null, 'premium_points' => null, 'page_access' => null, 'location' => null, 'rlname' => null, 'email_new' => null, 'email_new_time' => null, 'email_code' => null, 'next_email' => null, 'last_post' => null, 'flag' => null, 'vip_time' => null, 'vote' => null); public static $fields = array('id', 'name', 'password', 'premdays', 'lastday', 'email', 'key', 'create_ip', 'creation', 'premium_points', 'page_access', 'location', 'rlname', 'email_new', 'email_new_time', 'email_code', 'next_email', 'last_post', 'flag' , 'vip_time', 'vote'); public $players; public $playerRanks; public $guildAccess; public $bans; public function __construct($search_text = null, $search_by = self::LOADTYPE_ID) { if($search_text != null) $this->load($search_text, $search_by); } public function load($search_text, $search_by = self::LOADTYPE_ID) { if(in_array($search_by, self::$fields)) $search_string = $this->getDatabaseHandler()->fieldName($search_by) . ' = ' . $this->getDatabaseHandler()->quote($search_text); else new Error_Critic('', 'Wrong Account search_by type.'); $fieldsArray = array(); foreach(self::$fields as $fieldName) $fieldsArray[$fieldName] = $this->getDatabaseHandler()->fieldName($fieldName); $this->data = $this->getDatabaseHandler()->query('SELECT ' . implode(', ', $fieldsArray) . ' FROM ' . $this->getDatabaseHandler()->tableName(self::$table) . ' WHERE ' . $search_string)->fetch(); } public function loadById($id) { $this->load($id, 'id'); } public function loadByName($name) { $this->load($name, 'name'); } public function loadByEmail($mail) { $this->load($mail, 'email'); } public function save($forceInsert = false) { if(!isset($this->data['id']) || $forceInsert) { $keys = array(); $values = array(); foreach(self::$fields as $key) if($key != 'id') { $keys[] = $this->getDatabaseHandler()->fieldName($key); $values[] = $this->getDatabaseHandler()->quote($this->data[$key]); } $this->getDatabaseHandler()->query('INSERT INTO ' . $this->getDatabaseHandler()->tableName(self::$table) . ' (' . implode(', ', $keys) . ') VALUES (' . implode(', ', $values) . ')'); $this->setID($this->getDatabaseHandler()->lastInsertId()); } else { $updates = array(); foreach(self::$fields as $key) if($key != 'id') $updates[] = $this->getDatabaseHandler()->fieldName($key) . ' = ' . $this->getDatabaseHandler()->quote($this->data[$key]); $this->getDatabaseHandler()->query('UPDATE ' . $this->getDatabaseHandler()->tableName(self::$table) . ' SET ' . implode(', ', $updates) . ' WHERE ' . $this->getDatabaseHandler()->fieldName('id') . ' = ' . $this->getDatabaseHandler()->quote($this->data['id'])); } } public function getPlayers($forceReload = false) { if(!isset($this->players) || $forceReload) { $this->players = new DatabaseList('Player'); $this->players->setFilter(new SQL_Filter(new SQL_Field('account_id'), SQL_Filter::EQUAL, $this->getID())); $this->players->addOrder(new SQL_Order(new SQL_Field('name'))); } return $this->players; } /* public function getGuildRanks($forceReload = false) { if(!isset($this->playerRanks) || $forceReload) { $this->playerRanks = new DatabaseList('AccountGuildRank'); $filterAccount = new SQL_Filter(new SQL_Field('account_id', 'players'), SQL_Filter::EQUAL, $this->getID()); $filterPlayer1 = new SQL_Filter(new SQL_Field('id', 'players'), SQL_Filter::EQUAL, new SQL_Field('player_id', 'guild_membership')); $filterPlayer2 = new SQL_Filter(new SQL_Field('rank_id', 'guild_membership'), SQL_Filter::EQUAL, new SQL_Field('id', 'guild_ranks')); $filterGuild = new SQL_Filter(new SQL_Field('guild_id', 'guild_ranks'), SQL_Filter::EQUAL, new SQL_Field('id', 'guilds')); $filter = new SQL_Filter($filterAccount, SQL_Filter::CRITERIUM_AND, $filterPlayer1); $filter = new SQL_Filter($filter, SQL_Filter::CRITERIUM_AND, $filterPlayer2); $filter = new SQL_Filter($filter, SQL_Filter::CRITERIUM_AND, $filterGuild); $this->playerRanks->setFilter($filter); } return $this->playerRanks; } public function loadGuildAccess($forceReload = false) { if(!isset($this->guildAccess) || $forceReload) { $this->guildAccess = array(); foreach($this->getGuildRanks($forceReload) as $rank) if($rank->getOwnerID() == $rank->getPlayerID()) $this->guildAccess[$rank->getGuildID()] = Guild::LEVEL_OWNER; elseif(!isset($this->guildAccess[$rank->getGuildID()]) || $rank->getLevel() > $this->guildAccess[$rank->getGuildID()]) $this->guildAccess[$rank->getGuildID()] = $rank->getLevel(); } } public function isInGuild($guildId, $forceReload = false) { $this->loadGuildAccess($forceReload); return isset($this->guildAccess[$guildId]); } public function getGuildLevel($guildId, $forceReload = false) { $this->loadGuildAccess($forceReload); if(isset($this->guildAccess[$guildId])) return $this->guildAccess[$guildId]; else return 0; } */ public function unban() { $this->getDatabaseHandler()->query('DELETE FROM ' . $this->getDatabaseHandler()->tableName('account_bans') . ' WHERE ' . $this->getDatabaseHandler()->fieldName('account_id') . ' = ' . $this->getDatabaseHandler()->quote($this->data['id'])); unset($this->bans); } public function loadBans($forceReload = false) { if(!isset($this->bans) || $forceReload) { $this->bans = new DatabaseList('AccountBan'); $filter = new SQL_Filter(new SQL_Field('account_id'), SQL_Filter::EQUAL, $this->data['id']); $this->bans->setFilter($filter); } } public function isBanned($forceReload = false) { $this->loadBans($forceReload); return count($this->bans) > 0; } public function getBanTime($forceReload = false) { $this->loadBans($forceReload); $lastExpires = 0; foreach($bans as $ban) { if($ban->getExpiresAt() <= 0) { $lastExpires = 0; break; } if($ban->getExpiresAt() > time() && $ban->getExpiresAt() > $lastExpires) $lastExpires = $ban->getExpiresAt(); } return $lastExpires; } public function delete() { $this->getDatabaseHandler()->query('DELETE FROM ' . $this->getDatabaseHandler()->tableName(self::$table) . ' WHERE ' . $this->getDatabaseHandler()->fieldName('id') . ' = ' . $this->getDatabaseHandler()->quote($this->data['id'])); unset($this->data['id']); } public function setID($value){$this->data['id'] = $value;} public function getID(){return $this->data['id'];} public function setName($value){$this->data['name'] = $value;} public function getName(){return $this->data['name'];} public function setPassword($value) { $this->data['password'] = Website::encryptPassword($value, $this); } public function getPassword(){return $this->data['password'];} public function setPremDays($value){$this->data['premdays'] = $value;} public function getPremDays(){return $this->data['premdays'] - (date("z", time()) + (365 * (date("Y", time()) - date("Y", $this->data['lastday']))) - date("z", $this->data['lastday']));} public function setVipDays($value){$this->data['vip_time'] = $value;} public function getVipDays(){return $this->data['vip_time'];} public function setLastDay($value){$this->data['lastday'] = $value;} public function getLastDay(){return $this->data['lastday'];} public function setMail($value){$this->data['email'] = $value;} public function getMail(){return $this->data['email'];} public function setKey($value){$this->data['key'] = $value;} public function getKey(){return $this->data['key'];} /* * Custom AAC fields * create_ip , INT, default 0 * premium_points , INT, default 0 * page_access, INT, default 0 * location, VARCHAR(255), default '' * rlname, VARCHAR(255), default '' */ public function setCreateIP($value){$this->data['create_ip'] = $value;} public function getCreateIP(){return $this->data['create_ip'];} public function setCreateDate($value){$this->data['creation'] = $value;} public function getCreateDate(){return $this->data['creation'];} public function setPremiumPoints($value){$this->data['premium_points'] = $value;} public function getPremiumPoints(){return $this->data['premium_points'];} public function setPageAccess($value){$this->data['page_access'] = $value;} public function getPageAccess(){return $this->data['page_access'];} public function setLocation($value){$this->data['location'] = $value;} public function getLocation(){return $this->data['location'];} public function setRLName($value){$this->data['rlname'] = $value;} public function getRLName(){return $this->data['rlname'];} public function setFlag($value){$this->data['flag'] = $value;} public function getFlag(){return $this->data['flag'];} /* * for compability with old scripts */ public function getEMail(){return $this->getMail();} public function setEMail($value){$this->setMail($value);} public function getPlayersList(){return $this->getPlayers();} public function getGuildAccess($guildID){return $this->getGuildLevel($guildID);} public function isValidPassword($password) { return ($this->data['password'] == Website::encryptPassword($password, $this)); } public function find($name){$this->loadByName($name);} public function findByEmail($email){$this->loadByEmail($email);} public function isPremium(){return ($this->getPremDays() > 0);} public function isVip(){return ($this->getVipDays() > 0);} public function getLastLogin(){return $this->getLastDay();} }
×
×
  • Create New...