Ir para conteúdo

leandroskt8

Campones
  • Total de itens

    53
  • Registro em

  • Última visita

  • Dias Ganhos

    1

Tudo que leandroskt8 postou

  1. Bom da rep depois pelomenos esse script tira frags e o pk. <talkaction words="!removeskull" script="tirar skull.lua"/> function onSay(cid, words, param) local S = { [3] = {price = 500000,cobrar = true,msg = "Você perdeu seu white skull e frags.", premium = true}, [4] = {price = 1000000,cobrar = true,msg = "Você perdeu seu red skull e frags", premium = true}, [5] = {price = 1500000,cobrar = true,msg = "Você perdeu seu black skull e frags", premium = true}, } local skull = S[getCreatureSkullType(cid)] if(not skull) then doPlayerSendCancel(cid,"Você nao está com nenhum tipo de skull.") return TRUE elseif skull.premium == true and not isPremium(cid) then doPlayerSendCancel(cid,"Apenas players premium podem remover skull.") return TRUE elseif skull.cobrar == true and doPlayerRemoveMoney(cid, skull.price) == FALSE then doPlayerSendCancel(cid,"Você não tem " .. skull.price .. " gps para remover sua skull.") doSendMagicEffect(getPlayerPosition(cid), 2) return TRUE end db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")") doCreatureSetSkullType(cid, 0) doPlayerSendTextMessage(cid, 22,skull.msg) doSendMagicEffect(getPlayerPosition(cid), 36) return TRUE end
  2. tenta ai . [/b] [b]local id_coracao = 2346 local corp = {3058,3059} function onDeath(cid, corpse, deathList) local pos = getThingPos(cid) local item = doCreateItem(id_coracao,1,pos) doItemSetAttribute(item, 'description','Este crânio pertence ao player '..getCreatureName(cid)..' que foi morto por/pela '..getCreatureName(deathList[1])) addEvent(removecorpo,300,pos) return true end function removecorpo(pos) for s =1,254 do local c = getThingFromPos({x=pos.x,y=pos.y,z=pos.z,stackpos=s}) if isInArray(corp,c.itemid) then doRemoveThing(c.uid) break end end end que não der certo pede alguém arrumar.
  3. Script funciona da seguinte maneira quando player morre para alguém, dropa um coração igual esse da imagem com as informação de quem mato.mais quando player morre não aparece nada no corpo. ajuda ai pf darei rep+ local id_coracao = 2346 local corp = {3058,3059} function onDeath(cid, corpse, deathList) local pos = getThingPos(cid) local item = doCreateItem(id_coracao,1,pos) doItemSetAttribute(item, 'description','Este crânio pertence ao player '..getCreatureName(cid)..' que foi morto por/pela '..getCreatureName(deathList[1])) addEvent(removecorpo,300,pos) return true end function removecorpo(pos) for s =1,254 do local c = getThingFromPos({x=pos.x,y=pos.y,z=pos.z,stackpos=s}) if isInArray(corp,c.itemid) then doRemoveThing(c.uid) break end end end
  4. bom de mais, acho que velocidade ta 5x melhor
  5. Tipo vou explicar 1º Tirar caixa de criar characters. 2º DEPOIS E SO CRIA CHARACTER NORMAL. ENTRANDO CONTA QUE CABEI DE FAZER. 3º Agora so criar char normal. por ultimo. Por isso quero tirar parate de criar character la começo.
  6. tenta usar outro navegador google chrome aqui em casa ta normal.
  7. leandroskt8

    Vip Brilhante

    só pega STORARAGE seu vip e coloca script eu tenho esse sistema meu ot ,.
  8. quero só que retira essa parte de criar character quero que só cria conta ai para criar character ele vai loga e criar char.
  9. Por favor ficarei muito agradecido sei que você tem capacidade de arrumar,darei rep com prazer :)você conseguir estará salvando meu ot.
  10. Então player nase normal no templo, problema e quando char morre que da Mais tipo que cara for criar outro char em play now ai morre vai para templo normal só quando cria 1 char em creat account que não da
  11. Bom eu quero saber oque tem de errado nesse script ou que tenho que injetar la sql, porque cria char normal ai loga normal templo mais quando morre da. Ai eu olhei as posições quando char morre em phpmyadmin fica tudo 0 mais sendo que ta tudo certo as posições em accountmanagement.php, e config.php agora tem que comfigurar em creat account.php Script da creat account.php <b> <?php $location = array( 'GER' =>'Europe', // 'USA' =>'North America' ); $default = 'all';[/b][/center] [b]$worlds = array(2); $worlds[0] = array('GER', 'open'); /* $worlds[1] = array('GER', 'optional'); $worlds[2] = array('GER', 'hardcore'); $worlds[3] = array('USA', 'open'); $worlds[4] = array('USA', 'optional'); $worlds[5] = array('USA', 'hardcore'); */[/b] [b]$voc = array(); // if empty, Rook Sample will be used $voc[1] = 'Sorcerer'; $voc[2] = 'Druid'; $voc[3] = 'Paladin'; $voc[4] = 'Knight';[/b] [b]$suggestname = NULL; // not available $version = '860'; // for download link[/b] [b]foreach($worlds as $k =>$v) // remove invalid worlds if(!isset($location[$v[0]]) || !isset($config['site']['worlds'][$k])) unset($worlds[$k]);[/b] [b]$tmp = array(); foreach($location as $k =>$v) // remove invalid/unused locations foreach($worlds as $i =>$j) if($j[0] == $k) { $tmp[$k] = $v; break; } $location = $tmp; unset($tmp);[/b] [b]if(isset($_POST['step']) && $_POST['step'] == 'docreate') { $e = array(); $s = isset($_POST['accountname']) ? $_POST['accountname'] : ''; if($s == '') $e['acc'] = 'Please enter an account name!'; elseif(strlen($s) < 6) $e['acc'] = 'This account name is too short!'; elseif(strlen($s) > 30) $e['acc'] = 'This account name is too long!'; else { $s = strtoupper($s);[/b] [b] if(!ctype_alnum($s)) $e['acc'] = 'This account name has an invalid format. Your account name may only consist of numbers 0-9 and letters A-Z!'; elseif(!preg_match('/[A-Z]/', $s)) $e['acc'] = 'Your account name must include at least one letter A-Z!'; else { $con = mysql_pconnect($config['server']['sqlHost'], $config['server']['sqlUser'], $config['server']['sqlPass']) or die('MySQL connection error.'); mysql_select_db($config['server']['sqlDatabase']);[/b] [b] if(mysql_num_rows(mysql_query('SELECT id FROM accounts WHERE name=\''.mysql_escape_string($s).'\' LIMIT 1')) != 0) $e['acc'] = 'This account name is already used. Please select another one!'; } } $s = isset($_POST['name']) ? trim($_POST['name']) : '';[/b] [b]if(empty($s)) $e['name'] = 'Please enter a name for your character!'; elseif(strlen($s) < 2 || strlen($s) > 29) $e['name'] = 'A name must have at least 2 but no more than 29 letters!'; elseif(preg_match('/[^a-zA-Z ]/', $s)) $e['name'] = 'This name contains invalid letters. Please use only A-Z, a-z and space!'; elseif(!ctype_upper($s[0])) $e['name'] = 'The first letter of a name has to be a capital letter!'; elseif(strpos($s, ' ') !== false) $e['name'] = 'This name contains more than one space between words. Please use only one space between words!'; else { foreach(explode(' ', $s) as $k =>$v) { $words[$k] = str_split($v); $len = strlen($v); if($len == 1) { $e['name'] = 'This name contains a word with only one letter. Please use more than one letter for each word!'; break; } elseif($len > 14) { $e['name'] = 'This name contains a word that is too long. Please use no more than 14 letters for each word!'; break; } } if(!isset($e['name'])) { $total=0; foreach($words as $k =>$p) { if(isset($e['name'])) break; $total++; if($total > 3) { $e['name'] = 'This name contains more than 3 words. Please choose another name!'; break; } $len=0; foreach($p as $i =>$j) { $len++; if($i != 0 && ctype_upper($j)) { $e['name'] = 'In names capital letters are only allowed at the beginning of a word!'; break; } elseif($i == $len-1) { $ff=null; for($h=0;$h<strlen($v); $h++) { if(in_array(strtolower($v[$h]), array('a','e','i','o','u')) !== false) { $ff=true; break; } } if(!$ff) { $e['name'] = 'This name contains a word without vowels. Please choose another name!'; break; } } } } if(!isset($e['name'])) { $s = strtolower($s); for($i = 0; $i < strlen($s); $i++) if($s[$i] == $s[($i+1)] && $s[$i] == $s[($i+2)]) { $e['name'] = 'This character name is already used. Please select another one!'; break; } if(!isset($e['name'])) { foreach(array('aa ', 'ee', 'ii', 'oo', 'uu', 'gm','cm', 'aff ', 'god ', 'abc', 'tutor', 'game', 'admin', 'the ') as $v) if($v == substr($s, 0, strlen($v))) { $e['name'] = 'This character name is already used. Please select another one!'; break; } if(!isset($e['name'])) { foreach(array('game', 'customer', 'support', 'fuck', 'haha', 'sux', ' abc', 'suck', 'noob', 'tutor', 'admin', 'account', 'gay', 'password', 'manager') as $v) if(strpos($s, $v) !== false) { $e['name'] = 'This character name is already used. Please select another one!'; break; } if(!isset($e['name'])) { if(!isset($con)) { $con = mysql_pconnect($config['server']['sqlHost'], $config['server']['sqlUser'], $config['server']['sqlPass']) or die('MySQL connection error.'); mysql_select_db($config['server']['sqlDatabase']); } if(mysql_num_rows(mysql_query('SELECT id FROM players WHERE name=\''.mysql_escape_string($s).'\' LIMIT 1')) != 0) $e['name'] = 'This character name is already used. Please select another one!'; } } } } } }[/b] [b]if(!isset($_POST['world']) || empty($_POST['world'])) $e['world'] = 'Please select a game world for your character!';[/b] [b]if(!isset($_POST['sex']) || ($_POST['sex'] != 'male' && $_POST['sex'] != 'female')) $e['sex'] = 'Please select the sex for your character!';[/b] [b]if(count($voc) != 0 && (!isset($_POST['vocation']) || !is_numeric($_POST['vocation']) || !isset($voc[$_POST['vocation']]))) $e['vocation'] = 'Please select the vocation for your character!';[/b] [b]$s = isset($_POST['email']) ? $_POST['email'] : '';[/b] [b]if($s == '') $e['email'] = 'Please enter your email address!'; elseif(strlen($s) > 49) $e['email'] = 'Your email address is too long!'; elseif(!filter_var($s, FILTER_VALIDATE_EMAIL)) $e['email'] = 'This email address has an invalid format. Please enter a correct email address!'; else { if(!isset($con)) { $con = mysql_pconnect($config['server']['sqlHost'], $config['server']['sqlUser'], $config['server']['sqlPass']) or die('MySQL connection error.'); mysql_select_db($config['server']['sqlDatabase']); } if(mysql_num_rows(mysql_query('SELECT id FROM accounts WHERE email=\''.mysql_escape_string($s).'\' LIMIT 1')) != 0) $e['email'] = 'This email address is already used. Please enter another email address!'; }[/b] [b]$s1 = isset($_POST['password1']) ? $_POST['password1'] : ''; $s2 = isset($_POST['password2']) ? $_POST['password2'] : '';[/b] [b]if(empty($s2)) $e['pass'] = 'Please enter the password again!'; elseif($s1 != $s2) $e['pass'] = 'The two passwords do not match!'; else { $err = array(); if(strlen($s1) < 8 || strlen($s1) > 29) $err[] = 'The password must have at least 8 and less than 30 letters!'; if(!ctype_alnum($s1)) $err[] = 'The password contains invalid letters!'; if(!preg_match('/[a-zA-Z]/', $s1)) $err[] = 'The password must contain at least one letter A-Z or a-z!'; elseif(!preg_match('/[0-9]/', $s1)) $err[] = 'The password must contain at least one letter other than A-Z or a-z!';[/b] [b] if(count($err) != 0) { $e['pass'] = ''; for($i=0; $i < count($err); $i++) $e['pass'] .= ($i == 0 ? '' : '<br/>').$err[$i]; } }[/b] [b]if(!isset($_POST['agreeagreement']) || empty($_POST['agreeagreement'])) $e['agreement'] = 'You have to agree to the Tibia Service Agreement in order to create an account!'; if(!isset($_POST['agreerules']) || empty($_POST['agreerules'])) $e['rules'] = 'You have to agree to the Tibia Rules in order to create an account!'; if(!isset($_POST['agreeprivacy']) || empty($_POST['agreeprivacy'])) $e['privacy'] = 'You have to agree to the Tibia Privacy Policy in order to create an account!';[/b] [b]if(count($e) == 0) { $worldid = NULL; foreach($config['site']['worlds'] as $id =>$name) if($worlds[$id] && $name == $_POST['world']) { $worldid = $id; break; } if($worldid === FALSE) $e['world'] = 'Please select a valid game world.'; }[/b] [b]if(count($e) != 0) { $main_content = '<div class="SmallBox"><div class="MessageContainer"><div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif)"/></div><div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></div><div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></div><div class="ErrorMessage"><div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"/></div><div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"/></div><div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif)"/></div><b>The Following Errors Have Occurred:</b><br/>'; foreach($e as $error) $main_content .= $error.'<br/>'; $main_content .= '</div><div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif)"/></div><div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></div><div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></div></div></div><br/>'; } else { $random = rand(1, 9999999); $n = $random; $cur = array();[/b] [b] $q = mysql_query('SELECT id FROM accounts'); while ($r = mysql_fetch_array($q, MYSQL_NUM)) $cur[] = $r[0];[/b] [b] while(true) { if(!in_array($n, $cur)) break;[/b] [b] $n++;[/b] [b] if($n > 9999999) $n = 1;[/b] [b] if($n == $random) die('Failed to create account.'); }[/b] [b] if(mysql_query("INSERT INTO accounts (id,name,password,email,created) VALUES($n,'".$_POST['accountname']."','".($config['server']['encryptionType'] == 'plain' ? $_POST['password1'] : hash($config['server']['encryptionType'], $_POST['password1']))."','".$_POST['email']."',".time().")") === true) { $sample = (count($voc) == 0 ? 'Rook' : $voc[$_POST['vocation']]).' Sample'; $q = mysql_query("SELECT id,vocation,town_id,experience,level,maglevel,health,healthmax,mana,manamax,soul,lookbody,lookfeet,lookhead,looklegs,lookaddons,cap,save,posx,posy,posz FROM players WHERE name='$sample' LIMIT 1"); if(mysql_num_rows($q) != 1) die('Missing sample character ('.$sample.')');[/b] [b] $q = mysql_fetch_array($q); mysql_query('INSERT INTO players (name,world_id,account_id,level,vocation,health,healthmax,experience,lookbody,lookfeet,lookhead,looklegs,looktype,lookaddons,maglevel,mana,manamax,soul,town_id,posx,posy,posz,cap,sex,created) VALUES(\''.$_POST['name'].'\','.$worldid.','.$n.','.$q['level'].','.$q['vocation'].','.$q['health'].','.$q['healthmax'].','.$q['experience'].','.$q['lookbody'].','.$q['lookfeet'].','.$q['lookhead'].','.$q['looklegs'].','.($_POST['sex'] == 'female' ? 136 : 128).','.$q['lookaddons'].','.$q['maglevel'].','.$q['mana'].','.$q['manamax'].','.$q['soul'].','.$q['town_id'].','.$q['posx'].','.$q['posy'].','.$q['posz'].','.$q['cap'].','.($_POST['sex'] == 'female' ? 0 : 1).','.time().')'); } else die('Failed to create account.'); $main_content = '<div class="SmallBox"><div class="MessageContainer"><div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif)"/></div><div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></div><div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></div><div class="Message"><div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"/></div><div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"/></div><table><tr><td class="LabelV">Note:</td><td style="width:100%"><p>Your account and character have been created successfully.</p></td></tr></table></div><div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif)"/></div><div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></div><div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></div></div></div><div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif)"></div><div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></div><div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></div><br/><div class="TableContainer"><table class="Table4" cellpadding="0" cellspacing="0"><div class="CaptionContainer"><div class="CaptionInnerContainer"><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"/></span><div class="Text">Download Client</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"/></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></span></div></div><tr><td><div class="InnerTableContainer"><table style="width:100%"><tr><td><table width="100%" cellpadding=0 cellspacing=0><tr><td style="vertical-align:top"><div class="TableShadowContainerRightTop"><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif)"></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif)"><div class="TableContentContainer"><table class="TableContent" width="100%"><tr><td><table style="width:100%;text-align:center"><tr><td><a href="http://tibiaclient.com/files/tibia'.$version.'.exe" type="application/octet-stream" target="_top"><img style="width:180px;height:180px;border:0px" src="account/download_windows.png"/></a></td><td><a href="http://tibiaclient.com/files/tibia'.$version.'.tar" type="application/octet-stream" target="_top"><img style="width:180px;height:180px;border:0px" src="account/download_linux.png"/><br/></a></td></tr><tr><td valign="top"><a href="http://tibiaclient.com/files/tibia'.$version.'.exe" type="application/octet-stream" target="_top">Windows Tibia Client '.(sprintf('%01.2f', $version / 100)).'</a></td><td valign="top"><a href="http://tibiaclient.com/files/tibia'.$version.'.tar" type="application/octet-stream" target="_top">Linux Tibia Client '.(sprintf('%01.2f', $version / 100)).'</a></td></tr><tr><td colspan="2">[<span class="HelpLink" onClick="window.open(\'http://www.tibia.com/support/content/help.php?subtopic=requirementes\', \'Help\', \'width=380px, height=310px, scrollbars=yes\')"><a>system requirements</a></span>]</td></tr></table></td></tr></table></div></div><div class="TableShadowContainer"><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif)"><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif)"></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif)"></div></div></div></td><td style="vertical-align:top"><div class="TableShadowContainerRightTop"><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif)"></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif)"><div class="TableContentContainer"><table class="TableContent" width="100%"><tr><td style="text-align:center"><img style="width:254px;height:218px;margin:7px" src="account/successful_download.jpg"/></td></tr></table></div></div><div class="TableShadowContainer"><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif)"><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif)"></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif)"></div></div></div></td></tr></table><tr><td><div class="TableShadowContainerRightTop"><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif)"></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif)"><div class="TableContentContainer"><table class="TableContent" width="100%"><tr><td class="LabelV">Disclaimer</td></tr><tr><td>The software and any related documentation is provided "as is" without warranty of any kind. The entire risk arising out of use of the software remains with you. In no event shall CipSoft GmbH be liable for any damages to your computer or loss of data.</td></tr></table></div></div><div class="TableShadowContainer"><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif)"><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif)"></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif)"></div></div></div></td></tr></table></div></table></div></td></tr>'; return; } } else $_POST['step'] = '';[/b] [b]$main_content .= '<script type="text/javascript" src="account/jquery.js"></script> <script type="text/javascript" src="account/create_character.js"></script> <script type="text/javascript">var PreselectServerLocation="'.$default.'";var g_FormName="CreateAccountAndCharacter";var g_FieldName="accountname";document.getElementById("ActiveSubmenuItemIcon_createaccount").style.visibility = "visible";'; foreach($worlds as $k =>$v) // create dynamic server list $main_content .= 'ServerList.push(new Array(\''.$config['site']['worlds'][$k].'\', \''.$v[0].'\', \''.$v[1].'\'));'; $main_content .= '</script><div style="position:relative;top:0px;left:0px"><form action="/index.php?subtopic=createaccount" method=post name="CreateAccountAndCharacter"><div class="TableContainer"><table class="Table5" cellpadding="0" cellspacing="0"><div class="CaptionContainer"><div class="CaptionInnerContainer"><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span><div class="Text">Create New Account</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span></div></div><tr><td><div class="InnerTableContainer"><table style="width:100%"><tr><td><div class="TableShadowContainerRightTop"><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif)"></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif)"><div class="TableContentContainer"><table class="TableContent" width="100%"><tr><td class="LabelV150"><span id="accountname_label"'.(isset($e['acc']) ? ' class="red"' : '').'>Account Name:</span></td><td><input id="accountname" name="accountname" class="CipAjaxInput" style="width:206px;float:left" value="'.(isset($_POST['accountname']) ? htmlspecialchars(substr($_POST['accountname'], 0, 30)) : '').'" size="30" maxlength="30" onBlur="SendAjaxCip({DataType: \'Container\'}, {Href: \'account/ajax_accountname.php\',PostData: \'a_AccountName=\'+this.value,Method: \'POST\'})"/><div id="accountname_indicator" class="InputIndicator" style="background-image:url(account/'.($_POST['step'] != 'docreate' || isset($e['acc']) ? 'n' : '').'ok.gif)"></div></td></tr><tr><td></td><td><span id="accountname_errormessage" class="FormFieldError">'.(isset($e['acc']) ? $e['acc'] : '').'</span></td></tr><tr><td class="LabelV150"><span id="email_label"'.(isset($e['email']) ? ' class="red"' : '').'>Email Address:</span></td><td><input id="email" name="email" class="CipAjaxInput" style="width:206px;float:left" value="'.(isset($_POST['email']) ? htmlspecialchars(substr($_POST['email'], 0, 50)) : '').'" autocomplete="off" size="30" maxlength="50" onBlur="SendAjaxCip({DataType: \'Container\'}, {Href: \'account/ajax_email.php\',PostData: \'a_EMail=\'+this.value,Method: \'POST\'})"/><div id="email_indicator" class="InputIndicator" style="background-image:url(account/'.($_POST['step'] != 'docreate' || isset($e['email']) ? 'n' : '').'ok.gif)"></div></td></tr><tr><td></td><td><span id="email_errormessage" class="FormFieldError">'.(isset($e['email']) ? $e['email'] : '').'</span></td></tr><tr><td class="LabelV150"><span id="password1_label"'.(isset($e['pass']) ? ' class="red"' : '').'>Password:</span></td><td><input id="password1" type="password" autocomplete="off" name="password1" style="width:206px;float:left" value="'.(isset($_POST['password1']) ? htmlspecialchars(substr($_POST['password1'], 0, 30)) : '').'" size="30" maxlength="30" onBlur="SendAjaxCip({DataType: \'Container\'}, {Href: \'account/ajax_password.php\',PostData: \'a_Password1=\'+getElementById(\'password1\').value+\'&a_Password2=\'+getElementById(\'password2\').value,Method: \'POST\'})"/><div id="password1_indicator" class="InputIndicator" style="background-image:url(account/'.($_POST['step'] != 'docreate' || isset($e['pass']) ? 'n' : '').'ok.gif)"></div></td></tr><tr><td class="LabelV150"><span id="password2_label"'.(isset($e['pass']) ? ' class="red"' : '').'>Password Again:</span></td><td><input id="password2" type="password" name="password2" style="width:206px;float:left" value="'.(isset($_POST['password2']) ? htmlspecialchars(substr($_POST['password2'], 0, 30)) : '').'" size="30" maxlength="30" onBlur="SendAjaxCip({DataType: \'Container\'}, {Href: \'account/ajax_password.php\',PostData: \'a_Password1=\'+getElementById(\'password1\').value+\'&a_Password2=\'+getElementById(\'password2\').value,Method: \'POST\'})"/><div id="password2_indicator" class="InputIndicator" style="background-image:url(account/'.($_POST['step'] != 'docreate' || isset($e['pass']) ? 'n' : '').'ok.gif)"></div></td></tr><tr><td></td><td><span id="password_errormessage" class="FormFieldError">'.(isset($e['pass']) ? $e['pass'] : '').'</span></td></tr></table></div></div><div class="TableShadowContainer"><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif)"><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif)"></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif)"></div></div></div></td></tr><tr><td><div class="TableShadowContainerRightTop"><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif)"></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif)"><div class="TableContentContainer"><table class="TableContent" width="100%"><tr><td class="LabelV150"><span id="charactername_label"'.(isset($e['name']) ? ' class="red"' : '').'>Character Name:</span></td><td><input id="charactername" name="name" class="CipAjaxInput" style="width:206px;float:left;position:relative" style="float:left" value="'.(isset($_POST['name']) ? htmlspecialchars(str_replace('+', ' ', substr(trim($_POST['name']), 0, 30))) : '').'" size="30" maxlength="30" onBlur="SendAjaxCip({DataType: \'Container\'}, {Href: \'account/ajax_charactername.php\',PostData: \'a_CharacterName=\'+this.value,Method: \'POST\'})"/><div id="charactername_indicator" class="InputIndicator" style="background-image:url(account/'.($_POST['step'] != 'docreate' || isset($e['name']) ? 'n' : '').'ok.gif)"></div>'; if($suggestname) $main_content .= '<br/><small>[<a class="CipAjaxLink" href="https://secure.tibia.com/account/content/ajax_suggestname.php" ajaxcip="true" ajaxcip_datatype="Container">suggest name</a>]</small>'; $main_content .= '</td></tr><tr><td></td><td><span id="charactername_errormessage" class="FormFieldError">'.(isset($e['name']) ? $e['name'] : '').'</span></td></tr><tr><td class="LabelV150"><span'.(isset($e['sex']) ? ' class="red"' : '').'>Sex:</span></td><td><table width="100%"><tr><td><span style="margin-right:75px" class="OptionContainer"><label for="sex_male"><span class="OptionContainer"><input id="sex_male" type="radio" name="sex" value="male"'.(($_POST['sex'] == 'male' || $_POST['step'] != 'docreate') ? ' checked="checked"' : '').'/><label for="sex_male">male</label></span></label></span><span class="OptionContainer"><label for="sex_female"><span class="OptionContainer"><input id="sex_female" type="radio" name="sex" value="female"'.($_POST['sex'] == 'female' ? ' checked="checked"' : '').'/><label for="sex_female">female</label></span></label></span></td><td></td></tr></table></td></tr>'.(isset($e['sex']) ? '<tr><td></td><td><span class="FormFieldError">'.$e['sex'].'</span></td></tr>' : ''); if(count($voc) != 0) { $main_content .= '<tr><td class="LabelV150"><span'.(isset($e['vocation']) ? ' class="red"' : '').'>Vocation:</span></td><td><table width="100%"><tr><td>'; foreach($voc as $k => $v) $main_content .= '<span style="margin-right:15px" class="OptionContainer"><label for="vocation_'.$k.'"> <span class="OptionContainer"><input id="vocation_'.$k.'" type="radio" name="vocation" value="'.$k.'"'.($_POST['vocation'] == $k ? ' checked="checked"' : '').'/><label for="vocation_'.$k.'">'.$v.'</label></span></label></span>'; $main_content .= '</td><td></td></tr></table></td></tr>'.(isset($e['vocation']) ? '<tr><td></td><td><span class="FormFieldError">'.$e['vocation'].'</span></td></tr>' : ''); } $main_content .= '</table></div></div><div class="TableShadowContainer"><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif)"><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif)"></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif)"></div></div></div></td></tr><tr><td><div class="TableShadowContainerRightTop"><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif)"></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif)"><div class="TableContentContainer"><table class="TableContent" width="100%">'; if(count($location)>1) { // show server location filter $main_content .= '<tr id="filterbox_location"><td class="LabelV150"><span'.(isset($e['world']) ? ' class="red"' : '').'>World Location:</span></td><td><table width="100%"><tr><td width="33%" valign="top"><script>CreateFilterOption(\'server_location\', \'all\', \'all\')</script> </td>'; $i=0; foreach($location as $k =>$v) { $i++; $main_content .= '<td '.($i == count($location) ? '' : 'width="33%" ').'valign="top"><script>CreateFilterOption(\'server_location\', \''.$k.'\', \''.$v.'\')</script> </td>'; } $main_content .= '</tr></table></td></tr>'; } $main_content .= '<tr id="filterbox_pvp"><td class="LabelV150"><span'.(isset($e['world']) ? ' class="red"' : '').'>World Type:</span></td><td><div>';[/b] [b]$optional=true; $open=true; $hardcore=true;[/b] [b]foreach($worlds as $k =>$v) { // remove selection if there's no valid worlds if($optional && $v[1] == 'optional') unset($optional); elseif($open && $v[1] == 'open') unset($open); elseif($hardcore && $v[1] == 'hardcore') unset($hardcore); elseif(!$optional && !$open && !$hardcore) break; }[/b] [b]$n = 0; foreach(array($optional, $open, $hardcore) as $k) if(!$k) $n++; $main_content .= '<table width="'.round(33.33 * $n).'%"><tr>'; if(!$optional) $main_content .= '<td width="'.(100 / $n).'%" align="center" valign="top"><b><script>CreateFilterOption(\'server_pvp_type\', \'optional\', \'Optional PvP\')</script></b> Only if both sides agree, characters can be fought<br/><br/></td>'; if(!$open) $main_content .= '<td width="'.(100 / $n).'%" align="center" valign="top"><b><script>CreateFilterOption(\'server_pvp_type\', \'open\', \'Open PvP\')</script></b> Killing other characters is possible, but restricted<br/><br/></td>'; if(!$hardcore) $main_content .= '<td align="center" valign="top"><b><script>CreateFilterOption(\'server_pvp_type\', \'hardcore\', \'Hardcore PvP\')</script></b> Killing other characters is not restricted at all<br/><br/></td>';[/b] [b]$main_content .= '</tr></table></div></td></tr><tr><td class="LabelV150"><span'.(isset($e['world']) ? ' class="red"' : '').'>World Name:</span></td><td><div id="js_world_box" style="display:none"><table width="100%"><tr id="world_list_tr" style="text-align:left"></tr></table><span onClick="ToggleVisibility(\'js_world_box\', \'suggested_world_box\'); UpdateServerList(); "><small>[<a style="cursor:pointer">suggest game world</a>]</small></span></div><div id="suggested_world_box">Suggested world: <span id="suggested_world_div"></span><br/><span onClick="ToggleVisibility(\'suggested_world_box\', \'js_world_box\'); "><small>[<a style="cursor:pointer">change game world</a></span>]</small></div></td></tr><tr><td><table id="js_world_box" width="100%"><tr id="world_list_tr"></tr></table><table id="plain_world_box" width="100%"><tr><td>'; foreach($worlds as $k =>$v) $main_content .= '<input id="server_static_'.$config['site']['worlds'][$k].'" type="radio" name="world" value="'.$config['site']['worlds'][$k].'"'.($config['site']['worlds'][$k] == $_POST['world'] ? ' checked="checked"' : '').'><label for="server_static_'.$config['site']['worlds'][$k].'">'.$config['site']['worlds'][$k].'</label><br/>'; $main_content .= '</td></tr></table></td></tr>'.(isset($e['world']) ? '<tr><td></td><td><span class="FormFieldError">'.$e['world'].'</span></td></tr>' : '').'</table></div></div><div class="TableShadowContainer"><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif)"><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif)"></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif)"></div></div></div></td></tr><tr><td><div class="TableShadowContainerRightTop"><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif)"></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif)"><div class="TableContentContainer"><table class="TableContent" width="100%"><tr><td><b>Please select all of the following check boxes:</b></td></tr><tr><td><input type="checkbox" name="agreeagreement" value="true" onClick="if(this.checked == true) { document.getElementById(\'agreeagreement_errormessage\').innerHTML = \'\';} else { document.getElementById(\'agreeagreement_errormessage\').innerHTML = \'You have to agree to the Tibia Service Agreement in order to create an account!\';}"'.($_POST['step'] == 'docreate' && !isset($e['agreement']) ? ' checked="checked"' : '').'/>I agree to the <a href="/index.php?subtopic=legaldocuments&page=agreement" target="_blank">Tibia Service Agreement</a>.</td></tr><tr><td><span id="agreeagreement_errormessage" class="FormFieldError">'.(isset($e['agreement']) ? $e['agreement'] : '').'</span></td></tr><tr><td><input type="checkbox" name="agreerules" value="true" onClick="if(this.checked == true) { document.getElementById(\'agreerules_errormessage\').innerHTML = \'\';} else { document.getElementById(\'agreerules_errormessage\').innerHTML = \'You have to agree to the Tibia Rules in order to create an account!\';}"'.($_POST['step'] == 'docreate' && !isset($e['rules']) ? ' checked="checked"' : '').'/>I agree to the <a href="/index.php?subtopic=legaldocuments&page=rules" target="_blank">Tibia Rules</a>.</td></tr><tr><td><span id="agreerules_errormessage" class="FormFieldError">'.(isset($e['rules']) ? $e['rules'] : '').'</span></td></tr><tr><td><input type="checkbox" name="agreeprivacy" value="true" onClick="if(this.checked == true) { document.getElementById(\'agreeprivacy_errormessage\').innerHTML = \'\';} else { document.getElementById(\'agreeprivacy_errormessage\').innerHTML = \'You have to agree to the Tibia Privacy Policy in order to create an account!\';}"'.($_POST['step'] == 'docreate' && !isset($e['privacy']) ? ' checked="checked"' : '').'/>I agree to the <a href="/index.php?subtopic=legaldocuments&page=privacy" target="_blank">Tibia Privacy Policy</a>.</td></tr><tr><td><span id="agreeprivacy_errormessage" class="FormFieldError">'.(isset($e['privacy']) ? $e['privacy'] : '').'</span></td></tr></table></div></div><div class="TableShadowContainer"><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif)"><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif)"></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif)"></div></div></div></td></tr><script type="text/javascript">PreselectWorld="'; if(isset($_POST['world']) && !empty($_POST['world'])) foreach($config['site']['worlds'] as $id =>$name) if($worlds[$id] && $name == $_POST['world']) { $main_content .= $name; break; } $main_content .= '";InitializeCharacterCreator(PreselectServerLocation, \''.(!$optional ? 'optional' : (!$open ? 'open' : 'hardcore')).'\')</script></table></div></table></div></td></tr><br/></div><center><table border="0" cellspacing="0" cellpadding="0"><tr><td style="border:0px"><input type="hidden" name=step value=docreate><input type="hidden" name=noframe value=""><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)"><div onMouseOver="MouseOverBigButton(this)" onMouseOut="MouseOutBigButton(this)"><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif)"></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif"></div></div></td><tr></form></table></center><script type="text/javascript" language="javascript">document.forms[\'CreateAccountAndCharacter\'].elements[\'accountname\'].focus();</script><script type="text/javascript" src="account/generic.js"></script><script type="text/javascript" src="account/ajaxcip.js"></script>';
  12. Boa tarde bom primeiramente obrigado por estar aqui querendo ajudar.vamos la eu quero apenas tirar essa caixa onde eu marquei vermelho quero que cara cria apenas sua conta.ai depois e só cria char normalmente la em play now! Esse e script createaccount. <b> <?php $location = array( 'GER' =>'Europe', // 'USA' =>'North America' ); $default = 'all';[/b][/size] [size=4][b]$worlds = array(); $worlds[0] = array('GER', 'open'); /* $worlds[1] = array('GER', 'optional'); $worlds[2] = array('GER', 'hardcore'); $worlds[3] = array('USA', 'open'); $worlds[4] = array('USA', 'optional'); $worlds[5] = array('USA', 'hardcore'); */[/b][/size] [size=4][b]$voc = array(); // if empty, Rook Sample will be used $voc[1] = 'Sorcerer'; $voc[2] = 'Druid'; $voc[3] = 'Paladin'; $voc[4] = 'Knight';[/b][/size] [size=4][b]$suggestname = NULL; // not available $version = '860'; // for download link[/b][/size] [size=4][b]foreach($worlds as $k =>$v) // remove invalid worlds if(!isset($location[$v[0]]) || !isset($config['site']['worlds'][$k])) unset($worlds[$k]);[/b][/size] [size=4][b]$tmp = array(); foreach($location as $k =>$v) // remove invalid/unused locations foreach($worlds as $i =>$j) if($j[0] == $k) { $tmp[$k] = $v; break; } $location = $tmp; unset($tmp);[/b][/size] [size=4][b]if(isset($_POST['step']) && $_POST['step'] == 'docreate') { $e = array(); $s = isset($_POST['accountname']) ? $_POST['accountname'] : ''; if($s == '') $e['acc'] = 'Please enter an account name!'; elseif(strlen($s) < 6) $e['acc'] = 'This account name is too short!'; elseif(strlen($s) > 30) $e['acc'] = 'This account name is too long!'; else { $s = strtoupper($s);[/b][/size] [size=4][b] if(!ctype_alnum($s)) $e['acc'] = 'This account name has an invalid format. Your account name may only consist of numbers 0-9 and letters A-Z!'; elseif(!preg_match('/[A-Z]/', $s)) $e['acc'] = 'Your account name must include at least one letter A-Z!'; else { $con = mysql_pconnect($config['server']['sqlHost'], $config['server']['sqlUser'], $config['server']['sqlPass']) or die('MySQL connection error.'); mysql_select_db($config['server']['sqlDatabase']);[/b][/size] [size=4][b] if(mysql_num_rows(mysql_query('SELECT id FROM accounts WHERE name=\''.mysql_escape_string($s).'\' LIMIT 1')) != 0) $e['acc'] = 'This account name is already used. Please select another one!'; } } $s = isset($_POST['name']) ? trim($_POST['name']) : '';[/b][/size] [size=4][b]if(empty($s)) $e['name'] = 'Please enter a name for your character!'; elseif(strlen($s) < 2 || strlen($s) > 29) $e['name'] = 'A name must have at least 2 but no more than 29 letters!'; elseif(preg_match('/[^a-zA-Z ]/', $s)) $e['name'] = 'This name contains invalid letters. Please use only A-Z, a-z and space!'; elseif(!ctype_upper($s[0])) $e['name'] = 'The first letter of a name has to be a capital letter!'; elseif(strpos($s, ' ') !== false) $e['name'] = 'This name contains more than one space between words. Please use only one space between words!'; else { foreach(explode(' ', $s) as $k =>$v) { $words[$k] = str_split($v); $len = strlen($v); if($len == 1) { $e['name'] = 'This name contains a word with only one letter. Please use more than one letter for each word!'; break; } elseif($len > 14) { $e['name'] = 'This name contains a word that is too long. Please use no more than 14 letters for each word!'; break; } } if(!isset($e['name'])) { $total=0; foreach($words as $k =>$p) { if(isset($e['name'])) break; $total++; if($total > 3) { $e['name'] = 'This name contains more than 3 words. Please choose another name!'; break; } $len=0; foreach($p as $i =>$j) { $len++; if($i != 0 && ctype_upper($j)) { $e['name'] = 'In names capital letters are only allowed at the beginning of a word!'; break; } elseif($i == $len-1) { $ff=null; for($h=0;$h<strlen($v); $h++) { if(in_array(strtolower($v[$h]), array('a','e','i','o','u')) !== false) { $ff=true; break; } } if(!$ff) { $e['name'] = 'This name contains a word without vowels. Please choose another name!'; break; } } } } if(!isset($e['name'])) { $s = strtolower($s); for($i = 0; $i < strlen($s); $i++) if($s[$i] == $s[($i+1)] && $s[$i] == $s[($i+2)]) { $e['name'] = 'This character name is already used. Please select another one!'; break; } if(!isset($e['name'])) { foreach(array('aa ', 'ee', 'ii', 'oo', 'uu', 'gm','cm', 'aff ', 'god ', 'abc', 'tutor', 'game', 'admin', 'the ') as $v) if($v == substr($s, 0, strlen($v))) { $e['name'] = 'This character name is already used. Please select another one!'; break; } if(!isset($e['name'])) { foreach(array('game', 'customer', 'support', 'fuck', 'haha', 'sux', ' abc', 'suck', 'noob', 'tutor', 'admin', 'account', 'gay', 'password', 'manager') as $v) if(strpos($s, $v) !== false) { $e['name'] = 'This character name is already used. Please select another one!'; break; } if(!isset($e['name'])) { if(!isset($con)) { $con = mysql_pconnect($config['server']['sqlHost'], $config['server']['sqlUser'], $config['server']['sqlPass']) or die('MySQL connection error.'); mysql_select_db($config['server']['sqlDatabase']); } if(mysql_num_rows(mysql_query('SELECT id FROM players WHERE name=\''.mysql_escape_string($s).'\' LIMIT 1')) != 0) $e['name'] = 'This character name is already used. Please select another one!'; } } } } } }[/b][/size] [size=4][b]if(!isset($_POST['world']) || empty($_POST['world'])) $e['world'] = 'Please select a game world for your character!';[/b][/size] [size=4][b]if(!isset($_POST['sex']) || ($_POST['sex'] != 'male' && $_POST['sex'] != 'female')) $e['sex'] = 'Please select the sex for your character!';[/b][/size] [size=4][b]if(count($voc) != 0 && (!isset($_POST['vocation']) || !is_numeric($_POST['vocation']) || !isset($voc[$_POST['vocation']]))) $e['vocation'] = 'Please select the vocation for your character!';[/b][/size] [size=4][b]$s = isset($_POST['email']) ? $_POST['email'] : '';[/b][/size] [size=4][b]if($s == '') $e['email'] = 'Please enter your email address!'; elseif(strlen($s) > 49) $e['email'] = 'Your email address is too long!'; elseif(!filter_var($s, FILTER_VALIDATE_EMAIL)) $e['email'] = 'This email address has an invalid format. Please enter a correct email address!'; else { if(!isset($con)) { $con = mysql_pconnect($config['server']['sqlHost'], $config['server']['sqlUser'], $config['server']['sqlPass']) or die('MySQL connection error.'); mysql_select_db($config['server']['sqlDatabase']); } if(mysql_num_rows(mysql_query('SELECT id FROM accounts WHERE email=\''.mysql_escape_string($s).'\' LIMIT 1')) != 0) $e['email'] = 'This email address is already used. Please enter another email address!'; }[/b][/size] [size=4][b]$s1 = isset($_POST['password1']) ? $_POST['password1'] : ''; $s2 = isset($_POST['password2']) ? $_POST['password2'] : '';[/b][/size] [size=4][b]if(empty($s2)) $e['pass'] = 'Please enter the password again!'; elseif($s1 != $s2) $e['pass'] = 'The two passwords do not match!'; else { $err = array(); if(strlen($s1) < 8 || strlen($s1) > 29) $err[] = 'The password must have at least 8 and less than 30 letters!'; if(!ctype_alnum($s1)) $err[] = 'The password contains invalid letters!'; if(!preg_match('/[a-zA-Z]/', $s1)) $err[] = 'The password must contain at least one letter A-Z or a-z!'; elseif(!preg_match('/[0-9]/', $s1)) $err[] = 'The password must contain at least one letter other than A-Z or a-z!';[/b][/size] [size=4][b] if(count($err) != 0) { $e['pass'] = ''; for($i=0; $i < count($err); $i++) $e['pass'] .= ($i == 0 ? '' : '<br/>').$err[$i]; } }[/b][/size] [size=4][b]if(!isset($_POST['agreeagreement']) || empty($_POST['agreeagreement'])) $e['agreement'] = 'You have to agree to the Tibia Service Agreement in order to create an account!'; if(!isset($_POST['agreerules']) || empty($_POST['agreerules'])) $e['rules'] = 'You have to agree to the Tibia Rules in order to create an account!'; if(!isset($_POST['agreeprivacy']) || empty($_POST['agreeprivacy'])) $e['privacy'] = 'You have to agree to the Tibia Privacy Policy in order to create an account!';[/b][/size] [size=4][b]if(count($e) == 0) { $worldid = NULL; foreach($config['site']['worlds'] as $id =>$name) if($worlds[$id] && $name == $_POST['world']) { $worldid = $id; break; } if($worldid === FALSE) $e['world'] = 'Please select a valid game world.'; }[/b][/size] [size=4][b]if(count($e) != 0) { $main_content = '<div class="SmallBox"><div class="MessageContainer"><div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif)"/></div><div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></div><div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></div><div class="ErrorMessage"><div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"/></div><div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"/></div><div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif)"/></div><b>The Following Errors Have Occurred:</b><br/>'; foreach($e as $error) $main_content .= $error.'<br/>'; $main_content .= '</div><div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif)"/></div><div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></div><div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></div></div></div><br/>'; } else { $random = rand(1, 9999999); $n = $random; $cur = array();[/b][/size] [size=4][b] $q = mysql_query('SELECT id FROM accounts'); while ($r = mysql_fetch_array($q, MYSQL_NUM)) $cur[] = $r[0];[/b][/size] [size=4][b] while(true) { if(!in_array($n, $cur)) break;[/b][/size] [size=4][b] $n++;[/b][/size] [size=4][b] if($n > 9999999) $n = 1;[/b][/size] [size=4][b] if($n == $random) die('Failed to create account.'); }[/b][/size] [size=4][b] if(mysql_query("INSERT INTO accounts (id,name,password,email,created) VALUES($n,'".$_POST['accountname']."','".($config['server']['encryptionType'] == 'plain' ? $_POST['password1'] : hash($config['server']['encryptionType'], $_POST['password1']))."','".$_POST['email']."',".time().")") === true) { $sample = (count($voc) == 0 ? 'Rook' : $voc[$_POST['vocation']]).' Sample'; $q = mysql_query("SELECT id,vocation,town_id,experience,level,maglevel,health,healthmax,mana,manamax,soul,lookbody,lookfeet,lookhead,looklegs,lookaddons,cap,save,posx,posy,posz FROM players WHERE name='$sample' LIMIT 1"); if(mysql_num_rows($q) != 1) die('Missing sample character ('.$sample.')');[/b][/size] [size=4][b] $q = mysql_fetch_array($q); mysql_query('INSERT INTO players (name,world_id,account_id,level,vocation,health,healthmax,experience,lookbody,lookfeet,lookhead,looklegs,looktype,lookaddons,maglevel,mana,manamax,soul,town_id,posx,posy,posz,cap,sex,created) VALUES(\''.$_POST['name'].'\','.$worldid.','.$n.','.$q['level'].','.$q['vocation'].','.$q['health'].','.$q['healthmax'].','.$q['experience'].','.$q['lookbody'].','.$q['lookfeet'].','.$q['lookhead'].','.$q['looklegs'].','.($_POST['sex'] == 'female' ? 136 : 128).','.$q['lookaddons'].','.$q['maglevel'].','.$q['mana'].','.$q['manamax'].','.$q['soul'].','.$q['town_id'].','.$q['posx'].','.$q['posy'].','.$q['posz'].','.$q['cap'].','.($_POST['sex'] == 'female' ? 0 : 1).','.time().')'); } else die('Failed to create account.'); $main_content = '<div class="SmallBox"><div class="MessageContainer"><div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif)"/></div><div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></div><div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></div><div class="Message"><div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"/></div><div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"/></div><table><tr><td class="LabelV">Note:</td><td style="width:100%"><p>Your account and character have been created successfully.</p></td></tr></table></div><div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif)"/></div><div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></div><div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></div></div></div><div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif)"></div><div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></div><div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></div><br/><div class="TableContainer"><table class="Table4" cellpadding="0" cellspacing="0"><div class="CaptionContainer"><div class="CaptionInnerContainer"><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"/></span><div class="Text">Download Client</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"/></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></span></div></div><tr><td><div class="InnerTableContainer"><table style="width:100%"><tr><td><table width="100%" cellpadding=0 cellspacing=0><tr><td style="vertical-align:top"><div class="TableShadowContainerRightTop"><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif)"></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif)"><div class="TableContentContainer"><table class="TableContent" width="100%"><tr><td><table style="width:100%;text-align:center"><tr><td><a href="http://tibiaclient.com/files/tibia'.$version.'.exe" type="application/octet-stream" target="_top"><img style="width:180px;height:180px;border:0px" src="account/download_windows.png"/></a></td><td><a href="http://tibiaclient.com/files/tibia'.$version.'.tar" type="application/octet-stream" target="_top"><img style="width:180px;height:180px;border:0px" src="account/download_linux.png"/><br/></a></td></tr><tr><td valign="top"><a href="http://tibiaclient.com/files/tibia'.$version.'.exe" type="application/octet-stream" target="_top">Windows Tibia Client '.(sprintf('%01.2f', $version / 100)).'</a></td><td valign="top"><a href="http://tibiaclient.com/files/tibia'.$version.'.tar" type="application/octet-stream" target="_top">Linux Tibia Client '.(sprintf('%01.2f', $version / 100)).'</a></td></tr><tr><td colspan="2">[<span class="HelpLink" onClick="window.open(\'http://www.tibia.com/support/content/help.php?subtopic=requirementes\', \'Help\', \'width=380px, height=310px, scrollbars=yes\')"><a>system requirements</a></span>]</td></tr></table></td></tr></table></div></div><div class="TableShadowContainer"><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif)"><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif)"></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif)"></div></div></div></td><td style="vertical-align:top"><div class="TableShadowContainerRightTop"><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif)"></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif)"><div class="TableContentContainer"><table class="TableContent" width="100%"><tr><td style="text-align:center"><img style="width:254px;height:218px;margin:7px" src="account/successful_download.jpg"/></td></tr></table></div></div><div class="TableShadowContainer"><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif)"><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif)"></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif)"></div></div></div></td></tr></table><tr><td><div class="TableShadowContainerRightTop"><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif)"></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif)"><div class="TableContentContainer"><table class="TableContent" width="100%"><tr><td class="LabelV">Disclaimer</td></tr><tr><td>The software and any related documentation is provided "as is" without warranty of any kind. The entire risk arising out of use of the software remains with you. In no event shall CipSoft GmbH be liable for any damages to your computer or loss of data.</td></tr></table></div></div><div class="TableShadowContainer"><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif)"><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif)"></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif)"></div></div></div></td></tr></table></div></table></div></td></tr>'; return; } } else $_POST['step'] = '';[/b][/size] [size=4][b]$main_content .= '<script type="text/javascript" src="account/jquery.js"></script> <script type="text/javascript" src="account/create_character.js"></script> <script type="text/javascript">var PreselectServerLocation="'.$default.'";var g_FormName="CreateAccountAndCharacter";var g_FieldName="accountname";document.getElementById("ActiveSubmenuItemIcon_createaccount").style.visibility = "visible";'; foreach($worlds as $k =>$v) // create dynamic server list $main_content .= 'ServerList.push(new Array(\''.$config['site']['worlds'][$k].'\', \''.$v[0].'\', \''.$v[1].'\'));'; $main_content .= '</script><div style="position:relative;top:0px;left:0px"><form action="/index.php?subtopic=createaccount" method=post name="CreateAccountAndCharacter"><div class="TableContainer"><table class="Table5" cellpadding="0" cellspacing="0"><div class="CaptionContainer"><div class="CaptionInnerContainer"><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span><div class="Text">Create New Account</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span></div></div><tr><td><div class="InnerTableContainer"><table style="width:100%"><tr><td><div class="TableShadowContainerRightTop"><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif)"></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif)"><div class="TableContentContainer"><table class="TableContent" width="100%"><tr><td class="LabelV150"><span id="accountname_label"'.(isset($e['acc']) ? ' class="red"' : '').'>Account Name:</span></td><td><input id="accountname" name="accountname" class="CipAjaxInput" style="width:206px;float:left" value="'.(isset($_POST['accountname']) ? htmlspecialchars(substr($_POST['accountname'], 0, 30)) : '').'" size="30" maxlength="30" onBlur="SendAjaxCip({DataType: \'Container\'}, {Href: \'account/ajax_accountname.php\',PostData: \'a_AccountName=\'+this.value,Method: \'POST\'})"/><div id="accountname_indicator" class="InputIndicator" style="background-image:url(account/'.($_POST['step'] != 'docreate' || isset($e['acc']) ? 'n' : '').'ok.gif)"></div></td></tr><tr><td></td><td><span id="accountname_errormessage" class="FormFieldError">'.(isset($e['acc']) ? $e['acc'] : '').'</span></td></tr><tr><td class="LabelV150"><span id="email_label"'.(isset($e['email']) ? ' class="red"' : '').'>Email Address:</span></td><td><input id="email" name="email" class="CipAjaxInput" style="width:206px;float:left" value="'.(isset($_POST['email']) ? htmlspecialchars(substr($_POST['email'], 0, 50)) : '').'" autocomplete="off" size="30" maxlength="50" onBlur="SendAjaxCip({DataType: \'Container\'}, {Href: \'account/ajax_email.php\',PostData: \'a_EMail=\'+this.value,Method: \'POST\'})"/><div id="email_indicator" class="InputIndicator" style="background-image:url(account/'.($_POST['step'] != 'docreate' || isset($e['email']) ? 'n' : '').'ok.gif)"></div></td></tr><tr><td></td><td><span id="email_errormessage" class="FormFieldError">'.(isset($e['email']) ? $e['email'] : '').'</span></td></tr><tr><td class="LabelV150"><span id="password1_label"'.(isset($e['pass']) ? ' class="red"' : '').'>Password:</span></td><td><input id="password1" type="password" autocomplete="off" name="password1" style="width:206px;float:left" value="'.(isset($_POST['password1']) ? htmlspecialchars(substr($_POST['password1'], 0, 30)) : '').'" size="30" maxlength="30" onBlur="SendAjaxCip({DataType: \'Container\'}, {Href: \'account/ajax_password.php\',PostData: \'a_Password1=\'+getElementById(\'password1\').value+\'&a_Password2=\'+getElementById(\'password2\').value,Method: \'POST\'})"/><div id="password1_indicator" class="InputIndicator" style="background-image:url(account/'.($_POST['step'] != 'docreate' || isset($e['pass']) ? 'n' : '').'ok.gif)"></div></td></tr><tr><td class="LabelV150"><span id="password2_label"'.(isset($e['pass']) ? ' class="red"' : '').'>Password Again:</span></td><td><input id="password2" type="password" name="password2" style="width:206px;float:left" value="'.(isset($_POST['password2']) ? htmlspecialchars(substr($_POST['password2'], 0, 30)) : '').'" size="30" maxlength="30" onBlur="SendAjaxCip({DataType: \'Container\'}, {Href: \'account/ajax_password.php\',PostData: \'a_Password1=\'+getElementById(\'password1\').value+\'&a_Password2=\'+getElementById(\'password2\').value,Method: \'POST\'})"/><div id="password2_indicator" class="InputIndicator" style="background-image:url(account/'.($_POST['step'] != 'docreate' || isset($e['pass']) ? 'n' : '').'ok.gif)"></div></td></tr><tr><td></td><td><span id="password_errormessage" class="FormFieldError">'.(isset($e['pass']) ? $e['pass'] : '').'</span></td></tr></table></div></div><div class="TableShadowContainer"><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif)"><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif)"></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif)"></div></div></div></td></tr><tr><td><div class="TableShadowContainerRightTop"><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif)"></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif)"><div class="TableContentContainer"><table class="TableContent" width="100%"><tr><td class="LabelV150"><span id="charactername_label"'.(isset($e['name']) ? ' class="red"' : '').'>Character Name:</span></td><td><input id="charactername" name="name" class="CipAjaxInput" style="width:206px;float:left;position:relative" style="float:left" value="'.(isset($_POST['name']) ? htmlspecialchars(str_replace('+', ' ', substr(trim($_POST['name']), 0, 30))) : '').'" size="30" maxlength="30" onBlur="SendAjaxCip({DataType: \'Container\'}, {Href: \'account/ajax_charactername.php\',PostData: \'a_CharacterName=\'+this.value,Method: \'POST\'})"/><div id="charactername_indicator" class="InputIndicator" style="background-image:url(account/'.($_POST['step'] != 'docreate' || isset($e['name']) ? 'n' : '').'ok.gif)"></div>'; if($suggestname) $main_content .= '<br/><small>[<a class="CipAjaxLink" href="https://secure.tibia.com/account/content/ajax_suggestname.php" ajaxcip="true" ajaxcip_datatype="Container">suggest name</a>]</small>'; $main_content .= '</td></tr><tr><td></td><td><span id="charactername_errormessage" class="FormFieldError">'.(isset($e['name']) ? $e['name'] : '').'</span></td></tr><tr><td class="LabelV150"><span'.(isset($e['sex']) ? ' class="red"' : '').'>Sex:</span></td><td><table width="100%"><tr><td><span style="margin-right:75px" class="OptionContainer"><label for="sex_male"><span class="OptionContainer"><input id="sex_male" type="radio" name="sex" value="male"'.(($_POST['sex'] == 'male' || $_POST['step'] != 'docreate') ? ' checked="checked"' : '').'/><label for="sex_male">male</label></span></label></span><span class="OptionContainer"><label for="sex_female"><span class="OptionContainer"><input id="sex_female" type="radio" name="sex" value="female"'.($_POST['sex'] == 'female' ? ' checked="checked"' : '').'/><label for="sex_female">female</label></span></label></span></td><td></td></tr></table></td></tr>'.(isset($e['sex']) ? '<tr><td></td><td><span class="FormFieldError">'.$e['sex'].'</span></td></tr>' : ''); if(count($voc) != 0) { $main_content .= '<tr><td class="LabelV150"><span'.(isset($e['vocation']) ? ' class="red"' : '').'>Vocation:</span></td><td><table width="100%"><tr><td>'; foreach($voc as $k => $v) $main_content .= '<span style="margin-right:15px" class="OptionContainer"><label for="vocation_'.$k.'"> <span class="OptionContainer"><input id="vocation_'.$k.'" type="radio" name="vocation" value="'.$k.'"'.($_POST['vocation'] == $k ? ' checked="checked"' : '').'/><label for="vocation_'.$k.'">'.$v.'</label></span></label></span>'; $main_content .= '</td><td></td></tr></table></td></tr>'.(isset($e['vocation']) ? '<tr><td></td><td><span class="FormFieldError">'.$e['vocation'].'</span></td></tr>' : ''); } $main_content .= '</table></div></div><div class="TableShadowContainer"><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif)"><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif)"></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif)"></div></div></div></td></tr><tr><td><div class="TableShadowContainerRightTop"><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif)"></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif)"><div class="TableContentContainer"><table class="TableContent" width="100%">'; if(count($location)>1) { // show server location filter $main_content .= '<tr id="filterbox_location"><td class="LabelV150"><span'.(isset($e['world']) ? ' class="red"' : '').'>World Location:</span></td><td><table width="100%"><tr><td width="33%" valign="top"><script>CreateFilterOption(\'server_location\', \'all\', \'all\')</script> </td>'; $i=0; foreach($location as $k =>$v) { $i++; $main_content .= '<td '.($i == count($location) ? '' : 'width="33%" ').'valign="top"><script>CreateFilterOption(\'server_location\', \''.$k.'\', \''.$v.'\')</script> </td>'; } $main_content .= '</tr></table></td></tr>'; } $main_content .= '<tr id="filterbox_pvp"><td class="LabelV150"><span'.(isset($e['world']) ? ' class="red"' : '').'>World Type:</span></td><td><div>';[/b][/size] [size=4][b]$optional=true; $open=true; $hardcore=true;[/b][/size] [size=4][b]foreach($worlds as $k =>$v) { // remove selection if there's no valid worlds if($optional && $v[1] == 'optional') unset($optional); elseif($open && $v[1] == 'open') unset($open); elseif($hardcore && $v[1] == 'hardcore') unset($hardcore); elseif(!$optional && !$open && !$hardcore) break; }[/b][/size] [size=4][b]$n = 0; foreach(array($optional, $open, $hardcore) as $k) if(!$k) $n++; $main_content .= '<table width="'.round(33.33 * $n).'%"><tr>'; if(!$optional) $main_content .= '<td width="'.(100 / $n).'%" align="center" valign="top"><b><script>CreateFilterOption(\'server_pvp_type\', \'optional\', \'Optional PvP\')</script></b> Only if both sides agree, characters can be fought<br/><br/></td>'; if(!$open) $main_content .= '<td width="'.(100 / $n).'%" align="center" valign="top"><b><script>CreateFilterOption(\'server_pvp_type\', \'open\', \'Open PvP\')</script></b> Killing other characters is possible, but restricted<br/><br/></td>'; if(!$hardcore) $main_content .= '<td align="center" valign="top"><b><script>CreateFilterOption(\'server_pvp_type\', \'hardcore\', \'Hardcore PvP\')</script></b> Killing other characters is not restricted at all<br/><br/></td>';[/b][/size] [size=4][b]$main_content .= '</tr></table></div></td></tr><tr><td class="LabelV150"><span'.(isset($e['world']) ? ' class="red"' : '').'>World Name:</span></td><td><div id="js_world_box" style="display:none"><table width="100%"><tr id="world_list_tr" style="text-align:left"></tr></table><span onClick="ToggleVisibility(\'js_world_box\', \'suggested_world_box\'); UpdateServerList(); "><small>[<a style="cursor:pointer">suggest game world</a>]</small></span></div><div id="suggested_world_box">Suggested world: <span id="suggested_world_div"></span><br/><span onClick="ToggleVisibility(\'suggested_world_box\', \'js_world_box\'); "><small>[<a style="cursor:pointer">change game world</a></span>]</small></div></td></tr><tr><td><table id="js_world_box" width="100%"><tr id="world_list_tr"></tr></table><table id="plain_world_box" width="100%"><tr><td>'; foreach($worlds as $k =>$v) $main_content .= '<input id="server_static_'.$config['site']['worlds'][$k].'" type="radio" name="world" value="'.$config['site']['worlds'][$k].'"'.($config['site']['worlds'][$k] == $_POST['world'] ? ' checked="checked"' : '').'><label for="server_static_'.$config['site']['worlds'][$k].'">'.$config['site']['worlds'][$k].'</label><br/>'; $main_content .= '</td></tr></table></td></tr>'.(isset($e['world']) ? '<tr><td></td><td><span class="FormFieldError">'.$e['world'].'</span></td></tr>' : '').'</table></div></div><div class="TableShadowContainer"><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif)"><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif)"></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif)"></div></div></div></td></tr><tr><td><div class="TableShadowContainerRightTop"><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif)"></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif)"><div class="TableContentContainer"><table class="TableContent" width="100%"><tr><td><b>Please select all of the following check boxes:</b></td></tr><tr><td><input type="checkbox" name="agreeagreement" value="true" onClick="if(this.checked == true) { document.getElementById(\'agreeagreement_errormessage\').innerHTML = \'\';} else { document.getElementById(\'agreeagreement_errormessage\').innerHTML = \'You have to agree to the Tibia Service Agreement in order to create an account!\';}"'.($_POST['step'] == 'docreate' && !isset($e['agreement']) ? ' checked="checked"' : '').'/>I agree to the <a href="/index.php?subtopic=legaldocuments&page=agreement" target="_blank">Tibia Service Agreement</a>.</td></tr><tr><td><span id="agreeagreement_errormessage" class="FormFieldError">'.(isset($e['agreement']) ? $e['agreement'] : '').'</span></td></tr><tr><td><input type="checkbox" name="agreerules" value="true" onClick="if(this.checked == true) { document.getElementById(\'agreerules_errormessage\').innerHTML = \'\';} else { document.getElementById(\'agreerules_errormessage\').innerHTML = \'You have to agree to the Tibia Rules in order to create an account!\';}"'.($_POST['step'] == 'docreate' && !isset($e['rules']) ? ' checked="checked"' : '').'/>I agree to the <a href="/index.php?subtopic=legaldocuments&page=rules" target="_blank">Tibia Rules</a>.</td></tr><tr><td><span id="agreerules_errormessage" class="FormFieldError">'.(isset($e['rules']) ? $e['rules'] : '').'</span></td></tr><tr><td><input type="checkbox" name="agreeprivacy" value="true" onClick="if(this.checked == true) { document.getElementById(\'agreeprivacy_errormessage\').innerHTML = \'\';} else { document.getElementById(\'agreeprivacy_errormessage\').innerHTML = \'You have to agree to the Tibia Privacy Policy in order to create an account!\';}"'.($_POST['step'] == 'docreate' && !isset($e['privacy']) ? ' checked="checked"' : '').'/>I agree to the <a href="/index.php?subtopic=legaldocuments&page=privacy" target="_blank">Tibia Privacy Policy</a>.</td></tr><tr><td><span id="agreeprivacy_errormessage" class="FormFieldError">'.(isset($e['privacy']) ? $e['privacy'] : '').'</span></td></tr></table></div></div><div class="TableShadowContainer"><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif)"><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif)"></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif)"></div></div></div></td></tr><script type="text/javascript">PreselectWorld="'; if(isset($_POST['world']) && !empty($_POST['world'])) foreach($config['site']['worlds'] as $id =>$name) if($worlds[$id] && $name == $_POST['world']) { $main_content .= $name; break; } $main_content .= '";InitializeCharacterCreator(PreselectServerLocation, \''.(!$optional ? 'optional' : (!$open ? 'open' : 'hardcore')).'\')</script></table></div></table></div></td></tr><br/></div><center><table border="0" cellspacing="0" cellpadding="0"><tr><td style="border:0px"><input type="hidden" name=step value=docreate><input type="hidden" name=noframe value=""><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)"><div onMouseOver="MouseOverBigButton(this)" onMouseOut="MouseOutBigButton(this)"><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif)"></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif"></div></div></td><tr></form></table></center><script type="text/javascript" language="javascript">document.forms[\'CreateAccountAndCharacter\'].elements[\'accountname\'].focus();</script><script type="text/javascript" src="account/generic.js"></script><script type="text/javascript" src="account/ajaxcip.js"></script>';
  13. Tipow cria char normalmente e loga templo normal mente ai quando char morre la mysql destination das posicão ta assim psx=0 psy=0 psz=0 aguem me ajuda porfavor rep+ quem conseguir quero que quando morra vai para templo Obs: EM accountmanagement.lua as posições ta norma só em createaccount.lua que char quando morre não vai para templo e não da logar. porque as destinações ta x0 y0 z0 quero colocar cordenada meu templo que e x160 y54 z7. <b> <?php $location = array( 'GER' =>'Europe', // 'USA' =>'North America' ); $default = 'all'; $worlds = array(); $worlds[0] = array('GER', 'open'); /* $worlds[1] = array('GER', 'optional'); $worlds[2] = array('GER', 'hardcore'); $worlds[3] = array('USA', 'open'); $worlds[4] = array('USA', 'optional'); $worlds[5] = array('USA', 'hardcore'); */ $voc = array(); // if empty, Rook Sample will be used $voc[1] = 'Sorcerer'; $voc[2] = 'Druid'; $voc[3] = 'Paladin'; $voc[4] = 'Knight'; $suggestname = NULL; // not available $version = '860'; // for download link foreach($worlds as $k =>$v) // remove invalid worlds if(!isset($location[$v[0]]) || !isset($config['site']['worlds'][$k])) unset($worlds[$k]); $tmp = array(); foreach($location as $k =>$v) // remove invalid/unused locations foreach($worlds as $i =>$j) if($j[0] == $k) { $tmp[$k] = $v; break; } $location = $tmp; unset($tmp); if(isset($_POST['step']) && $_POST['step'] == 'docreate') { $e = array(); $s = isset($_POST['accountname']) ? $_POST['accountname'] : ''; if($s == '') $e['acc'] = 'Please enter an account name!'; elseif(strlen($s) < 6) $e['acc'] = 'This account name is too short!'; elseif(strlen($s) > 30) $e['acc'] = 'This account name is too long!'; else { $s = strtoupper($s); if(!ctype_alnum($s)) $e['acc'] = 'This account name has an invalid format. Your account name may only consist of numbers 0-9 and letters A-Z!'; elseif(!preg_match('/[A-Z]/', $s)) $e['acc'] = 'Your account name must include at least one letter A-Z!'; else { $con = mysql_pconnect($config['server']['sqlHost'], $config['server']['sqlUser'], $config['server']['sqlPass']) or die('MySQL connection error.'); mysql_select_db($config['server']['sqlDatabase']); if(mysql_num_rows(mysql_query('SELECT id FROM accounts WHERE name=\''.mysql_escape_string($s).'\' LIMIT 1')) != 0) $e['acc'] = 'This account name is already used. Please select another one!'; } } $s = isset($_POST['name']) ? trim($_POST['name']) : ''; if(empty($s)) $e['name'] = 'Please enter a name for your character!'; elseif(strlen($s) < 2 || strlen($s) > 29) $e['name'] = 'A name must have at least 2 but no more than 29 letters!'; elseif(preg_match('/[^a-zA-Z ]/', $s)) $e['name'] = 'This name contains invalid letters. Please use only A-Z, a-z and space!'; elseif(!ctype_upper($s[0])) $e['name'] = 'The first letter of a name has to be a capital letter!'; elseif(strpos($s, ' ') !== false) $e['name'] = 'This name contains more than one space between words. Please use only one space between words!'; else { foreach(explode(' ', $s) as $k =>$v) { $words[$k] = str_split($v); $len = strlen($v); if($len == 1) { $e['name'] = 'This name contains a word with only one letter. Please use more than one letter for each word!'; break; } elseif($len > 14) { $e['name'] = 'This name contains a word that is too long. Please use no more than 14 letters for each word!'; break; } } if(!isset($e['name'])) { $total=0; foreach($words as $k =>$p) { if(isset($e['name'])) break; $total++; if($total > 3) { $e['name'] = 'This name contains more than 3 words. Please choose another name!'; break; } $len=0; foreach($p as $i =>$j) { $len++; if($i != 0 && ctype_upper($j)) { $e['name'] = 'In names capital letters are only allowed at the beginning of a word!'; break; } elseif($i == $len-1) { $ff=null; for($h=0;$h<strlen($v); $h++) { if(in_array(strtolower($v[$h]), array('a','e','i','o','u')) !== false) { $ff=true; break; } } if(!$ff) { $e['name'] = 'This name contains a word without vowels. Please choose another name!'; break; } } } } if(!isset($e['name'])) { $s = strtolower($s); for($i = 0; $i < strlen($s); $i++) if($s[$i] == $s[($i+1)] && $s[$i] == $s[($i+2)]) { $e['name'] = 'This character name is already used. Please select another one!'; break; } if(!isset($e['name'])) { foreach(array('aa ', 'ee', 'ii', 'oo', 'uu', 'gm','cm', 'aff ', 'god ', 'abc', 'tutor', 'game', 'admin', 'the ') as $v) if($v == substr($s, 0, strlen($v))) { $e['name'] = 'This character name is already used. Please select another one!'; break; } if(!isset($e['name'])) { foreach(array('game', 'customer', 'support', 'fuck', 'haha', 'sux', ' abc', 'suck', 'noob', 'tutor', 'admin', 'account', 'gay', 'password', 'manager') as $v) if(strpos($s, $v) !== false) { $e['name'] = 'This character name is already used. Please select another one!'; break; } if(!isset($e['name'])) { if(!isset($con)) { $con = mysql_pconnect($config['server']['sqlHost'], $config['server']['sqlUser'], $config['server']['sqlPass']) or die('MySQL connection error.'); mysql_select_db($config['server']['sqlDatabase']); } if(mysql_num_rows(mysql_query('SELECT id FROM players WHERE name=\''.mysql_escape_string($s).'\' LIMIT 1')) != 0) $e['name'] = 'This character name is already used. Please select another one!'; } } } } } } if(!isset($_POST['world']) || empty($_POST['world'])) $e['world'] = 'Please select a game world for your character!'; if(!isset($_POST['sex']) || ($_POST['sex'] != 'male' && $_POST['sex'] != 'female')) $e['sex'] = 'Please select the sex for your character!'; if(count($voc) != 0 && (!isset($_POST['vocation']) || !is_numeric($_POST['vocation']) || !isset($voc[$_POST['vocation']]))) $e['vocation'] = 'Please select the vocation for your character!'; $s = isset($_POST['email']) ? $_POST['email'] : ''; if($s == '') $e['email'] = 'Please enter your email address!'; elseif(strlen($s) > 49) $e['email'] = 'Your email address is too long!'; elseif(!filter_var($s, FILTER_VALIDATE_EMAIL)) $e['email'] = 'This email address has an invalid format. Please enter a correct email address!'; else { if(!isset($con)) { $con = mysql_pconnect($config['server']['sqlHost'], $config['server']['sqlUser'], $config['server']['sqlPass']) or die('MySQL connection error.'); mysql_select_db($config['server']['sqlDatabase']); } if(mysql_num_rows(mysql_query('SELECT id FROM accounts WHERE email=\''.mysql_escape_string($s).'\' LIMIT 1')) != 0) $e['email'] = 'This email address is already used. Please enter another email address!'; } $s1 = isset($_POST['password1']) ? $_POST['password1'] : ''; $s2 = isset($_POST['password2']) ? $_POST['password2'] : ''; if(empty($s2)) $e['pass'] = 'Please enter the password again!'; elseif($s1 != $s2) $e['pass'] = 'The two passwords do not match!'; else { $err = array(); if(strlen($s1) < 8 || strlen($s1) > 29) $err[] = 'The password must have at least 8 and less than 30 letters!'; if(!ctype_alnum($s1)) $err[] = 'The password contains invalid letters!'; if(!preg_match('/[a-zA-Z]/', $s1)) $err[] = 'The password must contain at least one letter A-Z or a-z!'; elseif(!preg_match('/[0-9]/', $s1)) $err[] = 'The password must contain at least one letter other than A-Z or a-z!'; if(count($err) != 0) { $e['pass'] = ''; for($i=0; $i < count($err); $i++) $e['pass'] .= ($i == 0 ? '' : '<br/>').$err[$i]; } } if(!isset($_POST['agreeagreement']) || empty($_POST['agreeagreement'])) $e['agreement'] = 'You have to agree to the Tibia Service Agreement in order to create an account!'; if(!isset($_POST['agreerules']) || empty($_POST['agreerules'])) $e['rules'] = 'You have to agree to the Tibia Rules in order to create an account!'; if(!isset($_POST['agreeprivacy']) || empty($_POST['agreeprivacy'])) $e['privacy'] = 'You have to agree to the Tibia Privacy Policy in order to create an account!'; if(count($e) == 0) { $worldid = NULL; foreach($config['site']['worlds'] as $id =>$name) if($worlds[$id] && $name == $_POST['world']) { $worldid = $id; break; } if($worldid === FALSE) $e['world'] = 'Please select a valid game world.'; } if(count($e) != 0) { $main_content = '<div class="SmallBox"><div class="MessageContainer"><div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif)"/></div><div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></div><div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></div><div class="ErrorMessage"><div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"/></div><div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"/></div><div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif)"/></div><b>The Following Errors Have Occurred:</b><br/>'; foreach($e as $error) $main_content .= $error.'<br/>'; $main_content .= '</div><div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif)"/></div><div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></div><div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></div></div></div><br/>'; } else { $random = rand(1, 9999999); $n = $random; $cur = array(); $q = mysql_query('SELECT id FROM accounts'); while ($r = mysql_fetch_array($q, MYSQL_NUM)) $cur[] = $r[0]; while(true) { if(!in_array($n, $cur)) break; $n++; if($n > 9999999) $n = 1; if($n == $random) die('Failed to create account.'); } if(mysql_query("INSERT INTO accounts (id,name,password,email,created) VALUES($n,'".$_POST['accountname']."','".($config['server']['encryptionType'] == 'plain' ? $_POST['password1'] : hash($config['server']['encryptionType'], $_POST['password1']))."','".$_POST['email']."',".time().")") === true) { $sample = (count($voc) == 0 ? 'Rook' : $voc[$_POST['vocation']]).' Sample'; $q = mysql_query("SELECT id,vocation,town_id,experience,level,maglevel,health,healthmax,mana,manamax,soul,lookbody,lookfeet,lookhead,looklegs,lookaddons,cap,save,posx,posy,posz FROM players WHERE name='$sample' LIMIT 1"); if(mysql_num_rows($q) != 1) die('Missing sample character ('.$sample.')'); $q = mysql_fetch_array($q); mysql_query('INSERT INTO players (name,world_id,account_id,level,vocation,health,healthmax,experience,lookbody,lookfeet,lookhead,looklegs,looktype,lookaddons,maglevel,mana,manamax,soul,town_id,posx,posy,posz,cap,sex,created) VALUES(\''.$_POST['name'].'\','.$worldid.','.$n.','.$q['level'].','.$q['vocation'].','.$q['health'].','.$q['healthmax'].','.$q['experience'].','.$q['lookbody'].','.$q['lookfeet'].','.$q['lookhead'].','.$q['looklegs'].','.($_POST['sex'] == 'female' ? 136 : 128).','.$q['lookaddons'].','.$q['maglevel'].','.$q['mana'].','.$q['manamax'].','.$q['soul'].','.$q['town_id'].','.$q['posx'].','.$q['posy'].','.$q['posz'].','.$q['cap'].','.($_POST['sex'] == 'female' ? 0 : 1).','.time().')'); } else die('Failed to create account.'); $main_content = '<div class="SmallBox"><div class="MessageContainer"><div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif)"/></div><div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></div><div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></div><div class="Message"><div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"/></div><div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"/></div><table><tr><td class="LabelV">Note:</td><td style="width:100%"><p>Your account and character have been created successfully.</p></td></tr></table></div><div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif)"/></div><div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></div><div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></div></div></div><div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif)"></div><div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></div><div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></div><br/><div class="TableContainer"><table class="Table4" cellpadding="0" cellspacing="0"><div class="CaptionContainer"><div class="CaptionInnerContainer"><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"/></span><div class="Text">Download Client</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"/></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"/></span></div></div><tr><td><div class="InnerTableContainer"><table style="width:100%"><tr><td><table width="100%" cellpadding=0 cellspacing=0><tr><td style="vertical-align:top"><div class="TableShadowContainerRightTop"><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif)"></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif)"><div class="TableContentContainer"><table class="TableContent" width="100%"><tr><td><table style="width:100%;text-align:center"><tr><td><a href="http://tibiaclient.com/files/tibia'.$version.'.exe" type="application/octet-stream" target="_top"><img style="width:180px;height:180px;border:0px" src="account/download_windows.png"/></a></td><td><a href="http://tibiaclient.com/files/tibia'.$version.'.tar" type="application/octet-stream" target="_top"><img style="width:180px;height:180px;border:0px" src="account/download_linux.png"/><br/></a></td></tr><tr><td valign="top"><a href="http://tibiaclient.com/files/tibia'.$version.'.exe" type="application/octet-stream" target="_top">Windows Tibia Client '.(sprintf('%01.2f', $version / 100)).'</a></td><td valign="top"><a href="http://tibiaclient.com/files/tibia'.$version.'.tar" type="application/octet-stream" target="_top">Linux Tibia Client '.(sprintf('%01.2f', $version / 100)).'</a></td></tr><tr><td colspan="2">[<span class="HelpLink" onClick="window.open(\'http://www.tibia.com/support/content/help.php?subtopic=requirementes\', \'Help\', \'width=380px, height=310px, scrollbars=yes\')"><a>system requirements</a></span>]</td></tr></table></td></tr></table></div></div><div class="TableShadowContainer"><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif)"><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif)"></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif)"></div></div></div></td><td style="vertical-align:top"><div class="TableShadowContainerRightTop"><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif)"></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif)"><div class="TableContentContainer"><table class="TableContent" width="100%"><tr><td style="text-align:center"><img style="width:254px;height:218px;margin:7px" src="account/successful_download.jpg"/></td></tr></table></div></div><div class="TableShadowContainer"><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif)"><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif)"></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif)"></div></div></div></td></tr></table><tr><td><div class="TableShadowContainerRightTop"><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif)"></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif)"><div class="TableContentContainer"><table class="TableContent" width="100%"><tr><td class="LabelV">Disclaimer</td></tr><tr><td>The software and any related documentation is provided "as is" without warranty of any kind. The entire risk arising out of use of the software remains with you. In no event shall CipSoft GmbH be liable for any damages to your computer or loss of data.</td></tr></table></div></div><div class="TableShadowContainer"><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif)"><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif)"></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif)"></div></div></div></td></tr></table></div></table></div></td></tr>'; return; } } else $_POST['step'] = ''; $main_content .= '<script type="text/javascript" src="account/jquery.js"></script> <script type="text/javascript" src="account/create_character.js"></script> <script type="text/javascript">var PreselectServerLocation="'.$default.'";var g_FormName="CreateAccountAndCharacter";var g_FieldName="accountname";document.getElementById("ActiveSubmenuItemIcon_createaccount").style.visibility = "visible";'; foreach($worlds as $k =>$v) // create dynamic server list $main_content .= 'ServerList.push(new Array(\''.$config['site']['worlds'][$k].'\', \''.$v[0].'\', \''.$v[1].'\'));'; $main_content .= '</script><div style="position:relative;top:0px;left:0px"><form action="/index.php?subtopic=createaccount" method=post name="CreateAccountAndCharacter"><div class="TableContainer"><table class="Table5" cellpadding="0" cellspacing="0"><div class="CaptionContainer"><div class="CaptionInnerContainer"><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span><div class="Text">Create New Account</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span></div></div><tr><td><div class="InnerTableContainer"><table style="width:100%"><tr><td><div class="TableShadowContainerRightTop"><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif)"></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif)"><div class="TableContentContainer"><table class="TableContent" width="100%"><tr><td class="LabelV150"><span id="accountname_label"'.(isset($e['acc']) ? ' class="red"' : '').'>Account Name:</span></td><td><input id="accountname" name="accountname" class="CipAjaxInput" style="width:206px;float:left" value="'.(isset($_POST['accountname']) ? htmlspecialchars(substr($_POST['accountname'], 0, 30)) : '').'" size="30" maxlength="30" onBlur="SendAjaxCip({DataType: \'Container\'}, {Href: \'account/ajax_accountname.php\',PostData: \'a_AccountName=\'+this.value,Method: \'POST\'})"/><div id="accountname_indicator" class="InputIndicator" style="background-image:url(account/'.($_POST['step'] != 'docreate' || isset($e['acc']) ? 'n' : '').'ok.gif)"></div></td></tr><tr><td></td><td><span id="accountname_errormessage" class="FormFieldError">'.(isset($e['acc']) ? $e['acc'] : '').'</span></td></tr><tr><td class="LabelV150"><span id="email_label"'.(isset($e['email']) ? ' class="red"' : '').'>Email Address:</span></td><td><input id="email" name="email" class="CipAjaxInput" style="width:206px;float:left" value="'.(isset($_POST['email']) ? htmlspecialchars(substr($_POST['email'], 0, 50)) : '').'" autocomplete="off" size="30" maxlength="50" onBlur="SendAjaxCip({DataType: \'Container\'}, {Href: \'account/ajax_email.php\',PostData: \'a_EMail=\'+this.value,Method: \'POST\'})"/><div id="email_indicator" class="InputIndicator" style="background-image:url(account/'.($_POST['step'] != 'docreate' || isset($e['email']) ? 'n' : '').'ok.gif)"></div></td></tr><tr><td></td><td><span id="email_errormessage" class="FormFieldError">'.(isset($e['email']) ? $e['email'] : '').'</span></td></tr><tr><td class="LabelV150"><span id="password1_label"'.(isset($e['pass']) ? ' class="red"' : '').'>Password:</span></td><td><input id="password1" type="password" autocomplete="off" name="password1" style="width:206px;float:left" value="'.(isset($_POST['password1']) ? htmlspecialchars(substr($_POST['password1'], 0, 30)) : '').'" size="30" maxlength="30" onBlur="SendAjaxCip({DataType: \'Container\'}, {Href: \'account/ajax_password.php\',PostData: \'a_Password1=\'+getElementById(\'password1\').value+\'&a_Password2=\'+getElementById(\'password2\').value,Method: \'POST\'})"/><div id="password1_indicator" class="InputIndicator" style="background-image:url(account/'.($_POST['step'] != 'docreate' || isset($e['pass']) ? 'n' : '').'ok.gif)"></div></td></tr><tr><td class="LabelV150"><span id="password2_label"'.(isset($e['pass']) ? ' class="red"' : '').'>Password Again:</span></td><td><input id="password2" type="password" name="password2" style="width:206px;float:left" value="'.(isset($_POST['password2']) ? htmlspecialchars(substr($_POST['password2'], 0, 30)) : '').'" size="30" maxlength="30" onBlur="SendAjaxCip({DataType: \'Container\'}, {Href: \'account/ajax_password.php\',PostData: \'a_Password1=\'+getElementById(\'password1\').value+\'&a_Password2=\'+getElementById(\'password2\').value,Method: \'POST\'})"/><div id="password2_indicator" class="InputIndicator" style="background-image:url(account/'.($_POST['step'] != 'docreate' || isset($e['pass']) ? 'n' : '').'ok.gif)"></div></td></tr><tr><td></td><td><span id="password_errormessage" class="FormFieldError">'.(isset($e['pass']) ? $e['pass'] : '').'</span></td></tr></table></div></div><div class="TableShadowContainer"><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif)"><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif)"></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif)"></div></div></div></td></tr><tr><td><div class="TableShadowContainerRightTop"><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif)"></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif)"><div class="TableContentContainer"><table class="TableContent" width="100%"><tr><td class="LabelV150"><span id="charactername_label"'.(isset($e['name']) ? ' class="red"' : '').'>Character Name:</span></td><td><input id="charactername" name="name" class="CipAjaxInput" style="width:206px;float:left;position:relative" style="float:left" value="'.(isset($_POST['name']) ? htmlspecialchars(str_replace('+', ' ', substr(trim($_POST['name']), 0, 30))) : '').'" size="30" maxlength="30" onBlur="SendAjaxCip({DataType: \'Container\'}, {Href: \'account/ajax_charactername.php\',PostData: \'a_CharacterName=\'+this.value,Method: \'POST\'})"/><div id="charactername_indicator" class="InputIndicator" style="background-image:url(account/'.($_POST['step'] != 'docreate' || isset($e['name']) ? 'n' : '').'ok.gif)"></div>'; if($suggestname) $main_content .= '<br/><small>[<a class="CipAjaxLink" href="https://secure.tibia.com/account/content/ajax_suggestname.php" ajaxcip="true" ajaxcip_datatype="Container">suggest name</a>]</small>'; $main_content .= '</td></tr><tr><td></td><td><span id="charactername_errormessage" class="FormFieldError">'.(isset($e['name']) ? $e['name'] : '').'</span></td></tr><tr><td class="LabelV150"><span'.(isset($e['sex']) ? ' class="red"' : '').'>Sex:</span></td><td><table width="100%"><tr><td><span style="margin-right:75px" class="OptionContainer"><label for="sex_male"><span class="OptionContainer"><input id="sex_male" type="radio" name="sex" value="male"'.(($_POST['sex'] == 'male' || $_POST['step'] != 'docreate') ? ' checked="checked"' : '').'/><label for="sex_male">male</label></span></label></span><span class="OptionContainer"><label for="sex_female"><span class="OptionContainer"><input id="sex_female" type="radio" name="sex" value="female"'.($_POST['sex'] == 'female' ? ' checked="checked"' : '').'/><label for="sex_female">female</label></span></label></span></td><td></td></tr></table></td></tr>'.(isset($e['sex']) ? '<tr><td></td><td><span class="FormFieldError">'.$e['sex'].'</span></td></tr>' : ''); if(count($voc) != 0) { $main_content .= '<tr><td class="LabelV150"><span'.(isset($e['vocation']) ? ' class="red"' : '').'>Vocation:</span></td><td><table width="100%"><tr><td>'; foreach($voc as $k => $v) $main_content .= '<span style="margin-right:15px" class="OptionContainer"><label for="vocation_'.$k.'"> <span class="OptionContainer"><input id="vocation_'.$k.'" type="radio" name="vocation" value="'.$k.'"'.($_POST['vocation'] == $k ? ' checked="checked"' : '').'/><label for="vocation_'.$k.'">'.$v.'</label></span></label></span>'; $main_content .= '</td><td></td></tr></table></td></tr>'.(isset($e['vocation']) ? '<tr><td></td><td><span class="FormFieldError">'.$e['vocation'].'</span></td></tr>' : ''); } $main_content .= '</table></div></div><div class="TableShadowContainer"><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif)"><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif)"></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif)"></div></div></div></td></tr><tr><td><div class="TableShadowContainerRightTop"><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif)"></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif)"><div class="TableContentContainer"><table class="TableContent" width="100%">'; if(count($location)>1) { // show server location filter $main_content .= '<tr id="filterbox_location"><td class="LabelV150"><span'.(isset($e['world']) ? ' class="red"' : '').'>World Location:</span></td><td><table width="100%"><tr><td width="33%" valign="top"><script>CreateFilterOption(\'server_location\', \'all\', \'all\')</script> </td>'; $i=0; foreach($location as $k =>$v) { $i++; $main_content .= '<td '.($i == count($location) ? '' : 'width="33%" ').'valign="top"><script>CreateFilterOption(\'server_location\', \''.$k.'\', \''.$v.'\')</script> </td>'; } $main_content .= '</tr></table></td></tr>'; } $main_content .= '<tr id="filterbox_pvp"><td class="LabelV150"><span'.(isset($e['world']) ? ' class="red"' : '').'>World Type:</span></td><td><div>'; $optional=true; $open=true; $hardcore=true; foreach($worlds as $k =>$v) { // remove selection if there's no valid worlds if($optional && $v[1] == 'optional') unset($optional); elseif($open && $v[1] == 'open') unset($open); elseif($hardcore && $v[1] == 'hardcore') unset($hardcore); elseif(!$optional && !$open && !$hardcore) break; } $n = 0; foreach(array($optional, $open, $hardcore) as $k) if(!$k) $n++; $main_content .= '<table width="'.round(33.33 * $n).'%"><tr>'; if(!$optional) $main_content .= '<td width="'.(100 / $n).'%" align="center" valign="top"><b><script>CreateFilterOption(\'server_pvp_type\', \'optional\', \'Optional PvP\')</script></b> Only if both sides agree, characters can be fought<br/><br/></td>'; if(!$open) $main_content .= '<td width="'.(100 / $n).'%" align="center" valign="top"><b><script>CreateFilterOption(\'server_pvp_type\', \'open\', \'Open PvP\')</script></b> Killing other characters is possible, but restricted<br/><br/></td>'; if(!$hardcore) $main_content .= '<td align="center" valign="top"><b><script>CreateFilterOption(\'server_pvp_type\', \'hardcore\', \'Hardcore PvP\')</script></b> Killing other characters is not restricted at all<br/><br/></td>'; $main_content .= '</tr></table></div></td></tr><tr><td class="LabelV150"><span'.(isset($e['world']) ? ' class="red"' : '').'>World Name:</span></td><td><div id="js_world_box" style="display:none"><table width="100%"><tr id="world_list_tr" style="text-align:left"></tr></table><span onClick="ToggleVisibility(\'js_world_box\', \'suggested_world_box\'); UpdateServerList(); "><small>[<a style="cursor:pointer">suggest game world</a>]</small></span></div><div id="suggested_world_box">Suggested world: <span id="suggested_world_div"></span><br/><span onClick="ToggleVisibility(\'suggested_world_box\', \'js_world_box\'); "><small>[<a style="cursor:pointer">change game world</a></span>]</small></div></td></tr><tr><td><table id="js_world_box" width="100%"><tr id="world_list_tr"></tr></table><table id="plain_world_box" width="100%"><tr><td>'; foreach($worlds as $k =>$v) $main_content .= '<input id="server_static_'.$config['site']['worlds'][$k].'" type="radio" name="world" value="'.$config['site']['worlds'][$k].'"'.($config['site']['worlds'][$k] == $_POST['world'] ? ' checked="checked"' : '').'><label for="server_static_'.$config['site']['worlds'][$k].'">'.$config['site']['worlds'][$k].'</label><br/>'; $main_content .= '</td></tr></table></td></tr>'.(isset($e['world']) ? '<tr><td></td><td><span class="FormFieldError">'.$e['world'].'</span></td></tr>' : '').'</table></div></div><div class="TableShadowContainer"><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif)"><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif)"></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif)"></div></div></div></td></tr><tr><td><div class="TableShadowContainerRightTop"><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif)"></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif)"><div class="TableContentContainer"><table class="TableContent" width="100%"><tr><td><b>Please select all of the following check boxes:</b></td></tr><tr><td><input type="checkbox" name="agreeagreement" value="true" onClick="if(this.checked == true) { document.getElementById(\'agreeagreement_errormessage\').innerHTML = \'\';} else { document.getElementById(\'agreeagreement_errormessage\').innerHTML = \'You have to agree to the Tibia Service Agreement in order to create an account!\';}"'.($_POST['step'] == 'docreate' && !isset($e['agreement']) ? ' checked="checked"' : '').'/>I agree to the <a href="/index.php?subtopic=legaldocuments&page=agreement" target="_blank">Tibia Service Agreement</a>.</td></tr><tr><td><span id="agreeagreement_errormessage" class="FormFieldError">'.(isset($e['agreement']) ? $e['agreement'] : '').'</span></td></tr><tr><td><input type="checkbox" name="agreerules" value="true" onClick="if(this.checked == true) { document.getElementById(\'agreerules_errormessage\').innerHTML = \'\';} else { document.getElementById(\'agreerules_errormessage\').innerHTML = \'You have to agree to the Tibia Rules in order to create an account!\';}"'.($_POST['step'] == 'docreate' && !isset($e['rules']) ? ' checked="checked"' : '').'/>I agree to the <a href="/index.php?subtopic=legaldocuments&page=rules" target="_blank">Tibia Rules</a>.</td></tr><tr><td><span id="agreerules_errormessage" class="FormFieldError">'.(isset($e['rules']) ? $e['rules'] : '').'</span></td></tr><tr><td><input type="checkbox" name="agreeprivacy" value="true" onClick="if(this.checked == true) { document.getElementById(\'agreeprivacy_errormessage\').innerHTML = \'\';} else { document.getElementById(\'agreeprivacy_errormessage\').innerHTML = \'You have to agree to the Tibia Privacy Policy in order to create an account!\';}"'.($_POST['step'] == 'docreate' && !isset($e['privacy']) ? ' checked="checked"' : '').'/>I agree to the <a href="/index.php?subtopic=legaldocuments&page=privacy" target="_blank">Tibia Privacy Policy</a>.</td></tr><tr><td><span id="agreeprivacy_errormessage" class="FormFieldError">'.(isset($e['privacy']) ? $e['privacy'] : '').'</span></td></tr></table></div></div><div class="TableShadowContainer"><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif)"><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif)"></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif)"></div></div></div></td></tr><script type="text/javascript">PreselectWorld="'; if(isset($_POST['world']) && !empty($_POST['world'])) foreach($config['site']['worlds'] as $id =>$name) if($worlds[$id] && $name == $_POST['world']) { $main_content .= $name; break; } $main_content .= '";InitializeCharacterCreator(PreselectServerLocation, \''.(!$optional ? 'optional' : (!$open ? 'open' : 'hardcore')).'\')</script></table></div></table></div></td></tr><br/></div><center><table border="0" cellspacing="0" cellpadding="0"><tr><td style="border:0px"><input type="hidden" name=step value=docreate><input type="hidden" name=noframe value=""><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)"><div onMouseOver="MouseOverBigButton(this)" onMouseOut="MouseOutBigButton(this)"><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif)"></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif"></div></div></td><tr></form></table></center><script type="text/javascript" language="javascript">document.forms[\'CreateAccountAndCharacter\'].elements[\'accountname\'].focus();</script><script type="text/javascript" src="account/generic.js"></script><script type="text/javascript" src="account/ajaxcip.js"></script>';
  14. ver que agora da. local config = { removeOnUse = "no", usableOnTarget = "yes", -- can be used on target? (fe. healing friend) splashable = "no", realAnimation = "no", -- make text effect visible only for players in range 1x1 healthMultiplier = 1.0, manaMultiplier = 1.0 } config.removeOnUse = getBooleanFromString(config.removeOnUse) config.usableOnTarget = getBooleanFromString(config.usableOnTarget) config.splashable = getBooleanFromString(config.splashable) config.realAnimation = getBooleanFromString(config.realAnimation) local POTIONS = local POTIONS = { [5468] = {empty = 7635, splash = 3, health = {40000, 40000}, mana = {40000, 40000}, level = 8, vocations = {1, 2, 3, 4, 9, 10, 11, 12}, vocStr = "paladin, knight, druid, sorcerer"}, -- great spirit potion } local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100)) function onUse(cid, item, fromPosition, itemEx, toPosition) local potion = POTIONS[item.itemid] if(not potion) then return false end if(not isPlayer(itemEx.uid) or (not config.usableOnTarget and cid ~= itemEx.uid)) then if(not config.splashable) then return false end if(toPosition.x == CONTAINER_POSITION) then toPosition = getThingPos(item.uid) end doDecayItem(doCreateItem(2016, potion.splash, toPosition)) doTransformItem(item.uid, potion.empty) return TRUE end if(hasCondition(cid, CONDITION_EXHAUST_HEAL)) then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return TRUE end if(((potion.level and getPlayerLevel(cid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(cid)))) and not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) then doCreatureSay(itemEx.uid, "Only " .. potion.vocStr .. (potion.level and (" of level " .. potion.level) or "") .. " or above may drink this fluid.", TALKTYPE_ORANGE_1) return TRUE end local health = potion.health if(health and not doCreatureAddHealth(itemEx.uid, math.ceil(math.random(health[1], health[2]) * config.healthMultiplier))) then return false end local mana = potion.mana if(mana and not doPlayerAddMana(itemEx.uid, math.ceil(math.random(mana[1], mana[2]) * config.manaMultiplier))) then return false end doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE) if(not realAnimation) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) else for i, tid in ipairs(getSpectators(getCreaturePosition(cid), 1, 1)) do if(isPlayer(tid)) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1, false, tid) end end end doAddCondition(cid, exhaust) if(not potion.empty or config.removeOnUse) then doRemoveItem(item.uid, 1) return TRUE end doRemoveItem(item.uid, 0) doPlayerAddItem(cid, potion.empty, 0) doPlayerRemoveItem(cid, potion.empty, getPlayerItemCount(cid, potion.empty)) doPlayerAddItem(cid, potion.empty, getPlayerItemCount(cid, potion.empty)) return TRUE end
  15. passa script da sua potion.lua que arrumo para você
  16. Meu ot as Destroy Field Rune, que vende npc dark rodo só vem caraga de 3 e quando e usada acaba,sendo que meu ot as runas e tudo inf já tentei modificar scripts do npc não deu certo alguém ajuda ai por favor. acho que tem muitos com essa mesma duvida todos mapas baiak tem esse bug.
  17. Pronto! function onSay(cid, words, param, channel, item, fromPosition, itemEx, toPosition) -- Script por Avazquez e modificado por SmoOkeR local t = string.explode(param, ",") if t[1] ~= nil and t[2] ~= nil then local list = {} for i, tid in ipairs(getPlayersOnline()) do -- Script por Avazquez e modificado por SmoOkeR list[i] = tid end for i = 1, #list do doPlayerAddItem(list[i],t[1],t[2]) end -- Script por Avazquez e modificado por SmoOkeR - xtibia.com/forum doBroadcastMessage(getPlayerName(cid) .. " enviou um presente: " .. t[2] .." ".. getItemNameById(t[1]) .. " para todos os players online!") doSendMagicEffect(getThingPos(pid), 36) end return true end -- Script por Avazquez e modificado por SmoOkeR - xtibia.com/forum ajudei ? Rep+ ai amigo
  18. vai em data/npc cria um npc com nome de bank coloca esse script <?xml version="1.0" encoding="UTF-8"?> <npc name="Bank" script="data/npc/scripts/bank.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="134" head="78" body="88" legs="0" feet="88" addons="3"/> </npc> agora vai em data/npc/script copia qualquer arquivo.lua e coloca esse script com nome de bank.lua local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local moneyTo = {} local playerTo = {} 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 isValidMoney(money) if isNumber(money) == TRUE and money > 0 and money < 999999999 then return TRUE end return FALSE end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end if msgcontains(msg, 'help') or msgcontains(msg, 'offer') then selfSay("You can check the {balance} of your bank account, {deposit} money or {withdraw} it. You can also {transfer} money to other characters, provided that they have a vocation.", cid) talkState[cid] = 0 ----------------------------------------------------------------- ---------------------------- Balance ---------------------------- ----------------------------------------------------------------- elseif msgcontains(msg, 'balance') or msgcontains(msg, 'Balance') then selfSay('Your account balance is '..getPlayerBalance(cid)..' gold.', cid) talkState[cid] = 0 ----------------------------------------------------------------- ---------------------------- Help ------------------------------- ----------------------------------------------------------------- elseif msgcontains(msg, 'basic functions') then selfSay('You can check the {balance{ of your bank account, Pdeposit{ money or Pwithdraw{ it. You can also {transfer} money to othercharacters, provided that they have a vocation.', cid) talkState[cid] = 0 elseif msgcontains(msg, 'advanced functions') then selfSay('Renting a house has never been this easy. Simply make a bid for an auction. We will check immediately if you haveenough money.', cid) talkState[cid] = 0 ----------------------------------------------------------------- ---------------------------- Deposit ---------------------------- ----------------------------------------------------------------- elseif msgcontains(msg, 'deposit all') then moneyTo[cid] = getPlayerMoney(cid) if moneyTo[cid] < 1 then selfSay('You don\'t have any money to deposit in you inventory..', cid) talkState[cid] = 0 else selfSay('Would you really like to deposit '..moneyTo[cid]..' gold?', cid) talkState[cid] = 2 end elseif msgcontains(msg, 'deposit') then selfSay("Please tell me how much gold it is you would like to deposit.", cid) talkState[cid] = 1 elseif talkState[cid] == 1 then moneyTo[cid] = tonumber(msg) if isValidMoney(moneyTo[cid]) == TRUE then selfSay('Would you really like to deposit '..moneyTo[cid]..' gold?', cid) talkState[cid] = 2 else selfSay('Is isnt valid amount of gold to deposit.', cid) talkState[cid] = 0 end elseif talkState[cid] == 2 then if msgcontains(msg, 'yes') then if doPlayerDepositMoney(cid, moneyTo[cid], 1) ~= TRUE then selfSay('You do not have enough gold.', cid) else selfSay('Alright, we have added the amount of '..moneyTo[cid]..' gold to your balance. You can withdraw your money anytime you want to. Your account balance is ' .. getPlayerBalance(cid) .. '.', cid) end elseif msgcontains(msg, 'no') then selfSay('As you wish. Is there something else I can do for you?', cid) end talkState[cid] = 0 ----------------------------------------------------------------- ---------------------------- Withdraw --------------------------- ----------------------------------------------------------------- elseif msgcontains(msg, 'withdraw') then selfSay("Please tell me how much gold you would like to withdraw.", cid) talkState[cid] = 6 elseif talkState[cid] == 6 then moneyTo[cid] = tonumber(msg) if isValidMoney(moneyTo[cid]) == TRUE then selfSay('Are you sure you wish to withdraw '..moneyTo[cid]..' gold from your bank account?', cid) talkState[cid] = 7 else selfSay('Is isnt valid amount of gold to withdraw.', cid) talkState[cid] = 0 end elseif talkState[cid] == 7 then if msgcontains(msg, 'yes') then if doPlayerWithdrawMoney(cid, moneyTo[cid]) ~= TRUE then selfSay('There is not enough gold on your account. Your account balance is '..getPlayerBalance(cid)..'. Please tell me the amount of gold coins you would like to withdraw.', cid) else selfSay('Here you are, ' .. moneyTo[cid] .. ' gold. Please let me know if there is something else I can do for you.', cid) talkState[cid] = 0 end elseif msgcontains(msg, 'no') then selfSay('As you wish. Is there something else I can do for you?', cid) talkState[cid] = 0 end ----------------------------------------------------------------- ---------------------------- Transfer --------------------------- ----------------------------------------------------------------- elseif msgcontains(msg, 'transfer') then selfSay("Please tell me the amount of gold you would like to transfer.", cid) talkState[cid] = 11 elseif talkState[cid] == 11 then moneyTo[cid] = tonumber(msg) if isValidMoney(moneyTo[cid]) == TRUE then selfSay('Who would you like transfer '..moneyTo[cid]..' gold to?', cid) talkState[cid] = 12 else selfSay('Is isnt valid amount of gold to transfer.', cid) talkState[cid] = 0 end elseif talkState[cid] == 12 then playerTo[cid] = msg if getCreatureName(cid) == playerTo[cid] then selfSay('Ehm, You want transfer money to yourself? Its impossible!', cid) talkState[cid] = 0 return TRUE end if playerExists(playerTo[cid]) then selfSay('So you would like to transfer ' .. moneyTo[cid] .. ' gold to "' .. playerTo[cid] .. '" ?', cid) talkState[cid] = 13 else selfSay('Player with name "' .. playerTo[cid] .. '" doesnt exist.', cid) talkState[cid] = 0 end elseif talkState[cid] == 13 then if msgcontains(msg, 'yes') then if getPlayerBalance(cid) < moneyTo[cid] then selfSay('You dont have enought money on your bank account.', cid) return TRUE end if doPlayerTransferMoneyTo(cid, playerTo[cid], moneyTo[cid]) ~= TRUE then selfSay('This player does not exist on this world or have no vocation.', cid) else selfSay('You have transferred ' .. moneyTo[cid] .. ' gold to "' .. playerTo[cid] ..' ".', cid) playerTo[cid] = nil end elseif msgcontains(msg, 'no') then selfSay('As you wish. Is there something else I can do for you?', cid) end talkState[cid] = 0 end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) que der certo da rep+ ae
  19. Bom quero um script que quando player chega devido level possa usar comando !pet e simonar um pet .O pet vai evoluindo conforme for upando de level. possa simonar apenas 1 pet . é tipo utevo res" mais com comando !pet. Apenas druid e socerers pode uzar esse comando. Ficarei muito agradecido para quem fizer darei Rep+ Esses são pets Level 100 = =Dragon Hatchling Level 200= = Frost Dragon Hatchling Level 300= = Dragon Lord Hatchling
  20. É só alterar o lessloss. em vocations xml vai la e mude para lessloss="0" todas vocações coloca 0. ai não precisa de aol, runa to preguiça fazer
  21. melhor então você fazer uma vocação vip ai só vip uza iten
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...