Ir para conteúdo
  • 0

[Gesior] Como tirar input obrigatorio no cadastro


curruwilliam

Pergunta

Olá,

 

Editei o [Gesior acc] e ocultei umas opção Wolrd que tinha no cadastro, e essa opção ta obrigatoria o preenchimento, alguem sabe como tiro?

Tem só essas opção agora:

B2HwWVl.png

 

até mais

Link para o comentário
Compartilhar em outros sites

15 respostass a esta questão

Posts Recomendados

  • 0

Arrumado e testado

 

 


<?php
$location = array(
'GER' => 'Europe',
'USA' => 'North America'
);
$default = 'all';
$worlds = array();
$worlds[0] = array('GER', $config['server']['worldType']);
$worlds[1] = array('GER', $config['server']['worldType']);
/*$worlds[2] = array('GER', 'hardcore');
$worlds[3] = array('USA', 'open');
$worlds[4] = array('USA', 'optional');
$worlds[5] = array('USA', 'hardcore');
*/
$town_array = $towns_list[0];
$town = $config['site']['newchar_towns'][0];
$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) > 10)
$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-Z0-9]/', $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('puta', 'caralho', 'karalho', 'porra', 'buceta', 'simone', 'corno','training', 'devovorga', 'energized raging mage', 'ot', 'otserv', 'thunder', 'serve', 'trimera', 'drugo', 'drugovich','adm','godsao','godzao','godsinho','GoDzinho','godzinho','Godzinho','god','GoD','GOd','God','GOD','mage mad', 'mad mage', 'abyssador', 'armadile', 'cliff strider', 'crystalcrusher', 'damaged crystal golem', 'deathstrike', 'stone devourer', 'hideous fungus', 'humongous fungus', 'humorless fungus', 'enraged crystal golem', 'wiggler', 'lost berserker', 'lava golem', 'magma crawler', 'weeper', 'gnomevil', 'ironblight', 'orewalker', 'vulcongra', 'mushroom sniffer', 'parasite', 'infected weeper', 'doctor gnomedix', 'pythius the rotten', 'lady bug', 'manta ray', 'deepling worker', 'god alone', 'bazir', 'crawler', 'deepling guard', 'deepling spellsinger', 'deepling warrior', 'manta', 'shark', 'spidris', 'spitter', 'waspoid', 'kollos', 'insectoid scout', 'calamary', 'fish', 'hive overseer', 'jellyfish', 'northern pike', 'spidris elite', 'swarmer', 'insectoid worker', 'deepling brawler', 'deepling master librarian', 'deepling tyrant', 'deepling elite', 'floor blob', 'hive pore', 'lesser swarmer', 'adi', 'adinmin', 'adimi', 'adimin', 'task', 'task clous', 'queen', 'queen eloise', 'aa ', 'ee', " ' ", 'ii', 'oo', 'uu', 'gm','cm', 'aff ', 'god ', 'abc', 'tutor', 'game', 'admin', 'the', 'rashid', 'alesar', 'benjamin', 'suzy', 'tajis', 'sarina', 'poach', 'Nah Bob', 'galuna', 'elane', 'chonndur', 'chondur', 'addoner', 'haroun', 'yaman', 'towncryer', 'jaul', 'obujos', 'hive overseer', 'crawler', 'deepling guard', 'deepling spellsinger', 'deepling warrior', 'lady bug', 'manta', 'shark', 'spidris', 'spitter', 'waspoid', 'kollos', 'lion event', 'tiger event', 'gerador azul i', 'gerador azul ii', 'gerador azul iii', 'gerador vermelho i', 'gerador vermelho ii', 'gerador vermelho iii', 'zombie event', 'emperium', 'guard', 'feromous', 'abomination fury', 'alvo', 'gate', 'elder beholder', 'trainer', 'beholder', 'yalaharian', 'protect cube', 'protect castle', 'protect statue', 'castle gates', 'lizard magistratus', 'lizard noble', 'askarak demon', 'askarak lord', 'askarak prince', 'bog frog', 'clay guardian', 'crystal wolf', 'death priest', 'deepling scout', 'desperate white deer', 'diamond servant', 'dromedary', 'donkey', 'elder mummy', 'enraged white deer', 'feverish citizen', 'filth toad', 'firestarter', 'ghoulish hyaena', 'golden servant', 'grave guard', 'groam', 'honour guard', 'horestis', 'horse', 'incredible old witch', 'insectoid scout', 'iron servant', 'kraknaknork', 'kraknaknork demon', 'running elite orc guard', 'sacred spider', 'sandstone scorpion', 'shaburak demon', 'shaburak lord', 'shaburak prince', 'slug', 'spider queen', 'starving wolf', 'thornfire wolf', 'tomb servant', 'weakened demon', 'wild dog', 'white deer', 'yielothax', 'boar', 'cake golem', 'crustacea gigantica', 'draptor', 'ghost rat', 'midnight panther', 'slime puddle', 'spectral scum', 'stampor', 'undead cavebear', 'brimstone bug', 'draken abomination', 'draken elite', 'fury of the emperor', 'glitterscale', 'heoni', 'lizard abomination', 'snake god essence', 'scorn of the emperor', 'snake think', 'souleater', 'spite of the emperor', 'wrath of the emperor', 'draken spellweaver', 'draken warmaster', 'ghastly dragon', 'gnarlhound', 'insect swarm', 'killer caiman', 'lancer beetle', 'lizard chosen', 'lizard dragon priest', 'lizard high guard', 'lizard legionnaire', 'lizard zaogun', 'orc marauder', 'sandcrawler', 'terramite', 'undead prospector', 'skeleton', 'wailing widow', 'berserker chicken', 'boogey', 'bride of night', 'demon parrot', 'dirtbeard', 'deer', 'esmeralda', 'essence of darkness', 'evil mastermind', 'evil sheep lord', 'evil sheep', 'fahim the wise', 'hide', 'hot dog', 'killer rabbit', 'medusa', 'mephiles', 'merikh the slaughterer', 'monstor', 'rottie the rotworm', 'shardhead', 'the bloodtusk', 'the many', 'the noxious spawn', 'the snapper', 'badger', 'bat', 'bear', 'black sheep', 'blood crab', 'blood crab underwater', 'carrion worm', 'cat', 'cave rat', 'chicken', 'cockroach', 'crab', 'crocodile', 'dire penguin', 'dog', 'elephant', 'flamingo', 'hyaena', 'husky', 'kitty', 'lion', 'mad sheep', 'mammoth', 'panda', 'parrot', 'penguin', 'pig', 'polar bear', 'rabbit', 'rat', 'rotworm', 'seagull', 'sheep', 'silver rabbit', 'skunk', 'squirrel', 'terror bird', 'thornback tortoise', 'tiger', 'tortoise', 'tortoise anti-bot', 'war wolf', 'winter wolf', 'wolf', 'dwarf', 'dwarf guard', 'dwarf geomancer', 'dwarf soldier', 'quara pincher', 'quara predator', 'quara constrictor', 'quara hydromancer', 'quara mantassin', 'quara pincher scout', 'quara predator scout', 'quara constrictor scout', 'quara hydromancer scout', 'quara mantassin scout', 'sea serpent', 'young sea serpent', 'achad', 'axeitus headbanger', 'bloodpaw', 'bovinus', 'colerian the barbarian', 'cursed gladiator', 'frostfur', 'orcus the cruel', 'rocky', 'the hairy one', 'avalanche', 'drasilla', 'grimgor guteater', 'kreebosh the exile', 'slim', 'spirit of earth', 'spirit of fire', 'spirit of water', 'the dark dancer', 'the hag', 'darakan the executioner', 'deathbringer', 'fallen mooh tah master ghar', 'gnorre chyllson', 'norgle glacierbeard', 'svoren the mad', 'the masked marauder', 'the obliverator', 'the pit lord', 'webster', 'flamethrower', 'hell hole', 'lavahole', 'dwarf dispenser', 'magicthrower', 'magic pillar', 'pillar', 'mechanical figher', 'plaguethrower', 'poisonthrower', 'shredderthrower', 'barbarian bloodwalker', 'barbarian brutetamer', 'barbarian headsplitter', 'barbarian skullhunter', 'arachir the ancient one', 'armenius', 'arthei', 'apprentice sheng', 'azerus', 'barbaria', 'battlemaster zunzu', 'big boss trolliver', 'blistering fire elemental', 'boreth', 'captain jones', 'chizzoron the distorter', 'the countess sorrow', 'cublarc the plunderer', 'deadeye devious', 'demodras', 'dharalion', 'diblis the fair', 'diseased bill', 'diseased dan', 'diseased fred', 'dracola', 'dreadmaw', 'earth overlord', 'energy overlord', 'fernfang', 'ferumbras', 'fire overlord', 'fleabringer', 'foreman kneebiter', 'freegoiz', 'general murius', 'grandfather tridian', 'grand mother foulscale', 'grorlam', 'hairman the huge', 'lizard templar', 'ice overlord', 'inky', 'koshei the deathless', 'lersatio', 'lethal lissy', 'lizard gate guardian', 'lord of the elements', 'mad technomancer', 'man in the cave', 'marziel', 'massacre', 'mooh tah master', 'mr. punish', 'munster', 'necropharus', 'ron the ripper', 'renegade orc', 'rotworm queen', 'rukor zad', 'shadow of boreth', 'shadow of lersatio', 'shadow of marziel', 'shard of corruption', 'sharptooth', 'sir valorcrest', 'splasher', 'smuggler baron silvertoe', 'stonecracker', 'the blightfather', 'the big bad one', 'the collector', 'the count', 'the evil eye', 'the frog prince', 'the handmaiden', 'the horned fox', 'the imperor', 'the old widow', 'the plasmother', 'the voice of ruin', 'the weakened count', 'thul', 'tiquandas revenge', 'ungreez', 'warlord ruzad', 'yakchal', 'yalahari', 'yeti', 'zarabustor', 'zebelon duskbringer', 'zulazza the corruptor', 'chakoya toolshaper', 'chakoya tribewarden', 'chakoya windcaller', 'dark torturer', 'demon', 'destroyer', 'diabolic imp', 'fire devil', 'gozzler', 'hand of cursed fate', 'hellfire fighter', 'hellhound', 'hellspawn', 'juggernaut', 'nightmare', 'nightmare scion', 'nightstalker', 'plaguesmith', 'bazir', 'orshabaal', 'zoralurk', 'frost dragon', 'wyrm', 'dragon lord', 'dragon', 'hydra', 'dragon hatchling', 'dragon lord hatchling', 'frost dragon hatchling', 'undead dragon', 'wyvern', 'blazing fire elemental', 'charged energy elemental', 'earth elemental', 'energy elemental', 'fire elemental', 'jagged earth elemental', 'massive earth elemental', 'massive energy elemental', 'massive fire elemental', 'massive water elemental', 'muddy earth elemental', 'overcharged energy elemental', 'roaring water elemental', 'slick water elemental', 'water elemental', 'elf arcanist', 'elf scout', 'elf', 'bones', 'deathslicer', 'exp bug', 'eye of the seven', 'fluffy', 'gamemaster', 'goblin demon', 'grynch clan goblin', 'hacker', 'the halloween hare', 'the ruthless herald', 'minishabaal', 'primitive', 'servant golem', 'tha exp carrier', 'the mutated pumpkin', 'tibia bug', 'undead minion', 'ashmunrah', 'arkhothep', 'dipthrah', 'mahrdis', 'morguthis', 'omruc', 'rahemos', 'thalas', 'vashresamun', 'frost giant', 'frost giantess', 'cyclops smith', 'cyclops drone', 'behemoth', 'cyclops', 'ice golem', 'the old whopper', 'stone golem', 'war golem', 'worker golem', 'damaged worker golem', 'goblin leader', 'goblin scavenger', 'goblin', 'goblin assassin', 'dworc fleshhunter', 'dworc venomsniper', 'dworc voodoomaster', 'acolyte of the cult', 'adept of the cult', 'amazon', 'crazed beggar', 'enlightened of the cult', 'novice of the cult', 'dark monk', 'monk', 'dark apprentice', 'dark magician', 'fury', 'gladiator', 'gang member', 'ice witch', 'infernalist', 'mad scientist', 'warlock', 'witch', 'necromancer', 'priestess', 'assasin', 'bandit', 'black knight', 'hero', 'hunter', 'nomad', 'morik the gladiator', 'smuggler', 'poacher', 'thief', 'undead jester', 'valkyrie', 'yaga the crone', 'wild warrior', 'baron brute', 'coldheart', 'doomhowl', 'dreadwing', 'fatality', 'haunter', 'incineron', 'menace', 'rocko', 'the axeorcist', 'the dreadorian', 'tirecz', 'tremorak', 'lizard sentinel', 'lizard snakecharmer', 'blue djinn', 'efreet', 'green djinn', 'marid', 'braindeath', 'bonelord', 'elder bonelord', 'gazer', 'mimic', 'stalker', 'wisp', 'minotaur archer', 'minotaur guard', 'minotaur mage', 'minotaur', 'banshee', 'betrayed wraith', 'blightwalker', 'bonebeast', 'crypt shambler', 'demon skeleton', 'dreadbeast', 'gargoyle', 'ghost', 'ghoul', 'ghostly apparition', 'grim reaper', 'gravelord oshuran', 'lich', 'lost soul', 'mummy', 'phantasm', 'pythius the rotten', 'skeleton warrior', 'spectre', 'tormented ghost', 'vampire', 'vampire bride', 'undead gladiator', 'zombie', 'mutated bat', 'mutated human', 'mutated rat', 'mutated tiger', 'werewolf', 'orc berserker', 'orc leader', 'orc rider', 'orc shaman', 'orc spearman', 'orc warlord', 'orc warrior', 'orc', 'brutus bloodbeard', 'pirate buccaneer', 'pirate corsair', 'pirate cutthroat', 'pirate ghost', 'pirate marauder', 'pirate skeleton', 'carniphila', 'haunted treeling', 'spit nettle', 'kongra', 'merlkin', 'sibang', 'serpent spawn', 'apocalypse', 'infernatil', 'verminor', 'annihilon', 'golgordan', 'hellgorak', 'latrivan', 'madareth', 'rift brood', 'rift lord', 'rift phantom', 'rift scythe', 'rift worm', 'ushuriel', 'zugurosh', 'ghazbaran', 'morgaroth', 'troll champion', 'frost troll', 'island troll', 'swamp troll', 'troll', 'acid blob', 'ancient scarab', 'azure frog', 'butterfly', 'bog raider', 'bug', 'centipede', 'cobra', 'coral frog', 'crimson frog', 'crystal spider', 'death blob', 'deathspawn', 'defiler', 'giant spider', 'green frog', 'larva', 'mercury blob', 'orchid frog', 'poison spider', 'scarab', 'scorpion', 'slime2', 'slime', 'snake', 'son of verminor', 'spider', 'tarantula', 'the abomination', 'toad', 'wasp') 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('puta', 'caralho', 'karalho', 'porra', 'buceta', 'corno', 'simone','training', 'devovorga', 'energized raging mage', 'ot', 'otserv', 'thunder', 'serve', 'trimera', 'drugo', 'drugovich', 'adm', 'godsao','godzao','godsinho','GoDzinho','godzinho','Godzinho','god','GoD','GOd','God','GOD','mage mad', 'mad mage', 'abyssador', 'armadile', 'cliff strider', 'crystalcrusher', 'damaged crystal golem', 'deathstrike', 'stone devourer', 'hideous fungus', 'humongous fungus', 'humorless fungus', 'enraged crystal golem', 'wiggler', 'lost berserker', 'lava golem', 'magma crawler', 'weeper', 'gnomevil', 'ironblight', 'orewalker', 'vulcongra', 'mushroom sniffer', 'parasite', 'infected weeper', 'doctor gnomedix', 'pythius the rotten', 'lady bug', 'manta ray', 'deepling worker', 'god alone', 'bazir', 'crawler', 'deepling guard', 'deepling spellsinger', 'deepling warrior', 'manta', 'shark', 'spidris', 'spitter', 'waspoid', 'kollos', 'insectoid scout', 'calamary', 'fish', 'hive overseer', 'jellyfish', 'northern pike', 'spidris elite', 'swarmer', 'insectoid worker', 'deepling brawler', 'deepling master librarian', 'deepling tyrant', 'deepling elite', 'floor blob', 'hive pore', 'lesser swarmer', 'adi', 'adinmin', 'adimi', 'adimin', 'task', 'task clous', 'queen', 'queen eloise', 'game', " ' ", 'customer', 'support', 'fuck', 'haha', 'sux', ' abc', 'suck', 'noob', 'tutor', 'admin', 'account', 'gay', 'password', 'manager', 'aa ', 'ee', " ' ", 'ii', 'oo', 'uu', 'gm','cm', 'aff ', 'god ', 'abc', 'tutor', 'game', 'admin', 'the', 'rashid', 'alesar', 'benjamin', 'suzy', 'tajis', 'sarina', 'poach', 'Nah Bob', 'galuna', 'elane', 'chonndur', 'chondur', 'addoner', 'haroun', 'yaman', 'towncryer', 'jaul', 'obujos', 'hive overseer', 'crawler', 'deepling guard', 'deepling spellsinger', 'deepling warrior', 'lady bug', 'manta', 'shark', 'spidris', 'spitter', 'waspoid', 'kollos', 'lion event', 'tiger event', 'gerador azul i', 'gerador azul ii', 'gerador azul iii', 'gerador vermelho i', 'gerador vermelho ii', 'gerador vermelho iii', 'zombie event', 'emperium', 'guard', 'feromous', 'abomination fury', 'alvo', 'gate', 'elder beholder', 'trainer', 'beholder', 'yalaharian', 'protect cube', 'protect castle', 'protect statue', 'castle gates', 'lizard magistratus', 'lizard noble', 'askarak demon', 'askarak lord', 'askarak prince', 'bog frog', 'clay guardian', 'crystal wolf', 'death priest', 'deepling scout', 'desperate white deer', 'diamond servant', 'dromedary', 'donkey', 'elder mummy', 'enraged white deer', 'feverish citizen', 'filth toad', 'firestarter', 'ghoulish hyaena', 'golden servant', 'grave guard', 'groam', 'honour guard', 'horestis', 'horse', 'incredible old witch', 'insectoid scout', 'iron servant', 'kraknaknork', 'kraknaknork demon', 'running elite orc guard', 'sacred spider', 'sandstone scorpion', 'shaburak demon', 'shaburak lord', 'shaburak prince', 'slug', 'spider queen', 'starving wolf', 'thornfire wolf', 'tomb servant', 'weakened demon', 'wild dog', 'white deer', 'yielothax', 'boar', 'cake golem', 'crustacea gigantica', 'draptor', 'ghost rat', 'midnight panther', 'slime puddle', 'spectral scum', 'stampor', 'undead cavebear', 'brimstone bug', 'draken abomination', 'draken elite', 'fury of the emperor', 'glitterscale', 'heoni', 'lizard abomination', 'snake god essence', 'scorn of the emperor', 'snake think', 'souleater', 'spite of the emperor', 'wrath of the emperor', 'draken spellweaver', 'draken warmaster', 'ghastly dragon', 'gnarlhound', 'insect swarm', 'killer caiman', 'lancer beetle', 'lizard chosen', 'lizard dragon priest', 'lizard high guard', 'lizard legionnaire', 'lizard zaogun', 'orc marauder', 'sandcrawler', 'terramite', 'undead prospector', 'skeleton', 'wailing widow', 'berserker chicken', 'boogey', 'bride of night', 'demon parrot', 'dirtbeard', 'deer', 'esmeralda', 'essence of darkness', 'evil mastermind', 'evil sheep lord', 'evil sheep', 'fahim the wise', 'hide', 'hot dog', 'killer rabbit', 'medusa', 'mephiles', 'merikh the slaughterer', 'monstor', 'rottie the rotworm', 'shardhead', 'the bloodtusk', 'the many', 'the noxious spawn', 'the snapper', 'badger', 'bat', 'bear', 'black sheep', 'blood crab', 'blood crab underwater', 'carrion worm', 'cat', 'cave rat', 'chicken', 'cockroach', 'crab', 'crocodile', 'dire penguin', 'dog', 'elephant', 'flamingo', 'hyaena', 'husky', 'kitty', 'lion', 'mad sheep', 'mammoth', 'panda', 'parrot', 'penguin', 'pig', 'polar bear', 'rabbit', 'rat', 'rotworm', 'seagull', 'sheep', 'silver rabbit', 'skunk', 'squirrel', 'terror bird', 'thornback tortoise', 'tiger', 'tortoise', 'tortoise anti-bot', 'war wolf', 'winter wolf', 'wolf', 'dwarf', 'dwarf guard', 'dwarf geomancer', 'dwarf soldier', 'quara pincher', 'quara predator', 'quara constrictor', 'quara hydromancer', 'quara mantassin', 'quara pincher scout', 'quara predator scout', 'quara constrictor scout', 'quara hydromancer scout', 'quara mantassin scout', 'sea serpent', 'young sea serpent', 'achad', 'axeitus headbanger', 'bloodpaw', 'bovinus', 'colerian the barbarian', 'cursed gladiator', 'frostfur', 'orcus the cruel', 'rocky', 'the hairy one', 'avalanche', 'drasilla', 'grimgor guteater', 'kreebosh the exile', 'slim', 'spirit of earth', 'spirit of fire', 'spirit of water', 'the dark dancer', 'the hag', 'darakan the executioner', 'deathbringer', 'fallen mooh tah master ghar', 'gnorre chyllson', 'norgle glacierbeard', 'svoren the mad', 'the masked marauder', 'the obliverator', 'the pit lord', 'webster', 'flamethrower', 'hell hole', 'lavahole', 'dwarf dispenser', 'magicthrower', 'magic pillar', 'pillar', 'mechanical figher', 'plaguethrower', 'poisonthrower', 'shredderthrower', 'barbarian bloodwalker', 'barbarian brutetamer', 'barbarian headsplitter', 'barbarian skullhunter', 'arachir the ancient one', 'armenius', 'arthei', 'apprentice sheng', 'azerus', 'barbaria', 'battlemaster zunzu', 'big boss trolliver', 'blistering fire elemental', 'boreth', 'captain jones', 'chizzoron the distorter', 'the countess sorrow', 'cublarc the plunderer', 'deadeye devious', 'demodras', 'dharalion', 'diblis the fair', 'diseased bill', 'diseased dan', 'diseased fred', 'dracola', 'dreadmaw', 'earth overlord', 'energy overlord', 'fernfang', 'ferumbras', 'fire overlord', 'fleabringer', 'foreman kneebiter', 'freegoiz', 'general murius', 'grandfather tridian', 'grand mother foulscale', 'grorlam', 'hairman the huge', 'lizard templar', 'ice overlord', 'inky', 'koshei the deathless', 'lersatio', 'lethal lissy', 'lizard gate guardian', 'lord of the elements', 'mad technomancer', 'man in the cave', 'marziel', 'massacre', 'mooh tah master', 'mr. punish', 'munster', 'necropharus', 'ron the ripper', 'renegade orc', 'rotworm queen', 'rukor zad', 'shadow of boreth', 'shadow of lersatio', 'shadow of marziel', 'shard of corruption', 'sharptooth', 'sir valorcrest', 'splasher', 'smuggler baron silvertoe', 'stonecracker', 'the blightfather', 'the big bad one', 'the collector', 'the count', 'the evil eye', 'the frog prince', 'the handmaiden', 'the horned fox', 'the imperor', 'the old widow', 'the plasmother', 'the voice of ruin', 'the weakened count', 'thul', 'tiquandas revenge', 'ungreez', 'warlord ruzad', 'yakchal', 'yalahari', 'yeti', 'zarabustor', 'zebelon duskbringer', 'zulazza the corruptor', 'chakoya toolshaper', 'chakoya tribewarden', 'chakoya windcaller', 'dark torturer', 'demon', 'destroyer', 'diabolic imp', 'fire devil', 'gozzler', 'hand of cursed fate', 'hellfire fighter', 'hellhound', 'hellspawn', 'juggernaut', 'nightmare', 'nightmare scion', 'nightstalker', 'plaguesmith', 'bazir', 'orshabaal', 'zoralurk', 'frost dragon', 'wyrm', 'dragon lord', 'dragon', 'hydra', 'dragon hatchling', 'dragon lord hatchling', 'frost dragon hatchling', 'undead dragon', 'wyvern', 'blazing fire elemental', 'charged energy elemental', 'earth elemental', 'energy elemental', 'fire elemental', 'jagged earth elemental', 'massive earth elemental', 'massive energy elemental', 'massive fire elemental', 'massive water elemental', 'muddy earth elemental', 'overcharged energy elemental', 'roaring water elemental', 'slick water elemental', 'water elemental', 'elf arcanist', 'elf scout', 'elf', 'bones', 'deathslicer', 'exp bug', 'eye of the seven', 'fluffy', 'gamemaster', 'goblin demon', 'grynch clan goblin', 'hacker', 'the halloween hare', 'the ruthless herald', 'minishabaal', 'primitive', 'servant golem', 'tha exp carrier', 'the mutated pumpkin', 'tibia bug', 'undead minion', 'ashmunrah', 'arkhothep', 'dipthrah', 'mahrdis', 'morguthis', 'omruc', 'rahemos', 'thalas', 'vashresamun', 'frost giant', 'frost giantess', 'cyclops smith', 'cyclops drone', 'behemoth', 'cyclops', 'ice golem', 'the old whopper', 'stone golem', 'war golem', 'worker golem', 'damaged worker golem', 'goblin leader', 'goblin scavenger', 'goblin', 'goblin assassin', 'dworc fleshhunter', 'dworc venomsniper', 'dworc voodoomaster', 'acolyte of the cult', 'adept of the cult', 'amazon', 'crazed beggar', 'enlightened of the cult', 'novice of the cult', 'dark monk', 'monk', 'dark apprentice', 'dark magician', 'fury', 'gladiator', 'gang member', 'ice witch', 'infernalist', 'mad scientist', 'warlock', 'witch', 'necromancer', 'priestess', 'assasin', 'bandit', 'black knight', 'hero', 'hunter', 'nomad', 'morik the gladiator', 'smuggler', 'poacher', 'thief', 'undead jester', 'valkyrie', 'yaga the crone', 'wild warrior', 'baron brute', 'coldheart', 'doomhowl', 'dreadwing', 'fatality', 'haunter', 'incineron', 'menace', 'rocko', 'the axeorcist', 'the dreadorian', 'tirecz', 'tremorak', 'lizard sentinel', 'lizard snakecharmer', 'blue djinn', 'efreet', 'green djinn', 'marid', 'braindeath', 'bonelord', 'elder bonelord', 'gazer', 'mimic', 'stalker', 'wisp', 'minotaur archer', 'minotaur guard', 'minotaur mage', 'minotaur', 'banshee', 'betrayed wraith', 'blightwalker', 'bonebeast', 'crypt shambler', 'demon skeleton', 'dreadbeast', 'gargoyle', 'ghost', 'ghoul', 'ghostly apparition', 'grim reaper', 'gravelord oshuran', 'lich', 'lost soul', 'mummy', 'phantasm', 'pythius the rotten', 'skeleton warrior', 'spectre', 'tormented ghost', 'vampire', 'vampire bride', 'undead gladiator', 'zombie', 'mutated bat', 'mutated human', 'mutated rat', 'mutated tiger', 'werewolf', 'orc berserker', 'orc leader', 'orc rider', 'orc shaman', 'orc spearman', 'orc warlord', 'orc warrior', 'orc', 'brutus bloodbeard', 'pirate buccaneer', 'pirate corsair', 'pirate cutthroat', 'pirate ghost', 'pirate marauder', 'pirate skeleton', 'carniphila', 'haunted treeling', 'spit nettle', 'kongra', 'merlkin', 'sibang', 'serpent spawn', 'apocalypse', 'infernatil', 'verminor', 'annihilon', 'golgordan', 'hellgorak', 'latrivan', 'madareth', 'rift brood', 'rift lord', 'rift phantom', 'rift scythe', 'rift worm', 'ushuriel', 'zugurosh', 'ghazbaran', 'morgaroth', 'troll champion', 'frost troll', 'island troll', 'swamp troll', 'troll', 'acid blob', 'ancient scarab', 'azure frog', 'butterfly', 'bog raider', 'bug', 'centipede', 'cobra', 'coral frog', 'crimson frog', 'crystal spider', 'death blob', 'deathspawn', 'defiler', 'giant spider', 'green frog', 'larva', 'mercury blob', 'orchid frog', 'poison spider', 'scarab', 'scorpion', 'slime2', 'slime', 'snake', 'son of verminor', 'spider', 'tarantula', 'the abomination', 'toad', 'wasp') 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['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) < 6 || 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(count($err) != 0) {
$e['pass'] = '';
for($i=0; $i < count($err); $i++)
$e['pass'] .= ($i == 0 ? '' : '<br/>').$err[$i];
}
}
/*if(!isset($_POST['agreerules']) || empty($_POST['agreerules']))
$e['rules'] = 'You have to agree to the Tibia Rules 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,premdays) VALUES($n,'".$_POST['accountname']."','".($config['server']['encryptionType'] == 'plain' ? $_POST['password1'] : hash($config['server']['encryptionType'], $_POST['password1']))."','".$_POST['email']."',".time().", '".$config['site']['newaccount_premdays']."')") === true) {
$sample = (count($voc) == 0 ? 'Rook' : $voc[$_POST['vocation']]).' Sample';
$q = mysql_query("SELECT * 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'].'\',0,'.$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'].','.$town_c.','.$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://www.mediafire.com/?j0mleh967l67sku" 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://www.mediafire.com/?j0mleh967l67sku" 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="?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" width="20%"><span id="accountname_label"'.(isset($e['acc']) ? ' class="red"' : '').'><b>Account Name:</b></span></td><td><input id="accountname" name="accountname" autocomplete="off" 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"' : '').'><b>Email Address:</b></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"' : '').'><b>Password:</b></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"' : '').'><b>Password Again:</b></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" width="20%"><span id="charactername_label"'.(isset($e['name']) ? ' class="red"' : '').'><b>Character Name:</b></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" width="20%"><span'.(isset($e['sex']) ? ' class="red"' : '').'><b>Sex:</b></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" width="10%"><span'.(isset($e['vocation']) ? ' class="red"' : '').'><b>Vocation:</b></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 .= '
<tr>
<td class="LabelV150" width="10%"><span'.(isset($e['town']) ? ' class="red"' : '').'><b>Select your city:</b></span></td>
<td>
<table width="100%">
<tr>
<td><select name="town_c">';
foreach($town as $k => $v)
$main_content .= '
<span style="margin-right:15px" class="OptionContainer">
<label for="town_'.$k.'">
<span class="OptionContainer">
<option value="'.$k.'">'.$town_array[$v].'</option>
<label for="town_'.$k.'">'.$v.'</label>
</span>
</label>
</span>';
$main_content .= '</select>
</td>
<td>
</td>
</tr>
</table>
</td>
</tr>'.(isset($e['town']) ? '<tr>
<td>
</td>
<td>
<span class="FormFieldError">'.$e['town'].'</span>
</td>
</tr>' : '');
$main_content .= '</table></div></div></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>';

 

 


Tópico movido para a seção de dúvidas e pedidos resolvidos. Editado por VictorWEBMaster
Código atualizado, funcionando
Link para o comentário
Compartilhar em outros sites

  • 0

Quando for fazer um pedido desses poste o create account para darmos uma avaliada mesmo eu não sabendo muito sobre gesior acho que posso ai estar te ajudando revendo o script.

Link para o comentário
Compartilhar em outros sites

  • 0

Tenta ai

 

 

 

<?php
$location = array(
'GER' => 'Europe',
'USA' => 'North America'
);
$default = 'all';
$worlds = array();
$worlds[0] = array('GER', $config['server']['worldType']);
$worlds[1] = array('GER', $config['server']['worldType']);
/*$worlds[2] = array('GER', 'hardcore');
$worlds[3] = array('USA', 'open');
$worlds[4] = array('USA', 'optional');
$worlds[5] = array('USA', 'hardcore');
*/
$town_array = $towns_list[0];
$town = $config['site']['newchar_towns'][0];
$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'] = 'Por favor, digite um nome para conta!';
elseif(strlen($s) < 6)
$e['acc'] = 'O nome da conta é muito curta!';
elseif(strlen($s) > 10)
$e['acc'] = 'O nome da conta é muito longo!';
else {
$s = strtoupper($s);
if(!ctype_alnum($s))
$e['acc'] = 'O nome da conta tem um formato inválido. O nome da conta só pode consistir em números de 0-9 e letras de A-Z!';
elseif(!preg_match('/[A-Z0-9]/', $s))
$e['acc'] = 'O nome da conta deve incluir pelo menos uma letra 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'] = 'O nome da conta já é utilizado. Por favor escolha um outro!';
}
}
$s = isset($_POST['name']) ? trim($_POST['name']) : '';
if(empty($s))
$e['name'] = 'Por favor insira um nome para o seu personagem!';
elseif(strlen($s) < 2 || strlen($s) > 29)
$e['name'] = 'Um nome deve ter entre 2 a 29 letras!';
elseif(preg_match('/[^a-zA-Z ]/', $s))
$e['name'] = 'Este nome contém letras inválidos. Por favor, use apenas A-Z, a-z e espaço!';
elseif(!ctype_upper($s[0]))
$e['name'] = 'A primeira letra de um nome deve ser uma letra maiúscula!';
elseif(strpos($s, ' ') !== false)
$e['name'] = 'Este nome contém mais de um espaço entre as palavras. Por favor, use apenas um espaço entre as palavras!';
else {
foreach(explode(' ', $s) as $k =>$v) {
$words[$k] = str_split($v);
$len = strlen($v);
if($len == 1) {
$e['name'] = 'Este nome contém uma palavra com apenas uma letra. Por favor, use mais de uma letra para cada palavra!';
break;
}
elseif($len > 14) {
$e['name'] = 'Este nome contém uma palavra que é muito longo. Por favor, não use mais de 14 cartas para cada palavra!';
break;
}
}
if(!isset($e['name'])) {
$total=0;
foreach($words as $k =>$p) {
if(isset($e['name']))
break;
$total++;
if($total > 3) {
$e['name'] = 'Este nome contém mais de 3 palavras. Por favor escolha outro nome!';
break;
}
$len=0;
foreach($p as $i =>$j) {
$len++;
if($i != 0 && ctype_upper($j)) {
$e['name'] = 'Em nomes de letras maiúsculas são permitidas apenas no início de uma palavra!';
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'] = 'Este nome contém uma palavra sem vogais. Escolha outro nome!';
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'] = 'Este nome do personagem já é usado. Por favor escolha um outro!';
break;
}
if(!isset($e['name'])) {
foreach(array('puta', 'caralho', 'karalho', 'porra', 'buceta', 'simone', 'corno','training', 'devovorga', 'energized raging mage', 'ot', 'otserv', 'thunder', 'serve', 'trimera', 'drugo', 'drugovich','adm','godsao','godzao','godsinho','GoDzinho','godzinho','Godzinho','god','GoD','GOd','God','GOD','mage mad', 'mad mage', 'abyssador', 'armadile', 'cliff strider', 'crystalcrusher', 'damaged crystal golem', 'deathstrike', 'stone devourer', 'hideous fungus', 'humongous fungus', 'humorless fungus', 'enraged crystal golem', 'wiggler', 'lost berserker', 'lava golem', 'magma crawler', 'weeper', 'gnomevil', 'ironblight', 'orewalker', 'vulcongra', 'mushroom sniffer', 'parasite', 'infected weeper', 'doctor gnomedix', 'pythius the rotten', 'lady bug', 'manta ray', 'deepling worker', 'god alone', 'bazir', 'crawler', 'deepling guard', 'deepling spellsinger', 'deepling warrior', 'manta', 'shark', 'spidris', 'spitter', 'waspoid', 'kollos', 'insectoid scout', 'calamary', 'fish', 'hive overseer', 'jellyfish', 'northern pike', 'spidris elite', 'swarmer', 'insectoid worker', 'deepling brawler', 'deepling master librarian', 'deepling tyrant', 'deepling elite', 'floor blob', 'hive pore', 'lesser swarmer', 'adi', 'adinmin', 'adimi', 'adimin', 'task', 'task clous', 'queen', 'queen eloise', 'aa ', 'ee', " ' ", 'ii', 'oo', 'uu', 'gm','cm', 'aff ', 'god ', 'abc', 'tutor', 'game', 'admin', 'the', 'rashid', 'alesar', 'benjamin', 'suzy', 'tajis', 'sarina', 'poach', 'Nah Bob', 'galuna', 'elane', 'chonndur', 'chondur', 'addoner', 'haroun', 'yaman', 'towncryer', 'jaul', 'obujos', 'hive overseer', 'crawler', 'deepling guard', 'deepling spellsinger', 'deepling warrior', 'lady bug', 'manta', 'shark', 'spidris', 'spitter', 'waspoid', 'kollos', 'lion event', 'tiger event', 'gerador azul i', 'gerador azul ii', 'gerador azul iii', 'gerador vermelho i', 'gerador vermelho ii', 'gerador vermelho iii', 'zombie event', 'emperium', 'guard', 'feromous', 'abomination fury', 'alvo', 'gate', 'elder beholder', 'trainer', 'beholder', 'yalaharian', 'protect cube', 'protect castle', 'protect statue', 'castle gates', 'lizard magistratus', 'lizard noble', 'askarak demon', 'askarak lord', 'askarak prince', 'bog frog', 'clay guardian', 'crystal wolf', 'death priest', 'deepling scout', 'desperate white deer', 'diamond servant', 'dromedary', 'donkey', 'elder mummy', 'enraged white deer', 'feverish citizen', 'filth toad', 'firestarter', 'ghoulish hyaena', 'golden servant', 'grave guard', 'groam', 'honour guard', 'horestis', 'horse', 'incredible old witch', 'insectoid scout', 'iron servant', 'kraknaknork', 'kraknaknork demon', 'running elite orc guard', 'sacred spider', 'sandstone scorpion', 'shaburak demon', 'shaburak lord', 'shaburak prince', 'slug', 'spider queen', 'starving wolf', 'thornfire wolf', 'tomb servant', 'weakened demon', 'wild dog', 'white deer', 'yielothax', 'boar', 'cake golem', 'crustacea gigantica', 'draptor', 'ghost rat', 'midnight panther', 'slime puddle', 'spectral scum', 'stampor', 'undead cavebear', 'brimstone bug', 'draken abomination', 'draken elite', 'fury of the emperor', 'glitterscale', 'heoni', 'lizard abomination', 'snake god essence', 'scorn of the emperor', 'snake think', 'souleater', 'spite of the emperor', 'wrath of the emperor', 'draken spellweaver', 'draken warmaster', 'ghastly dragon', 'gnarlhound', 'insect swarm', 'killer caiman', 'lancer beetle', 'lizard chosen', 'lizard dragon priest', 'lizard high guard', 'lizard legionnaire', 'lizard zaogun', 'orc marauder', 'sandcrawler', 'terramite', 'undead prospector', 'skeleton', 'wailing widow', 'berserker chicken', 'boogey', 'bride of night', 'demon parrot', 'dirtbeard', 'deer', 'esmeralda', 'essence of darkness', 'evil mastermind', 'evil sheep lord', 'evil sheep', 'fahim the wise', 'hide', 'hot dog', 'killer rabbit', 'medusa', 'mephiles', 'merikh the slaughterer', 'monstor', 'rottie the rotworm', 'shardhead', 'the bloodtusk', 'the many', 'the noxious spawn', 'the snapper', 'badger', 'bat', 'bear', 'black sheep', 'blood crab', 'blood crab underwater', 'carrion worm', 'cat', 'cave rat', 'chicken', 'cockroach', 'crab', 'crocodile', 'dire penguin', 'dog', 'elephant', 'flamingo', 'hyaena', 'husky', 'kitty', 'lion', 'mad sheep', 'mammoth', 'panda', 'parrot', 'penguin', 'pig', 'polar bear', 'rabbit', 'rat', 'rotworm', 'seagull', 'sheep', 'silver rabbit', 'skunk', 'squirrel', 'terror bird', 'thornback tortoise', 'tiger', 'tortoise', 'tortoise anti-bot', 'war wolf', 'winter wolf', 'wolf', 'dwarf', 'dwarf guard', 'dwarf geomancer', 'dwarf soldier', 'quara pincher', 'quara predator', 'quara constrictor', 'quara hydromancer', 'quara mantassin', 'quara pincher scout', 'quara predator scout', 'quara constrictor scout', 'quara hydromancer scout', 'quara mantassin scout', 'sea serpent', 'young sea serpent', 'achad', 'axeitus headbanger', 'bloodpaw', 'bovinus', 'colerian the barbarian', 'cursed gladiator', 'frostfur', 'orcus the cruel', 'rocky', 'the hairy one', 'avalanche', 'drasilla', 'grimgor guteater', 'kreebosh the exile', 'slim', 'spirit of earth', 'spirit of fire', 'spirit of water', 'the dark dancer', 'the hag', 'darakan the executioner', 'deathbringer', 'fallen mooh tah master ghar', 'gnorre chyllson', 'norgle glacierbeard', 'svoren the mad', 'the masked marauder', 'the obliverator', 'the pit lord', 'webster', 'flamethrower', 'hell hole', 'lavahole', 'dwarf dispenser', 'magicthrower', 'magic pillar', 'pillar', 'mechanical figher', 'plaguethrower', 'poisonthrower', 'shredderthrower', 'barbarian bloodwalker', 'barbarian brutetamer', 'barbarian headsplitter', 'barbarian skullhunter', 'arachir the ancient one', 'armenius', 'arthei', 'apprentice sheng', 'azerus', 'barbaria', 'battlemaster zunzu', 'big boss trolliver', 'blistering fire elemental', 'boreth', 'captain jones', 'chizzoron the distorter', 'the countess sorrow', 'cublarc the plunderer', 'deadeye devious', 'demodras', 'dharalion', 'diblis the fair', 'diseased bill', 'diseased dan', 'diseased fred', 'dracola', 'dreadmaw', 'earth overlord', 'energy overlord', 'fernfang', 'ferumbras', 'fire overlord', 'fleabringer', 'foreman kneebiter', 'freegoiz', 'general murius', 'grandfather tridian', 'grand mother foulscale', 'grorlam', 'hairman the huge', 'lizard templar', 'ice overlord', 'inky', 'koshei the deathless', 'lersatio', 'lethal lissy', 'lizard gate guardian', 'lord of the elements', 'mad technomancer', 'man in the cave', 'marziel', 'massacre', 'mooh tah master', 'mr. punish', 'munster', 'necropharus', 'ron the ripper', 'renegade orc', 'rotworm queen', 'rukor zad', 'shadow of boreth', 'shadow of lersatio', 'shadow of marziel', 'shard of corruption', 'sharptooth', 'sir valorcrest', 'splasher', 'smuggler baron silvertoe', 'stonecracker', 'the blightfather', 'the big bad one', 'the collector', 'the count', 'the evil eye', 'the frog prince', 'the handmaiden', 'the horned fox', 'the imperor', 'the old widow', 'the plasmother', 'the voice of ruin', 'the weakened count', 'thul', 'tiquandas revenge', 'ungreez', 'warlord ruzad', 'yakchal', 'yalahari', 'yeti', 'zarabustor', 'zebelon duskbringer', 'zulazza the corruptor', 'chakoya toolshaper', 'chakoya tribewarden', 'chakoya windcaller', 'dark torturer', 'demon', 'destroyer', 'diabolic imp', 'fire devil', 'gozzler', 'hand of cursed fate', 'hellfire fighter', 'hellhound', 'hellspawn', 'juggernaut', 'nightmare', 'nightmare scion', 'nightstalker', 'plaguesmith', 'bazir', 'orshabaal', 'zoralurk', 'frost dragon', 'wyrm', 'dragon lord', 'dragon', 'hydra', 'dragon hatchling', 'dragon lord hatchling', 'frost dragon hatchling', 'undead dragon', 'wyvern', 'blazing fire elemental', 'charged energy elemental', 'earth elemental', 'energy elemental', 'fire elemental', 'jagged earth elemental', 'massive earth elemental', 'massive energy elemental', 'massive fire elemental', 'massive water elemental', 'muddy earth elemental', 'overcharged energy elemental', 'roaring water elemental', 'slick water elemental', 'water elemental', 'elf arcanist', 'elf scout', 'elf', 'bones', 'deathslicer', 'exp bug', 'eye of the seven', 'fluffy', 'gamemaster', 'goblin demon', 'grynch clan goblin', 'hacker', 'the halloween hare', 'the ruthless herald', 'minishabaal', 'primitive', 'servant golem', 'tha exp carrier', 'the mutated pumpkin', 'tibia bug', 'undead minion', 'ashmunrah', 'arkhothep', 'dipthrah', 'mahrdis', 'morguthis', 'omruc', 'rahemos', 'thalas', 'vashresamun', 'frost giant', 'frost giantess', 'cyclops smith', 'cyclops drone', 'behemoth', 'cyclops', 'ice golem', 'the old whopper', 'stone golem', 'war golem', 'worker golem', 'damaged worker golem', 'goblin leader', 'goblin scavenger', 'goblin', 'goblin assassin', 'dworc fleshhunter', 'dworc venomsniper', 'dworc voodoomaster', 'acolyte of the cult', 'adept of the cult', 'amazon', 'crazed beggar', 'enlightened of the cult', 'novice of the cult', 'dark monk', 'monk', 'dark apprentice', 'dark magician', 'fury', 'gladiator', 'gang member', 'ice witch', 'infernalist', 'mad scientist', 'warlock', 'witch', 'necromancer', 'priestess', 'assasin', 'bandit', 'black knight', 'hero', 'hunter', 'nomad', 'morik the gladiator', 'smuggler', 'poacher', 'thief', 'undead jester', 'valkyrie', 'yaga the crone', 'wild warrior', 'baron brute', 'coldheart', 'doomhowl', 'dreadwing', 'fatality', 'haunter', 'incineron', 'menace', 'rocko', 'the axeorcist', 'the dreadorian', 'tirecz', 'tremorak', 'lizard sentinel', 'lizard snakecharmer', 'blue djinn', 'efreet', 'green djinn', 'marid', 'braindeath', 'bonelord', 'elder bonelord', 'gazer', 'mimic', 'stalker', 'wisp', 'minotaur archer', 'minotaur guard', 'minotaur mage', 'minotaur', 'banshee', 'betrayed wraith', 'blightwalker', 'bonebeast', 'crypt shambler', 'demon skeleton', 'dreadbeast', 'gargoyle', 'ghost', 'ghoul', 'ghostly apparition', 'grim reaper', 'gravelord oshuran', 'lich', 'lost soul', 'mummy', 'phantasm', 'pythius the rotten', 'skeleton warrior', 'spectre', 'tormented ghost', 'vampire', 'vampire bride', 'undead gladiator', 'zombie', 'mutated bat', 'mutated human', 'mutated rat', 'mutated tiger', 'werewolf', 'orc berserker', 'orc leader', 'orc rider', 'orc shaman', 'orc spearman', 'orc warlord', 'orc warrior', 'orc', 'brutus bloodbeard', 'pirate buccaneer', 'pirate corsair', 'pirate cutthroat', 'pirate ghost', 'pirate marauder', 'pirate skeleton', 'carniphila', 'haunted treeling', 'spit nettle', 'kongra', 'merlkin', 'sibang', 'serpent spawn', 'apocalypse', 'infernatil', 'verminor', 'annihilon', 'golgordan', 'hellgorak', 'latrivan', 'madareth', 'rift brood', 'rift lord', 'rift phantom', 'rift scythe', 'rift worm', 'ushuriel', 'zugurosh', 'ghazbaran', 'morgaroth', 'troll champion', 'frost troll', 'island troll', 'swamp troll', 'troll', 'acid blob', 'ancient scarab', 'azure frog', 'butterfly', 'bog raider', 'bug', 'centipede', 'cobra', 'coral frog', 'crimson frog', 'crystal spider', 'death blob', 'deathspawn', 'defiler', 'giant spider', 'green frog', 'larva', 'mercury blob', 'orchid frog', 'poison spider', 'scarab', 'scorpion', 'slime2', 'slime', 'snake', 'son of verminor', 'spider', 'tarantula', 'the abomination', 'toad', 'wasp') as $v)
if($v == substr($s, 0, strlen($v))) {
$e['name'] = 'Este nome do personagem já é usado. Por favor escolha um outro!';
break;
}
if(!isset($e['name'])) {
foreach(array('puta', 'caralho', 'karalho', 'porra', 'buceta', 'corno', 'simone','training', 'devovorga', 'energized raging mage', 'ot', 'otserv', 'thunder', 'serve', 'trimera', 'drugo', 'drugovich', 'adm', 'godsao','godzao','godsinho','GoDzinho','godzinho','Godzinho','god','GoD','GOd','God','GOD','mage mad', 'mad mage', 'abyssador', 'armadile', 'cliff strider', 'crystalcrusher', 'damaged crystal golem', 'deathstrike', 'stone devourer', 'hideous fungus', 'humongous fungus', 'humorless fungus', 'enraged crystal golem', 'wiggler', 'lost berserker', 'lava golem', 'magma crawler', 'weeper', 'gnomevil', 'ironblight', 'orewalker', 'vulcongra', 'mushroom sniffer', 'parasite', 'infected weeper', 'doctor gnomedix', 'pythius the rotten', 'lady bug', 'manta ray', 'deepling worker', 'god alone', 'bazir', 'crawler', 'deepling guard', 'deepling spellsinger', 'deepling warrior', 'manta', 'shark', 'spidris', 'spitter', 'waspoid', 'kollos', 'insectoid scout', 'calamary', 'fish', 'hive overseer', 'jellyfish', 'northern pike', 'spidris elite', 'swarmer', 'insectoid worker', 'deepling brawler', 'deepling master librarian', 'deepling tyrant', 'deepling elite', 'floor blob', 'hive pore', 'lesser swarmer', 'adi', 'adinmin', 'adimi', 'adimin', 'task', 'task clous', 'queen', 'queen eloise', 'game', " ' ", 'customer', 'support', 'fuck', 'haha', 'sux', ' abc', 'suck', 'noob', 'tutor', 'admin', 'account', 'gay', 'password', 'manager', 'aa ', 'ee', " ' ", 'ii', 'oo', 'uu', 'gm','cm', 'aff ', 'god ', 'abc', 'tutor', 'game', 'admin', 'the', 'rashid', 'alesar', 'benjamin', 'suzy', 'tajis', 'sarina', 'poach', 'Nah Bob', 'galuna', 'elane', 'chonndur', 'chondur', 'addoner', 'haroun', 'yaman', 'towncryer', 'jaul', 'obujos', 'hive overseer', 'crawler', 'deepling guard', 'deepling spellsinger', 'deepling warrior', 'lady bug', 'manta', 'shark', 'spidris', 'spitter', 'waspoid', 'kollos', 'lion event', 'tiger event', 'gerador azul i', 'gerador azul ii', 'gerador azul iii', 'gerador vermelho i', 'gerador vermelho ii', 'gerador vermelho iii', 'zombie event', 'emperium', 'guard', 'feromous', 'abomination fury', 'alvo', 'gate', 'elder beholder', 'trainer', 'beholder', 'yalaharian', 'protect cube', 'protect castle', 'protect statue', 'castle gates', 'lizard magistratus', 'lizard noble', 'askarak demon', 'askarak lord', 'askarak prince', 'bog frog', 'clay guardian', 'crystal wolf', 'death priest', 'deepling scout', 'desperate white deer', 'diamond servant', 'dromedary', 'donkey', 'elder mummy', 'enraged white deer', 'feverish citizen', 'filth toad', 'firestarter', 'ghoulish hyaena', 'golden servant', 'grave guard', 'groam', 'honour guard', 'horestis', 'horse', 'incredible old witch', 'insectoid scout', 'iron servant', 'kraknaknork', 'kraknaknork demon', 'running elite orc guard', 'sacred spider', 'sandstone scorpion', 'shaburak demon', 'shaburak lord', 'shaburak prince', 'slug', 'spider queen', 'starving wolf', 'thornfire wolf', 'tomb servant', 'weakened demon', 'wild dog', 'white deer', 'yielothax', 'boar', 'cake golem', 'crustacea gigantica', 'draptor', 'ghost rat', 'midnight panther', 'slime puddle', 'spectral scum', 'stampor', 'undead cavebear', 'brimstone bug', 'draken abomination', 'draken elite', 'fury of the emperor', 'glitterscale', 'heoni', 'lizard abomination', 'snake god essence', 'scorn of the emperor', 'snake think', 'souleater', 'spite of the emperor', 'wrath of the emperor', 'draken spellweaver', 'draken warmaster', 'ghastly dragon', 'gnarlhound', 'insect swarm', 'killer caiman', 'lancer beetle', 'lizard chosen', 'lizard dragon priest', 'lizard high guard', 'lizard legionnaire', 'lizard zaogun', 'orc marauder', 'sandcrawler', 'terramite', 'undead prospector', 'skeleton', 'wailing widow', 'berserker chicken', 'boogey', 'bride of night', 'demon parrot', 'dirtbeard', 'deer', 'esmeralda', 'essence of darkness', 'evil mastermind', 'evil sheep lord', 'evil sheep', 'fahim the wise', 'hide', 'hot dog', 'killer rabbit', 'medusa', 'mephiles', 'merikh the slaughterer', 'monstor', 'rottie the rotworm', 'shardhead', 'the bloodtusk', 'the many', 'the noxious spawn', 'the snapper', 'badger', 'bat', 'bear', 'black sheep', 'blood crab', 'blood crab underwater', 'carrion worm', 'cat', 'cave rat', 'chicken', 'cockroach', 'crab', 'crocodile', 'dire penguin', 'dog', 'elephant', 'flamingo', 'hyaena', 'husky', 'kitty', 'lion', 'mad sheep', 'mammoth', 'panda', 'parrot', 'penguin', 'pig', 'polar bear', 'rabbit', 'rat', 'rotworm', 'seagull', 'sheep', 'silver rabbit', 'skunk', 'squirrel', 'terror bird', 'thornback tortoise', 'tiger', 'tortoise', 'tortoise anti-bot', 'war wolf', 'winter wolf', 'wolf', 'dwarf', 'dwarf guard', 'dwarf geomancer', 'dwarf soldier', 'quara pincher', 'quara predator', 'quara constrictor', 'quara hydromancer', 'quara mantassin', 'quara pincher scout', 'quara predator scout', 'quara constrictor scout', 'quara hydromancer scout', 'quara mantassin scout', 'sea serpent', 'young sea serpent', 'achad', 'axeitus headbanger', 'bloodpaw', 'bovinus', 'colerian the barbarian', 'cursed gladiator', 'frostfur', 'orcus the cruel', 'rocky', 'the hairy one', 'avalanche', 'drasilla', 'grimgor guteater', 'kreebosh the exile', 'slim', 'spirit of earth', 'spirit of fire', 'spirit of water', 'the dark dancer', 'the hag', 'darakan the executioner', 'deathbringer', 'fallen mooh tah master ghar', 'gnorre chyllson', 'norgle glacierbeard', 'svoren the mad', 'the masked marauder', 'the obliverator', 'the pit lord', 'webster', 'flamethrower', 'hell hole', 'lavahole', 'dwarf dispenser', 'magicthrower', 'magic pillar', 'pillar', 'mechanical figher', 'plaguethrower', 'poisonthrower', 'shredderthrower', 'barbarian bloodwalker', 'barbarian brutetamer', 'barbarian headsplitter', 'barbarian skullhunter', 'arachir the ancient one', 'armenius', 'arthei', 'apprentice sheng', 'azerus', 'barbaria', 'battlemaster zunzu', 'big boss trolliver', 'blistering fire elemental', 'boreth', 'captain jones', 'chizzoron the distorter', 'the countess sorrow', 'cublarc the plunderer', 'deadeye devious', 'demodras', 'dharalion', 'diblis the fair', 'diseased bill', 'diseased dan', 'diseased fred', 'dracola', 'dreadmaw', 'earth overlord', 'energy overlord', 'fernfang', 'ferumbras', 'fire overlord', 'fleabringer', 'foreman kneebiter', 'freegoiz', 'general murius', 'grandfather tridian', 'grand mother foulscale', 'grorlam', 'hairman the huge', 'lizard templar', 'ice overlord', 'inky', 'koshei the deathless', 'lersatio', 'lethal lissy', 'lizard gate guardian', 'lord of the elements', 'mad technomancer', 'man in the cave', 'marziel', 'massacre', 'mooh tah master', 'mr. punish', 'munster', 'necropharus', 'ron the ripper', 'renegade orc', 'rotworm queen', 'rukor zad', 'shadow of boreth', 'shadow of lersatio', 'shadow of marziel', 'shard of corruption', 'sharptooth', 'sir valorcrest', 'splasher', 'smuggler baron silvertoe', 'stonecracker', 'the blightfather', 'the big bad one', 'the collector', 'the count', 'the evil eye', 'the frog prince', 'the handmaiden', 'the horned fox', 'the imperor', 'the old widow', 'the plasmother', 'the voice of ruin', 'the weakened count', 'thul', 'tiquandas revenge', 'ungreez', 'warlord ruzad', 'yakchal', 'yalahari', 'yeti', 'zarabustor', 'zebelon duskbringer', 'zulazza the corruptor', 'chakoya toolshaper', 'chakoya tribewarden', 'chakoya windcaller', 'dark torturer', 'demon', 'destroyer', 'diabolic imp', 'fire devil', 'gozzler', 'hand of cursed fate', 'hellfire fighter', 'hellhound', 'hellspawn', 'juggernaut', 'nightmare', 'nightmare scion', 'nightstalker', 'plaguesmith', 'bazir', 'orshabaal', 'zoralurk', 'frost dragon', 'wyrm', 'dragon lord', 'dragon', 'hydra', 'dragon hatchling', 'dragon lord hatchling', 'frost dragon hatchling', 'undead dragon', 'wyvern', 'blazing fire elemental', 'charged energy elemental', 'earth elemental', 'energy elemental', 'fire elemental', 'jagged earth elemental', 'massive earth elemental', 'massive energy elemental', 'massive fire elemental', 'massive water elemental', 'muddy earth elemental', 'overcharged energy elemental', 'roaring water elemental', 'slick water elemental', 'water elemental', 'elf arcanist', 'elf scout', 'elf', 'bones', 'deathslicer', 'exp bug', 'eye of the seven', 'fluffy', 'gamemaster', 'goblin demon', 'grynch clan goblin', 'hacker', 'the halloween hare', 'the ruthless herald', 'minishabaal', 'primitive', 'servant golem', 'tha exp carrier', 'the mutated pumpkin', 'tibia bug', 'undead minion', 'ashmunrah', 'arkhothep', 'dipthrah', 'mahrdis', 'morguthis', 'omruc', 'rahemos', 'thalas', 'vashresamun', 'frost giant', 'frost giantess', 'cyclops smith', 'cyclops drone', 'behemoth', 'cyclops', 'ice golem', 'the old whopper', 'stone golem', 'war golem', 'worker golem', 'damaged worker golem', 'goblin leader', 'goblin scavenger', 'goblin', 'goblin assassin', 'dworc fleshhunter', 'dworc venomsniper', 'dworc voodoomaster', 'acolyte of the cult', 'adept of the cult', 'amazon', 'crazed beggar', 'enlightened of the cult', 'novice of the cult', 'dark monk', 'monk', 'dark apprentice', 'dark magician', 'fury', 'gladiator', 'gang member', 'ice witch', 'infernalist', 'mad scientist', 'warlock', 'witch', 'necromancer', 'priestess', 'assasin', 'bandit', 'black knight', 'hero', 'hunter', 'nomad', 'morik the gladiator', 'smuggler', 'poacher', 'thief', 'undead jester', 'valkyrie', 'yaga the crone', 'wild warrior', 'baron brute', 'coldheart', 'doomhowl', 'dreadwing', 'fatality', 'haunter', 'incineron', 'menace', 'rocko', 'the axeorcist', 'the dreadorian', 'tirecz', 'tremorak', 'lizard sentinel', 'lizard snakecharmer', 'blue djinn', 'efreet', 'green djinn', 'marid', 'braindeath', 'bonelord', 'elder bonelord', 'gazer', 'mimic', 'stalker', 'wisp', 'minotaur archer', 'minotaur guard', 'minotaur mage', 'minotaur', 'banshee', 'betrayed wraith', 'blightwalker', 'bonebeast', 'crypt shambler', 'demon skeleton', 'dreadbeast', 'gargoyle', 'ghost', 'ghoul', 'ghostly apparition', 'grim reaper', 'gravelord oshuran', 'lich', 'lost soul', 'mummy', 'phantasm', 'pythius the rotten', 'skeleton warrior', 'spectre', 'tormented ghost', 'vampire', 'vampire bride', 'undead gladiator', 'zombie', 'mutated bat', 'mutated human', 'mutated rat', 'mutated tiger', 'werewolf', 'orc berserker', 'orc leader', 'orc rider', 'orc shaman', 'orc spearman', 'orc warlord', 'orc warrior', 'orc', 'brutus bloodbeard', 'pirate buccaneer', 'pirate corsair', 'pirate cutthroat', 'pirate ghost', 'pirate marauder', 'pirate skeleton', 'carniphila', 'haunted treeling', 'spit nettle', 'kongra', 'merlkin', 'sibang', 'serpent spawn', 'apocalypse', 'infernatil', 'verminor', 'annihilon', 'golgordan', 'hellgorak', 'latrivan', 'madareth', 'rift brood', 'rift lord', 'rift phantom', 'rift scythe', 'rift worm', 'ushuriel', 'zugurosh', 'ghazbaran', 'morgaroth', 'troll champion', 'frost troll', 'island troll', 'swamp troll', 'troll', 'acid blob', 'ancient scarab', 'azure frog', 'butterfly', 'bog raider', 'bug', 'centipede', 'cobra', 'coral frog', 'crimson frog', 'crystal spider', 'death blob', 'deathspawn', 'defiler', 'giant spider', 'green frog', 'larva', 'mercury blob', 'orchid frog', 'poison spider', 'scarab', 'scorpion', 'slime2', 'slime', 'snake', 'son of verminor', 'spider', 'tarantula', 'the abomination', 'toad', 'wasp') as $v)
if(strpos($s, $v) !== false) {
$e['name'] = 'Este nome do personagem já é usado. Por favor escolha um outro!';
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'] = 'Este nome do personagem já é usado. Por favor escolha um outro!';
}
}
}
}
}
}
if(!isset($_POST['sex']) || ($_POST['sex'] != 'male' && $_POST['sex'] != 'female'))
$e['sex'] = 'Selecione o sexo para o seu personagem!!';
if(count($voc) != 0 && (!isset($_POST['vocation']) || !is_numeric($_POST['vocation']) || !isset($voc[$_POST['vocation']])))
$e['vocation'] = 'Por favor selecione a vocação para o seu personagem!';
$s = isset($_POST['email']) ? $_POST['email'] : '';
if($s == '')
$e['email'] = 'Digite seu endereço de e-mail!';
elseif(strlen($s) > 49)
$e['email'] = 'Seu endereço de email é muito longo!';
elseif(!filter_var($s, FILTER_VALIDATE_EMAIL))
$e['email'] = 'Este endereço de e-mail tem um formato inválido. Por favor insira um endereço de e-mail correto!';
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'] = 'Este endereço de e-mail já está sendo usado. Por favor, digite um outro endereço de e-mail!';
}
$s1 = isset($_POST['password1']) ? $_POST['password1'] : '';
$s2 = isset($_POST['password2']) ? $_POST['password2'] : '';
if(empty($s2))
$e['pass'] = 'Por favor, digite a senha novamente!';
elseif($s1 != $s2)
$e['pass'] = 'As duas senhas não são iguais!';
else {
$err = array();
if(strlen($s1) < 6 || strlen($s1) > 29)
$err[] = 'A senha deve ter pelo entre 8 a 30 letras!';
if(!ctype_alnum($s1))
$err[] = 'A senha contém letras inválidos!';
if(count($err) != 0) {
$e['pass'] = '';
for($i=0; $i < count($err); $i++)
$e['pass'] .= ($i == 0 ? '' : '<br/>').$err[$i];
}
}
if(!isset($_POST['agreerules']) || empty($_POST['agreerules']))
$e['rules'] = 'Você tem que concordar com as regras do jogo, a fim de criar uma conta!';
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,premdays) VALUES($n,'".$_POST['accountname']."','".($config['server']['encryptionType'] == 'plain' ? $_POST['password1'] : hash($config['server']['encryptionType'], $_POST['password1']))."','".$_POST['email']."',".time().", '".$config['site']['newaccount_premdays']."')") === true) {
$sample = (count($voc) == 0 ? 'Rook' : $voc[$_POST['vocation']]).' Sample';
$q = mysql_query("SELECT * 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'].','.$_POST['town'].','.$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://www.mediafire.com/?j0mleh967l67sku" 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://www.mediafire.com/?j0mleh967l67sku" 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 id="ccacc" style="position:relative;top:0px;left:0px"><form action="?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">Criar nova conta</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" width="40%"><span id="accountname_label"'.(isset($e['acc']) ? ' class="red"' : '').'><b>Account Name:</b></span></td><td><input id="accountname" name="accountname" autocomplete="off" 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"' : '').'><b>Email Address:</b></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"' : '').'><b>Password:</b></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"' : '').'><b>Repita password:</b></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" width="40%"><span id="charactername_label"'.(isset($e['name']) ? ' class="red"' : '').'><b>Nome do personagem:</b></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" width="20%"><span'.(isset($e['sex']) ? ' class="red"' : '').'><b>Sex:</b></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" width="10%"><span'.(isset($e['vocation']) ? ' class="red"' : '').'><b>Vocação:</b></span></td><td><table width="100%" id="cavoc"><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"' : '').'><b>World Type:</b></span></td><td><div>';
</script></table></div></table>
</div></td></tr><br/>
<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>
</div>
<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>';

Link para o comentário
Compartilhar em outros sites

  • 0

Sistema utilizado para campos obrigatórios é em ajax amigo.

Poste em spoiler seu config.php, posso te ajudar melhor.

Entendi que:

  • Voce quer colocar 1 cidadade, sendo que qualquer player criando persoangens vão nascer na mesma town ne? me envia o seu config.
Link para o comentário
Compartilhar em outros sites

  • 0

Seria isso:

config.php:

 

 

<?PHP
$link_down = "http://www.tibia.com"; ## Link de download do cliente proprio ##
$config['site']['SocialFacebook'] = "curruwilla";
$config['site']['SocialTweet'] = "curruwilla";
###############################
###### Bônus Points ###########
###############################
################################
## Ex: 1x = Points normais #####
# Ex: 2x = Compra 1 e recebe 2 #
################################
################################
# 5x double points os pontos ###
# são extreme points ###########
################################
$config['site']['bonusPoints'] = 1; #! Quantidade de vezes a ser multiplicados os points !#
###################################
###### CONFIGURAÇÕES DO SITE ######
###################################
$config['site']['check_titles']= false; #! Não mecha !#
$config['site']['allowed_titles'] = array(); #! Não mecha !#
$config['site']['worlds'] = array(0 => 'Azure'); #! NOME DO SERVIDOR !#
$config['site']['one_email'] = 1; #! 1 email por account 1 = sim, 0 = não !#
$config['site']['email_days_to_change'] = 7;
$config['site']['newaccount_premdays'] = 0; ## DIAS DE PREMIUM QUE JOGADOR RECEBE QUANDO CRIA CHARACTER ##
$config['site']['generate_new_reckey'] = 1; #! POSSIBILIDADE DE GERAÇÃO NOVA DE RECOVERY KEY 1 = sim || 0 = não !#
$config['site']['generate_new_reckey_price'] = 5; #! Preço em 'points' de nova recovery key !#
$config['site']['send_mail_when_change_password'] = 1; #! Enviar novo password sempre que for alterado para o email !#
$config['site']['send_mail_when_generate_reckey'] = 1; #! Enviar nova recovery key para o email !#
##############################################
####### CONFIGURAÇÃO DAS VOCAÇÕES ############
##############################################
$config['site']['newchar_vocations'][0] = array(1 => 'Sorcerer Sample', 2 => 'Druid Sample', 3 => 'Paladin Sample', 4 => 'Knight Sample');
$config['site']['newchar_vocations'][1] = array(1 => 'Sorcerer Sample', 2 => 'Druid Sample', 3 => 'Paladin Sample', 4 => 'Knight Sample');
$config['site']['newchar_towns'][0] = array(1,2,5,6);
$config['site']['newchar_towns'][1] = array(1,2,5,6);
$vocation_name[0][0] = array(0 => 'None', 1 => 'Sorcerer', 2 => 'Druid', 3 => 'Paladin', 4 => 'Knight');
$vocation_name[0][1] = array(1 => 'Master Sorcerer', 2 => 'Elder Druid', 3 => 'Royal Paladin', 4 => 'Elite Knight');
$vocation_name[1][0] = array(0 => 'None', 1 => 'Sorcerer', 2 => 'Druid', 3 => 'Paladin', 4 => 'Knight');
$vocation_name[1][1] = array(1 => 'Master Sorcerer', 2 => 'Elder Druid', 3 => 'Royal Paladin', 4 => 'Elite Knight');
#######################################
######### Cidades do Servidor #########
#######################################
$towns_list[0] = array(
1 => 'Azure',
2 => 'Mountain',
3 => 'Pharao',
4 => 'Alfon'
);
$towns_list[1] = array(
1 => 'Azure',
2 => 'Mountain',
3 => 'Pharao',
4 => 'Alfon'
);
$config['site']['monsters'] = array("amazon","valkyrie","carrion worm","rotworm","rotworm queen","cockroach","kongra","merlkin","sibang","crystal spider","giant spider","poison spider","scorpion","spider","tarantula","achad","axeitus headbanger","bloodpaw","bovinus","colerian the barbarian","cursed gladiator","frostfur","orcus the cruel","rocky","the hairy one","avalanche","drasilla","grimgor guteater","kreebosh the exile","slim","spirit of earth","spirit of fire","spirit of water","the dark dancer","the hag","darakan the executioner","deathbringer","fallen mooh'tah master ghar","gnorre chyllson","norgle glacierbeard","svoren the mad","the masked marauder","the obliverator","the pit lord","webster","barbarian bloodwalker","barbarian brutetamer","barbarian headsplitter","barbarian skullhunter","bear","panda","polar bear","braindeath","beholder","elder beholder","gazer","chicken","dire penguin","flamingo","parrot","penguin","seagull","terror bird","bazir","infernatil","thul","munster","son of verminor","xenia","zoralurk","big boss trolliver","foreman kneebiter","mad technomancer","man in the cave","lord of the elements","the count","the plasmother","dracola","the abomination","the handmaiden","mr. punish","the countess sorrow","the imperor","massacre","apocalypse","brutus bloodbeard","deadeye devious","demodras","dharalion","fernfang","ferumbras","general murius","ghazbaran","grorlam","lethal lissy","morgaroth","necropharus","orshabaal","ron the ripper","the evil eye","the horned fox","the old widow","tiquandas revenge","apprentice sheng","dog","hellhound","war wolf","winter wolf","wolf","chakoya toolshaper","chakoya tribewarden","chakoya windcaller","blood crab","crab","frost giant","frost giantess","ice golem","yeti","acolyte of the cult","adept of the cult","enlightened of the cult","novice of the cult","ungreez","dark torturer","demon","destroyer","diabolic imp","fire devil","fury","hand of cursed fate","juggernaut","nightmare","plaguesmith","blue djinn","efreet","green djinn","marid","frost dragon","wyrm","sea serpent","dragon lord","dragon","hydra","dragon hatchling","dragon lord hatchling","frost dragon hatchling","dwarf geomancer","dwarf guard","dwarf soldier","dwarf","dworc fleshhunter","dworc venomsniper","dworc voodoomaster","elephant","mammoth","elf arcanist","elf scout","elf","charged energy elemental","energy elemental","massive energy elemental","overcharged energy elemental","energy overlord","cat","lion","tiger","azure frog","coral frog","crimson frog","green frog","orchid frog","toad","jagged earth elemental","muddy earth elemental","earth elemental","massive earth elemental","earth overlord","gargoyle","stone golem","ghost","phantasm","phantasm","pirate ghost","spectre","cyclops smith","cyclops drone","behemoth","cyclops","slick water elemental","roaring water elemental","ice overlord","water elemental","massive water elemental","ancient scarab","butterfly","bug","centipede","exp bug","larva","scarab","wasp","lizard sentinel","lizard snakecharmer","lizard templar","minotaur archer","minotaur guard","minotaur mage","minotaur","squirrel","goblin demon","badger","bat","deer","the halloween hare","hyaena","pig","rabbit","silver rabbit","skunk","wisp","dark monk","monk","tha exp carrier","necromancer","priestess","orc berserker","orc leader","orc rider","orc shaman","orc spearman","orc warlord","orc warrior","orc","goblin leader","goblin scavenger","goblin","goblin assassin","assasin","bandit","black knight","hero","hunter","nomad","smuggler","stalker","poacher","wild warrior","ashmunrah","dipthrah","mahrdis","morguthis","omruc","rahemos","thalas","vashresamun","pirate buccaneer","pirate corsair","pirate cutthroat","pirate marauder","carniphila","spit nettle","fire overlord","massive fire elemental","blistering fire elemental","blazing fire elemental","fire elemental","hellfire fighter","quara constrictor scout","quara hydromancer scout","quara mantassin scout","quara pincher scout","quara predator scout","quara constrictor","quara hydromancer","quara mantassin","quara pincher","quara predator","cave rat","rat","cobra","crocodile","serpent spawn","snake","wyvern","black sheep","sheep","mimic","betrayed wraith","bonebeast","demon skeleton","lost soul","pirate skeleton","skeleton","skeleton warrior","undead dragon","defiler","slime2","slime","bog raider","ice witch","warlock","witch","bones","fluffy","grynch clan goblin","hacker","minishabaal","primitive","tibia bug","undead minion","annihilon","hellgorak","latrivan","madareth","zugurosh","ushuriel","golgordan","thornback tortoise","tortoise","eye of the seven","deathslicer","flamethrower","magicthrower","plaguethrower","poisonthrower","shredderthrower","troll champion","frost troll","island troll","swamp troll","troll","banshee","blightwalker","crypt shambler","ghoul","lich","mummy","vampire","grim reaper","trainer","forest dragon","knight","paladin","druid","sorcerer","guard","mercenary","thief","toxiros","pyramo","lazarus","zathroth","goshnar","durin","demora","orc champion","lumenia","dracula","alezzo","prince almirith","elf warlord","random noob","magebomb");
$config['site']['npc'] = array('alice', 'oarkhal', 'equer', 'parkhal', 'leoric', 'sarkhal', 'pallo', 'riona', 'her miona', 'varkhal', 'eura', 'blitz', 'markhal', 'wengo', 'larkhal');
$config['site']['max_players_per_account'] = 10; #! Personagens por account !#
$config['site']['guild_need_level'] = 75; #! Level minimo para criar uma nova guild !#
$config['site']['guild_need_pacc'] = 1; #! Para criar guild necessario premium? 1 = sim || 0 = não !#
$config['site']['guild_image_size_kb'] = 300; #! Tamanho da imagem para logo da guild !#
$config['site']['guild_description_chars_limit'] = 1000;
$config['site']['guild_description_lines_limit'] = 6;
$config['site']['guild_motd_chars_limit'] = 150;
###########################################
########## CONFIGURAÇÃO DE SMTP ###########
## Insira todas as informações de email ###
## para que possa funcionar o smtp ########
###########################################
$config['site']['send_emails'] = 1;
$config['site']['mail_address'] = "curruwilla@gmail.com";
$config['site']['smtp_enabled'] = "yes";
$config['site']['smtp_host'] = "smtp.gmail.com";
$config['site']['smtp_port'] = 587;
$config['site']['smtp_auth'] = true;
$config['site']['smtp_user'] = "curruwilla@gmail.com";
$config['site']['smtp_pass'] = "BAH";
#! Opções, paginas e etc a serem exibidos !#
$config['site']['access_news'] = 6;
$config['site']['access_admin_panel'] = 6;
$config['site']['news_big_limit'] = 5;
$config['site']['news_ticks_limit'] = 5;
$config['site']['show_creationdate'] = 1;
$config['site']['last_deaths_limit'] = 40;
$config['site']['players_group_id_block'] = 4;
$config['site']['support_group_id'] = 2;
$config['site']['shop_system'] = 1;
$config['site']['serverinfo_page'] = 1;
$config['site']['email_lai_sec_interval'] = 180;
$config['site']['screenoftheday'] = 1;
#############
## Layouts ##
#############
$config['site']['layout'] = 'tibiacom';
############################
## PagSeguro/Paypal Email ##
############################
$config['pagseguro']['email'] = 'curruwilla@gmail.com'; ## EMAIL PAGSEGURO ##
$config['paypal']['email'] = 'curruwilla@gmail.com'; ## EMAIL PAYPAL ##
## Formas de pagamento [1 = ativo | 0 = inativo] ##
$config['site']['caixa'] = 0;
$config['site']['pagseguro'] = 1;
$config['site']['paypal'] = 1;
#####################
## Nome do Produto ##
#####################
$config['pagseguro']['produtoNome'] = 'Premium Points';
#############################
######### C A I X A ########
#############################
#! Informações do pagamento com caixa economica federal !#
$config['site']['CaixaCont'] = "
C/C:
Ag:
etc..
";
?>

 

 

Editado por curruwilliam
Link para o comentário
Compartilhar em outros sites

  • 0

Veja se este te ajuda amigo

 

 

<?PHP
$link_down = "http://www.tibia.com"; ## Link de download do cliente proprio ##
$config['site']['SocialFacebook'] = "curruwilla";
$config['site']['SocialTweet'] = "curruwilla";
 
###############################
###### Bônus Points ###########
###############################
 
################################
## Ex: 1x = Points normais #####
# Ex: 2x = Compra 1 e recebe 2 #
################################
################################
# 5x double points os pontos ###
# são extreme points ###########
################################
 
$config['site']['bonusPoints'] = 1; #! Quantidade de vezes a ser multiplicados os points !#
 
 
###################################
###### CONFIGURAÇÕES DO SITE ######
###################################
 
$config['site']['check_titles']= false; #! Não mecha !#
$config['site']['allowed_titles'] = array(); #! Não mecha !#
 
$config['site']['worlds'] = array(0 => 'Azure'); #! NOME DO SERVIDOR !#
$config['site']['one_email'] = 1; #! 1 email por account 1 = sim, 0  = não !#
$config['site']['email_days_to_change'] = 7;
$config['site']['newaccount_premdays'] = 0; ## DIAS DE PREMIUM QUE JOGADOR RECEBE QUANDO CRIA CHARACTER ##
$config['site']['generate_new_reckey'] = 1; #! POSSIBILIDADE DE GERAÇÃO NOVA DE RECOVERY KEY 1 = sim || 0 = não !# 
$config['site']['generate_new_reckey_price'] = 5; #! Preço em 'points' de nova recovery key !#
$config['site']['send_mail_when_change_password'] = 1; #! Enviar novo password sempre que for alterado para o email !#
$config['site']['send_mail_when_generate_reckey'] = 1; #! Enviar nova recovery key para o email !#
 
##############################################
####### CONFIGURAÇÃO DAS VOCAÇÕES ############
##############################################
$config['site']['newchar_vocations'][0] = array(1 => 'Sorcerer Sample', 2 => 'Druid Sample', 3 => 'Paladin Sample', 4 => 'Knight Sample');
$config['site']['newchar_vocations'][1] = array(1 => 'Sorcerer Sample', 2 => 'Druid Sample', 3 => 'Paladin Sample', 4 => 'Knight Sample');
 
$config['site']['newchar_towns'][0] = array(1);
$config['site']['newchar_towns'][1] = array(1);
 
$vocation_name[0][0] = array(0 => 'None', 1 => 'Sorcerer', 2 => 'Druid', 3 => 'Paladin', 4 => 'Knight'); 
$vocation_name[0][1] = array(1 => 'Master Sorcerer', 2 => 'Elder Druid', 3 => 'Royal Paladin', 4 => 'Elite Knight'); 
$vocation_name[1][0] = array(0 => 'None', 1 => 'Sorcerer', 2 => 'Druid', 3 => 'Paladin', 4 => 'Knight'); 
$vocation_name[1][1] = array(1 => 'Master Sorcerer', 2 => 'Elder Druid', 3 => 'Royal Paladin', 4 => 'Elite Knight'); 
 
#######################################
######### Cidades do Servidor #########
#######################################
$towns_list[0] = array(
1 => 'Azure',
2 => 'Mountain',
3 => 'Pharao',
4 => 'Alfon'
);
$towns_list[1] = array(
1 => 'Azure',
2 => 'Mountain',
3 => 'Pharao',
4 => 'Alfon'
);
 
$config['site']['monsters'] = array("amazon","valkyrie","carrion worm","rotworm","rotworm queen","cockroach","kongra","merlkin","sibang","crystal spider","giant spider","poison spider","scorpion","spider","tarantula","achad","axeitus headbanger","bloodpaw","bovinus","colerian the barbarian","cursed gladiator","frostfur","orcus the cruel","rocky","the hairy one","avalanche","drasilla","grimgor guteater","kreebosh the exile","slim","spirit of earth","spirit of fire","spirit of water","the dark dancer","the hag","darakan the executioner","deathbringer","fallen mooh'tah master ghar","gnorre chyllson","norgle glacierbeard","svoren the mad","the masked marauder","the obliverator","the pit lord","webster","barbarian bloodwalker","barbarian brutetamer","barbarian headsplitter","barbarian skullhunter","bear","panda","polar bear","braindeath","beholder","elder beholder","gazer","chicken","dire penguin","flamingo","parrot","penguin","seagull","terror bird","bazir","infernatil","thul","munster","son of verminor","xenia","zoralurk","big boss trolliver","foreman kneebiter","mad technomancer","man in the cave","lord of the elements","the count","the plasmother","dracola","the abomination","the handmaiden","mr. punish","the countess sorrow","the imperor","massacre","apocalypse","brutus bloodbeard","deadeye devious","demodras","dharalion","fernfang","ferumbras","general murius","ghazbaran","grorlam","lethal lissy","morgaroth","necropharus","orshabaal","ron the ripper","the evil eye","the horned fox","the old widow","tiquandas revenge","apprentice sheng","dog","hellhound","war wolf","winter wolf","wolf","chakoya toolshaper","chakoya tribewarden","chakoya windcaller","blood crab","crab","frost giant","frost giantess","ice golem","yeti","acolyte of the cult","adept of the cult","enlightened of the cult","novice of the cult","ungreez","dark torturer","demon","destroyer","diabolic imp","fire devil","fury","hand of cursed fate","juggernaut","nightmare","plaguesmith","blue djinn","efreet","green djinn","marid","frost dragon","wyrm","sea serpent","dragon lord","dragon","hydra","dragon hatchling","dragon lord hatchling","frost dragon hatchling","dwarf geomancer","dwarf guard","dwarf soldier","dwarf","dworc fleshhunter","dworc venomsniper","dworc voodoomaster","elephant","mammoth","elf arcanist","elf scout","elf","charged energy elemental","energy elemental","massive energy elemental","overcharged energy elemental","energy overlord","cat","lion","tiger","azure frog","coral frog","crimson frog","green frog","orchid frog","toad","jagged earth elemental","muddy earth elemental","earth elemental","massive earth elemental","earth overlord","gargoyle","stone golem","ghost","phantasm","phantasm","pirate ghost","spectre","cyclops smith","cyclops drone","behemoth","cyclops","slick water elemental","roaring water elemental","ice overlord","water elemental","massive water elemental","ancient scarab","butterfly","bug","centipede","exp bug","larva","scarab","wasp","lizard sentinel","lizard snakecharmer","lizard templar","minotaur archer","minotaur guard","minotaur mage","minotaur","squirrel","goblin demon","badger","bat","deer","the halloween hare","hyaena","pig","rabbit","silver rabbit","skunk","wisp","dark monk","monk","tha exp carrier","necromancer","priestess","orc berserker","orc leader","orc rider","orc shaman","orc spearman","orc warlord","orc warrior","orc","goblin leader","goblin scavenger","goblin","goblin assassin","assasin","bandit","black knight","hero","hunter","nomad","smuggler","stalker","poacher","wild warrior","ashmunrah","dipthrah","mahrdis","morguthis","omruc","rahemos","thalas","vashresamun","pirate buccaneer","pirate corsair","pirate cutthroat","pirate marauder","carniphila","spit nettle","fire overlord","massive fire elemental","blistering fire elemental","blazing fire elemental","fire elemental","hellfire fighter","quara constrictor scout","quara hydromancer scout","quara mantassin scout","quara pincher scout","quara predator scout","quara constrictor","quara hydromancer","quara mantassin","quara pincher","quara predator","cave rat","rat","cobra","crocodile","serpent spawn","snake","wyvern","black sheep","sheep","mimic","betrayed wraith","bonebeast","demon skeleton","lost soul","pirate skeleton","skeleton","skeleton warrior","undead dragon","defiler","slime2","slime","bog raider","ice witch","warlock","witch","bones","fluffy","grynch clan goblin","hacker","minishabaal","primitive","tibia bug","undead minion","annihilon","hellgorak","latrivan","madareth","zugurosh","ushuriel","golgordan","thornback tortoise","tortoise","eye of the seven","deathslicer","flamethrower","magicthrower","plaguethrower","poisonthrower","shredderthrower","troll champion","frost troll","island troll","swamp troll","troll","banshee","blightwalker","crypt shambler","ghoul","lich","mummy","vampire","grim reaper","trainer","forest dragon","knight","paladin","druid","sorcerer","guard","mercenary","thief","toxiros","pyramo","lazarus","zathroth","goshnar","durin","demora","orc champion","lumenia","dracula","alezzo","prince almirith","elf warlord","random noob","magebomb");
$config['site']['npc'] = array('alice', 'oarkhal', 'equer', 'parkhal', 'leoric', 'sarkhal', 'pallo', 'riona', 'her miona', 'varkhal', 'eura', 'blitz', 'markhal', 'wengo', 'larkhal');
 
 
$config['site']['max_players_per_account'] = 10; #! Personagens por account !#
$config['site']['guild_need_level'] = 75; #! Level minimo para criar uma nova guild !#
$config['site']['guild_need_pacc'] = 1; #! Para criar guild necessario premium? 1 = sim || 0 = não !#
$config['site']['guild_image_size_kb'] = 300; #! Tamanho da imagem para logo da guild !#
$config['site']['guild_description_chars_limit'] = 1000;
$config['site']['guild_description_lines_limit'] = 6;
$config['site']['guild_motd_chars_limit'] = 150;
 
###########################################
########## CONFIGURAÇÃO DE SMTP ###########
## Insira todas as informações de email ###
## para que possa funcionar o smtp ########
###########################################
$config['site']['send_emails'] = 1;
$config['site']['mail_address'] = "curruwilla@gmail.com";
$config['site']['smtp_enabled'] = "yes";
$config['site']['smtp_host'] = "smtp.gmail.com";
$config['site']['smtp_port'] = 587;
$config['site']['smtp_auth'] = true;
$config['site']['smtp_user'] = "curruwilla@gmail.com";
$config['site']['smtp_pass'] = "BAH";
 
#! Opções, paginas e etc a serem exibidos !#
$config['site']['access_news'] = 6;
$config['site']['access_admin_panel'] = 6;
$config['site']['news_big_limit'] = 5;
$config['site']['news_ticks_limit'] = 5;
$config['site']['show_creationdate'] = 1;
$config['site']['last_deaths_limit'] = 40;
$config['site']['players_group_id_block'] = 4;
$config['site']['support_group_id'] = 2;
$config['site']['shop_system'] = 1;
$config['site']['serverinfo_page'] = 1;
$config['site']['email_lai_sec_interval'] = 180;
$config['site']['screenoftheday'] = 1;
 
#############
## Layouts ##
#############
$config['site']['layout'] = 'tibiacom';
 
############################
## PagSeguro/Paypal Email ##
############################
$config['pagseguro']['email'] = 'curruwilla@gmail.com'; ## EMAIL PAGSEGURO ##
$config['paypal']['email'] = 'curruwilla@gmail.com'; ## EMAIL PAYPAL ##
 
## Formas de pagamento [1 = ativo | 0 = inativo] ##
$config['site']['caixa'] = 0;
$config['site']['pagseguro'] = 1;
$config['site']['paypal'] = 1;
 
#####################
## Nome do Produto ##
#####################
$config['pagseguro']['produtoNome'] = 'Premium Points';
 
#############################
######### C A I X A ########
#############################
#! Informações do pagamento com caixa economica federal !#
$config['site']['CaixaCont'] = "
C/C:
Ag:
etc..
"; 
?>

 

 

Link para o comentário
Compartilhar em outros sites

  • 0

Coloca esse createaccount.php

 

 

<?php

$location = array(
	'GER' => 'Europe',
	'USA' => 'North America'
);
$default = 'all';

$worlds = array();
$worlds[0] = array('GER', 'open');
$worlds[1] = array('GER', $config['server']['worldType']);

/*$worlds[2] = array('GER', 'hardcore');
$worlds[3] = array('USA', 'open');
$worlds[4] = array('USA', 'optional');
$worlds[5] = array('USA', 'hardcore');
*/
$town_array = $towns_list[0];
$town = $config['site']['newchar_towns'][0];
$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'] = 'Por favor, digite um nome para conta!';
	elseif(strlen($s) < 6)
		$e['acc'] = 'O nome da conta é muito curta!';
	elseif(strlen($s) > 10)
		$e['acc'] = 'O nome da conta é muito longo!';
	else {
		$s = strtoupper($s);

		if(!ctype_alnum($s))
			$e['acc'] = 'O nome da conta tem um formato inválido. O nome da conta só pode consistir em números de 0-9 e letras de A-Z!';
		elseif(!preg_match('/[A-Z0-9]/', $s))
			$e['acc'] = 'O nome da conta deve incluir pelo menos uma letra 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'] = 'O nome da conta já é utilizado. Por favor escolha um outro!';
		}
	}
	
	$s = isset($_POST['name']) ? trim($_POST['name']) : '';

	if(empty($s))
		$e['name'] = 'Por favor insira um nome para o seu personagem!';
	elseif(strlen($s) < 2 || strlen($s) > 29)
		$e['name'] = 'Um nome deve ter entre 2 a 29 letras!';
	elseif(preg_match('/[^a-zA-Z ]/', $s))
		$e['name'] = 'Este nome contém letras inválidos. Por favor, use apenas A-Z, a-z e espaço!';
	elseif(!ctype_upper($s[0]))
		$e['name'] = 'A primeira letra de um nome deve ser uma letra maiúscula!';
	elseif(strpos($s, '  ') !== false)
		$e['name'] = 'Este nome contém mais de um espaço entre as palavras. Por favor, use apenas um espaço entre as palavras!';
	else {
		foreach(explode(' ', $s) as $k =>$v) {
			$words[$k] = str_split($v);
			$len = strlen($v);
			if($len == 1) {
				$e['name'] = 'Este nome contém uma palavra com apenas uma letra. Por favor, use mais de uma letra para cada palavra!';
				break;
			}
			elseif($len > 14) {
				$e['name'] = 'Este nome contém uma palavra que é muito longo. Por favor, não use mais de 14 cartas para cada palavra!';
				break;
			}
		}
		if(!isset($e['name'])) {
			$total=0;
			foreach($words as $k =>$p) {
				if(isset($e['name']))
					break;
				$total++;
				if($total > 3) {
					$e['name'] = 'Este nome contém mais de 3 palavras. Por favor escolha outro nome!';
					break;
				}
				$len=0;
				foreach($p as $i =>$j) {
					$len++;
					if($i != 0 && ctype_upper($j)) {
						$e['name'] = 'Em nomes de letras maiúsculas são permitidas apenas no início de uma palavra!';
						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'] = 'Este nome contém uma palavra sem vogais. Escolha outro nome!';
							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'] = 'Este nome do personagem já é usado. Por favor escolha um outro!';
						break;
					}
				if(!isset($e['name'])) {
					foreach(array('puta', 'caralho', 'karalho', 'porra', 'buceta', 'simone', 'corno','training', 'devovorga', 'energized raging mage', 'ot', 'otserv', 'thunder', 'serve', 'trimera', 'drugo', 'drugovich','adm','godsao','godzao','godsinho','GoDzinho','godzinho','Godzinho','god','GoD','GOd','God','GOD','mage mad', 'mad mage', 'abyssador', 'armadile', 'cliff strider', 'crystalcrusher', 'damaged crystal golem', 'deathstrike', 'stone devourer', 'hideous fungus', 'humongous fungus', 'humorless fungus', 'enraged crystal golem', 'wiggler', 'lost berserker', 'lava golem', 'magma crawler', 'weeper', 'gnomevil', 'ironblight', 'orewalker', 'vulcongra', 'mushroom sniffer', 'parasite', 'infected weeper', 'doctor gnomedix', 'pythius the rotten', 'lady bug', 'manta ray', 'deepling worker', 'god alone', 'bazir', 'crawler', 'deepling guard', 'deepling spellsinger', 'deepling warrior', 'manta', 'shark', 'spidris', 'spitter', 'waspoid', 'kollos', 'insectoid scout', 'calamary', 'fish', 'hive overseer', 'jellyfish', 'northern pike', 'spidris elite', 'swarmer', 'insectoid worker', 'deepling brawler', 'deepling master librarian', 'deepling tyrant', 'deepling elite', 'floor blob', 'hive pore', 'lesser swarmer', 'adi', 'adinmin', 'adimi', 'adimin', 'task', 'task clous', 'queen', 'queen eloise', 'aa ', 'ee', " ' ", 'ii', 'oo', 'uu', 'gm','cm', 'aff ', 'god ', 'abc', 'tutor', 'game', 'admin', 'the', 'rashid', 'alesar', 'benjamin', 'suzy', 'tajis', 'sarina', 'poach', 'Nah Bob', 'galuna', 'elane', 'chonndur', 'chondur', 'addoner', 'haroun', 'yaman', 'towncryer', 'jaul', 'obujos', 'hive overseer', 'crawler', 'deepling guard', 'deepling spellsinger', 'deepling warrior', 'lady bug', 'manta', 'shark', 'spidris', 'spitter', 'waspoid', 'kollos', 'lion event', 'tiger event', 'gerador azul i', 'gerador azul ii', 'gerador azul iii', 'gerador vermelho i', 'gerador vermelho ii', 'gerador vermelho iii', 'zombie event', 'emperium', 'guard', 'feromous', 'abomination fury', 'alvo', 'gate', 'elder beholder', 'trainer', 'beholder', 'yalaharian', 'protect cube', 'protect castle', 'protect statue', 'castle gates', 'lizard magistratus', 'lizard noble', 'askarak demon', 'askarak lord', 'askarak prince', 'bog frog', 'clay guardian', 'crystal wolf', 'death priest', 'deepling scout', 'desperate white deer', 'diamond servant', 'dromedary', 'donkey', 'elder mummy', 'enraged white deer', 'feverish citizen', 'filth toad', 'firestarter', 'ghoulish hyaena', 'golden servant', 'grave guard', 'groam', 'honour guard', 'horestis', 'horse', 'incredible old witch', 'insectoid scout', 'iron servant', 'kraknaknork', 'kraknaknork demon', 'running elite orc guard', 'sacred spider', 'sandstone scorpion', 'shaburak demon', 'shaburak lord', 'shaburak prince', 'slug', 'spider queen', 'starving wolf', 'thornfire wolf', 'tomb servant', 'weakened demon', 'wild dog', 'white deer', 'yielothax', 'boar', 'cake golem', 'crustacea gigantica', 'draptor', 'ghost rat', 'midnight panther', 'slime puddle', 'spectral scum', 'stampor', 'undead cavebear', 'brimstone bug', 'draken abomination', 'draken elite', 'fury of the emperor', 'glitterscale', 'heoni', 'lizard abomination', 'snake god essence', 'scorn of the emperor', 'snake think', 'souleater', 'spite of the emperor', 'wrath of the emperor', 'draken spellweaver', 'draken warmaster', 'ghastly dragon', 'gnarlhound', 'insect swarm', 'killer caiman', 'lancer beetle', 'lizard chosen', 'lizard dragon priest', 'lizard high guard', 'lizard legionnaire', 'lizard zaogun', 'orc marauder', 'sandcrawler', 'terramite', 'undead prospector', 'skeleton', 'wailing widow', 'berserker chicken', 'boogey', 'bride of night', 'demon parrot', 'dirtbeard', 'deer', 'esmeralda', 'essence of darkness', 'evil mastermind', 'evil sheep lord', 'evil sheep', 'fahim the wise', 'hide', 'hot dog', 'killer rabbit', 'medusa', 'mephiles', 'merikh the slaughterer', 'monstor', 'rottie the rotworm', 'shardhead', 'the bloodtusk', 'the many', 'the noxious spawn', 'the snapper', 'badger', 'bat', 'bear', 'black sheep', 'blood crab', 'blood crab underwater', 'carrion worm', 'cat', 'cave rat', 'chicken', 'cockroach', 'crab', 'crocodile', 'dire penguin', 'dog', 'elephant', 'flamingo', 'hyaena', 'husky', 'kitty', 'lion', 'mad sheep', 'mammoth', 'panda', 'parrot', 'penguin', 'pig', 'polar bear', 'rabbit', 'rat', 'rotworm', 'seagull', 'sheep', 'silver rabbit', 'skunk', 'squirrel', 'terror bird', 'thornback tortoise', 'tiger', 'tortoise', 'tortoise anti-bot', 'war wolf', 'winter wolf', 'wolf', 'dwarf', 'dwarf guard', 'dwarf geomancer', 'dwarf soldier', 'quara pincher', 'quara predator', 'quara constrictor', 'quara hydromancer', 'quara mantassin', 'quara pincher scout', 'quara predator scout', 'quara constrictor scout', 'quara hydromancer scout', 'quara mantassin scout', 'sea serpent', 'young sea serpent', 'achad', 'axeitus headbanger', 'bloodpaw', 'bovinus', 'colerian the barbarian', 'cursed gladiator', 'frostfur', 'orcus the cruel', 'rocky', 'the hairy one', 'avalanche', 'drasilla', 'grimgor guteater', 'kreebosh the exile', 'slim', 'spirit of earth', 'spirit of fire', 'spirit of water', 'the dark dancer', 'the hag', 'darakan the executioner', 'deathbringer', 'fallen mooh tah master ghar', 'gnorre chyllson', 'norgle glacierbeard', 'svoren the mad', 'the masked marauder', 'the obliverator', 'the pit lord', 'webster', 'flamethrower', 'hell hole', 'lavahole', 'dwarf dispenser', 'magicthrower', 'magic pillar', 'pillar', 'mechanical figher', 'plaguethrower', 'poisonthrower', 'shredderthrower', 'barbarian bloodwalker', 'barbarian brutetamer', 'barbarian headsplitter', 'barbarian skullhunter', 'arachir the ancient one', 'armenius', 'arthei', 'apprentice sheng', 'azerus', 'barbaria', 'battlemaster zunzu', 'big boss trolliver', 'blistering fire elemental', 'boreth', 'captain jones', 'chizzoron the distorter', 'the countess sorrow', 'cublarc the plunderer', 'deadeye devious', 'demodras', 'dharalion', 'diblis the fair', 'diseased bill', 'diseased dan', 'diseased fred', 'dracola', 'dreadmaw', 'earth overlord', 'energy overlord', 'fernfang', 'ferumbras', 'fire overlord', 'fleabringer', 'foreman kneebiter', 'freegoiz', 'general murius', 'grandfather tridian', 'grand mother foulscale', 'grorlam', 'hairman the huge', 'lizard templar', 'ice overlord', 'inky', 'koshei the deathless', 'lersatio', 'lethal lissy', 'lizard gate guardian', 'lord of the elements', 'mad technomancer', 'man in the cave', 'marziel', 'massacre', 'mooh tah master', 'mr. punish', 'munster', 'necropharus', 'ron the ripper', 'renegade orc', 'rotworm queen', 'rukor zad', 'shadow of boreth', 'shadow of lersatio', 'shadow of marziel', 'shard of corruption', 'sharptooth', 'sir valorcrest', 'splasher', 'smuggler baron silvertoe', 'stonecracker', 'the blightfather', 'the big bad one', 'the collector', 'the count', 'the evil eye', 'the frog prince', 'the handmaiden', 'the horned fox', 'the imperor', 'the old widow', 'the plasmother', 'the voice of ruin', 'the weakened count', 'thul', 'tiquandas revenge', 'ungreez', 'warlord ruzad', 'yakchal', 'yalahari', 'yeti', 'zarabustor', 'zebelon duskbringer', 'zulazza the corruptor', 'chakoya toolshaper', 'chakoya tribewarden', 'chakoya windcaller', 'dark torturer', 'demon', 'destroyer', 'diabolic imp', 'fire devil', 'gozzler', 'hand of cursed fate', 'hellfire fighter', 'hellhound', 'hellspawn', 'juggernaut', 'nightmare', 'nightmare scion', 'nightstalker', 'plaguesmith', 'bazir', 'orshabaal', 'zoralurk', 'frost dragon', 'wyrm', 'dragon lord', 'dragon', 'hydra', 'dragon hatchling', 'dragon lord hatchling', 'frost dragon hatchling', 'undead dragon', 'wyvern', 'blazing fire elemental', 'charged energy elemental', 'earth elemental', 'energy elemental', 'fire elemental', 'jagged earth elemental', 'massive earth elemental', 'massive energy elemental', 'massive fire elemental', 'massive water elemental', 'muddy earth elemental', 'overcharged energy elemental', 'roaring water elemental', 'slick water elemental', 'water elemental', 'elf arcanist', 'elf scout', 'elf', 'bones', 'deathslicer', 'exp bug', 'eye of the seven', 'fluffy', 'gamemaster', 'goblin demon', 'grynch clan goblin', 'hacker', 'the halloween hare', 'the ruthless herald', 'minishabaal', 'primitive', 'servant golem', 'tha exp carrier', 'the mutated pumpkin', 'tibia bug', 'undead minion', 'ashmunrah', 'arkhothep', 'dipthrah', 'mahrdis', 'morguthis', 'omruc', 'rahemos', 'thalas', 'vashresamun', 'frost giant', 'frost giantess', 'cyclops smith', 'cyclops drone', 'behemoth', 'cyclops', 'ice golem', 'the old whopper', 'stone golem', 'war golem', 'worker golem', 'damaged worker golem', 'goblin leader', 'goblin scavenger', 'goblin', 'goblin assassin', 'dworc fleshhunter', 'dworc venomsniper', 'dworc voodoomaster', 'acolyte of the cult', 'adept of the cult', 'amazon', 'crazed beggar', 'enlightened of the cult', 'novice of the cult', 'dark monk', 'monk', 'dark apprentice', 'dark magician', 'fury', 'gladiator', 'gang member', 'ice witch', 'infernalist', 'mad scientist', 'warlock', 'witch', 'necromancer', 'priestess', 'assasin', 'bandit', 'black knight', 'hero', 'hunter', 'nomad', 'morik the gladiator', 'smuggler', 'poacher', 'thief', 'undead jester', 'valkyrie', 'yaga the crone', 'wild warrior', 'baron brute', 'coldheart', 'doomhowl', 'dreadwing', 'fatality', 'haunter', 'incineron', 'menace', 'rocko', 'the axeorcist', 'the dreadorian', 'tirecz', 'tremorak', 'lizard sentinel', 'lizard snakecharmer', 'blue djinn', 'efreet', 'green djinn', 'marid', 'braindeath', 'bonelord', 'elder bonelord', 'gazer', 'mimic', 'stalker', 'wisp', 'minotaur archer', 'minotaur guard', 'minotaur mage', 'minotaur', 'banshee', 'betrayed wraith', 'blightwalker', 'bonebeast', 'crypt shambler', 'demon skeleton', 'dreadbeast', 'gargoyle', 'ghost', 'ghoul', 'ghostly apparition', 'grim reaper', 'gravelord oshuran', 'lich', 'lost soul', 'mummy', 'phantasm', 'pythius the rotten', 'skeleton warrior', 'spectre', 'tormented ghost', 'vampire', 'vampire bride', 'undead gladiator', 'zombie', 'mutated bat', 'mutated human', 'mutated rat', 'mutated tiger', 'werewolf', 'orc berserker', 'orc leader', 'orc rider', 'orc shaman', 'orc spearman', 'orc warlord', 'orc warrior', 'orc', 'brutus bloodbeard', 'pirate buccaneer', 'pirate corsair', 'pirate cutthroat', 'pirate ghost', 'pirate marauder', 'pirate skeleton', 'carniphila', 'haunted treeling', 'spit nettle', 'kongra', 'merlkin', 'sibang', 'serpent spawn', 'apocalypse', 'infernatil', 'verminor', 'annihilon', 'golgordan', 'hellgorak', 'latrivan', 'madareth', 'rift brood', 'rift lord', 'rift phantom', 'rift scythe', 'rift worm', 'ushuriel', 'zugurosh', 'ghazbaran', 'morgaroth', 'troll champion', 'frost troll', 'island troll', 'swamp troll', 'troll', 'acid blob', 'ancient scarab', 'azure frog', 'butterfly', 'bog raider', 'bug', 'centipede', 'cobra', 'coral frog', 'crimson frog', 'crystal spider', 'death blob', 'deathspawn', 'defiler', 'giant spider', 'green frog', 'larva', 'mercury blob', 'orchid frog', 'poison spider', 'scarab', 'scorpion', 'slime2', 'slime', 'snake', 'son of verminor', 'spider', 'tarantula', 'the abomination', 'toad', 'wasp') as $v)
						if($v == substr($s, 0, strlen($v))) {
							$e['name'] = 'Este nome do personagem já é usado. Por favor escolha um outro!';
							break;
						}
					if(!isset($e['name'])) {
						foreach(array('puta', 'caralho', 'karalho', 'porra', 'buceta', 'corno', 'simone','training', 'devovorga', 'energized raging mage', 'ot', 'otserv', 'thunder', 'serve', 'trimera', 'drugo', 'drugovich', 'adm', 'godsao','godzao','godsinho','GoDzinho','godzinho','Godzinho','god','GoD','GOd','God','GOD','mage mad', 'mad mage', 'abyssador', 'armadile', 'cliff strider', 'crystalcrusher', 'damaged crystal golem', 'deathstrike', 'stone devourer', 'hideous fungus', 'humongous fungus', 'humorless fungus', 'enraged crystal golem', 'wiggler', 'lost berserker', 'lava golem', 'magma crawler', 'weeper', 'gnomevil', 'ironblight', 'orewalker', 'vulcongra', 'mushroom sniffer', 'parasite', 'infected weeper', 'doctor gnomedix', 'pythius the rotten', 'lady bug', 'manta ray', 'deepling worker', 'god alone', 'bazir', 'crawler', 'deepling guard', 'deepling spellsinger', 'deepling warrior', 'manta', 'shark', 'spidris', 'spitter', 'waspoid', 'kollos', 'insectoid scout', 'calamary', 'fish', 'hive overseer', 'jellyfish', 'northern pike', 'spidris elite', 'swarmer', 'insectoid worker', 'deepling brawler', 'deepling master librarian', 'deepling tyrant', 'deepling elite', 'floor blob', 'hive pore', 'lesser swarmer', 'adi', 'adinmin', 'adimi', 'adimin', 'task', 'task clous', 'queen', 'queen eloise', 'game', " ' ", 'customer', 'support', 'fuck', 'haha', 'sux', ' abc', 'suck', 'noob', 'tutor', 'admin', 'account', 'gay', 'password', 'manager', 'aa ', 'ee', " ' ", 'ii', 'oo', 'uu', 'gm','cm', 'aff ', 'god ', 'abc', 'tutor', 'game', 'admin', 'the', 'rashid', 'alesar', 'benjamin', 'suzy', 'tajis', 'sarina', 'poach', 'Nah Bob', 'galuna', 'elane', 'chonndur', 'chondur', 'addoner', 'haroun', 'yaman', 'towncryer', 'jaul', 'obujos', 'hive overseer', 'crawler', 'deepling guard', 'deepling spellsinger', 'deepling warrior', 'lady bug', 'manta', 'shark', 'spidris', 'spitter', 'waspoid', 'kollos', 'lion event', 'tiger event', 'gerador azul i', 'gerador azul ii', 'gerador azul iii', 'gerador vermelho i', 'gerador vermelho ii', 'gerador vermelho iii', 'zombie event', 'emperium', 'guard', 'feromous', 'abomination fury', 'alvo', 'gate', 'elder beholder', 'trainer', 'beholder', 'yalaharian', 'protect cube', 'protect castle', 'protect statue', 'castle gates', 'lizard magistratus', 'lizard noble', 'askarak demon', 'askarak lord', 'askarak prince', 'bog frog', 'clay guardian', 'crystal wolf', 'death priest', 'deepling scout', 'desperate white deer', 'diamond servant', 'dromedary', 'donkey', 'elder mummy', 'enraged white deer', 'feverish citizen', 'filth toad', 'firestarter', 'ghoulish hyaena', 'golden servant', 'grave guard', 'groam', 'honour guard', 'horestis', 'horse', 'incredible old witch', 'insectoid scout', 'iron servant', 'kraknaknork', 'kraknaknork demon', 'running elite orc guard', 'sacred spider', 'sandstone scorpion', 'shaburak demon', 'shaburak lord', 'shaburak prince', 'slug', 'spider queen', 'starving wolf', 'thornfire wolf', 'tomb servant', 'weakened demon', 'wild dog', 'white deer', 'yielothax', 'boar', 'cake golem', 'crustacea gigantica', 'draptor', 'ghost rat', 'midnight panther', 'slime puddle', 'spectral scum', 'stampor', 'undead cavebear', 'brimstone bug', 'draken abomination', 'draken elite', 'fury of the emperor', 'glitterscale', 'heoni', 'lizard abomination', 'snake god essence', 'scorn of the emperor', 'snake think', 'souleater', 'spite of the emperor', 'wrath of the emperor', 'draken spellweaver', 'draken warmaster', 'ghastly dragon', 'gnarlhound', 'insect swarm', 'killer caiman', 'lancer beetle', 'lizard chosen', 'lizard dragon priest', 'lizard high guard', 'lizard legionnaire', 'lizard zaogun', 'orc marauder', 'sandcrawler', 'terramite', 'undead prospector', 'skeleton', 'wailing widow', 'berserker chicken', 'boogey', 'bride of night', 'demon parrot', 'dirtbeard', 'deer', 'esmeralda', 'essence of darkness', 'evil mastermind', 'evil sheep lord', 'evil sheep', 'fahim the wise', 'hide', 'hot dog', 'killer rabbit', 'medusa', 'mephiles', 'merikh the slaughterer', 'monstor', 'rottie the rotworm', 'shardhead', 'the bloodtusk', 'the many', 'the noxious spawn', 'the snapper', 'badger', 'bat', 'bear', 'black sheep', 'blood crab', 'blood crab underwater', 'carrion worm', 'cat', 'cave rat', 'chicken', 'cockroach', 'crab', 'crocodile', 'dire penguin', 'dog', 'elephant', 'flamingo', 'hyaena', 'husky', 'kitty', 'lion', 'mad sheep', 'mammoth', 'panda', 'parrot', 'penguin', 'pig', 'polar bear', 'rabbit', 'rat', 'rotworm', 'seagull', 'sheep', 'silver rabbit', 'skunk', 'squirrel', 'terror bird', 'thornback tortoise', 'tiger', 'tortoise', 'tortoise anti-bot', 'war wolf', 'winter wolf', 'wolf', 'dwarf', 'dwarf guard', 'dwarf geomancer', 'dwarf soldier', 'quara pincher', 'quara predator', 'quara constrictor', 'quara hydromancer', 'quara mantassin', 'quara pincher scout', 'quara predator scout', 'quara constrictor scout', 'quara hydromancer scout', 'quara mantassin scout', 'sea serpent', 'young sea serpent', 'achad', 'axeitus headbanger', 'bloodpaw', 'bovinus', 'colerian the barbarian', 'cursed gladiator', 'frostfur', 'orcus the cruel', 'rocky', 'the hairy one', 'avalanche', 'drasilla', 'grimgor guteater', 'kreebosh the exile', 'slim', 'spirit of earth', 'spirit of fire', 'spirit of water', 'the dark dancer', 'the hag', 'darakan the executioner', 'deathbringer', 'fallen mooh tah master ghar', 'gnorre chyllson', 'norgle glacierbeard', 'svoren the mad', 'the masked marauder', 'the obliverator', 'the pit lord', 'webster', 'flamethrower', 'hell hole', 'lavahole', 'dwarf dispenser', 'magicthrower', 'magic pillar', 'pillar', 'mechanical figher', 'plaguethrower', 'poisonthrower', 'shredderthrower', 'barbarian bloodwalker', 'barbarian brutetamer', 'barbarian headsplitter', 'barbarian skullhunter', 'arachir the ancient one', 'armenius', 'arthei', 'apprentice sheng', 'azerus', 'barbaria', 'battlemaster zunzu', 'big boss trolliver', 'blistering fire elemental', 'boreth', 'captain jones', 'chizzoron the distorter', 'the countess sorrow', 'cublarc the plunderer', 'deadeye devious', 'demodras', 'dharalion', 'diblis the fair', 'diseased bill', 'diseased dan', 'diseased fred', 'dracola', 'dreadmaw', 'earth overlord', 'energy overlord', 'fernfang', 'ferumbras', 'fire overlord', 'fleabringer', 'foreman kneebiter', 'freegoiz', 'general murius', 'grandfather tridian', 'grand mother foulscale', 'grorlam', 'hairman the huge', 'lizard templar', 'ice overlord', 'inky', 'koshei the deathless', 'lersatio', 'lethal lissy', 'lizard gate guardian', 'lord of the elements', 'mad technomancer', 'man in the cave', 'marziel', 'massacre', 'mooh tah master', 'mr. punish', 'munster', 'necropharus', 'ron the ripper', 'renegade orc', 'rotworm queen', 'rukor zad', 'shadow of boreth', 'shadow of lersatio', 'shadow of marziel', 'shard of corruption', 'sharptooth', 'sir valorcrest', 'splasher', 'smuggler baron silvertoe', 'stonecracker', 'the blightfather', 'the big bad one', 'the collector', 'the count', 'the evil eye', 'the frog prince', 'the handmaiden', 'the horned fox', 'the imperor', 'the old widow', 'the plasmother', 'the voice of ruin', 'the weakened count', 'thul', 'tiquandas revenge', 'ungreez', 'warlord ruzad', 'yakchal', 'yalahari', 'yeti', 'zarabustor', 'zebelon duskbringer', 'zulazza the corruptor', 'chakoya toolshaper', 'chakoya tribewarden', 'chakoya windcaller', 'dark torturer', 'demon', 'destroyer', 'diabolic imp', 'fire devil', 'gozzler', 'hand of cursed fate', 'hellfire fighter', 'hellhound', 'hellspawn', 'juggernaut', 'nightmare', 'nightmare scion', 'nightstalker', 'plaguesmith', 'bazir', 'orshabaal', 'zoralurk', 'frost dragon', 'wyrm', 'dragon lord', 'dragon', 'hydra', 'dragon hatchling', 'dragon lord hatchling', 'frost dragon hatchling', 'undead dragon', 'wyvern', 'blazing fire elemental', 'charged energy elemental', 'earth elemental', 'energy elemental', 'fire elemental', 'jagged earth elemental', 'massive earth elemental', 'massive energy elemental', 'massive fire elemental', 'massive water elemental', 'muddy earth elemental', 'overcharged energy elemental', 'roaring water elemental', 'slick water elemental', 'water elemental', 'elf arcanist', 'elf scout', 'elf', 'bones', 'deathslicer', 'exp bug', 'eye of the seven', 'fluffy', 'gamemaster', 'goblin demon', 'grynch clan goblin', 'hacker', 'the halloween hare', 'the ruthless herald', 'minishabaal', 'primitive', 'servant golem', 'tha exp carrier', 'the mutated pumpkin', 'tibia bug', 'undead minion', 'ashmunrah', 'arkhothep', 'dipthrah', 'mahrdis', 'morguthis', 'omruc', 'rahemos', 'thalas', 'vashresamun', 'frost giant', 'frost giantess', 'cyclops smith', 'cyclops drone', 'behemoth', 'cyclops', 'ice golem', 'the old whopper', 'stone golem', 'war golem', 'worker golem', 'damaged worker golem', 'goblin leader', 'goblin scavenger', 'goblin', 'goblin assassin', 'dworc fleshhunter', 'dworc venomsniper', 'dworc voodoomaster', 'acolyte of the cult', 'adept of the cult', 'amazon', 'crazed beggar', 'enlightened of the cult', 'novice of the cult', 'dark monk', 'monk', 'dark apprentice', 'dark magician', 'fury', 'gladiator', 'gang member', 'ice witch', 'infernalist', 'mad scientist', 'warlock', 'witch', 'necromancer', 'priestess', 'assasin', 'bandit', 'black knight', 'hero', 'hunter', 'nomad', 'morik the gladiator', 'smuggler', 'poacher', 'thief', 'undead jester', 'valkyrie', 'yaga the crone', 'wild warrior', 'baron brute', 'coldheart', 'doomhowl', 'dreadwing', 'fatality', 'haunter', 'incineron', 'menace', 'rocko', 'the axeorcist', 'the dreadorian', 'tirecz', 'tremorak', 'lizard sentinel', 'lizard snakecharmer', 'blue djinn', 'efreet', 'green djinn', 'marid', 'braindeath', 'bonelord', 'elder bonelord', 'gazer', 'mimic', 'stalker', 'wisp', 'minotaur archer', 'minotaur guard', 'minotaur mage', 'minotaur', 'banshee', 'betrayed wraith', 'blightwalker', 'bonebeast', 'crypt shambler', 'demon skeleton', 'dreadbeast', 'gargoyle', 'ghost', 'ghoul', 'ghostly apparition', 'grim reaper', 'gravelord oshuran', 'lich', 'lost soul', 'mummy', 'phantasm', 'pythius the rotten', 'skeleton warrior', 'spectre', 'tormented ghost', 'vampire', 'vampire bride', 'undead gladiator', 'zombie', 'mutated bat', 'mutated human', 'mutated rat', 'mutated tiger', 'werewolf', 'orc berserker', 'orc leader', 'orc rider', 'orc shaman', 'orc spearman', 'orc warlord', 'orc warrior', 'orc', 'brutus bloodbeard', 'pirate buccaneer', 'pirate corsair', 'pirate cutthroat', 'pirate ghost', 'pirate marauder', 'pirate skeleton', 'carniphila', 'haunted treeling', 'spit nettle', 'kongra', 'merlkin', 'sibang', 'serpent spawn', 'apocalypse', 'infernatil', 'verminor', 'annihilon', 'golgordan', 'hellgorak', 'latrivan', 'madareth', 'rift brood', 'rift lord', 'rift phantom', 'rift scythe', 'rift worm', 'ushuriel', 'zugurosh', 'ghazbaran', 'morgaroth', 'troll champion', 'frost troll', 'island troll', 'swamp troll', 'troll', 'acid blob', 'ancient scarab', 'azure frog', 'butterfly', 'bog raider', 'bug', 'centipede', 'cobra', 'coral frog', 'crimson frog', 'crystal spider', 'death blob', 'deathspawn', 'defiler', 'giant spider', 'green frog', 'larva', 'mercury blob', 'orchid frog', 'poison spider', 'scarab', 'scorpion', 'slime2', 'slime', 'snake', 'son of verminor', 'spider', 'tarantula', 'the abomination', 'toad', 'wasp') as $v)
							if(strpos($s, $v) !== false) {
								$e['name'] = 'Este nome do personagem já é usado. Por favor escolha um outro!';
								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'] = 'Este nome do personagem já é usado. Por favor escolha um outro!';
						}
					}
				}
			}
		}
	}

	if(!isset($_POST['world']) || empty($_POST['world']))
		$e['world'] = 'Por favor selecione um mundo de jogo para o seu personagem!';

	if(!isset($_POST['sex']) || ($_POST['sex'] != 'male' && $_POST['sex'] != 'female'))
		$e['sex'] = 'Selecione o sexo para o seu personagem!!';

	if(count($voc) != 0 && (!isset($_POST['vocation']) || !is_numeric($_POST['vocation']) || !isset($voc[$_POST['vocation']])))
		$e['vocation'] = 'Por favor selecione a vocação para o seu personagem!';

	$s = isset($_POST['email']) ? $_POST['email'] : '';

	if($s == '')
		$e['email'] = 'Digite seu endereço de e-mail!';
	elseif(strlen($s) > 49)
		$e['email'] = 'Seu endereço de email é muito longo!';
	elseif(!filter_var($s, FILTER_VALIDATE_EMAIL))
		$e['email'] = 'Este endereço de e-mail tem um formato inválido. Por favor insira um endereço de e-mail correto!';
	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'] = 'Este endereço de e-mail já está sendo usado. Por favor, digite um outro endereço de e-mail!';
	}

	$s1 = isset($_POST['password1']) ? $_POST['password1'] : '';
	$s2 = isset($_POST['password2']) ? $_POST['password2'] : '';

	if(empty($s2))
		$e['pass'] = 'Por favor, digite a senha novamente!';
	elseif($s1 != $s2)
		$e['pass'] = 'As duas senhas não são iguais!';
	else {
		$err = array();
		if(strlen($s1) < 6 || strlen($s1) > 29)
			$err[] = 'A senha deve ter pelo entre 8 a 30 letras!';
		if(!ctype_alnum($s1))
			$err[] = 'A senha contém letras inválidos!';

		if(count($err) != 0) {
			$e['pass'] = '';
			for($i=0; $i < count($err); $i++)
				$e['pass'] .= ($i == 0 ? '' : '<br/>').$err[$i];
		}
	}

	if(!isset($_POST['agreerules']) || empty($_POST['agreerules']))
		$e['rules'] = 'Você tem que concordar com as regras do jogo, a fim de criar uma conta!';

	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'] = 'Por favor selecione um mundo de jogo válido.';
	}

	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,premdays) VALUES($n,'".$_POST['accountname']."','".($config['server']['encryptionType'] == 'plain' ? $_POST['password1'] : hash($config['server']['encryptionType'], $_POST['password1']))."','".$_POST['email']."',".time().", '".$config['site']['newaccount_premdays']."')") === true) {
			$sample = (count($voc) == 0 ? 'Rook' : $voc[$_POST['vocation']]).' Sample';
			$q = mysql_query("SELECT * 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'].','.$_POST['town'].','.$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://www.mediafire.com/?j0mleh967l67sku" 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://www.mediafire.com/?j0mleh967l67sku" 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 id="ccacc" style="position:relative;top:0px;left:0px"><form action="?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">Criar nova conta</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" width="40%"><span id="accountname_label"'.(isset($e['acc']) ? ' class="red"' : '').'><b>Account Name:</b></span></td><td><input id="accountname" name="accountname" autocomplete="off" 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"' : '').'><b>Email Address:</b></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"' : '').'><b>Password:</b></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"' : '').'><b>Repita password:</b></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" width="40%"><span id="charactername_label"'.(isset($e['name']) ? ' class="red"' : '').'><b>Nome do personagem:</b></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" width="20%"><span'.(isset($e['sex']) ? ' class="red"' : '').'><b>Sex:</b></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" width="10%"><span'.(isset($e['vocation']) ? ' class="red"' : '').'><b>Vocação:</b></span></td><td><table width="100%" id="cavoc"><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"' : '').'><b>World Type:</b></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 id="filterbox_pvp"><td class="LabelV150"><span'.(isset($e['world']) ? ' class="red"' : '').'><b>World Name:</b></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>Por favor, selecione todas as seguintes caixas:</b></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"' : '').'/>Concordo com as <a href="?subtopic=legaldocuments&page=rules" target="_blank">regras do jogo</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/>
<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>
</div>
<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>'; 

 

 

Link para o comentário
Compartilhar em outros sites

  • 0

Ok, agora ta certo.

 

 

<?php

$location = array(
	'GER' => 'Europe',
	'USA' => 'North America'
);
$default = 'all';

$worlds = array();
$worlds[0] = array('GER', $config['server']['worldType']);
$worlds[1] = array('GER', $config['server']['worldType']);

/*$worlds[2] = array('GER', 'hardcore');
$worlds[3] = array('USA', 'open');
$worlds[4] = array('USA', 'optional');
$worlds[5] = array('USA', 'hardcore');
*/
$town_array = $towns_list[0];
$town = $config['site']['newchar_towns'][0];
$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) > 10)
		$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-Z0-9]/', $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('puta', 'caralho', 'karalho', 'porra', 'buceta', 'simone', 'corno','training', 'devovorga', 'energized raging mage', 'ot', 'otserv', 'thunder', 'serve', 'trimera', 'drugo', 'drugovich','adm','godsao','godzao','godsinho','GoDzinho','godzinho','Godzinho','god','GoD','GOd','God','GOD','mage mad', 'mad mage', 'abyssador', 'armadile', 'cliff strider', 'crystalcrusher', 'damaged crystal golem', 'deathstrike', 'stone devourer', 'hideous fungus', 'humongous fungus', 'humorless fungus', 'enraged crystal golem', 'wiggler', 'lost berserker', 'lava golem', 'magma crawler', 'weeper', 'gnomevil', 'ironblight', 'orewalker', 'vulcongra', 'mushroom sniffer', 'parasite', 'infected weeper', 'doctor gnomedix', 'pythius the rotten', 'lady bug', 'manta ray', 'deepling worker', 'god alone', 'bazir', 'crawler', 'deepling guard', 'deepling spellsinger', 'deepling warrior', 'manta', 'shark', 'spidris', 'spitter', 'waspoid', 'kollos', 'insectoid scout', 'calamary', 'fish', 'hive overseer', 'jellyfish', 'northern pike', 'spidris elite', 'swarmer', 'insectoid worker', 'deepling brawler', 'deepling master librarian', 'deepling tyrant', 'deepling elite', 'floor blob', 'hive pore', 'lesser swarmer', 'adi', 'adinmin', 'adimi', 'adimin', 'task', 'task clous', 'queen', 'queen eloise', 'aa ', 'ee', " ' ", 'ii', 'oo', 'uu', 'gm','cm', 'aff ', 'god ', 'abc', 'tutor', 'game', 'admin', 'the', 'rashid', 'alesar', 'benjamin', 'suzy', 'tajis', 'sarina', 'poach', 'Nah Bob', 'galuna', 'elane', 'chonndur', 'chondur', 'addoner', 'haroun', 'yaman', 'towncryer', 'jaul', 'obujos', 'hive overseer', 'crawler', 'deepling guard', 'deepling spellsinger', 'deepling warrior', 'lady bug', 'manta', 'shark', 'spidris', 'spitter', 'waspoid', 'kollos', 'lion event', 'tiger event', 'gerador azul i', 'gerador azul ii', 'gerador azul iii', 'gerador vermelho i', 'gerador vermelho ii', 'gerador vermelho iii', 'zombie event', 'emperium', 'guard', 'feromous', 'abomination fury', 'alvo', 'gate', 'elder beholder', 'trainer', 'beholder', 'yalaharian', 'protect cube', 'protect castle', 'protect statue', 'castle gates', 'lizard magistratus', 'lizard noble', 'askarak demon', 'askarak lord', 'askarak prince', 'bog frog', 'clay guardian', 'crystal wolf', 'death priest', 'deepling scout', 'desperate white deer', 'diamond servant', 'dromedary', 'donkey', 'elder mummy', 'enraged white deer', 'feverish citizen', 'filth toad', 'firestarter', 'ghoulish hyaena', 'golden servant', 'grave guard', 'groam', 'honour guard', 'horestis', 'horse', 'incredible old witch', 'insectoid scout', 'iron servant', 'kraknaknork', 'kraknaknork demon', 'running elite orc guard', 'sacred spider', 'sandstone scorpion', 'shaburak demon', 'shaburak lord', 'shaburak prince', 'slug', 'spider queen', 'starving wolf', 'thornfire wolf', 'tomb servant', 'weakened demon', 'wild dog', 'white deer', 'yielothax', 'boar', 'cake golem', 'crustacea gigantica', 'draptor', 'ghost rat', 'midnight panther', 'slime puddle', 'spectral scum', 'stampor', 'undead cavebear', 'brimstone bug', 'draken abomination', 'draken elite', 'fury of the emperor', 'glitterscale', 'heoni', 'lizard abomination', 'snake god essence', 'scorn of the emperor', 'snake think', 'souleater', 'spite of the emperor', 'wrath of the emperor', 'draken spellweaver', 'draken warmaster', 'ghastly dragon', 'gnarlhound', 'insect swarm', 'killer caiman', 'lancer beetle', 'lizard chosen', 'lizard dragon priest', 'lizard high guard', 'lizard legionnaire', 'lizard zaogun', 'orc marauder', 'sandcrawler', 'terramite', 'undead prospector', 'skeleton', 'wailing widow', 'berserker chicken', 'boogey', 'bride of night', 'demon parrot', 'dirtbeard', 'deer', 'esmeralda', 'essence of darkness', 'evil mastermind', 'evil sheep lord', 'evil sheep', 'fahim the wise', 'hide', 'hot dog', 'killer rabbit', 'medusa', 'mephiles', 'merikh the slaughterer', 'monstor', 'rottie the rotworm', 'shardhead', 'the bloodtusk', 'the many', 'the noxious spawn', 'the snapper', 'badger', 'bat', 'bear', 'black sheep', 'blood crab', 'blood crab underwater', 'carrion worm', 'cat', 'cave rat', 'chicken', 'cockroach', 'crab', 'crocodile', 'dire penguin', 'dog', 'elephant', 'flamingo', 'hyaena', 'husky', 'kitty', 'lion', 'mad sheep', 'mammoth', 'panda', 'parrot', 'penguin', 'pig', 'polar bear', 'rabbit', 'rat', 'rotworm', 'seagull', 'sheep', 'silver rabbit', 'skunk', 'squirrel', 'terror bird', 'thornback tortoise', 'tiger', 'tortoise', 'tortoise anti-bot', 'war wolf', 'winter wolf', 'wolf', 'dwarf', 'dwarf guard', 'dwarf geomancer', 'dwarf soldier', 'quara pincher', 'quara predator', 'quara constrictor', 'quara hydromancer', 'quara mantassin', 'quara pincher scout', 'quara predator scout', 'quara constrictor scout', 'quara hydromancer scout', 'quara mantassin scout', 'sea serpent', 'young sea serpent', 'achad', 'axeitus headbanger', 'bloodpaw', 'bovinus', 'colerian the barbarian', 'cursed gladiator', 'frostfur', 'orcus the cruel', 'rocky', 'the hairy one', 'avalanche', 'drasilla', 'grimgor guteater', 'kreebosh the exile', 'slim', 'spirit of earth', 'spirit of fire', 'spirit of water', 'the dark dancer', 'the hag', 'darakan the executioner', 'deathbringer', 'fallen mooh tah master ghar', 'gnorre chyllson', 'norgle glacierbeard', 'svoren the mad', 'the masked marauder', 'the obliverator', 'the pit lord', 'webster', 'flamethrower', 'hell hole', 'lavahole', 'dwarf dispenser', 'magicthrower', 'magic pillar', 'pillar', 'mechanical figher', 'plaguethrower', 'poisonthrower', 'shredderthrower', 'barbarian bloodwalker', 'barbarian brutetamer', 'barbarian headsplitter', 'barbarian skullhunter', 'arachir the ancient one', 'armenius', 'arthei', 'apprentice sheng', 'azerus', 'barbaria', 'battlemaster zunzu', 'big boss trolliver', 'blistering fire elemental', 'boreth', 'captain jones', 'chizzoron the distorter', 'the countess sorrow', 'cublarc the plunderer', 'deadeye devious', 'demodras', 'dharalion', 'diblis the fair', 'diseased bill', 'diseased dan', 'diseased fred', 'dracola', 'dreadmaw', 'earth overlord', 'energy overlord', 'fernfang', 'ferumbras', 'fire overlord', 'fleabringer', 'foreman kneebiter', 'freegoiz', 'general murius', 'grandfather tridian', 'grand mother foulscale', 'grorlam', 'hairman the huge', 'lizard templar', 'ice overlord', 'inky', 'koshei the deathless', 'lersatio', 'lethal lissy', 'lizard gate guardian', 'lord of the elements', 'mad technomancer', 'man in the cave', 'marziel', 'massacre', 'mooh tah master', 'mr. punish', 'munster', 'necropharus', 'ron the ripper', 'renegade orc', 'rotworm queen', 'rukor zad', 'shadow of boreth', 'shadow of lersatio', 'shadow of marziel', 'shard of corruption', 'sharptooth', 'sir valorcrest', 'splasher', 'smuggler baron silvertoe', 'stonecracker', 'the blightfather', 'the big bad one', 'the collector', 'the count', 'the evil eye', 'the frog prince', 'the handmaiden', 'the horned fox', 'the imperor', 'the old widow', 'the plasmother', 'the voice of ruin', 'the weakened count', 'thul', 'tiquandas revenge', 'ungreez', 'warlord ruzad', 'yakchal', 'yalahari', 'yeti', 'zarabustor', 'zebelon duskbringer', 'zulazza the corruptor', 'chakoya toolshaper', 'chakoya tribewarden', 'chakoya windcaller', 'dark torturer', 'demon', 'destroyer', 'diabolic imp', 'fire devil', 'gozzler', 'hand of cursed fate', 'hellfire fighter', 'hellhound', 'hellspawn', 'juggernaut', 'nightmare', 'nightmare scion', 'nightstalker', 'plaguesmith', 'bazir', 'orshabaal', 'zoralurk', 'frost dragon', 'wyrm', 'dragon lord', 'dragon', 'hydra', 'dragon hatchling', 'dragon lord hatchling', 'frost dragon hatchling', 'undead dragon', 'wyvern', 'blazing fire elemental', 'charged energy elemental', 'earth elemental', 'energy elemental', 'fire elemental', 'jagged earth elemental', 'massive earth elemental', 'massive energy elemental', 'massive fire elemental', 'massive water elemental', 'muddy earth elemental', 'overcharged energy elemental', 'roaring water elemental', 'slick water elemental', 'water elemental', 'elf arcanist', 'elf scout', 'elf', 'bones', 'deathslicer', 'exp bug', 'eye of the seven', 'fluffy', 'gamemaster', 'goblin demon', 'grynch clan goblin', 'hacker', 'the halloween hare', 'the ruthless herald', 'minishabaal', 'primitive', 'servant golem', 'tha exp carrier', 'the mutated pumpkin', 'tibia bug', 'undead minion', 'ashmunrah', 'arkhothep', 'dipthrah', 'mahrdis', 'morguthis', 'omruc', 'rahemos', 'thalas', 'vashresamun', 'frost giant', 'frost giantess', 'cyclops smith', 'cyclops drone', 'behemoth', 'cyclops', 'ice golem', 'the old whopper', 'stone golem', 'war golem', 'worker golem', 'damaged worker golem', 'goblin leader', 'goblin scavenger', 'goblin', 'goblin assassin', 'dworc fleshhunter', 'dworc venomsniper', 'dworc voodoomaster', 'acolyte of the cult', 'adept of the cult', 'amazon', 'crazed beggar', 'enlightened of the cult', 'novice of the cult', 'dark monk', 'monk', 'dark apprentice', 'dark magician', 'fury', 'gladiator', 'gang member', 'ice witch', 'infernalist', 'mad scientist', 'warlock', 'witch', 'necromancer', 'priestess', 'assasin', 'bandit', 'black knight', 'hero', 'hunter', 'nomad', 'morik the gladiator', 'smuggler', 'poacher', 'thief', 'undead jester', 'valkyrie', 'yaga the crone', 'wild warrior', 'baron brute', 'coldheart', 'doomhowl', 'dreadwing', 'fatality', 'haunter', 'incineron', 'menace', 'rocko', 'the axeorcist', 'the dreadorian', 'tirecz', 'tremorak', 'lizard sentinel', 'lizard snakecharmer', 'blue djinn', 'efreet', 'green djinn', 'marid', 'braindeath', 'bonelord', 'elder bonelord', 'gazer', 'mimic', 'stalker', 'wisp', 'minotaur archer', 'minotaur guard', 'minotaur mage', 'minotaur', 'banshee', 'betrayed wraith', 'blightwalker', 'bonebeast', 'crypt shambler', 'demon skeleton', 'dreadbeast', 'gargoyle', 'ghost', 'ghoul', 'ghostly apparition', 'grim reaper', 'gravelord oshuran', 'lich', 'lost soul', 'mummy', 'phantasm', 'pythius the rotten', 'skeleton warrior', 'spectre', 'tormented ghost', 'vampire', 'vampire bride', 'undead gladiator', 'zombie', 'mutated bat', 'mutated human', 'mutated rat', 'mutated tiger', 'werewolf', 'orc berserker', 'orc leader', 'orc rider', 'orc shaman', 'orc spearman', 'orc warlord', 'orc warrior', 'orc', 'brutus bloodbeard', 'pirate buccaneer', 'pirate corsair', 'pirate cutthroat', 'pirate ghost', 'pirate marauder', 'pirate skeleton', 'carniphila', 'haunted treeling', 'spit nettle', 'kongra', 'merlkin', 'sibang', 'serpent spawn', 'apocalypse', 'infernatil', 'verminor', 'annihilon', 'golgordan', 'hellgorak', 'latrivan', 'madareth', 'rift brood', 'rift lord', 'rift phantom', 'rift scythe', 'rift worm', 'ushuriel', 'zugurosh', 'ghazbaran', 'morgaroth', 'troll champion', 'frost troll', 'island troll', 'swamp troll', 'troll', 'acid blob', 'ancient scarab', 'azure frog', 'butterfly', 'bog raider', 'bug', 'centipede', 'cobra', 'coral frog', 'crimson frog', 'crystal spider', 'death blob', 'deathspawn', 'defiler', 'giant spider', 'green frog', 'larva', 'mercury blob', 'orchid frog', 'poison spider', 'scarab', 'scorpion', 'slime2', 'slime', 'snake', 'son of verminor', 'spider', 'tarantula', 'the abomination', 'toad', 'wasp') 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('puta', 'caralho', 'karalho', 'porra', 'buceta', 'corno', 'simone','training', 'devovorga', 'energized raging mage', 'ot', 'otserv', 'thunder', 'serve', 'trimera', 'drugo', 'drugovich', 'adm', 'godsao','godzao','godsinho','GoDzinho','godzinho','Godzinho','god','GoD','GOd','God','GOD','mage mad', 'mad mage', 'abyssador', 'armadile', 'cliff strider', 'crystalcrusher', 'damaged crystal golem', 'deathstrike', 'stone devourer', 'hideous fungus', 'humongous fungus', 'humorless fungus', 'enraged crystal golem', 'wiggler', 'lost berserker', 'lava golem', 'magma crawler', 'weeper', 'gnomevil', 'ironblight', 'orewalker', 'vulcongra', 'mushroom sniffer', 'parasite', 'infected weeper', 'doctor gnomedix', 'pythius the rotten', 'lady bug', 'manta ray', 'deepling worker', 'god alone', 'bazir', 'crawler', 'deepling guard', 'deepling spellsinger', 'deepling warrior', 'manta', 'shark', 'spidris', 'spitter', 'waspoid', 'kollos', 'insectoid scout', 'calamary', 'fish', 'hive overseer', 'jellyfish', 'northern pike', 'spidris elite', 'swarmer', 'insectoid worker', 'deepling brawler', 'deepling master librarian', 'deepling tyrant', 'deepling elite', 'floor blob', 'hive pore', 'lesser swarmer', 'adi', 'adinmin', 'adimi', 'adimin', 'task', 'task clous', 'queen', 'queen eloise', 'game', " ' ", 'customer', 'support', 'fuck', 'haha', 'sux', ' abc', 'suck', 'noob', 'tutor', 'admin', 'account', 'gay', 'password', 'manager', 'aa ', 'ee', " ' ", 'ii', 'oo', 'uu', 'gm','cm', 'aff ', 'god ', 'abc', 'tutor', 'game', 'admin', 'the', 'rashid', 'alesar', 'benjamin', 'suzy', 'tajis', 'sarina', 'poach', 'Nah Bob', 'galuna', 'elane', 'chonndur', 'chondur', 'addoner', 'haroun', 'yaman', 'towncryer', 'jaul', 'obujos', 'hive overseer', 'crawler', 'deepling guard', 'deepling spellsinger', 'deepling warrior', 'lady bug', 'manta', 'shark', 'spidris', 'spitter', 'waspoid', 'kollos', 'lion event', 'tiger event', 'gerador azul i', 'gerador azul ii', 'gerador azul iii', 'gerador vermelho i', 'gerador vermelho ii', 'gerador vermelho iii', 'zombie event', 'emperium', 'guard', 'feromous', 'abomination fury', 'alvo', 'gate', 'elder beholder', 'trainer', 'beholder', 'yalaharian', 'protect cube', 'protect castle', 'protect statue', 'castle gates', 'lizard magistratus', 'lizard noble', 'askarak demon', 'askarak lord', 'askarak prince', 'bog frog', 'clay guardian', 'crystal wolf', 'death priest', 'deepling scout', 'desperate white deer', 'diamond servant', 'dromedary', 'donkey', 'elder mummy', 'enraged white deer', 'feverish citizen', 'filth toad', 'firestarter', 'ghoulish hyaena', 'golden servant', 'grave guard', 'groam', 'honour guard', 'horestis', 'horse', 'incredible old witch', 'insectoid scout', 'iron servant', 'kraknaknork', 'kraknaknork demon', 'running elite orc guard', 'sacred spider', 'sandstone scorpion', 'shaburak demon', 'shaburak lord', 'shaburak prince', 'slug', 'spider queen', 'starving wolf', 'thornfire wolf', 'tomb servant', 'weakened demon', 'wild dog', 'white deer', 'yielothax', 'boar', 'cake golem', 'crustacea gigantica', 'draptor', 'ghost rat', 'midnight panther', 'slime puddle', 'spectral scum', 'stampor', 'undead cavebear', 'brimstone bug', 'draken abomination', 'draken elite', 'fury of the emperor', 'glitterscale', 'heoni', 'lizard abomination', 'snake god essence', 'scorn of the emperor', 'snake think', 'souleater', 'spite of the emperor', 'wrath of the emperor', 'draken spellweaver', 'draken warmaster', 'ghastly dragon', 'gnarlhound', 'insect swarm', 'killer caiman', 'lancer beetle', 'lizard chosen', 'lizard dragon priest', 'lizard high guard', 'lizard legionnaire', 'lizard zaogun', 'orc marauder', 'sandcrawler', 'terramite', 'undead prospector', 'skeleton', 'wailing widow', 'berserker chicken', 'boogey', 'bride of night', 'demon parrot', 'dirtbeard', 'deer', 'esmeralda', 'essence of darkness', 'evil mastermind', 'evil sheep lord', 'evil sheep', 'fahim the wise', 'hide', 'hot dog', 'killer rabbit', 'medusa', 'mephiles', 'merikh the slaughterer', 'monstor', 'rottie the rotworm', 'shardhead', 'the bloodtusk', 'the many', 'the noxious spawn', 'the snapper', 'badger', 'bat', 'bear', 'black sheep', 'blood crab', 'blood crab underwater', 'carrion worm', 'cat', 'cave rat', 'chicken', 'cockroach', 'crab', 'crocodile', 'dire penguin', 'dog', 'elephant', 'flamingo', 'hyaena', 'husky', 'kitty', 'lion', 'mad sheep', 'mammoth', 'panda', 'parrot', 'penguin', 'pig', 'polar bear', 'rabbit', 'rat', 'rotworm', 'seagull', 'sheep', 'silver rabbit', 'skunk', 'squirrel', 'terror bird', 'thornback tortoise', 'tiger', 'tortoise', 'tortoise anti-bot', 'war wolf', 'winter wolf', 'wolf', 'dwarf', 'dwarf guard', 'dwarf geomancer', 'dwarf soldier', 'quara pincher', 'quara predator', 'quara constrictor', 'quara hydromancer', 'quara mantassin', 'quara pincher scout', 'quara predator scout', 'quara constrictor scout', 'quara hydromancer scout', 'quara mantassin scout', 'sea serpent', 'young sea serpent', 'achad', 'axeitus headbanger', 'bloodpaw', 'bovinus', 'colerian the barbarian', 'cursed gladiator', 'frostfur', 'orcus the cruel', 'rocky', 'the hairy one', 'avalanche', 'drasilla', 'grimgor guteater', 'kreebosh the exile', 'slim', 'spirit of earth', 'spirit of fire', 'spirit of water', 'the dark dancer', 'the hag', 'darakan the executioner', 'deathbringer', 'fallen mooh tah master ghar', 'gnorre chyllson', 'norgle glacierbeard', 'svoren the mad', 'the masked marauder', 'the obliverator', 'the pit lord', 'webster', 'flamethrower', 'hell hole', 'lavahole', 'dwarf dispenser', 'magicthrower', 'magic pillar', 'pillar', 'mechanical figher', 'plaguethrower', 'poisonthrower', 'shredderthrower', 'barbarian bloodwalker', 'barbarian brutetamer', 'barbarian headsplitter', 'barbarian skullhunter', 'arachir the ancient one', 'armenius', 'arthei', 'apprentice sheng', 'azerus', 'barbaria', 'battlemaster zunzu', 'big boss trolliver', 'blistering fire elemental', 'boreth', 'captain jones', 'chizzoron the distorter', 'the countess sorrow', 'cublarc the plunderer', 'deadeye devious', 'demodras', 'dharalion', 'diblis the fair', 'diseased bill', 'diseased dan', 'diseased fred', 'dracola', 'dreadmaw', 'earth overlord', 'energy overlord', 'fernfang', 'ferumbras', 'fire overlord', 'fleabringer', 'foreman kneebiter', 'freegoiz', 'general murius', 'grandfather tridian', 'grand mother foulscale', 'grorlam', 'hairman the huge', 'lizard templar', 'ice overlord', 'inky', 'koshei the deathless', 'lersatio', 'lethal lissy', 'lizard gate guardian', 'lord of the elements', 'mad technomancer', 'man in the cave', 'marziel', 'massacre', 'mooh tah master', 'mr. punish', 'munster', 'necropharus', 'ron the ripper', 'renegade orc', 'rotworm queen', 'rukor zad', 'shadow of boreth', 'shadow of lersatio', 'shadow of marziel', 'shard of corruption', 'sharptooth', 'sir valorcrest', 'splasher', 'smuggler baron silvertoe', 'stonecracker', 'the blightfather', 'the big bad one', 'the collector', 'the count', 'the evil eye', 'the frog prince', 'the handmaiden', 'the horned fox', 'the imperor', 'the old widow', 'the plasmother', 'the voice of ruin', 'the weakened count', 'thul', 'tiquandas revenge', 'ungreez', 'warlord ruzad', 'yakchal', 'yalahari', 'yeti', 'zarabustor', 'zebelon duskbringer', 'zulazza the corruptor', 'chakoya toolshaper', 'chakoya tribewarden', 'chakoya windcaller', 'dark torturer', 'demon', 'destroyer', 'diabolic imp', 'fire devil', 'gozzler', 'hand of cursed fate', 'hellfire fighter', 'hellhound', 'hellspawn', 'juggernaut', 'nightmare', 'nightmare scion', 'nightstalker', 'plaguesmith', 'bazir', 'orshabaal', 'zoralurk', 'frost dragon', 'wyrm', 'dragon lord', 'dragon', 'hydra', 'dragon hatchling', 'dragon lord hatchling', 'frost dragon hatchling', 'undead dragon', 'wyvern', 'blazing fire elemental', 'charged energy elemental', 'earth elemental', 'energy elemental', 'fire elemental', 'jagged earth elemental', 'massive earth elemental', 'massive energy elemental', 'massive fire elemental', 'massive water elemental', 'muddy earth elemental', 'overcharged energy elemental', 'roaring water elemental', 'slick water elemental', 'water elemental', 'elf arcanist', 'elf scout', 'elf', 'bones', 'deathslicer', 'exp bug', 'eye of the seven', 'fluffy', 'gamemaster', 'goblin demon', 'grynch clan goblin', 'hacker', 'the halloween hare', 'the ruthless herald', 'minishabaal', 'primitive', 'servant golem', 'tha exp carrier', 'the mutated pumpkin', 'tibia bug', 'undead minion', 'ashmunrah', 'arkhothep', 'dipthrah', 'mahrdis', 'morguthis', 'omruc', 'rahemos', 'thalas', 'vashresamun', 'frost giant', 'frost giantess', 'cyclops smith', 'cyclops drone', 'behemoth', 'cyclops', 'ice golem', 'the old whopper', 'stone golem', 'war golem', 'worker golem', 'damaged worker golem', 'goblin leader', 'goblin scavenger', 'goblin', 'goblin assassin', 'dworc fleshhunter', 'dworc venomsniper', 'dworc voodoomaster', 'acolyte of the cult', 'adept of the cult', 'amazon', 'crazed beggar', 'enlightened of the cult', 'novice of the cult', 'dark monk', 'monk', 'dark apprentice', 'dark magician', 'fury', 'gladiator', 'gang member', 'ice witch', 'infernalist', 'mad scientist', 'warlock', 'witch', 'necromancer', 'priestess', 'assasin', 'bandit', 'black knight', 'hero', 'hunter', 'nomad', 'morik the gladiator', 'smuggler', 'poacher', 'thief', 'undead jester', 'valkyrie', 'yaga the crone', 'wild warrior', 'baron brute', 'coldheart', 'doomhowl', 'dreadwing', 'fatality', 'haunter', 'incineron', 'menace', 'rocko', 'the axeorcist', 'the dreadorian', 'tirecz', 'tremorak', 'lizard sentinel', 'lizard snakecharmer', 'blue djinn', 'efreet', 'green djinn', 'marid', 'braindeath', 'bonelord', 'elder bonelord', 'gazer', 'mimic', 'stalker', 'wisp', 'minotaur archer', 'minotaur guard', 'minotaur mage', 'minotaur', 'banshee', 'betrayed wraith', 'blightwalker', 'bonebeast', 'crypt shambler', 'demon skeleton', 'dreadbeast', 'gargoyle', 'ghost', 'ghoul', 'ghostly apparition', 'grim reaper', 'gravelord oshuran', 'lich', 'lost soul', 'mummy', 'phantasm', 'pythius the rotten', 'skeleton warrior', 'spectre', 'tormented ghost', 'vampire', 'vampire bride', 'undead gladiator', 'zombie', 'mutated bat', 'mutated human', 'mutated rat', 'mutated tiger', 'werewolf', 'orc berserker', 'orc leader', 'orc rider', 'orc shaman', 'orc spearman', 'orc warlord', 'orc warrior', 'orc', 'brutus bloodbeard', 'pirate buccaneer', 'pirate corsair', 'pirate cutthroat', 'pirate ghost', 'pirate marauder', 'pirate skeleton', 'carniphila', 'haunted treeling', 'spit nettle', 'kongra', 'merlkin', 'sibang', 'serpent spawn', 'apocalypse', 'infernatil', 'verminor', 'annihilon', 'golgordan', 'hellgorak', 'latrivan', 'madareth', 'rift brood', 'rift lord', 'rift phantom', 'rift scythe', 'rift worm', 'ushuriel', 'zugurosh', 'ghazbaran', 'morgaroth', 'troll champion', 'frost troll', 'island troll', 'swamp troll', 'troll', 'acid blob', 'ancient scarab', 'azure frog', 'butterfly', 'bog raider', 'bug', 'centipede', 'cobra', 'coral frog', 'crimson frog', 'crystal spider', 'death blob', 'deathspawn', 'defiler', 'giant spider', 'green frog', 'larva', 'mercury blob', 'orchid frog', 'poison spider', 'scarab', 'scorpion', 'slime2', 'slime', 'snake', 'son of verminor', 'spider', 'tarantula', 'the abomination', 'toad', 'wasp') 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) < 6 || 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(count($err) != 0) {
			$e['pass'] = '';
			for($i=0; $i < count($err); $i++)
				$e['pass'] .= ($i == 0 ? '' : '<br/>').$err[$i];
		}
	}

	if(!isset($_POST['agreerules']) || empty($_POST['agreerules']))
		$e['rules'] = 'You have to agree to the Tibia Rules 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,premdays) VALUES($n,'".$_POST['accountname']."','".($config['server']['encryptionType'] == 'plain' ? $_POST['password1'] : hash($config['server']['encryptionType'], $_POST['password1']))."','".$_POST['email']."',".time().", '".$config['site']['newaccount_premdays']."')") === true) {
			$sample = (count($voc) == 0 ? 'Rook' : $voc[$_POST['vocation']]).' Sample';
			$q = mysql_query("SELECT * 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'].','.$town_c.','.$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://www.mediafire.com/?j0mleh967l67sku" 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://www.mediafire.com/?j0mleh967l67sku" 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="?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" width="20%"><span id="accountname_label"'.(isset($e['acc']) ? ' class="red"' : '').'><b>Account Name:</b></span></td><td><input id="accountname" name="accountname" autocomplete="off" 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"' : '').'><b>Email Address:</b></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"' : '').'><b>Password:</b></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"' : '').'><b>Password Again:</b></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" width="20%"><span id="charactername_label"'.(isset($e['name']) ? ' class="red"' : '').'><b>Character Name:</b></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" width="20%"><span'.(isset($e['sex']) ? ' class="red"' : '').'><b>Sex:</b></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" width="10%"><span'.(isset($e['vocation']) ? ' class="red"' : '').'><b>Vocation:</b></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 .= '
<tr>
<td class="LabelV150" width="10%"><span'.(isset($e['town']) ? ' class="red"' : '').'><b>Select your city:</b></span></td>
<td>
<table width="100%">
<tr>
<td><select name="town_c">';
foreach($town as $k => $v)
$main_content .= '
<span style="margin-right:15px" class="OptionContainer">
<label for="town_'.$k.'">
<span class="OptionContainer">
<option value="'.$k.'">'.$town_array[$v].'</option>
<label for="town_'.$k.'">'.$v.'</label>
</span>
</label>
</span>';
$main_content .= '</select>
</td>
<td>
</td>
</tr>
</table>
</td>
</tr>'.(isset($e['town']) ? '<tr>
<td>
</td>
<td>
<span class="FormFieldError">'.$e['town'].'</span>
</td>
</tr>' : '');
$main_content .= '</table></div></div></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>'; 

 

 

Link para o comentário
Compartilhar em outros sites

  • -1

Ta aqui:

<?php

$location = array(
	'GER' => 'Europe',
	'USA' => 'North America'
);
$default = 'all';

$worlds = array();
$worlds[0] = array('GER', $config['server']['worldType']);
$worlds[1] = array('GER', $config['server']['worldType']);

/*$worlds[2] = array('GER', 'hardcore');
$worlds[3] = array('USA', 'open');
$worlds[4] = array('USA', 'optional');
$worlds[5] = array('USA', 'hardcore');
*/
$town_array = $towns_list[0];
$town = $config['site']['newchar_towns'][0];
$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'] = 'Por favor, digite um nome para conta!';
	elseif(strlen($s) < 6)
		$e['acc'] = 'O nome da conta é muito curta!';
	elseif(strlen($s) > 10)
		$e['acc'] = 'O nome da conta é muito longo!';
	else {
		$s = strtoupper($s);

		if(!ctype_alnum($s))
			$e['acc'] = 'O nome da conta tem um formato inválido. O nome da conta só pode consistir em números de 0-9 e letras de A-Z!';
		elseif(!preg_match('/[A-Z0-9]/', $s))
			$e['acc'] = 'O nome da conta deve incluir pelo menos uma letra 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'] = 'O nome da conta já é utilizado. Por favor escolha um outro!';
		}
	}
	
	$s = isset($_POST['name']) ? trim($_POST['name']) : '';

	if(empty($s))
		$e['name'] = 'Por favor insira um nome para o seu personagem!';
	elseif(strlen($s) < 2 || strlen($s) > 29)
		$e['name'] = 'Um nome deve ter entre 2 a 29 letras!';
	elseif(preg_match('/[^a-zA-Z ]/', $s))
		$e['name'] = 'Este nome contém letras inválidos. Por favor, use apenas A-Z, a-z e espaço!';
	elseif(!ctype_upper($s[0]))
		$e['name'] = 'A primeira letra de um nome deve ser uma letra maiúscula!';
	elseif(strpos($s, '  ') !== false)
		$e['name'] = 'Este nome contém mais de um espaço entre as palavras. Por favor, use apenas um espaço entre as palavras!';
	else {
		foreach(explode(' ', $s) as $k =>$v) {
			$words[$k] = str_split($v);
			$len = strlen($v);
			if($len == 1) {
				$e['name'] = 'Este nome contém uma palavra com apenas uma letra. Por favor, use mais de uma letra para cada palavra!';
				break;
			}
			elseif($len > 14) {
				$e['name'] = 'Este nome contém uma palavra que é muito longo. Por favor, não use mais de 14 cartas para cada palavra!';
				break;
			}
		}
		if(!isset($e['name'])) {
			$total=0;
			foreach($words as $k =>$p) {
				if(isset($e['name']))
					break;
				$total++;
				if($total > 3) {
					$e['name'] = 'Este nome contém mais de 3 palavras. Por favor escolha outro nome!';
					break;
				}
				$len=0;
				foreach($p as $i =>$j) {
					$len++;
					if($i != 0 && ctype_upper($j)) {
						$e['name'] = 'Em nomes de letras maiúsculas são permitidas apenas no início de uma palavra!';
						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'] = 'Este nome contém uma palavra sem vogais. Escolha outro nome!';
							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'] = 'Este nome do personagem já é usado. Por favor escolha um outro!';
						break;
					}
				if(!isset($e['name'])) {
					foreach(array('puta', 'caralho', 'karalho', 'porra', 'buceta', 'simone', 'corno','training', 'devovorga', 'energized raging mage', 'ot', 'otserv', 'thunder', 'serve', 'trimera', 'drugo', 'drugovich','adm','godsao','godzao','godsinho','GoDzinho','godzinho','Godzinho','god','GoD','GOd','God','GOD','mage mad', 'mad mage', 'abyssador', 'armadile', 'cliff strider', 'crystalcrusher', 'damaged crystal golem', 'deathstrike', 'stone devourer', 'hideous fungus', 'humongous fungus', 'humorless fungus', 'enraged crystal golem', 'wiggler', 'lost berserker', 'lava golem', 'magma crawler', 'weeper', 'gnomevil', 'ironblight', 'orewalker', 'vulcongra', 'mushroom sniffer', 'parasite', 'infected weeper', 'doctor gnomedix', 'pythius the rotten', 'lady bug', 'manta ray', 'deepling worker', 'god alone', 'bazir', 'crawler', 'deepling guard', 'deepling spellsinger', 'deepling warrior', 'manta', 'shark', 'spidris', 'spitter', 'waspoid', 'kollos', 'insectoid scout', 'calamary', 'fish', 'hive overseer', 'jellyfish', 'northern pike', 'spidris elite', 'swarmer', 'insectoid worker', 'deepling brawler', 'deepling master librarian', 'deepling tyrant', 'deepling elite', 'floor blob', 'hive pore', 'lesser swarmer', 'adi', 'adinmin', 'adimi', 'adimin', 'task', 'task clous', 'queen', 'queen eloise', 'aa ', 'ee', " ' ", 'ii', 'oo', 'uu', 'gm','cm', 'aff ', 'god ', 'abc', 'tutor', 'game', 'admin', 'the', 'rashid', 'alesar', 'benjamin', 'suzy', 'tajis', 'sarina', 'poach', 'Nah Bob', 'galuna', 'elane', 'chonndur', 'chondur', 'addoner', 'haroun', 'yaman', 'towncryer', 'jaul', 'obujos', 'hive overseer', 'crawler', 'deepling guard', 'deepling spellsinger', 'deepling warrior', 'lady bug', 'manta', 'shark', 'spidris', 'spitter', 'waspoid', 'kollos', 'lion event', 'tiger event', 'gerador azul i', 'gerador azul ii', 'gerador azul iii', 'gerador vermelho i', 'gerador vermelho ii', 'gerador vermelho iii', 'zombie event', 'emperium', 'guard', 'feromous', 'abomination fury', 'alvo', 'gate', 'elder beholder', 'trainer', 'beholder', 'yalaharian', 'protect cube', 'protect castle', 'protect statue', 'castle gates', 'lizard magistratus', 'lizard noble', 'askarak demon', 'askarak lord', 'askarak prince', 'bog frog', 'clay guardian', 'crystal wolf', 'death priest', 'deepling scout', 'desperate white deer', 'diamond servant', 'dromedary', 'donkey', 'elder mummy', 'enraged white deer', 'feverish citizen', 'filth toad', 'firestarter', 'ghoulish hyaena', 'golden servant', 'grave guard', 'groam', 'honour guard', 'horestis', 'horse', 'incredible old witch', 'insectoid scout', 'iron servant', 'kraknaknork', 'kraknaknork demon', 'running elite orc guard', 'sacred spider', 'sandstone scorpion', 'shaburak demon', 'shaburak lord', 'shaburak prince', 'slug', 'spider queen', 'starving wolf', 'thornfire wolf', 'tomb servant', 'weakened demon', 'wild dog', 'white deer', 'yielothax', 'boar', 'cake golem', 'crustacea gigantica', 'draptor', 'ghost rat', 'midnight panther', 'slime puddle', 'spectral scum', 'stampor', 'undead cavebear', 'brimstone bug', 'draken abomination', 'draken elite', 'fury of the emperor', 'glitterscale', 'heoni', 'lizard abomination', 'snake god essence', 'scorn of the emperor', 'snake think', 'souleater', 'spite of the emperor', 'wrath of the emperor', 'draken spellweaver', 'draken warmaster', 'ghastly dragon', 'gnarlhound', 'insect swarm', 'killer caiman', 'lancer beetle', 'lizard chosen', 'lizard dragon priest', 'lizard high guard', 'lizard legionnaire', 'lizard zaogun', 'orc marauder', 'sandcrawler', 'terramite', 'undead prospector', 'skeleton', 'wailing widow', 'berserker chicken', 'boogey', 'bride of night', 'demon parrot', 'dirtbeard', 'deer', 'esmeralda', 'essence of darkness', 'evil mastermind', 'evil sheep lord', 'evil sheep', 'fahim the wise', 'hide', 'hot dog', 'killer rabbit', 'medusa', 'mephiles', 'merikh the slaughterer', 'monstor', 'rottie the rotworm', 'shardhead', 'the bloodtusk', 'the many', 'the noxious spawn', 'the snapper', 'badger', 'bat', 'bear', 'black sheep', 'blood crab', 'blood crab underwater', 'carrion worm', 'cat', 'cave rat', 'chicken', 'cockroach', 'crab', 'crocodile', 'dire penguin', 'dog', 'elephant', 'flamingo', 'hyaena', 'husky', 'kitty', 'lion', 'mad sheep', 'mammoth', 'panda', 'parrot', 'penguin', 'pig', 'polar bear', 'rabbit', 'rat', 'rotworm', 'seagull', 'sheep', 'silver rabbit', 'skunk', 'squirrel', 'terror bird', 'thornback tortoise', 'tiger', 'tortoise', 'tortoise anti-bot', 'war wolf', 'winter wolf', 'wolf', 'dwarf', 'dwarf guard', 'dwarf geomancer', 'dwarf soldier', 'quara pincher', 'quara predator', 'quara constrictor', 'quara hydromancer', 'quara mantassin', 'quara pincher scout', 'quara predator scout', 'quara constrictor scout', 'quara hydromancer scout', 'quara mantassin scout', 'sea serpent', 'young sea serpent', 'achad', 'axeitus headbanger', 'bloodpaw', 'bovinus', 'colerian the barbarian', 'cursed gladiator', 'frostfur', 'orcus the cruel', 'rocky', 'the hairy one', 'avalanche', 'drasilla', 'grimgor guteater', 'kreebosh the exile', 'slim', 'spirit of earth', 'spirit of fire', 'spirit of water', 'the dark dancer', 'the hag', 'darakan the executioner', 'deathbringer', 'fallen mooh tah master ghar', 'gnorre chyllson', 'norgle glacierbeard', 'svoren the mad', 'the masked marauder', 'the obliverator', 'the pit lord', 'webster', 'flamethrower', 'hell hole', 'lavahole', 'dwarf dispenser', 'magicthrower', 'magic pillar', 'pillar', 'mechanical figher', 'plaguethrower', 'poisonthrower', 'shredderthrower', 'barbarian bloodwalker', 'barbarian brutetamer', 'barbarian headsplitter', 'barbarian skullhunter', 'arachir the ancient one', 'armenius', 'arthei', 'apprentice sheng', 'azerus', 'barbaria', 'battlemaster zunzu', 'big boss trolliver', 'blistering fire elemental', 'boreth', 'captain jones', 'chizzoron the distorter', 'the countess sorrow', 'cublarc the plunderer', 'deadeye devious', 'demodras', 'dharalion', 'diblis the fair', 'diseased bill', 'diseased dan', 'diseased fred', 'dracola', 'dreadmaw', 'earth overlord', 'energy overlord', 'fernfang', 'ferumbras', 'fire overlord', 'fleabringer', 'foreman kneebiter', 'freegoiz', 'general murius', 'grandfather tridian', 'grand mother foulscale', 'grorlam', 'hairman the huge', 'lizard templar', 'ice overlord', 'inky', 'koshei the deathless', 'lersatio', 'lethal lissy', 'lizard gate guardian', 'lord of the elements', 'mad technomancer', 'man in the cave', 'marziel', 'massacre', 'mooh tah master', 'mr. punish', 'munster', 'necropharus', 'ron the ripper', 'renegade orc', 'rotworm queen', 'rukor zad', 'shadow of boreth', 'shadow of lersatio', 'shadow of marziel', 'shard of corruption', 'sharptooth', 'sir valorcrest', 'splasher', 'smuggler baron silvertoe', 'stonecracker', 'the blightfather', 'the big bad one', 'the collector', 'the count', 'the evil eye', 'the frog prince', 'the handmaiden', 'the horned fox', 'the imperor', 'the old widow', 'the plasmother', 'the voice of ruin', 'the weakened count', 'thul', 'tiquandas revenge', 'ungreez', 'warlord ruzad', 'yakchal', 'yalahari', 'yeti', 'zarabustor', 'zebelon duskbringer', 'zulazza the corruptor', 'chakoya toolshaper', 'chakoya tribewarden', 'chakoya windcaller', 'dark torturer', 'demon', 'destroyer', 'diabolic imp', 'fire devil', 'gozzler', 'hand of cursed fate', 'hellfire fighter', 'hellhound', 'hellspawn', 'juggernaut', 'nightmare', 'nightmare scion', 'nightstalker', 'plaguesmith', 'bazir', 'orshabaal', 'zoralurk', 'frost dragon', 'wyrm', 'dragon lord', 'dragon', 'hydra', 'dragon hatchling', 'dragon lord hatchling', 'frost dragon hatchling', 'undead dragon', 'wyvern', 'blazing fire elemental', 'charged energy elemental', 'earth elemental', 'energy elemental', 'fire elemental', 'jagged earth elemental', 'massive earth elemental', 'massive energy elemental', 'massive fire elemental', 'massive water elemental', 'muddy earth elemental', 'overcharged energy elemental', 'roaring water elemental', 'slick water elemental', 'water elemental', 'elf arcanist', 'elf scout', 'elf', 'bones', 'deathslicer', 'exp bug', 'eye of the seven', 'fluffy', 'gamemaster', 'goblin demon', 'grynch clan goblin', 'hacker', 'the halloween hare', 'the ruthless herald', 'minishabaal', 'primitive', 'servant golem', 'tha exp carrier', 'the mutated pumpkin', 'tibia bug', 'undead minion', 'ashmunrah', 'arkhothep', 'dipthrah', 'mahrdis', 'morguthis', 'omruc', 'rahemos', 'thalas', 'vashresamun', 'frost giant', 'frost giantess', 'cyclops smith', 'cyclops drone', 'behemoth', 'cyclops', 'ice golem', 'the old whopper', 'stone golem', 'war golem', 'worker golem', 'damaged worker golem', 'goblin leader', 'goblin scavenger', 'goblin', 'goblin assassin', 'dworc fleshhunter', 'dworc venomsniper', 'dworc voodoomaster', 'acolyte of the cult', 'adept of the cult', 'amazon', 'crazed beggar', 'enlightened of the cult', 'novice of the cult', 'dark monk', 'monk', 'dark apprentice', 'dark magician', 'fury', 'gladiator', 'gang member', 'ice witch', 'infernalist', 'mad scientist', 'warlock', 'witch', 'necromancer', 'priestess', 'assasin', 'bandit', 'black knight', 'hero', 'hunter', 'nomad', 'morik the gladiator', 'smuggler', 'poacher', 'thief', 'undead jester', 'valkyrie', 'yaga the crone', 'wild warrior', 'baron brute', 'coldheart', 'doomhowl', 'dreadwing', 'fatality', 'haunter', 'incineron', 'menace', 'rocko', 'the axeorcist', 'the dreadorian', 'tirecz', 'tremorak', 'lizard sentinel', 'lizard snakecharmer', 'blue djinn', 'efreet', 'green djinn', 'marid', 'braindeath', 'bonelord', 'elder bonelord', 'gazer', 'mimic', 'stalker', 'wisp', 'minotaur archer', 'minotaur guard', 'minotaur mage', 'minotaur', 'banshee', 'betrayed wraith', 'blightwalker', 'bonebeast', 'crypt shambler', 'demon skeleton', 'dreadbeast', 'gargoyle', 'ghost', 'ghoul', 'ghostly apparition', 'grim reaper', 'gravelord oshuran', 'lich', 'lost soul', 'mummy', 'phantasm', 'pythius the rotten', 'skeleton warrior', 'spectre', 'tormented ghost', 'vampire', 'vampire bride', 'undead gladiator', 'zombie', 'mutated bat', 'mutated human', 'mutated rat', 'mutated tiger', 'werewolf', 'orc berserker', 'orc leader', 'orc rider', 'orc shaman', 'orc spearman', 'orc warlord', 'orc warrior', 'orc', 'brutus bloodbeard', 'pirate buccaneer', 'pirate corsair', 'pirate cutthroat', 'pirate ghost', 'pirate marauder', 'pirate skeleton', 'carniphila', 'haunted treeling', 'spit nettle', 'kongra', 'merlkin', 'sibang', 'serpent spawn', 'apocalypse', 'infernatil', 'verminor', 'annihilon', 'golgordan', 'hellgorak', 'latrivan', 'madareth', 'rift brood', 'rift lord', 'rift phantom', 'rift scythe', 'rift worm', 'ushuriel', 'zugurosh', 'ghazbaran', 'morgaroth', 'troll champion', 'frost troll', 'island troll', 'swamp troll', 'troll', 'acid blob', 'ancient scarab', 'azure frog', 'butterfly', 'bog raider', 'bug', 'centipede', 'cobra', 'coral frog', 'crimson frog', 'crystal spider', 'death blob', 'deathspawn', 'defiler', 'giant spider', 'green frog', 'larva', 'mercury blob', 'orchid frog', 'poison spider', 'scarab', 'scorpion', 'slime2', 'slime', 'snake', 'son of verminor', 'spider', 'tarantula', 'the abomination', 'toad', 'wasp') as $v)
						if($v == substr($s, 0, strlen($v))) {
							$e['name'] = 'Este nome do personagem já é usado. Por favor escolha um outro!';
							break;
						}
					if(!isset($e['name'])) {
						foreach(array('puta', 'caralho', 'karalho', 'porra', 'buceta', 'corno', 'simone','training', 'devovorga', 'energized raging mage', 'ot', 'otserv', 'thunder', 'serve', 'trimera', 'drugo', 'drugovich', 'adm', 'godsao','godzao','godsinho','GoDzinho','godzinho','Godzinho','god','GoD','GOd','God','GOD','mage mad', 'mad mage', 'abyssador', 'armadile', 'cliff strider', 'crystalcrusher', 'damaged crystal golem', 'deathstrike', 'stone devourer', 'hideous fungus', 'humongous fungus', 'humorless fungus', 'enraged crystal golem', 'wiggler', 'lost berserker', 'lava golem', 'magma crawler', 'weeper', 'gnomevil', 'ironblight', 'orewalker', 'vulcongra', 'mushroom sniffer', 'parasite', 'infected weeper', 'doctor gnomedix', 'pythius the rotten', 'lady bug', 'manta ray', 'deepling worker', 'god alone', 'bazir', 'crawler', 'deepling guard', 'deepling spellsinger', 'deepling warrior', 'manta', 'shark', 'spidris', 'spitter', 'waspoid', 'kollos', 'insectoid scout', 'calamary', 'fish', 'hive overseer', 'jellyfish', 'northern pike', 'spidris elite', 'swarmer', 'insectoid worker', 'deepling brawler', 'deepling master librarian', 'deepling tyrant', 'deepling elite', 'floor blob', 'hive pore', 'lesser swarmer', 'adi', 'adinmin', 'adimi', 'adimin', 'task', 'task clous', 'queen', 'queen eloise', 'game', " ' ", 'customer', 'support', 'fuck', 'haha', 'sux', ' abc', 'suck', 'noob', 'tutor', 'admin', 'account', 'gay', 'password', 'manager', 'aa ', 'ee', " ' ", 'ii', 'oo', 'uu', 'gm','cm', 'aff ', 'god ', 'abc', 'tutor', 'game', 'admin', 'the', 'rashid', 'alesar', 'benjamin', 'suzy', 'tajis', 'sarina', 'poach', 'Nah Bob', 'galuna', 'elane', 'chonndur', 'chondur', 'addoner', 'haroun', 'yaman', 'towncryer', 'jaul', 'obujos', 'hive overseer', 'crawler', 'deepling guard', 'deepling spellsinger', 'deepling warrior', 'lady bug', 'manta', 'shark', 'spidris', 'spitter', 'waspoid', 'kollos', 'lion event', 'tiger event', 'gerador azul i', 'gerador azul ii', 'gerador azul iii', 'gerador vermelho i', 'gerador vermelho ii', 'gerador vermelho iii', 'zombie event', 'emperium', 'guard', 'feromous', 'abomination fury', 'alvo', 'gate', 'elder beholder', 'trainer', 'beholder', 'yalaharian', 'protect cube', 'protect castle', 'protect statue', 'castle gates', 'lizard magistratus', 'lizard noble', 'askarak demon', 'askarak lord', 'askarak prince', 'bog frog', 'clay guardian', 'crystal wolf', 'death priest', 'deepling scout', 'desperate white deer', 'diamond servant', 'dromedary', 'donkey', 'elder mummy', 'enraged white deer', 'feverish citizen', 'filth toad', 'firestarter', 'ghoulish hyaena', 'golden servant', 'grave guard', 'groam', 'honour guard', 'horestis', 'horse', 'incredible old witch', 'insectoid scout', 'iron servant', 'kraknaknork', 'kraknaknork demon', 'running elite orc guard', 'sacred spider', 'sandstone scorpion', 'shaburak demon', 'shaburak lord', 'shaburak prince', 'slug', 'spider queen', 'starving wolf', 'thornfire wolf', 'tomb servant', 'weakened demon', 'wild dog', 'white deer', 'yielothax', 'boar', 'cake golem', 'crustacea gigantica', 'draptor', 'ghost rat', 'midnight panther', 'slime puddle', 'spectral scum', 'stampor', 'undead cavebear', 'brimstone bug', 'draken abomination', 'draken elite', 'fury of the emperor', 'glitterscale', 'heoni', 'lizard abomination', 'snake god essence', 'scorn of the emperor', 'snake think', 'souleater', 'spite of the emperor', 'wrath of the emperor', 'draken spellweaver', 'draken warmaster', 'ghastly dragon', 'gnarlhound', 'insect swarm', 'killer caiman', 'lancer beetle', 'lizard chosen', 'lizard dragon priest', 'lizard high guard', 'lizard legionnaire', 'lizard zaogun', 'orc marauder', 'sandcrawler', 'terramite', 'undead prospector', 'skeleton', 'wailing widow', 'berserker chicken', 'boogey', 'bride of night', 'demon parrot', 'dirtbeard', 'deer', 'esmeralda', 'essence of darkness', 'evil mastermind', 'evil sheep lord', 'evil sheep', 'fahim the wise', 'hide', 'hot dog', 'killer rabbit', 'medusa', 'mephiles', 'merikh the slaughterer', 'monstor', 'rottie the rotworm', 'shardhead', 'the bloodtusk', 'the many', 'the noxious spawn', 'the snapper', 'badger', 'bat', 'bear', 'black sheep', 'blood crab', 'blood crab underwater', 'carrion worm', 'cat', 'cave rat', 'chicken', 'cockroach', 'crab', 'crocodile', 'dire penguin', 'dog', 'elephant', 'flamingo', 'hyaena', 'husky', 'kitty', 'lion', 'mad sheep', 'mammoth', 'panda', 'parrot', 'penguin', 'pig', 'polar bear', 'rabbit', 'rat', 'rotworm', 'seagull', 'sheep', 'silver rabbit', 'skunk', 'squirrel', 'terror bird', 'thornback tortoise', 'tiger', 'tortoise', 'tortoise anti-bot', 'war wolf', 'winter wolf', 'wolf', 'dwarf', 'dwarf guard', 'dwarf geomancer', 'dwarf soldier', 'quara pincher', 'quara predator', 'quara constrictor', 'quara hydromancer', 'quara mantassin', 'quara pincher scout', 'quara predator scout', 'quara constrictor scout', 'quara hydromancer scout', 'quara mantassin scout', 'sea serpent', 'young sea serpent', 'achad', 'axeitus headbanger', 'bloodpaw', 'bovinus', 'colerian the barbarian', 'cursed gladiator', 'frostfur', 'orcus the cruel', 'rocky', 'the hairy one', 'avalanche', 'drasilla', 'grimgor guteater', 'kreebosh the exile', 'slim', 'spirit of earth', 'spirit of fire', 'spirit of water', 'the dark dancer', 'the hag', 'darakan the executioner', 'deathbringer', 'fallen mooh tah master ghar', 'gnorre chyllson', 'norgle glacierbeard', 'svoren the mad', 'the masked marauder', 'the obliverator', 'the pit lord', 'webster', 'flamethrower', 'hell hole', 'lavahole', 'dwarf dispenser', 'magicthrower', 'magic pillar', 'pillar', 'mechanical figher', 'plaguethrower', 'poisonthrower', 'shredderthrower', 'barbarian bloodwalker', 'barbarian brutetamer', 'barbarian headsplitter', 'barbarian skullhunter', 'arachir the ancient one', 'armenius', 'arthei', 'apprentice sheng', 'azerus', 'barbaria', 'battlemaster zunzu', 'big boss trolliver', 'blistering fire elemental', 'boreth', 'captain jones', 'chizzoron the distorter', 'the countess sorrow', 'cublarc the plunderer', 'deadeye devious', 'demodras', 'dharalion', 'diblis the fair', 'diseased bill', 'diseased dan', 'diseased fred', 'dracola', 'dreadmaw', 'earth overlord', 'energy overlord', 'fernfang', 'ferumbras', 'fire overlord', 'fleabringer', 'foreman kneebiter', 'freegoiz', 'general murius', 'grandfather tridian', 'grand mother foulscale', 'grorlam', 'hairman the huge', 'lizard templar', 'ice overlord', 'inky', 'koshei the deathless', 'lersatio', 'lethal lissy', 'lizard gate guardian', 'lord of the elements', 'mad technomancer', 'man in the cave', 'marziel', 'massacre', 'mooh tah master', 'mr. punish', 'munster', 'necropharus', 'ron the ripper', 'renegade orc', 'rotworm queen', 'rukor zad', 'shadow of boreth', 'shadow of lersatio', 'shadow of marziel', 'shard of corruption', 'sharptooth', 'sir valorcrest', 'splasher', 'smuggler baron silvertoe', 'stonecracker', 'the blightfather', 'the big bad one', 'the collector', 'the count', 'the evil eye', 'the frog prince', 'the handmaiden', 'the horned fox', 'the imperor', 'the old widow', 'the plasmother', 'the voice of ruin', 'the weakened count', 'thul', 'tiquandas revenge', 'ungreez', 'warlord ruzad', 'yakchal', 'yalahari', 'yeti', 'zarabustor', 'zebelon duskbringer', 'zulazza the corruptor', 'chakoya toolshaper', 'chakoya tribewarden', 'chakoya windcaller', 'dark torturer', 'demon', 'destroyer', 'diabolic imp', 'fire devil', 'gozzler', 'hand of cursed fate', 'hellfire fighter', 'hellhound', 'hellspawn', 'juggernaut', 'nightmare', 'nightmare scion', 'nightstalker', 'plaguesmith', 'bazir', 'orshabaal', 'zoralurk', 'frost dragon', 'wyrm', 'dragon lord', 'dragon', 'hydra', 'dragon hatchling', 'dragon lord hatchling', 'frost dragon hatchling', 'undead dragon', 'wyvern', 'blazing fire elemental', 'charged energy elemental', 'earth elemental', 'energy elemental', 'fire elemental', 'jagged earth elemental', 'massive earth elemental', 'massive energy elemental', 'massive fire elemental', 'massive water elemental', 'muddy earth elemental', 'overcharged energy elemental', 'roaring water elemental', 'slick water elemental', 'water elemental', 'elf arcanist', 'elf scout', 'elf', 'bones', 'deathslicer', 'exp bug', 'eye of the seven', 'fluffy', 'gamemaster', 'goblin demon', 'grynch clan goblin', 'hacker', 'the halloween hare', 'the ruthless herald', 'minishabaal', 'primitive', 'servant golem', 'tha exp carrier', 'the mutated pumpkin', 'tibia bug', 'undead minion', 'ashmunrah', 'arkhothep', 'dipthrah', 'mahrdis', 'morguthis', 'omruc', 'rahemos', 'thalas', 'vashresamun', 'frost giant', 'frost giantess', 'cyclops smith', 'cyclops drone', 'behemoth', 'cyclops', 'ice golem', 'the old whopper', 'stone golem', 'war golem', 'worker golem', 'damaged worker golem', 'goblin leader', 'goblin scavenger', 'goblin', 'goblin assassin', 'dworc fleshhunter', 'dworc venomsniper', 'dworc voodoomaster', 'acolyte of the cult', 'adept of the cult', 'amazon', 'crazed beggar', 'enlightened of the cult', 'novice of the cult', 'dark monk', 'monk', 'dark apprentice', 'dark magician', 'fury', 'gladiator', 'gang member', 'ice witch', 'infernalist', 'mad scientist', 'warlock', 'witch', 'necromancer', 'priestess', 'assasin', 'bandit', 'black knight', 'hero', 'hunter', 'nomad', 'morik the gladiator', 'smuggler', 'poacher', 'thief', 'undead jester', 'valkyrie', 'yaga the crone', 'wild warrior', 'baron brute', 'coldheart', 'doomhowl', 'dreadwing', 'fatality', 'haunter', 'incineron', 'menace', 'rocko', 'the axeorcist', 'the dreadorian', 'tirecz', 'tremorak', 'lizard sentinel', 'lizard snakecharmer', 'blue djinn', 'efreet', 'green djinn', 'marid', 'braindeath', 'bonelord', 'elder bonelord', 'gazer', 'mimic', 'stalker', 'wisp', 'minotaur archer', 'minotaur guard', 'minotaur mage', 'minotaur', 'banshee', 'betrayed wraith', 'blightwalker', 'bonebeast', 'crypt shambler', 'demon skeleton', 'dreadbeast', 'gargoyle', 'ghost', 'ghoul', 'ghostly apparition', 'grim reaper', 'gravelord oshuran', 'lich', 'lost soul', 'mummy', 'phantasm', 'pythius the rotten', 'skeleton warrior', 'spectre', 'tormented ghost', 'vampire', 'vampire bride', 'undead gladiator', 'zombie', 'mutated bat', 'mutated human', 'mutated rat', 'mutated tiger', 'werewolf', 'orc berserker', 'orc leader', 'orc rider', 'orc shaman', 'orc spearman', 'orc warlord', 'orc warrior', 'orc', 'brutus bloodbeard', 'pirate buccaneer', 'pirate corsair', 'pirate cutthroat', 'pirate ghost', 'pirate marauder', 'pirate skeleton', 'carniphila', 'haunted treeling', 'spit nettle', 'kongra', 'merlkin', 'sibang', 'serpent spawn', 'apocalypse', 'infernatil', 'verminor', 'annihilon', 'golgordan', 'hellgorak', 'latrivan', 'madareth', 'rift brood', 'rift lord', 'rift phantom', 'rift scythe', 'rift worm', 'ushuriel', 'zugurosh', 'ghazbaran', 'morgaroth', 'troll champion', 'frost troll', 'island troll', 'swamp troll', 'troll', 'acid blob', 'ancient scarab', 'azure frog', 'butterfly', 'bog raider', 'bug', 'centipede', 'cobra', 'coral frog', 'crimson frog', 'crystal spider', 'death blob', 'deathspawn', 'defiler', 'giant spider', 'green frog', 'larva', 'mercury blob', 'orchid frog', 'poison spider', 'scarab', 'scorpion', 'slime2', 'slime', 'snake', 'son of verminor', 'spider', 'tarantula', 'the abomination', 'toad', 'wasp') as $v)
							if(strpos($s, $v) !== false) {
								$e['name'] = 'Este nome do personagem já é usado. Por favor escolha um outro!';
								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'] = 'Este nome do personagem já é usado. Por favor escolha um outro!';
						}
					}
				}
			}
		}
	}

	if(!isset($_POST['world']) || empty($_POST['world']))
		$e['world'] = 'Por favor selecione um mundo de jogo para o seu personagem!';

	if(!isset($_POST['sex']) || ($_POST['sex'] != 'male' && $_POST['sex'] != 'female'))
		$e['sex'] = 'Selecione o sexo para o seu personagem!!';

	if(count($voc) != 0 && (!isset($_POST['vocation']) || !is_numeric($_POST['vocation']) || !isset($voc[$_POST['vocation']])))
		$e['vocation'] = 'Por favor selecione a vocação para o seu personagem!';

	$s = isset($_POST['email']) ? $_POST['email'] : '';

	if($s == '')
		$e['email'] = 'Digite seu endereço de e-mail!';
	elseif(strlen($s) > 49)
		$e['email'] = 'Seu endereço de email é muito longo!';
	elseif(!filter_var($s, FILTER_VALIDATE_EMAIL))
		$e['email'] = 'Este endereço de e-mail tem um formato inválido. Por favor insira um endereço de e-mail correto!';
	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'] = 'Este endereço de e-mail já está sendo usado. Por favor, digite um outro endereço de e-mail!';
	}

	$s1 = isset($_POST['password1']) ? $_POST['password1'] : '';
	$s2 = isset($_POST['password2']) ? $_POST['password2'] : '';

	if(empty($s2))
		$e['pass'] = 'Por favor, digite a senha novamente!';
	elseif($s1 != $s2)
		$e['pass'] = 'As duas senhas não são iguais!';
	else {
		$err = array();
		if(strlen($s1) < 6 || strlen($s1) > 29)
			$err[] = 'A senha deve ter pelo entre 8 a 30 letras!';
		if(!ctype_alnum($s1))
			$err[] = 'A senha contém letras inválidos!';

		if(count($err) != 0) {
			$e['pass'] = '';
			for($i=0; $i < count($err); $i++)
				$e['pass'] .= ($i == 0 ? '' : '<br/>').$err[$i];
		}
	}

	if(!isset($_POST['agreerules']) || empty($_POST['agreerules']))
		$e['rules'] = 'Você tem que concordar com as regras do jogo, a fim de criar uma conta!';

	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'] = 'Por favor selecione um mundo de jogo válido.';
	}

	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,premdays) VALUES($n,'".$_POST['accountname']."','".($config['server']['encryptionType'] == 'plain' ? $_POST['password1'] : hash($config['server']['encryptionType'], $_POST['password1']))."','".$_POST['email']."',".time().", '".$config['site']['newaccount_premdays']."')") === true) {
			$sample = (count($voc) == 0 ? 'Rook' : $voc[$_POST['vocation']]).' Sample';
			$q = mysql_query("SELECT * 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'].','.$_POST['town'].','.$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://www.mediafire.com/?j0mleh967l67sku" 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://www.mediafire.com/?j0mleh967l67sku" 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 id="ccacc" style="position:relative;top:0px;left:0px"><form action="?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">Criar nova conta</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" width="40%"><span id="accountname_label"'.(isset($e['acc']) ? ' class="red"' : '').'><b>Account Name:</b></span></td><td><input id="accountname" name="accountname" autocomplete="off" 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"' : '').'><b>Email Address:</b></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"' : '').'><b>Password:</b></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"' : '').'><b>Repita password:</b></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" width="40%"><span id="charactername_label"'.(isset($e['name']) ? ' class="red"' : '').'><b>Nome do personagem:</b></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" width="20%"><span'.(isset($e['sex']) ? ' class="red"' : '').'><b>Sex:</b></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" width="10%"><span'.(isset($e['vocation']) ? ' class="red"' : '').'><b>Vocação:</b></span></td><td><table width="100%" id="cavoc"><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"' : '').'><b>World Type:</b></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 id="filterbox_pvp"><td class="LabelV150"><span'.(isset($e['world']) ? ' class="red"' : '').'><b>World Name:</b></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>Por favor, selecione todas as seguintes caixas:</b></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"' : '').'/>Concordo com as <a href="?subtopic=legaldocuments&page=rules" target="_blank">regras do jogo</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/>
<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>
</div>
<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>';

:D

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...