Ir para conteúdo

Natanael Beckman

Conde
  • Total de itens

    554
  • Registro em

  • Última visita

  • Dias Ganhos

    7

Tudo que Natanael Beckman postou

  1. sqlType = "mysql" sqlHost = "cpmy0025.servidorwebfacil.com" <-- Ip numeros esse ip é de onde está localizada a sua database. sqlPort = 3306 sqlUser = "meu usuario aki" sqlPass = "minha senha aki" sqlDatabase = "tibiazc_Tibia" sqlFile = "tibiazc_tibia.s3db" sqlKeepAlive = 0 mysqlReadTimeout = 5000 <altera mysqlWriteTimeout = 5000 <altera encryptionType = "plain"
  2. Utilize essa. DROP TRIGGER IF EXISTS `oncreate_players`; DROP TRIGGER IF EXISTS `oncreate_guilds`; DROP TRIGGER IF EXISTS `ondelete_players`; DROP TRIGGER IF EXISTS `ondelete_guilds`; DROP TRIGGER IF EXISTS `ondelete_accounts`; DROP TABLE IF EXISTS `player_depotitems`; DROP TABLE IF EXISTS `tile_items`; DROP TABLE IF EXISTS `tiles`; DROP TABLE IF EXISTS `bans`; DROP TABLE IF EXISTS `house_lists`; DROP TABLE IF EXISTS `houses`; DROP TABLE IF EXISTS `player_items`; DROP TABLE IF EXISTS `player_namelocks`; DROP TABLE IF EXISTS `player_skills`; DROP TABLE IF EXISTS `player_storage`; DROP TABLE IF EXISTS `player_viplist`; DROP TABLE IF EXISTS `player_spells`; DROP TABLE IF EXISTS `player_deaths`; DROP TABLE IF EXISTS `killers`; DROP TABLE IF EXISTS `environment_killers`; DROP TABLE IF EXISTS `player_killers`; DROP TABLE IF EXISTS `guild_ranks`; DROP TABLE IF EXISTS `guilds`; DROP TABLE IF EXISTS `guild_invites`; DROP TABLE IF EXISTS `global_storage`; DROP TABLE IF EXISTS `players`; DROP TABLE IF EXISTS `accounts`; DROP TABLE IF EXISTS `server_record`; DROP TABLE IF EXISTS `server_motd`; DROP TABLE IF EXISTS `server_reports`; DROP TABLE IF EXISTS `server_config`; DROP TABLE IF EXISTS `account_viplist`; DROP TABLE IF EXISTS `poll_votes`; DROP TABLE IF EXISTS `polls`; CREATE TABLE `accounts` ( `id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR(32) NOT NULL DEFAULT '', `password` VARCHAR(255) NOT NULL/* VARCHAR(32) NOT NULL COMMENT 'MD5'*//* VARCHAR(40) NOT NULL COMMENT 'SHA1'*/, `premdays` INT NOT NULL DEFAULT 0, `lastday` INT UNSIGNED NOT NULL DEFAULT 0, `email` VARCHAR(255) NOT NULL DEFAULT '', `key` VARCHAR(20) NOT NULL DEFAULT '0', `blocked` TINYINT(1) NOT NULL DEFAULT FALSE COMMENT 'internal usage', `warnings` INT NOT NULL DEFAULT 0, `group_id` INT NOT NULL DEFAULT 1, `vip_time` INT(15) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), UNIQUE (`name`) ) ENGINE = InnoDB; INSERT INTO `accounts` VALUES (1, '1', '1', 65535, 0, '', '0', 0, 0, 1, 0); CREATE TABLE `players` ( `id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR(255) NOT NULL, `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0, `group_id` INT NOT NULL DEFAULT 1, `account_id` INT NOT NULL DEFAULT 0, `level` INT NOT NULL DEFAULT 1, `vocation` INT NOT NULL DEFAULT 0, `health` INT NOT NULL DEFAULT 150, `healthmax` INT NOT NULL DEFAULT 150, `experience` BIGINT NOT NULL DEFAULT 0, `lookbody` INT NOT NULL DEFAULT 0, `lookfeet` INT NOT NULL DEFAULT 0, `lookhead` INT NOT NULL DEFAULT 0, `looklegs` INT NOT NULL DEFAULT 0, `looktype` INT NOT NULL DEFAULT 136, `lookaddons` INT NOT NULL DEFAULT 0, `maglevel` INT NOT NULL DEFAULT 0, `mana` INT NOT NULL DEFAULT 0, `manamax` INT NOT NULL DEFAULT 0, `manaspent` INT NOT NULL DEFAULT 0, `soul` INT UNSIGNED NOT NULL DEFAULT 0, `town_id` INT NOT NULL DEFAULT 0, `posx` INT NOT NULL DEFAULT 0, `posy` INT NOT NULL DEFAULT 0, `posz` INT NOT NULL DEFAULT 0, `conditions` BLOB NOT NULL, `cap` INT NOT NULL DEFAULT 0, `sex` INT NOT NULL DEFAULT 0, `lastlogin` BIGINT UNSIGNED NOT NULL DEFAULT 0, `lastip` INT UNSIGNED NOT NULL DEFAULT 0, `save` TINYINT(1) NOT NULL DEFAULT 1, `skull` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0, `skulltime` INT NOT NULL DEFAULT 0, `rank_id` INT NOT NULL DEFAULT 0, `guildnick` VARCHAR(255) NOT NULL DEFAULT '', `lastlogout` BIGINT UNSIGNED NOT NULL DEFAULT 0, `blessings` TINYINT(2) NOT NULL DEFAULT 0, `balance` BIGINT NOT NULL DEFAULT 0, `stamina` BIGINT NOT NULL DEFAULT 151200000 COMMENT 'stored in miliseconds', `direction` INT NOT NULL DEFAULT 2, `loss_experience` INT NOT NULL DEFAULT 100, `loss_mana` INT NOT NULL DEFAULT 100, `loss_skills` INT NOT NULL DEFAULT 100, `loss_containers` INT NOT NULL DEFAULT 100, `loss_items` INT NOT NULL DEFAULT 100, `premend` INT NOT NULL DEFAULT 0 COMMENT 'NOT IN USE BY THE SERVER', `online` TINYINT(1) NOT NULL DEFAULT 0, `marriage` INT UNSIGNED NOT NULL DEFAULT 0, `marrystatus` INT UNSIGNED NOT NULL DEFAULT 0, `promotion` INT NOT NULL DEFAULT 0, `deleted` TINYINT(1) NOT NULL DEFAULT FALSE, `description` VARCHAR(255) NOT NULL DEFAULT '', PRIMARY KEY (`id`), UNIQUE (`name`, `deleted`), KEY (`account_id`), KEY (`group_id`), KEY (`online`), KEY (`deleted`), FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`) ON DELETE CASCADE ) ENGINE = InnoDB; INSERT INTO `players` VALUES (1, 'Account Manager', 0, 1, 1, 1, 0, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 32360, 31782, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, 0, ''); CREATE TABLE `account_viplist` ( `account_id` INT NOT NULL, `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0, `player_id` INT NOT NULL, KEY (`account_id`), KEY (`player_id`), KEY (`world_id`), UNIQUE (`account_id`, `player_id`), FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`) ON DELETE CASCADE, FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE ) ENGINE = InnoDB; CREATE TABLE `player_deaths` ( `id` INT NOT NULL AUTO_INCREMENT, `player_id` INT NOT NULL, `date` BIGINT UNSIGNED NOT NULL, `level` INT UNSIGNED NOT NULL, PRIMARY KEY (`id`), INDEX (`date`), FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE ) ENGINE = InnoDB; CREATE TABLE `player_depotitems` ( `player_id` INT NOT NULL, `sid` INT NOT NULL COMMENT 'any given range, eg. 0-100 is reserved for depot lockers and all above 100 will be normal items inside depots', `pid` INT NOT NULL DEFAULT 0, `itemtype` INT NOT NULL, `count` INT NOT NULL DEFAULT 0, `attributes` BLOB NOT NULL, KEY (`player_id`), UNIQUE (`player_id`, `sid`), FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE ) ENGINE = InnoDB; CREATE TABLE `player_items` ( `player_id` INT NOT NULL DEFAULT 0, `pid` INT NOT NULL DEFAULT 0, `sid` INT NOT NULL DEFAULT 0, `itemtype` INT NOT NULL DEFAULT 0, `count` INT NOT NULL DEFAULT 0, `attributes` BLOB NOT NULL, KEY (`player_id`), UNIQUE (`player_id`, `sid`), FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE ) ENGINE = InnoDB; CREATE TABLE `player_namelocks` ( `player_id` INT NOT NULL DEFAULT 0, `name` VARCHAR(255) NOT NULL, `new_name` VARCHAR(255) NOT NULL, `date` BIGINT NOT NULL DEFAULT 0, KEY (`player_id`), FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE ) ENGINE = InnoDB; CREATE TABLE `player_skills` ( `player_id` INT NOT NULL DEFAULT 0, `skillid` TINYINT(2) NOT NULL DEFAULT 0, `value` INT UNSIGNED NOT NULL DEFAULT 0, `count` INT UNSIGNED NOT NULL DEFAULT 0, KEY (`player_id`), UNIQUE (`player_id`, `skillid`), FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE ) ENGINE = InnoDB; CREATE TABLE `player_spells` ( `player_id` INT NOT NULL, `name` VARCHAR(255) NOT NULL, KEY (`player_id`), UNIQUE (`player_id`, `name`), FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE ) ENGINE = InnoDB; CREATE TABLE `player_storage` ( `player_id` INT NOT NULL DEFAULT 0, `key` INT UNSIGNED NOT NULL DEFAULT 0, `value` VARCHAR(255) NOT NULL DEFAULT '0', KEY (`player_id`), UNIQUE (`player_id`, `key`), FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE ) ENGINE = InnoDB; CREATE TABLE `player_viplist` ( `player_id` INT NOT NULL, `vip_id` INT NOT NULL, KEY (`player_id`), KEY (`vip_id`), UNIQUE (`player_id`, `vip_id`), FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE, FOREIGN KEY (`vip_id`) REFERENCES `players`(`id`) ON DELETE CASCADE ) ENGINE = InnoDB; CREATE TABLE `killers` ( `id` INT NOT NULL AUTO_INCREMENT, `death_id` INT NOT NULL, `final_hit` TINYINT(1) UNSIGNED NOT NULL DEFAULT FALSE, `unjustified` TINYINT(1) UNSIGNED NOT NULL DEFAULT FALSE, PRIMARY KEY (`id`), FOREIGN KEY (`death_id`) REFERENCES `player_deaths`(`id`) ON DELETE CASCADE ) ENGINE = InnoDB; CREATE TABLE `player_killers` ( `kill_id` INT NOT NULL, `player_id` INT NOT NULL, FOREIGN KEY (`kill_id`) REFERENCES `killers`(`id`) ON DELETE CASCADE, FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE ) ENGINE = InnoDB; CREATE TABLE `environment_killers` ( `kill_id` INT NOT NULL, `name` VARCHAR(255) NOT NULL, FOREIGN KEY (`kill_id`) REFERENCES `killers`(`id`) ON DELETE CASCADE ) ENGINE = InnoDB; CREATE TABLE `houses` ( `id` INT UNSIGNED NOT NULL, `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0, `owner` INT NOT NULL, `paid` INT UNSIGNED NOT NULL DEFAULT 0, `warnings` INT NOT NULL DEFAULT 0, `lastwarning` INT UNSIGNED NOT NULL DEFAULT 0, `name` VARCHAR(255) NOT NULL, `town` INT UNSIGNED NOT NULL DEFAULT 0, `size` INT UNSIGNED NOT NULL DEFAULT 0, `price` INT UNSIGNED NOT NULL DEFAULT 0, `rent` INT UNSIGNED NOT NULL DEFAULT 0, `doors` INT UNSIGNED NOT NULL DEFAULT 0, `beds` INT UNSIGNED NOT NULL DEFAULT 0, `tiles` INT UNSIGNED NOT NULL DEFAULT 0, `guild` TINYINT(1) UNSIGNED NOT NULL DEFAULT FALSE, `clear` TINYINT(1) UNSIGNED NOT NULL DEFAULT FALSE, UNIQUE (`id`, `world_id`) ) ENGINE = InnoDB; CREATE TABLE `house_auctions` ( `house_id` INT UNSIGNED NOT NULL, `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0, `player_id` INT NOT NULL, `bid` INT UNSIGNED NOT NULL DEFAULT 0, `limit` INT UNSIGNED NOT NULL DEFAULT 0, `endtime` BIGINT UNSIGNED NOT NULL DEFAULT 0, UNIQUE (`house_id`, `world_id`), FOREIGN KEY (`house_id`, `world_id`) REFERENCES `houses`(`id`, `world_id`) ON DELETE CASCADE, FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE ) ENGINE = InnoDB; CREATE TABLE `house_lists` ( `house_id` INT UNSIGNED NOT NULL, `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0, `listid` INT NOT NULL, `list` TEXT NOT NULL, UNIQUE (`house_id`, `world_id`, `listid`), FOREIGN KEY (`house_id`, `world_id`) REFERENCES `houses`(`id`, `world_id`) ON DELETE CASCADE ) ENGINE = InnoDB; CREATE TABLE `house_data` ( `house_id` INT UNSIGNED NOT NULL, `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0, `data` LONGBLOB NOT NULL, UNIQUE (`house_id`, `world_id`), FOREIGN KEY (`house_id`, `world_id`) REFERENCES `houses`(`id`, `world_id`) ON DELETE CASCADE ) ENGINE = InnoDB; CREATE TABLE `tiles` ( `id` INT UNSIGNED NOT NULL, `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0, `house_id` INT UNSIGNED NOT NULL, `x` INT(5) UNSIGNED NOT NULL, `y` INT(5) UNSIGNED NOT NULL, `z` TINYINT(2) UNSIGNED NOT NULL, UNIQUE (`id`, `world_id`), KEY (`x`, `y`, `z`), FOREIGN KEY (`house_id`, `world_id`) REFERENCES `houses`(`id`, `world_id`) ON DELETE CASCADE ) ENGINE = InnoDB; CREATE TABLE `tile_items` ( `tile_id` INT UNSIGNED NOT NULL, `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0, `sid` INT NOT NULL, `pid` INT NOT NULL DEFAULT 0, `itemtype` INT NOT NULL, `count` INT NOT NULL DEFAULT 0, `attributes` BLOB NOT NULL, UNIQUE (`tile_id`, `world_id`, `sid`), KEY (`sid`), FOREIGN KEY (`tile_id`) REFERENCES `tiles`(`id`) ON DELETE CASCADE ) ENGINE = InnoDB; CREATE TABLE `guilds` ( `id` INT NOT NULL AUTO_INCREMENT, `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0, `name` VARCHAR(255) NOT NULL, `ownerid` INT NOT NULL, `creationdata` INT NOT NULL, `motd` VARCHAR(255) NOT NULL, PRIMARY KEY (`id`), UNIQUE (`name`, `world_id`) ) ENGINE = InnoDB; CREATE TABLE `guild_invites` ( `player_id` INT NOT NULL DEFAULT 0, `guild_id` INT NOT NULL DEFAULT 0, UNIQUE (`player_id`, `guild_id`), FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE, FOREIGN KEY (`guild_id`) REFERENCES `guilds`(`id`) ON DELETE CASCADE ) ENGINE = InnoDB; CREATE TABLE `guild_ranks` ( `id` INT NOT NULL AUTO_INCREMENT, `guild_id` INT NOT NULL, `name` VARCHAR(255) NOT NULL, `level` INT NOT NULL COMMENT '1 - leader, 2 - vice leader, 3 - member', PRIMARY KEY (`id`), FOREIGN KEY (`guild_id`) REFERENCES `guilds`(`id`) ON DELETE CASCADE ) ENGINE = InnoDB; CREATE TABLE `bans` ( `id` INT UNSIGNED NOT NULL auto_increment, `type` TINYINT(1) NOT NULL COMMENT '1 - ip banishment, 2 - namelock, 3 - account banishment, 4 - notation, 5 - deletion', `value` INT UNSIGNED NOT NULL COMMENT 'ip address (integer), player guid or account number', `param` INT UNSIGNED NOT NULL DEFAULT 4294967295 COMMENT 'used only for ip banishment mask (integer)', `active` TINYINT(1) NOT NULL DEFAULT TRUE, `expires` INT NOT NULL, `added` INT UNSIGNED NOT NULL, `admin_id` INT UNSIGNED NOT NULL DEFAULT 0, `comment` TEXT NOT NULL, `reason` INT UNSIGNED NOT NULL DEFAULT 0, `action` INT UNSIGNED NOT NULL DEFAULT 0, `statement` VARCHAR(255) NOT NULL DEFAULT '', PRIMARY KEY (`id`), KEY `type` (`type`, `value`), KEY `active` (`active`) ) ENGINE = InnoDB; CREATE TABLE `global_storage` ( `key` INT UNSIGNED NOT NULL, `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0, `value` VARCHAR(255) NOT NULL DEFAULT '0', UNIQUE (`key`, `world_id`) ) ENGINE = InnoDB; CREATE TABLE `server_config` ( `config` VARCHAR(35) NOT NULL DEFAULT '', `value` INT NOT NULL, UNIQUE (`config`) ) ENGINE = InnoDB; INSERT INTO `server_config` VALUES ('db_version', 23); CREATE TABLE `server_motd` ( `id` INT UNSIGNED NOT NULL, `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0, `text` TEXT NOT NULL, UNIQUE (`id`, `world_id`) ) ENGINE = InnoDB; INSERT INTO `server_motd` VALUES (1, 0, 'Welcome to The Forgotten Server!'); CREATE TABLE `server_record` ( `record` INT NOT NULL, `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0, `timestamp` BIGINT NOT NULL, UNIQUE (`record`, `world_id`, `timestamp`) ) ENGINE = InnoDB; INSERT INTO `server_record` VALUES (0, 0, 0); CREATE TABLE `server_reports` ( `id` INT NOT NULL AUTO_INCREMENT, `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0, `player_id` INT NOT NULL DEFAULT 1, `posx` INT NOT NULL DEFAULT 0, `posy` INT NOT NULL DEFAULT 0, `posz` INT NOT NULL DEFAULT 0, `timestamp` BIGINT NOT NULL DEFAULT 0, `report` TEXT NOT NULL, `reads` INT NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY (`world_id`), KEY (`reads`), FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE ) ENGINE = InnoDB; CREATE TABLE `polls` ( `id` INTEGER AUTO_INCREMENT, `player_id` INT(11) NOT NULL, `poll` VARCHAR(255) NOT NULL, `options` VARCHAR(255) NOT NULL, `timestamp` INT(11) NOT NULL, PRIMARY KEY (`id`), FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE ) ENGINE = InnoDB; CREATE TABLE `poll_votes` ( `poll_id` INT(11) NOT NULL, `votes` VARCHAR(255) NOT NULL, `account_id` VARCHAR(255) NOT NULL, FOREIGN KEY (`poll_id`) REFERENCES `polls` (`id`) ON DELETE CASCADE ) ENGINE = InnoDB; DELIMITER | CREATE TRIGGER `ondelete_accounts` BEFORE DELETE ON `accounts` FOR EACH ROW BEGIN DELETE FROM `bans` WHERE `type` IN (3, 4) AND `value` = OLD.`id`; END| CREATE TRIGGER `oncreate_guilds` AFTER INSERT ON `guilds` FOR EACH ROW BEGIN INSERT INTO `guild_ranks` (`name`, `level`, `guild_id`) VALUES ('Leader', 3, NEW.`id`); INSERT INTO `guild_ranks` (`name`, `level`, `guild_id`) VALUES ('Vice-Leader', 2, NEW.`id`); INSERT INTO `guild_ranks` (`name`, `level`, `guild_id`) VALUES ('Member', 1, NEW.`id`); END| CREATE TRIGGER `ondelete_guilds` BEFORE DELETE ON `guilds` FOR EACH ROW BEGIN UPDATE `players` SET `guildnick` = '', `rank_id` = 0 WHERE `rank_id` IN (SELECT `id` FROM `guild_ranks` WHERE `guild_id` = OLD.`id`); END| CREATE TRIGGER `oncreate_players` AFTER INSERT ON `players` FOR EACH ROW BEGIN INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 0, 10); INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 1, 10); INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 2, 10); INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 3, 10); INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 4, 10); INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 5, 10); INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 6, 10); END| CREATE TRIGGER `ondelete_players` BEFORE DELETE ON `players` FOR EACH ROW BEGIN DELETE FROM `bans` WHERE `type` IN (2, 5) AND `value` = OLD.`id`; UPDATE `houses` SET `owner` = 0 WHERE `owner` = OLD.`id`; END| DELIMITER ;
  3. Concerteza! Após enviar o seu config.lua edit isso: sqlType = "mysql" sqlHost = "localhost" <--- ip da maquina que está seu OT. sqlPort = 3306 sqlUser = "root" sqlPass = "natan" sqlDatabase = "natan"
  4. natanbeckman@hotmail.com Eu dificilmente entro =s e quando entro fico o status off, vc me add e me manda menssage talvez eu esteja on ;p
  5. kkkkkkkkkkkkkkkk Lol mattew alopred ;p @PsyReboleira Concerteza você está fazendo tudo errado. 1º Veja se você realmente criou um banco de dados. 2° Veja com qual nome você criou e qual senha você adicionou.
  6. Concerteza está havendo alguma interferência agora vamos tentar saber qual é esse interferência. Seu site ficalocalizado na mesma maquina do pc? Seu sistema operacional é linux ou windows?
  7. Eu recomendo que você edite pelo bloco de notas eu empre faço assim, mais isso é algo particular meu não importa muito. E seria bom se você estabelecer etapas tipo, diga qual é sua duvida que nós tetaremos esclarecer. Sobre o plano de fundo vai até htdocs\layouts\tibiacom\images\header bom, la terá uma imagem com o nome background-artwork bota a que você quizer mais sempre lembre que seja o mesmo tamanho o mesmo nome e os mesmo formato dessa imagem ae ja existente.
  8. Nottinghster rula com o Tryller noob vai ser best esse crystal. Parabéns ;DD
  9. Local incorreto para suportes ;x PsyReboleira acesse Dúvidas sobre Websites e poste sua duvida. Edit: ------------------ Após o tópico ser mudado para a seção correta, vamos nois. 1° Pra você ter chegado na 4º etapa é sinal que seu config.lua não tem nada de errado ou o contrário disso você não tinha saido nem da 1° etapa... 2º Use esse install.php e veja se ocorre o mesmo error: <?PHP $config['site'] = parse_ini_file('config/config.ini'); session_start(); //save config in ini file function saveconfig_ini($config) { $file = fopen("config/config.ini", "w"); foreach($config as $param => $data) { $file_data .= $param.' = "'.str_replace('"', '', $data).'" '; } rewind($file); fwrite($file, $file_data); fclose($file); } function check_password($pass) { $temp = strspn("$pass", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890"); if ($temp != strlen($pass)) { return false; } else { $ok = "/[a-zA-Z0-9]{1,40}/"; return (preg_match($ok, $pass))? true: false; } } function password_ency($password) { $ency = $GLOBALS['passwordency']; if($ency == 'sha1') return sha1($password); elseif($ency == 'md5') return md5($password); elseif($ency == '') return $password; } if($_REQUEST['page'] == '' && !isset($_REQUEST['step'])) echo '<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" /> <title>Installation of account maker</title> </head> <frameset cols="230,*"> <frame name="menu" src="install.php?page=menu" /> <frame name="step" src="install.php?page=step&step=0" /> <noframes><body>Frames don\'t work. Install Firefox </body></noframes> </frameset> </html>'; if($_REQUEST['page'] == 'menu') echo '<h2>MENU</h2><br><b>IF NOT INSTALLED:</b><br> <a href="install.php?page=step&step=start" target="step">0. Informations</a><br> <a href="install.php?page=step&step=1" target="step">1. Set server path</a><br> <a href="install.php?page=step&step=2" target="step">2. Check DataBase connection</a><br> <a href="install.php?page=step&step=3&server_conf=yes" target="step">3. Add tables and columns to DB</a><br> <a href="install.php?page=step&step=4&server_conf=yes" target="step">4. Add samples to DB</a><br> <a href="install.php?page=step&step=5&server_conf=yes" target="step">5. Set Admin Account</a><br> <b>FOR ADMINS:</b><br> <a href="index.php?subtopic=adminpanel&action=install_monsters" target="step">6. Load Monsters from OTS</a><br> <a href="index.php?subtopic=adminpanel&action=install_spells" target="step">7. Load Spells from OTS</a><br>'; if($_REQUEST['page'] == 'step') { if($config['site']['install'] != "no") { if($_REQUEST['server_conf'] == 'yes' || ($_REQUEST['step'] > 2 && $_REQUEST['step'] < 6)) { $config['server'] = parse_ini_file($config['site']['server_path'].'config.lua'); if(isset($config['server']['mysqlHost'])) { $mysqlhost = $config['server']['mysqlHost']; $mysqluser = $config['server']['mysqlUser']; $mysqlpass = $config['server']['mysqlPass']; $mysqldatabase = $config['server']['mysqlDatabase']; } elseif(isset($config['server']['sqlHost'])) { $mysqlhost = $config['server']['sqlHost']; $mysqluser = $config['server']['sqlUser']; $mysqlpass = $config['server']['sqlPass']; $mysqldatabase = $config['server']['sqlDatabase']; } $sqlitefile = $config['server']['sqliteDatabase']; $passwordency = ''; if(strtolower($config['server']['useMD5Passwords']) == 'yes' || strtolower($config['server']['passwordType']) == 'md5') $passwordency = 'md5'; if(strtolower($config['server']['passwordType']) == 'sha1') $passwordency = 'sha1'; // loads #####POT mainfile##### include('pot/OTS.php'); // PDO and POT connects to database $ots = POT::getInstance(); if(strtolower($config['server']['sqlType']) == "mysql") { try { $ots->connect(POT::DB_MYSQL, array('host' => $mysqlhost, 'user' => $mysqluser, 'password' => $mysqlpass, 'database' => $mysqldatabase) ); } catch(PDOException $error) { echo 'Database error - can\'t connect to MySQL database. Possible reasons:<br>1. MySQL server is not running on host.<br>2. MySQL user, password, database or host isn\'t configured in: <b>'.$config['site']['server_path'].'config.lua</b> .<br>3. MySQL user, password, database or host is wrong.'; exit; } } elseif(strtolower($config['server']['sqlType']) == "sqlite") { $link_to_sqlitedatabase = $config['site']['server_path'].$sqlitefile; try { $ots->connect(POT::DB_SQLITE, array('database' => $link_to_sqlitedatabase)); } catch(PDOException $error) { echo 'Database error - can\'t open SQLite database. Possible reasons:<br><b>'.$link_to_sqlitedatabase.'</b> - file isn\'t valid SQLite database.<br><b>'.$link_to_sqlitedatabase.'</b> - doesn\'t exist.'; exit; } } else { echo 'Database error. Unknown database type in <b>'.$config['site']['server_path'].'config.lua</b> . Must be equal to: "<b>mysql</b>" or "<b>sqlite</b>". Now is: "<b>'.strtolower($config['server']['sqlType']).'"</b>'; exit; } $SQL = POT::getInstance()->getDBHandle(); } $step = $_REQUEST['step']; if(empty($step)) $step = $config['site']['install']; if($step == 'start') { echo '<h1>STEP '.$step.'</h1>Informations<br>'; echo 'Welcome to Gesior Account Maker installer. <b>First do steps 1-5 one by one, later (when you will be logged on admin account) press on links to steps 6-8 to load configuration from OTS.</b>'; } if($step == '1') { if(isset($_REQUEST['server_path'])) { echo '<h1>STEP '.$step.'</h1>Check server configuration<br>'; $config['site']['server_path'] = $_REQUEST['server_path']; $config['site']['server_path'] = trim($config['site']['server_path'])."\\"; $config['site']['server_path'] = str_replace("\\\\", "/", $config['site']['server_path']); $config['site']['server_path'] = str_replace("\\", "/", $config['site']['server_path']); $config['site']['server_path'] = str_replace("//", "/", $config['site']['server_path']); saveconfig_ini($config['site']); if(file_exists($config['site']['server_path'].'config.lua')) { $config['server'] = parse_ini_file($config['site']['server_path'].'config.lua'); if(isset($config['server']['sqlType'])) { $config['site']['install'] = 2; saveconfig_ini($config['site']); echo 'File <b>config.lua</b> loaded from <font color="red"><i>'.$config['site']['server_path'].'config.lua</i></font> and looks like fine server config file. Now you can check database('.$config['server']['sqlType'].') connection: <a href="install.php?page=step&step=2">STEP 2 - check database connection</a>'; } else { echo 'File <b>config.lua</b> loaded from <font color="red"><i>'.$config['site']['server_path'].'config.lua</i></font> and it\'s not valid TFS config.lua file. <a href="install.php?page=step&step=1">Go to STEP 1 - select other directory.</a> If it\'s your config.lua file from TFS contact with acc. maker author.'; } } else { echo 'Can\'t load file <b>config.lua</b> from <font color="red"><i>'.$config['site']['server_path'].'config.lua</i></font> File doesn\'t exist in selected directory. <a href="install.php?page=step&step=1">Go to STEP 1 - select other directory.</a>'; } } else { echo 'Please write you TFS directory below. Like: <i>C:\Documents and Settings\Gesior\Desktop\TFS 0.3.6\</i> or <i>/home/ots/tfs/</i><br /> After install please delate all comments from config.lua <br />Example: <pre>-- Account manager</pre> <form action="install.php"> <input type="text" name="server_path" size="90" value="'.$config['site']['server_path'].'" /><input type="hidden" name="page" value="step" /><input type="hidden" name="step" value="1" /><input type="submit" value="Set server path" /></form>'; } } if($step == '2') { echo '<h1>STEP '.$step.'</h1>Check database connection<br>'; echo 'If you don\'t see any errors press <a href="install.php?page=step&step=3&server_conf=yes">link to STEP 3 - Add tables and columns to DB</a>. If you see some errors it mean server has wrong configuration. Check FAQ or ask author of acc. maker.'; //load server config $config['server'] = parse_ini_file($config['site']['server_path'].'config.lua'); if(isset($config['server']['mysqlHost'])) { //new (0.2.6+) ots config.lua file $mysqlhost = $config['server']['mysqlHost']; $mysqluser = $config['server']['mysqlUser']; $mysqlpass = $config['server']['mysqlPass']; $mysqldatabase = $config['server']['mysqlDatabase']; } elseif(isset($config['server']['sqlHost'])) { //old (0.2.4) ots config.lua file $mysqlhost = $config['server']['sqlHost']; $mysqluser = $config['server']['sqlUser']; $mysqlpass = $config['server']['sqlPass']; $mysqldatabase = $config['server']['sqlDatabase']; } $sqlitefile = $config['server']['sqliteDatabase']; $passwordency = ''; if(strtolower($config['server']['useMD5Passwords']) == 'yes' || strtolower($config['server']['passwordType']) == 'md5') $passwordency = 'md5'; if(strtolower($config['server']['passwordType']) == 'sha1') $passwordency = 'sha1'; // loads #####POT mainfile##### include('pot/OTS.php'); $ots = POT::getInstance(); if(strtolower($config['server']['sqlType']) == "mysql") { try { $ots->connect(POT::DB_MYSQL, array('host' => $mysqlhost, 'user' => $mysqluser, 'password' => $mysqlpass, 'database' => $mysqldatabase) ); } catch(PDOException $error) { echo 'Database error - can\'t connect to MySQL database. Possible reasons:<br>1. MySQL server is not running on host.<br>2. MySQL user, password, database or host isn\'t configured in: <b>'.$config['site']['server_path'].'config.lua</b> .<br>3. MySQL user, password, database or host is wrong.'; exit; } } elseif(strtolower($config['server']['sqlType']) == "sqlite") { $link_to_sqlitedatabase = $config['site']['server_path'].$sqlitefile; try { $ots->connect(POT::DB_SQLITE, array('database' => $link_to_sqlitedatabase)); } catch(PDOException $error) { echo 'Database error - can\'t open SQLite database. Possible reasons:<br><b>'.$link_to_sqlitedatabase.'</b> - file isn\'t valid SQLite database.<br><b>'.$link_to_sqlitedatabase.'</b> - doesn\'t exist.'; exit; } } else { echo 'Database error. Unknown database type in <b>'.$config['site']['server_path'].'config.lua</b> . Must be equal to: "<b>mysql</b>" or "<b>sqlite</b>". Now is: "<b>'.strtolower($config['server']['sqlType']).'"</b>'; exit; } $SQL = POT::getInstance()->getDBHandle(); $config['site']['install'] = 3; saveconfig_ini($config['site']); } if($step == '3') { echo '<h1>STEP '.$step.'</h1>Add tables and columns to DB<br>'; echo 'Installer try to add new tables and columns to database.<br>'; $config['server'] = parse_ini_file($config['site']['server_path'].'config.lua'); if($config['server']['sqlType'] == "sqlite") { try { $SQL->query('ALTER TABLE accounts ADD "key" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "page_lastday" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "email_new" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "email_new_time" INTEGER(15) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "created" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "rlname" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "location" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "page_access" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "email_code" VARCHAR(255) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "next_email" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "premium_points" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} echo "Added columns to table <b>accounts</b>.<br/>"; try { $SQL->query('ALTER TABLE guilds ADD "description" TEXT NOT NULL DEFAULT "";'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE guilds ADD "logo_gfx_name" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {} echo "Added columns to table <b>guilds</b>.<br/>"; try { $SQL->query('ALTER TABLE players ADD "online" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE players ADD "created" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE players ADD "nick_verify" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE players ADD "old_name" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE players ADD "hide_char" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE players ADD "comment" TEXT NOT NULL DEFAULT "";'); } catch(PDOException $error) {} echo "Added columns to table <b>players</b>.<br/>"; try { $SQL->query('CREATE TABLE "z_news_tickers" ( "date" INTEGER NOT NULL, "author" INTEGER NOT NULL, "image_id" INTEGER NOT NULL DEFAULT 0, "text" TEXT NOT NULL, "hide_ticker" INTEGER NOT NULL DEFAULT 0);'); } catch(PDOException $error) {} echo "Added table <b>z_news_tickers</b> (tickers).<br/>"; try { $SQL->query('CREATE TABLE "z_spells" ( "name" VARCHAR(255) NOT NULL, "spell" VARCHAR(255) NOT NULL, "spell_type" VARCHAR(255) NOT NULL, "mana" INTEGER NOT NULL DEFAULT 0, "lvl" INTEGER NOT NULL DEFAULT 0, "mlvl" INTEGER NOT NULL DEFAULT 0, "soul" INTEGER NOT NULL DEFAULT 0, "pacc" VARCHAR(255) NOT NULL, "vocations" VARCHAR(255) NOT NULL, "conj_count" INTEGER NOT NULL DEFAULT 0, "hide_spell" INTEGER NOT NULL DEFAULT 0);'); } catch(PDOException $error) {} echo "Added table <b>z_spells</b> (spells list).<br/>"; try { $SQL->query('CREATE TABLE "z_monsters" ( "hide_creature" INTEGER NOT NULL DEFAULT 0, "name" VARCHAR(255) NOT NULL, "mana" INTEGER NOT NULL, "exp" INTEGER NOT NULL, "health" INTEGER NOT NULL, "speed_lvl" INTEGER NOT NULL DEFAULT 1, "use_haste" INTEGER NOT NULL, "voices" text NOT NULL, "immunities" VARCHAR(255) NOT NULL, "summonable" INTEGER NOT NULL, "convinceable" INTEGER NOT NULL, "race" VARCHAR(255) NOT NULL, "gfx_name" VARCHAR(255) NOT NULL)'); } catch(PDOException $error) {} echo "Added table <b>z_monsters</b> (monsters list).<br/>"; } elseif($config['server']['sqlType'] == "mysql") { echo "<h3>Add columns to table <b>accounts</b></h3>"; try { $SQL->query("ALTER TABLE `accounts` ADD `page_lastday` INT( 11 ) NOT NULL;"); echo "<font color=\"green\">Added column</font> <b>page_lastday</b> to table <b>accounts</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>page_lastday</b> to table <b>accounts</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `accounts` ADD `email_new` VARCHAR( 255 ) NOT NULL;"); echo "<font color=\"green\">Added column</font> <b>email_new</b> to table <b>accounts</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>email_new</b> to table <b>accounts</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `accounts` ADD `email_new_time` INT( 15 ) NOT NULL;"); echo "<font color=\"green\">Added column</font> <b>email_new_time</b> to table <b>accounts</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>email_new_time</b> to table <b>accounts</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `accounts` ADD `created` INT( 11 ) NOT NULL DEFAULT '0';"); echo "<font color=\"green\">Added column</font> <b>created</b> to table <b>accounts</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>created</b> to table <b>accounts</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `accounts` ADD `rlname` VARCHAR( 255 ) NOT NULL DEFAULT '';"); echo "<font color=\"green\">Added column</font> <b>rlname</b> to table <b>accounts</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>rlname</b> to table <b>accounts</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `accounts` ADD `location` VARCHAR( 255 ) NOT NULL DEFAULT '';"); echo "<font color=\"green\">Added column</font> <b>location</b> to table <b>accounts</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>location</b> to table <b>accounts</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `accounts` ADD `page_access` INT( 11 ) NOT NULL DEFAULT '0';"); echo "<font color=\"green\">Added column</font> <b>page_access</b> to table <b>accounts</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>page_access</b> to table <b>accounts</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `accounts` ADD `email_code` VARCHAR( 255 ) NOT NULL DEFAULT '0';"); echo "<font color=\"green\">Added column</font> <b>email_code</b> to table <b>accounts</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>email_code</b> to table <b>accounts</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `accounts` ADD `next_email` INT( 11 ) NOT NULL DEFAULT '0';"); echo "<font color=\"green\">Added column</font> <b>next_email</b> to table <b>accounts</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>next_email</b> to table <b>accounts</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `accounts` ADD `premium_points` INT( 11 ) NOT NULL DEFAULT '0';"); echo "<font color=\"green\">Added column</font> <b>premium_points</b> to table <b>accounts</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>premium_points</b> to table <b>accounts</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `accounts` ADD `vote` INT( 11 ) NOT NULL;"); echo "<font color=\"green\">Added column</font> <b>vote</b> to table <b>players</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>vote</b> to table <b>players</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `accounts` ADD `last_post` INT( 11 ) NOT NULL DEFAULT '0';"); echo "<font color=\"green\">Added column</font> <b>last post</b> to table <b>accounts</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>last posts</b> to table <b>accounts</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `accounts` ADD `flag` VARCHAR( 255 ) NOT NULL;"); echo "<font color=\"green\">Added column</font> <b>flag</b> to table <b>accounts</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>flag</b> to table <b>accounts</b>, already exist?<br/>";} echo "<h3>Add columns to table <b>guilds</b></h3>"; try { $SQL->query('ALTER TABLE `guilds` ADD `description` TEXT NOT NULL DEFAULT "";'); echo "<font color=\"green\">Added column</font> <b>description</b> to table <b>guilds</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>description</b> to table <b>guilds</b>, already exist?<br/>";} try { $SQL->query('ALTER TABLE `guilds` ADD `logo_gfx_name` VARCHAR( 255 ) NOT NULL DEFAULT "";'); echo "<font color=\"green\">Added column</font> <b>logo_gfx_name</b> to table <b>guilds</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>logo_gfx_name</b> to table <b>guilds</b>, already exist?<br/>";} echo "<h3>Add columns to table <b>players</b></h3>"; try { $SQL->query("ALTER TABLE `players` ADD `created` INT( 11 ) NOT NULL DEFAULT '0';"); echo "<font color=\"green\">Added column</font> <b>created</b> to table <b>players</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>created</b> to table <b>players</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `players` ADD `nick_verify` INT( 11 ) NOT NULL DEFAULT '0';"); echo "<font color=\"green\">Added column</font> <b>nick_verify</b> to table <b>players</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>nick_verify</b> to table <b>players</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `players` ADD `old_name` VARCHAR( 255 ) NOT NULL DEFAULT '';"); echo "<font color=\"green\">Added column</font> <b>old_name</b> to table <b>players</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>old_name</b> to table <b>players</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `players` ADD `hide_char` INT( 11 ) NOT NULL DEFAULT '0';"); echo "<font color=\"green\">Added column</font> <b>hide_char</b> to table <b>players</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>hide_char</b> to table <b>players</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `players` ADD `worldtransfer` int(11) NOT NULL DEFAULT '0';"); echo "<font color=\"green\">Added column</font> <b>worldtransfer</b> to table <b>players</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>worldtransfer</b> to table <b>players</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `players` ADD `comment` TEXT NOT NULL;"); echo "<font color=\"green\">Added column</font> <b>comment</b> to table <b>players</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>comment</b> to table <b>players</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `players` ADD `show_outfit` TINYINT( 4 ) NOT NULL DEFAULT '1';"); echo "<font color=\"green\">Added column</font> <b>show_outfit</b> to table <b>players</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>comment</b> to table <b>players</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `players` ADD `show_eq` TINYINT( 4 ) NOT NULL DEFAULT '1';"); echo "<font color=\"green\">Added column</font> <b>show_eq</b> to table <b>players</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>comment</b> to table <b>players</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `players` ADD `show_bars` TINYINT( 4 ) NOT NULL DEFAULT '1';"); echo "<font color=\"green\">Added column</font> <b>show_bars</b> to table <b>players</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>comment</b> to table <b>players</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `players` ADD `show_skills` TINYINT( 4 ) NOT NULL DEFAULT '1';"); echo "<font color=\"green\">Added column</font> <b>show_skills</b> to table <b>players</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>comment</b> to table <b>players</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `players` ADD `show_quests` TINYINT( 4 ) NOT NULL DEFAULT '1';"); echo "<font color=\"green\">Added column</font> <b>show_quests</b> to table <b>players</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>comment</b> to table <b>players</b>, already exist?<br/>";} echo "<h3>Add new tables to database</h3>"; try { $SQL->query("CREATE TABLE `z_news_tickers` ( `date` int(11) NOT NULL default '1', `author` int(11) NOT NULL, `image_id` int(3) NOT NULL default '0', `text` text NOT NULL, `hide_ticker` tinyint(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1;"); echo '<font color=\"green\">Added table <b>z_news_tickers</b></font><br/>'; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>z_news_tickers</b> not added.</font> Already exist?<br/>";} try { $SQL->query('CREATE TABLE `z_spells` ( `name` VARCHAR(255) NOT NULL, `spell` VARCHAR(255) NOT NULL, `spell_type` VARCHAR(255) NOT NULL, `mana` INTEGER NOT NULL DEFAULT 0, `lvl` INTEGER NOT NULL DEFAULT 0, `mlvl` INTEGER NOT NULL DEFAULT 0, `soul` INTEGER NOT NULL DEFAULT 0, `pacc` VARCHAR(255) NOT NULL, `vocations` VARCHAR(255) NOT NULL, `conj_count` INTEGER NOT NULL DEFAULT 0, `hide_spell` INTEGER NOT NULL DEFAULT 0);'); echo '<font color=\"green\">Added table <b>z_spells</b></font><br/>'; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>z_spells</b> not added.</font> Already exist?<br/>";} try { $SQL->query('CREATE TABLE `z_monsters` ( `hide_creature` tinyint(1) NOT NULL default \'0\', `name` varchar(255) NOT NULL, `mana` int(11) NOT NULL, `exp` int(11) NOT NULL, `health` int(11) NOT NULL, `speed_lvl` int(11) NOT NULL default \'1\', `use_haste` tinyint(1) NOT NULL, `voices` text NOT NULL, `immunities` varchar(255) NOT NULL, `summonable` tinyint(1) NOT NULL, `convinceable` tinyint(1) NOT NULL, `race` varchar(255) NOT NULL, `gfx_name` varchar(255) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1;'); echo"<font color=\"green\">Added table <b>z_monsters</b></font><br/>"; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>z_monsters</b> not added.</font> Already exist?<br/>";} try { $SQL->query("CREATE TABLE `z_ots_comunication` ( `id` int(11) NOT NULL auto_increment, `name` varchar(255) NOT NULL, `type` varchar(255) NOT NULL, `action` varchar(255) NOT NULL, `param1` varchar(255) NOT NULL, `param2` varchar(255) NOT NULL, `param3` varchar(255) NOT NULL, `param4` varchar(255) NOT NULL, `param5` varchar(255) NOT NULL, `param6` varchar(255) NOT NULL, `param7` varchar(255) NOT NULL, `delete_it` int(2) NOT NULL default '1', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;"); echo "<font color=\"green\">Added table <b>z_ots_comunication</b> (shopsystem).<br/></font>"; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>z_ots_comunication</b> not added.</font> Already exist?<br/>";} try { $SQL->query("CREATE TABLE `z_shop_offer` ( `id` int(11) NOT NULL auto_increment, `points` int(11) NOT NULL default '0', `itemid1` int(11) NOT NULL default '0', `count1` int(11) NOT NULL default '0', `itemid2` int(11) NOT NULL default '0', `count2` int(11) NOT NULL default '0', `offer_type` varchar(255) default NULL, `offer_description` text NOT NULL, `offer_name` varchar(255) NOT NULL, `pid` INT(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;"); echo "<font color=\"green\">Added table <b>z_shop_offer</b> (shopsystem).<br/></font>"; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>z_shop_offer</b> not added.</font> Already exist?<br/>";} try { $SQL->query("CREATE TABLE `z_shop_history_item` ( `id` int(11) NOT NULL auto_increment, `to_name` varchar(255) NOT NULL default '0', `to_account` int(11) NOT NULL default '0', `from_nick` varchar(255) NOT NULL, `from_account` int(11) NOT NULL default '0', `price` int(11) NOT NULL default '0', `offer_id` int(11) NOT NULL default '0', `trans_state` varchar(255) NOT NULL, `trans_start` int(11) NOT NULL default '0', `trans_real` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;"); echo "<font color=\"green\">Added table <b>z_shop_history_item</b> (shopsystem).<br/></font>"; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>z_shop_history_item</b> not added.</font> Already exist?<br/>";} try { $SQL->query("CREATE TABLE `z_shop_history_pacc` ( `id` int(11) NOT NULL auto_increment, `to_name` varchar(255) NOT NULL default '0', `to_account` int(11) NOT NULL default '0', `from_nick` varchar(255) NOT NULL, `from_account` int(11) NOT NULL default '0', `price` int(11) NOT NULL default '0', `pacc_days` int(11) NOT NULL default '0', `trans_state` varchar(255) NOT NULL, `trans_start` int(11) NOT NULL default '0', `trans_real` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;"); echo "<font color=\"green\">Added table <b>z_shop_history_pacc</b> (shopsystem).<br/></font>"; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>z_shop_history_pacc</b> not added.</font> Already exist?<br/>";} try { $SQL->query("CREATE TABLE `z_polls` ( `id` int(11) NOT NULL auto_increment, `question` varchar(255) NOT NULL, `end` int(11) NOT NULL, `start` int(11) NOT NULL, `answers` int(11) NOT NULL, `votes_all` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;"); echo "<font color=\"green\">Added table <b>z_polls</b> (poll-system).<br/></font>"; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>z_polls</b> not added.</font> Already exist?<br/>";} try { $SQL->query("CREATE TABLE `z_polls_answers` ( `poll_id` int(11) NOT NULL, `answer_id` int(11) NOT NULL, `answer` varchar(255) NOT NULL, `votes` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1;"); echo "<font color=\"green\">Added table <b>z_polls_answers</b> (poll-system).<br/></font>"; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>z_polls_answers</b> not added.</font> Already exist?<br/>";} try { $SQL->query("CREATE TABLE `zaypay_payment` ( `payID` bigint(30) NOT NULL, `account_id` int(20) NOT NULL, `status` varchar(255) NOT NULL, PRIMARY KEY (`payID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;"); echo "<font color=\"green\">Added table <b>zaypay_payment</b>.<br/></font>"; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>zaypay_payment</b> not added.</font> Already exist?<br/>";} try { $SQL->query("CREATE TABLE z_bug_tracker ( `account` varchar(255) NOT NULL, `type` int(11) NOT NULL, `status` int(11) NOT NULL, `text` text NOT NULL, `id` int(11) NOT NULL, `subject` varchar(255) NOT NULL, `priority` int(11) NOT NULL, `reply` int(11) NOT NULL, `who` int(11) NOT NULL, `uid` int(11) NOT NULL AUTO_INCREMENT, `tag` int(11) NOT NULL, PRIMARY KEY (uid) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;"); echo "<font color=\"green\">Added table <b>z_bug_tracker</b> (bug tracker).<br/></font>"; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>z_bug_tracker</b> not added.</font> Already exist?<br/>";} try { $SQL->query("CREATE TABLE `z_changelog` ( `id` int(11) NOT NULL auto_increment, `type` varchar(255) NOT NULL default '', `where` varchar(255) NOT NULL default '', `date` int(11) NOT NULL default '0', `description` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=0;"); echo "<font color=\"green\">Added table <b>z_changelog</b> (changelog).<br/></font>"; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>z_changelog</b> not added.</font> Already exist?<br/>";} try { $SQL->query("CREATE TABLE `z_forum` ( `id` int(11) NOT NULL auto_increment, `sticky` tinyint(1) NOT NULL DEFAULT '0', `closed` tinyint(1) NOT NULL DEFAULT '0', `first_post` int(11) NOT NULL default '0', `last_post` int(11) NOT NULL default '0', `section` int(3) NOT NULL default '0', `icon_id` int(3) NOT NULL default '1', `replies` int(20) NOT NULL default '0', `views` int(20) NOT NULL default '0', `author_aid` int(20) NOT NULL default '0', `author_guid` int(20) NOT NULL default '0', `post_text` text NOT NULL, `post_topic` varchar(255) NOT NULL, `post_smile` tinyint(1) NOT NULL default '0', `post_date` int(20) NOT NULL default '0', `last_edit_aid` int(20) NOT NULL default '0', `edit_date` int(20) NOT NULL default '0', `post_ip` varchar(32) NOT NULL default '0.0.0.0', PRIMARY KEY (`id`), KEY `section` (`section`) ) ENGINE=MyISAM AUTO_INCREMENT=1;"); echo "<font color=\"green\">Added table <b>z_forum</b> (forum).<br/></font>"; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>z_forum</b> not added.</font> Already exist?<br/>";} } $config['site']['install'] = 4; saveconfig_ini($config['site']); echo '<br>Tables and columns added to database.<br>Go to <a href="install.php?page=step&step=4&server_conf=yes">STEP 4 - Add samples</a>'; } if($step == '4') { echo '<h1>STEP '.$step.'</h1>Add samples to DB:<br>'; $check_news_ticker = $SQL->query('SELECT * FROM z_news_tickers WHERE image_id = 1 AND author = 1 AND hide_ticker = 0 LIMIT 1 OFFSET 0')->fetch(); if(!isset($check_news_ticker['author'])) { $SQL->query('INSERT INTO z_news_tickers (date, author, image_id, text, hide_ticker) VALUES ('.time().', 1, 1, "Hello! Gesior account manager 0.3.6 installed. Report bugs Otland.Net Thread. Thanks to widnet and Norix.", 0)'); echo "Added first news ticker.<br/>"; } else { echo "News ticker sample is already in database. New sample is not needed.<br/>"; } $check_voc_0 = $SQL->query('SELECT * FROM players WHERE name = "Rook Sample" LIMIT 1 OFFSET 0')->fetch(); if(!isset($check_voc_0['name'])) { $SQL->query('INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `comment`) VALUES (NULL, "Rook Sample", 0, 1, 1, 1, 0, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, "", 400, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, "", 0, 0, "", 0, "")'); echo "Added 'Rook Sample' character.<br/>"; } else { echo "Character 'Rook Sample' already in database.<br/>"; } $check_voc_1 = $SQL->query('SELECT * FROM players WHERE name = "Sorcerer Sample" LIMIT 1 OFFSET 0')->fetch(); if(!isset($check_voc_1['name'])) { $SQL->query('INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `comment`) VALUES (NULL, "Sorcerer Sample", 0, 1, 1, 1, 1, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, "", 400, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, "", 0, 0, "", 0, "")'); echo "Added 'Sorcerer Sample' character.<br/>"; } else { echo "Character 'Sorcerer Sample' already in database.<br/>"; } $check_voc_2 = $SQL->query('SELECT * FROM players WHERE name = "Druid Sample" LIMIT 1 OFFSET 0')->fetch(); if(!isset($check_voc_2['name'])) { $SQL->query('INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `comment`) VALUES (NULL, "Druid Sample", 0, 1, 1, 1, 2, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, "", 400, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, "", 0, 0, "", 0, "")'); echo "Added 'Druid Sample' character.<br/>"; } else { echo "Character 'Druid Sample' already in database.<br/>"; } $check_voc_3 = $SQL->query('SELECT * FROM players WHERE name = "Paladin Sample" LIMIT 1 OFFSET 0')->fetch(); if(!isset($check_voc_3['name'])) { $SQL->query('INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `comment`) VALUES (NULL, "Paladin Sample", 0, 1, 1, 1, 3, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, "", 400, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, "", 0, 0, "", 0, "")'); echo "Added 'Paladin Sample' character.<br/>"; } else { echo "Character 'Paladin Sample' already in database.<br/>"; } $check_voc_4 = $SQL->query('SELECT * FROM players WHERE name = "Knight Sample" LIMIT 1 OFFSET 0')->fetch(); if(!isset($check_voc_4['name'])) { $SQL->query('INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `comment`) VALUES (NULL, "Knight Sample", 0, 1, 1, 1, 4, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, "", 400, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, "", 0, 0, "", 0, "")'); echo "Added 'Knight Sample' character.<br/>"; echo 'All samples added to database. Now you can go to <a href="install.php?page=step&step=5&server_conf=yes">STEP 5 - Set Admin Account</a>'; } else { echo "Character 'Knight Sample' already in database.<br/>"; $config['site']['install'] = 5; saveconfig_ini($config['site']); echo 'All samples added to database. Now you can go to <a href="install.php?page=step&step=5&server_conf=yes">STEP 5 - Set Admin Account</a><br/>'; } } if($step == '5') { echo '<h1>STEP '.$step.'</h1>Set Admin Account<br>'; $config['server'] = parse_ini_file($config['site']['server_path'].'config.lua'); if(empty($_REQUEST['saveaccpassword'])) { echo 'Admin account number is: <b>1</b><br/>Set new password to this account.<br>'; echo 'New password: <form action="install.php" method=POST><input type="text" name="newpass" size="35">(Don\'t give it password to anyone!)'; echo '<input type="hidden" name="saveaccpassword" value="yes"><input type="hidden" name="page" value="step"><input type="hidden" name="step" value="5"><input type="submit" value="SET"></form><br>If account with number 1 doesn\'t exist installator will create it and set your password.'; } else { $newpass = $_POST['newpass']; if(!check_password($newpass)) echo 'Password contains illegal characters. Please use only a-Z and 0-9. <a href="install.php?page=step&step=5&server_conf=yes">GO BACK</a> and write other password.'; else { $newpass_to_db = password_ency($newpass); $account = new OTS_Account(); $account->load(1); if($account->isLoaded()) { $account->setPassword($newpass_to_db); $account->save(); $account->setCustomField("page_access", 3); } else { $number = $account->create(1,1,1); $account->setPassword($newpass_to_db); $account->unblock(); $account->save(); $account->setCustomField("page_access", 3); } $_SESSION['account'] = 1; $_SESSION['password'] = $newpass; $logged = TRUE; $account->setCustomField("page_lastday", time()); echo '<h1>Admin account number: 1<br>Admin account password: '.$_POST['newpass'].'</h1><br/><h3>It\'s end of first part of installation. Installation is blocked. From now don\'t modify file config.ini!<br>Press links to STEPs 6 and 7 in menu.</h3>'; $config['site']['install'] = 'no'; saveconfig_ini($config['site']); } } } } else echo "Account maker is already installed! To reinstall open file 'config.ini' in directory 'config' and change:<br/><b>install = \"no\"</b><br/>to:</br><b>install = \"start\"</b><br/>and enter this site again."; } ?>
  10. 1° Copie o arquivo .php e renomeiae para vip.php 2° Abre index.php e add isso: case "vip"; $topic = "Vip"; $subtopic = "vip"; include("vip.php"); break; 3° abra htdocs/layouts/tibiacom/layout.php e antes de <a href='?subtopic=shopsystem'> add: <a href='?subtopic=vip'> <div id='submenu_vip' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'> <div class='LeftChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div> <div id='ActiveSubmenuItemIcon_vip' class='ActiveSubmenuItemIcon' style='background-image:url(".$layout_name."/images/menu/icon-activesubmenu.gif);'></div> <div class='SubmenuitemLabel'><div style=\"color: white;\">Vantagéns VIP</div></div> <div class='RightChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div> </div> </a> Abra o vip.php apague tudo que tem dentro e comece a editar. um exemplo: <?header("Content-Type: text/html; charset=ISO-8859-1",true)?> <?PHP $main_content .= ' <center><h1>Vantagéns VIP!</h1></center> </br> </br> </br> </br> <img src="layouts/tibiacom/images/content/bullet.gif"> Seja Vip e ganhe 50% a mais de XP. '; ?> Espero ter ajudado!
  11. Você usa linux? seu site em hospedado em hoster diferente do que está seu servidor?
  12. Eu recomendo este site, siga o link: http://www.xtibia.com/forum/topic/139201-gesior-acc-maker-037/
  13. Rapz eu sei esse bug eu ajustei no meu servidor mais não lembro mais como fiz ;C Pega meu Shop System é full: Shopsystem.lua Shopadmin.lua
  14. Não inicia ;X Tente ver se existe algo que você alterou que esteja bloqueando a porta 80.
  15. Normalmente pra aparecer a tela é só abri o .exe que você compilou, lembrando que deve contar na mesma pasta que ele se localizar os seguintes arquivos, pasta data, as dlls que ele necesita, pasta mods, e config.lua. Tendo tudo isso é funcionará corretamente.
  16. Os Samples só você deletando-os, mais isso é besteira quando abri seu servidor ligeiro eles desaparecem. E o God /ghost ele não aprece mais ;p
  17. So usar esse aqui caso o seu sistema vip for o do Mock: <?PHP // ALTER TABLE `z_shop_history_item` CHANGE `offer_id` `offer_id` VARCHAR( 255 ) NOT NULL; // UPDATE `z_shop_history_item`, `z_shop_offer` SET `z_shop_history_item`.`offer_id` = `z_shop_offer`.`offer_name` WHERE `z_shop_history_item`.`offer_id` = `z_shop_offer`.`id`; if($config['site']['shop_system'] == 1) { if($logged) $user_premium_points = $account_logged->getCustomField('premium_points'); else $user_premium_points = 'Login first'; function getItemByID($id) { $id = (int) $id; $SQL = $GLOBALS['SQL']; $data = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_offer').' WHERE '.$SQL->fieldName('id').' = '.$SQL->quote($id).';')->fetch(); if ($data['offer_type'] == 'pacc') { $offer['id'] = $data['id']; $offer['type'] = $data['offer_type']; $offer['days'] = $data['count1']; $offer['points'] = $data['points']; $offer['description'] = $data['offer_description']; $offer['name'] = $data['offer_name']; } elseif ($data['offer_type'] == 'item') { $offer['id'] = $data['id']; $offer['type'] = $data['offer_type']; $offer['item_id'] = $data['itemid1']; $offer['item_count'] = $data['count1']; $offer['points'] = $data['points']; $offer['description'] = $data['offer_description']; $offer['name'] = $data['offer_name']; } elseif ($data['offer_type'] == 'container') { $offer['id'] = $data['id']; $offer['type'] = $data['offer_type']; $offer['container_id'] = $data['itemid2']; $offer['container_count'] = $data['count2']; $offer['item_id'] = $data['itemid1']; $offer['item_count'] = $data['count1']; $offer['points'] = $data['points']; $offer['description'] = $data['offer_description']; $offer['name'] = $data['offer_name']; } elseif ($data['offer_type'] == 'unban') { $offer['id'] = $data['id']; $offer['type'] = $data['offer_type']; $offer['points'] = $data['points']; $offer['description'] = $data['offer_description']; $offer['name'] = $data['offer_name']; } elseif ($data['offer_type'] == 'redskull') { $offer['id'] = $data['id']; $offer['type'] = $data['offer_type']; $offer['points'] = $data['points']; $offer['description'] = $data['offer_description']; $offer['name'] = $data['offer_name']; } elseif ($data['offer_type'] == 'itemlogout') { $offer['id'] = $data['id']; $offer['type'] = $data['offer_type']; $offer['points'] = $data['points']; $offer['description'] = $data['offer_description']; $offer['pid'] = $data['pid']; $offer['count1'] = $data['count1']; $offer['item_id'] = $data['itemid1']; $offer['free_cap'] = $data['free_cap']; } elseif ($data['offer_type'] == 'changename') { $offer['id'] = $data['id']; $offer['type'] = $data['offer_type']; $offer['points'] = $data['points']; $offer['description'] = $data['offer_description']; $offer['name'] = $data['offer_name']; } return $offer; } function getOfferArray() { $offer_list = $GLOBALS['SQL']->query('SELECT * FROM '.$GLOBALS['SQL']->tableName('z_shop_offer').';'); $i_pacc = 0; $i_item = 0; $i_container = 0; $i_unban = 0; $i_redskull = 0; $i_itemlogout = 0; $i_changename = 0; while($data = $offer_list->fetch()) { if ($data['offer_type'] == 'pacc') { $offer_array['pacc'][$i_pacc]['id'] = $data['id']; $offer_array['pacc'][$i_pacc]['days'] = $data['count1']; $offer_array['pacc'][$i_pacc]['points'] = $data['points']; $offer_array['pacc'][$i_pacc]['description'] = $data['offer_description']; $offer_array['pacc'][$i_pacc]['name'] = $data['offer_name']; $i_pacc++; } elseif ($data['offer_type'] == 'item') { $offer_array['item'][$i_item]['id'] = $data['id']; $offer_array['item'][$i_item]['item_id'] = $data['itemid1']; $offer_array['item'][$i_item]['item_count'] = $data['count1']; $offer_array['item'][$i_item]['points'] = $data['points']; $offer_array['item'][$i_item]['description'] = $data['offer_description']; $offer_array['item'][$i_item]['name'] = $data['offer_name']; $i_item++; } elseif ($data['offer_type'] == 'container') { $offer_array['container'][$i_container]['id'] = $data['id']; $offer_array['container'][$i_container]['container_id'] = $data['itemid2']; $offer_array['container'][$i_container]['container_count'] = $data['count2']; $offer_array['container'][$i_container]['item_id'] = $data['itemid1']; $offer_array['container'][$i_container]['item_count'] = $data['count1']; $offer_array['container'][$i_container]['points'] = $data['points']; $offer_array['container'][$i_container]['description'] = $data['offer_description']; $offer_array['container'][$i_container]['name'] = $data['offer_name']; $i_container++; } elseif ($data['offer_type'] == 'unban') { $offer_array['unban'][$i_unban]['id'] = $data['id']; $offer_array['unban'][$i_unban]['points'] = $data['points']; $offer_array['unban'][$i_unban]['description'] = $data['offer_description']; $offer_array['unban'][$i_unban]['name'] = $data['offer_name']; $i_unban++; } elseif ($data['offer_type'] == 'redskull') { $offer_array['redskull'][$i_redskull]['id'] = $data['id']; $offer_array['redskull'][$i_redskull]['points'] = $data['points']; $offer_array['redskull'][$i_redskull]['description'] = $data['offer_description']; $offer_array['redskull'][$i_redskull]['name'] = $data['offer_name']; $i_redskull++; } elseif ($data['offer_type'] == 'itemlogout') { $offer_array['itemlogout'][$i_itemlogout]['id'] = $data['id']; $offer_array['itemlogout'][$i_itemlogout]['points'] = $data['points']; $offer_array['itemlogout'][$i_itemlogout]['description'] = $data['offer_description']; $offer_array['itemlogout'][$i_itemlogout]['name'] = $data['offer_name']; $offer_array['itemlogout'][$i_itemlogout]['count1'] = $data['count1']; $offer_array['itemlogout'][$i_itemlogout]['pid'] = $data['pid']; $offer_array['itemlogout'][$i_itemlogout]['item_id'] = $data['itemid1']; $offer_array['itemlogout'][$i_itemlogout]['free_cap'] = $data['free_cap']; $i_itemlogout++; } elseif ($data['offer_type'] == 'changename') { $offer_array['changename'][$i_changename]['id'] = $data['id']; $offer_array['changename'][$i_changename]['points'] = $data['points']; $offer_array['changename'][$i_changename]['description'] = $data['offer_description']; $offer_array['changename'][$i_changename]['name'] = $data['offer_name']; $i_changename++; } } return $offer_array; } if($action == '') { unset($_SESSION['viewed_confirmation_page']); $main_content .= '<h2><center>Welcome to '.$config['server']['serverName'].' Shop.</center></h2>'; $offer_list = getOfferArray(); //show list of items offers if(count($offer_list['item']) > 0 or count($offer_list['container']) > 0 or count($offer_list['itemlogout']) > 0) $main_content .= '<center><table border="0" cellpadding="1" cellspacing="1" width="650"><tr width="650" bgcolor="#505050"><td colspan="3"><font color="white" size="4"><b> ITEMS</b></font></td></tr><tr bgcolor="#D4C0A1"><td width="50" align="center"><b>Picture</b></td><td width="350" align="left"><b>Description</b></td><td width="250" align="center"><b>Select product</b></td></tr>'; if(count($offer_list['item']) > 0) { foreach($offer_list['item'] as $item) { $main_content .= '<tr bgcolor="#F1E0C6"><td align="center"><img src="item_images/'.$item['id'].'.jpg"></td><td><b>'.$item['name'].'</b> ('.$item['points'].' points)<br />'.$item['description'].'</td><td align="center">'; if(!$logged) $main_content .= '<b>Login to buy</b>'; else $main_content .= '<form action="index.php?subtopic=shopsystem&action=select_player" method=POST><input type="hidden" name="buy_id" value="'.$item['id'].'"><input type="submit" value="Buy '.$item['name'].'"><br><b>for '.$item['points'].' points</b></form>'; $main_content .= '</td></tr>'; } $main_content .= '</table><br />'; } //show list of containers offers if(count($offer_list['container']) > 0) { $main_content .= '<table border="0" cellpadding="1" cellspacing="1" width="650"><tr width="650" bgcolor="#505050"><td colspan="3"><font color="white" size="4"><b> CONTAINERS WITH ITEMS</b></font></td></tr><tr bgcolor="#D4C0A1"><td width="50" align="center"><b>Picture</b></td><td width="350" align="left"><b>Description</b></td><td width="250" align="center"><b>Select product</b></td></tr>'; foreach($offer_list['container'] as $container) { $main_content .= '<tr bgcolor="#F1E0C6"><td align="center"><img src="item_images/'.$container['id'].'.jpg"></td><td><b>'.$container['name'].'</b> ('.$container['points'].' points)<br />'.$container['description'].'</td><td align="center">'; if(!$logged) $main_content .= '<b>Login to buy</b>'; else $main_content .= '<form action="?subtopic=shopsystem&action=select_player" method=POST><input type="hidden" name="buy_id" value="'.$container['id'].'"><input type="submit" value="Buy '.$container['name'].'"><br><b>for '.$container['points'].' points</b></form>'; $main_content .= '</td></tr>'; } $main_content .= '</table><br />'; } if(count($offer_list['itemlogout']) > 0) { $main_content .= '<table border="0" cellpadding="1" cellspacing="1" width="650"><tr width="650" bgcolor="#505050"><td colspan="3"><font color="white" size="4"><b> Receive Item on Logout</b></font></td></tr><tr bgcolor="#D4C0A1"><td width="50" align="center"><b>Picture</b></font></td><td width="350" align="left"><b>Description</b></font></td><td width="250" align="center"><b>Select product</b></font></td></tr>'; foreach($offer_list['itemlogout'] as $itemlogout) { $main_content .= '<tr bgcolor="#F1E0C6"><td align="center"><img src="item_images/'.$itemlogout['id'].'.jpg"></td><td><b>'.$itemlogout['name'].'</b> ('.$itemlogout['points'].' points)<br />'.$itemlogout['description'].'</td><td align="center">'; if(!$logged) $main_content .= '<b>Login to buy</b>'; else $main_content .= '<form action="index.php?subtopic=shopsystem&action=select_player" method=POST><input type="hidden" name="buy_id" value="'.$itemlogout['id'].'"><input type="submit" value="Buy '.$itemlogout['name'].'"><br><b>for '.$itemlogout['points'].' points</b></form>'; $main_content .= '</td></tr>'; } $main_content .= '</table><br />'; } if(count($offer_list['changename']) > 0 or count($offer_list['pacc']) > 0 or count($offer_list['redskull']) > 0 or count($offer_list['unban']) > 0 ) $main_content .= '<center><table border="0" cellpadding="1" cellspacing="1" width="650"><tr width="650" bgcolor="#505050"><td colspan="3"><font color="white" size="4"><b> Others</b></font></td></tr><tr bgcolor="#D4C0A1"><td width="50" align="center"><b>#</b></td><td width="350" align="left"><b>Description</b></td><td width="250" align="center"><b>Select product</b></td></tr>'; //Pacc if(count($offer_list['pacc']) > 0) foreach($offer_list['pacc'] as $pacc) { $main_content .= '<tr bgcolor="#F1E0C6"><td align="center">'.$pacc['days'].'</td><td><b>'.$pacc['name'].'</b> ('.$pacc['points'].' points)<br />'.$pacc['description'].'</td><td align="center">'; if(!$logged) $main_content .= '<b>Login to buy</b>'; else $main_content .= '<form action="index.php?subtopic=shopsystem&action=select_player" method=POST><input type="hidden" name="buy_id" value="'.$pacc['id'].'"><input type="submit" value="Buy '.$pacc['name'].'"><br><b>for '.$pacc['points'].' points</b></form>'; } //Change Name if(count($offer_list['changename']) > 0) foreach($offer_list['changename'] as $changename) { $main_content .= '<tr bgcolor="#F1E0C6"><td align="center">Change Name</td><td><b>'.$changename['name'].'</b> ('.$changename['points'].' points)<br />'.$changename['description'].'</td><td align="center">'; if(!$logged) $main_content .= '<b>Login to buy</b>'; else $main_content .= '<form action="index.php?subtopic=shopsystem&action=select_player" method=POST><input type="hidden" name="buy_id" value="'.$changename['id'].'"><input type="submit" value="Buy '.$changename['name'].'"><br><b>for '.$changename['points'].' points</b></form>'; } //Remove Red Skull if(count($offer_list['redskull']) > 0) foreach($offer_list['redskull'] as $redskull) { $main_content .= '<tr bgcolor="#F1E0C6"><td align="center"><img src="item_images/'.$redskull['id'].'.jpg"></td><td><b>'.$redskull['name'].'</b> ('.$redskull['points'].' points)<br />'.$redskull['description'].'</td><td align="center">'; if(!$logged) $main_content .= '<b>Login to buy</b>'; else $main_content .= '<form action="index.php?subtopic=shopsystem&action=select_player" method=POST><input type="hidden" name="buy_id" value="'.$redskull['id'].'"><input type="submit" value="Buy '.$redskull['name'].'"><br><b>for '.$redskull['points'].' points</b></form>'; $main_content .= '</td></tr>'; } //Unban if(count($offer_list['unban']) > 0) foreach($offer_list['unban'] as $unban){ $main_content .= '<tr bgcolor="#F1E0C6"><td align="center">Unban</td><td><b>'.$unban['name'].'</b> ('.$unban['points'].' points)<br />'.$unban['description'].'</td><td align="center">'; if(!$logged) $main_content .= '<b>Login to buy</b>'; else $main_content .= '<form action="index.php?subtopic=shopsystem&action=select_player" method=POST><input type="hidden" name="buy_id" value="'.$unban['id'].'"><input type="submit" value="Buy '.$unban['name'].'"><br><b>for '.$unban['points'].' points</b></form>'; $main_content .= '</td></tr>'; } $main_content .= '</table>'; } elseif($action == 'select_player') { unset($_SESSION['viewed_confirmation_page']); if(!$logged) { $main_content .= 'Please login first.'; } else { $buy_id = (int) $_REQUEST['buy_id']; if(empty($buy_id)) { $main_content .= 'Please <a href="index.php?subtopic=shopsystem">select item</a> first.'; } else { $buy_offer = getItemByID($buy_id); if(isset($buy_offer['id'])) { //item exist in database if($buy_offer['type'] != 'changename') { if($user_premium_points >= $buy_offer['points']) { $main_content .= '<center><h2>Select player</h2><table border="0" cellpadding="1" cellspacing="1" width="650"> <tr bgcolor="#505050"><td colspan="2"><font color="white" size="4"><b>Selected offer</b></font></td></tr> <tr bgcolor="#F1E0C6"><td width="100"><b>Name:</b></td><td width="550">'.$buy_offer['name'].'</td></tr> <tr bgcolor="#D4C0A1"><td width="100"><b>Description:</b></td><td width="550">'.$buy_offer['description'].'</td></tr> </table><br /><form action="index.php?subtopic=shopsystem&action=confirm_transaction" method=POST><input type="hidden" name="buy_id" value="'.$buy_id.'"> <table border="0" cellpadding="1" cellspacing="1" width="650"> <tr bgcolor="#505050"><td colspan="2"><font color="white" size="4"><b>Give item to a player from your account</b></font></td></tr> <tr bgcolor="#F1E0C6"><td width="110"><b>Name:</b></td><td width="550"><select name="buy_name">'; $players_from_logged_acc = $account_logged->getPlayersList(); if(count($players_from_logged_acc) > 0) { $players_from_logged_acc->orderBy('name'); foreach($players_from_logged_acc as $player) $main_content .= '<option>'.$player->getName().'</option>'; } else { $main_content .= 'You don\'t have any character on your account.'; } $main_content .= '</select> <input type="submit" value="Give"></td></tr></table> </form><br /><form action="index.php?subtopic=shopsystem&action=confirm_transaction" method=POST><input type="hidden" name="buy_id" value="'.$buy_id.'"> <table border="0" cellpadding="1" cellspacing="1" width="650"> <tr bgcolor="#505050"><td colspan="2"><font color="white" size="4"><b>Give item to other player</b></font></td></tr> <tr bgcolor="#D4C0A1"><td width="110"><b>To player:</b></td><td width="550"><input type="text" name="buy_name"> - name of the player who should get item</td></tr> <tr bgcolor="#F1E0C6"><td width="110"><b>From:</b></td><td width="550"><input type="text" name="buy_from"> <input type="submit" value="Give"> - your nick, \'empty\' = Anonymous</td></tr> </table><br /></form>'; } else { $main_content .= 'For this item you need <b>'.$buy_offer['points'].'</b> points.<br>You have only <b>'.$user_premium_points.'</b> premium points. Please <a href="index.php?subtopic=shopsystem">select other item</a> or buy premium points.'; } } else { $main_content .= '<center><h2>Change Name</h2><form action="index.php?subtopic=shopsystem&action=confirm_transaction" method=POST><input type="hidden" name="buy_id" value="'.$buy_id.'"> <table border="0" cellpadding="1" cellspacing="1" width="650"><tr bgcolor="#505050"><td colspan="2"><font color="white" size="4"><b>Change Name:</b></font></td></tr> <tr bgcolor="#D4C0A1"><td width="110"><b>Name:</b></td><td width="550"><select name="buy_name">'; $players_from_logged_acc = $account_logged->getPlayersList(); if(count($players_from_logged_acc) > 0) { $players_from_logged_acc->orderBy('name'); foreach($players_from_logged_acc as $player) { $main_content .= '<option>'.$player->getName().'</option>'; } } else { $main_content .= 'You don\'t have any character on your account.'; } $main_content .= '</select></td></tr><tr bgcolor="#F1E0C6"><td width="110"><b>New name:</b></td><td width="550"><input type="text" name="buy_from"> <input type="submit" value="Change Name"></td></tr></table><br /></form>'; } } else { $main_content .= 'Offer with ID <b>'.$buy_id.'</b> doesn\'t exist. Please <a href="index.php?subtopic=shopsystem">select item</a> again.'; } } } } elseif($action == 'confirm_transaction') { if(!$logged) { $main_content .= 'Please login first.'; } else { $buy_id = (int) $_POST['buy_id']; $buy_name = stripslashes(urldecode($_POST['buy_name'])); $buy_from = stripslashes(urldecode($_POST['buy_from'])); if(empty($buy_id)) { $main_content .= 'Please <a href="index.php?subtopic=shopsystem">select item</a> first.'; } else { if($buy_offer['type'] == 'changename'){ if(!check_name_new_char($buy_from)) { $main_content .= 'Invalid name format of new name.'; } } else { $buy_offer = getItemByID($buy_id); $check_name_in_database = $ots->createObject('Player'); $check_name_in_database->find($buy_from); if($buy_offer['type'] == 'changename'){ if(!$check_name_in_database->isLoaded()) { } } if(isset($buy_offer['id'])) { //item exist in database if($user_premium_points >= $buy_offer['points']) { if(check_name($buy_name)) { $buy_player = new OTS_Player(); $buy_player->find($buy_name); if($buy_player->isLoaded()) { $buy_player_account = $buy_player->getAccount(); if($_SESSION['viewed_confirmation_page'] == 'yes' && $_POST['buy_confirmed'] == 'yes') { if($buy_offer['type'] == 'pacc') { $player_vip_time = $buy_player_account->getCustomField('vip_time'); $player_lastlogin = $buy_player_account->getCustomField('lastday'); $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_pacc').' (id, to_name, to_account, from_nick, from_account, price, pacc_days, trans_state, trans_start, trans_real) VALUES (NULL, '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['days']).', \'realized\', '.$SQL->quote(time()).', '.$SQL->quote(time()).');'; $SQL->query($save_transaction); if($player_vip_time > 0) $buy_player_account->setCustomField('vip_time', $player_vip_time + $buy_offer['days'] * 86400); else $buy_player_account->setCustomField('vip_time', time() + $buy_offer['days'] * 86400); $buy_player_account->setCustomField('premium_points', $user_premium_points-$buy_offer['points']); $user_premium_points = $user_premium_points - $buy_offer['points']; if ($player_vip_days >= 1) { } $main_content .= '<center><h2>VIP Days added!</h2><b>'.$buy_offer['days'].' days</b> of VIP days added to the account of player <b>'.$buy_player->getName().'</b> for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br><br><a href="index.php?subtopic=shopsystem">Go to Shop Site</a><br>'; } elseif($buy_offer['type'] == 'unban') { $my_acc_id = $account_logged->getCustomField('id'); $datadata = $SQL->query('SELECT * FROM '.$SQL->tableName('bans').' WHERE value = '.$my_acc_id.';')->fetch(); if($datadata['value'] == $my_acc_id) { if($SQL->query('DELETE FROM bans WHERE value= '.$my_acc_id.' LIMIT 1;')) { } else { $SQL->query('DELETE FROM bans WHERE account= '.$my_acc_id.' LIMIT 1;'); } $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']); $user_premium_points = $user_premium_points - $buy_offer['points']; $main_content .= '<center><h2>Ban Deleted!</h2><b>Your account has been unbanned for '.$buy_offer['points'].' premium points</b> from your account. <br>Now you have <b>'.$user_premium_points.' premium points</b>.<br><br><a href="index.php?subtopic=shopsystem">Go to Shop Site</a><br>'; } else { $main_content .= '<center><b>You don\'t have any bans in your account!</b><br><br><a href="index.php?subtopic=shopsystem">Go back</a><br>'; } } //////////////////////////////// elseif($buy_offer['type'] == 'itemlogout') { $my_acc_id = $buy_player->getCustomField('id'); $playerinfo = $SQL->query('SELECT * FROM '.$SQL->tableName('players').' WHERE id = '.$my_acc_id.';')->fetch(); $playerslot = $SQL->query('SELECT * FROM '.$SQL->tableName('player_items').' WHERE player_id = '.$my_acc_id.';')->fetch(); if($playerinfo['online'] == '0') { if ($playerslot['pid'] != '10') { if ($datadata['cap'] >= $SQL->quote($buy_offer['free_cap'])) { $SQL->query('INSERT INTO player_items (player_id, pid, itemtype, count) VALUES ('.$my_acc_id.', '.$SQL->quote($buy_offer['pid']).', '.$SQL->quote($buy_offer['item_id']).', '.$SQL->quote($buy_offer['count1']).');'); $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']); $user_premium_points = $user_premium_points - $buy_offer['points']; $main_content .= '<h2>Item received to player: '.$buy_player->getName().'!</h2><br>Now you have <b>'.$user_premium_points.' premium points</b>. <br><a href="index.php?subtopic=shopsystem">Go to Shop Site</a>'; } else { $main_content .= '<b>You need '.$SQL->quote($buy_offer['free_cap']).' or more of cap!</b><br><a href="index.php?subtopic=shopsystem">Go back</a>'; } } else { $main_content .= '<b>Please leave the arrow slot in blank to receive item!</b><br><a href="index.php?subtopic=shopsystem">Go back</a>'; } } else { $main_content .= '<b>You need to be offline!</b><br><a href="index.php?subtopic=shopsystem">Go back</a>'; } } //////////////////////////////// elseif($buy_offer['type'] == 'changename') { $my_acc_id = $buy_player->getCustomField('id'); $playerinfo = $SQL->query('SELECT * FROM '.$SQL->tableName('players').' WHERE '.$SQL->fieldName('id').' = '.$my_acc_id.';')->fetch(); $checkname = $SQL->query('SELECT * FROM '.$SQL->tableName('players').' WHERE '.$SQL->fieldName('name').' = '. $SQL->quote($buy_from) .';')->fetch(); if($playerinfo['online'] == '0') { if($checkname == false) { $SQL->query('UPDATE `players` SET `name` = '. $SQL->quote($buy_from) .' WHERE `id` = '. $my_acc_id.' ;'); $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']); $user_premium_points = $user_premium_points - $buy_offer['points']; $main_content .= '<center><h2>Your name has been changed to '.$buy_from.'.</h2><br><b>You have '.$user_premium_points.' premium points left</b>. <br><br><a href="index.php?subtopic=shopsystem">Go to Shop Site</a><br>'; } else { $main_content .= '<center><h2>Sorry, the name "<i>'.$buy_from.'</i>" does already exist.<br>Please select another name.</h2><br>'; } } else { $main_content .= '<center><h2>'.$buy_name.' has to be offline to complete transaction.</h2><br><br><a href="index.php?subtopic=shopsystem">Go back</a><br>'; } } //////////////////////////////// elseif($buy_offer['type'] == 'redskull') { $my_acc_id = $buy_player->getCustomField('id'); $playerinfo = $SQL->query('SELECT * FROM '.$SQL->tableName('players').' WHERE '.$SQL->fieldName('id').' = '.$my_acc_id.';')->fetch(); if($playerinfo['skull'] == '4' AND $playerinfo['online'] >= '0' AND $playerinfo['skulltime'] > '0') { $SQL->query('UPDATE killers SET unjustified=0 WHERE id IN (SELECT kill_id FROM player_killers WHERE player_id='. $my_acc_id .');'); $SQL->query('UPDATE players SET skulltime=0, skull=0 WHERE id='. $my_acc_id .';'); $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']); $user_premium_points = $user_premium_points - $buy_offer['points']; $main_content .= '<center><h2>RedSkull Removed!</h2><br><b>Your redskull has been removed from the player '.$buy_player->getName().'.</b> <br>Now you have<b> '.$user_premium_points.' premium points</b>.<br><br><a href="index.php?subtopic=shopsystem">Go to Shop Site</a><br>'; } else { $main_content .= '<center><b>'.$buy_player->getName().' has to be offline or have redskull to complete transaction!.</b><br><br><a href="index.php?subtopic=shopsystem">Go back</a><br>'; } } ////////////////////////// elseif($buy_offer['type'] == 'item') { $sql = 'INSERT INTO '.$SQL->tableName('z_ots_comunication').' (id, name, type, action, param1, param2, param3, param4, param5, param6, param7, delete_it) VALUES (NULL, '.$SQL->quote($buy_player->getName()).', \'login\', \'give_item\', '.$SQL->quote($buy_offer['item_id']).', '.$SQL->quote($buy_offer['item_count']).', \'\', \'\', \'item\', '.$SQL->quote($buy_offer['name']).', \'\', \'1\');'; $SQL->query($sql); $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_item').' (id, to_name, to_account, from_nick, from_account, price, offer_id, trans_state, trans_start, trans_real) VALUES ('.$SQL->lastInsertId().', '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['name']).', \'wait\', '.$SQL->quote(time()).', \'0\');'; $SQL->query($save_transaction); $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']); $user_premium_points = $user_premium_points - $buy_offer['points']; $main_content .= '<center><h2>Item added!</h2><b>'.$buy_offer['name'].'</b> added to player <b>'.$buy_player->getName().'</b> for <b>'.$buy_offer['points'].' premium points</b> from your account.<br>Now you have <b>'.$user_premium_points.' premium points</b>.<br><br><a href="index.php?subtopic=shopsystem">GO TO MAIN SHOP SITE</a><br>'; } elseif($buy_offer['type'] == 'container') { $sql = 'INSERT INTO '.$SQL->tableName('z_ots_comunication').' (id, name, type, action, param1, param2, param3, param4, param5, param6, param7, delete_it) VALUES (NULL, '.$SQL->quote($buy_player->getName()).', \'login\', \'give_item\', '.$SQL->quote($buy_offer['item_id']).', '.$SQL->quote($buy_offer['item_count']).', '.$SQL->quote($buy_offer['container_id']).', '.$SQL->quote($buy_offer['container_count']).', \'container\', '.$SQL->quote($buy_offer['name']).', \'\', \'1\');'; $SQL->query($sql); $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_item').' (id, to_name, to_account, from_nick, from_account, price, offer_id, trans_state, trans_start, trans_real) VALUES ('.$SQL->lastInsertId().', '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['name']).', \'wait\', '.$SQL->quote(time()).', \'0\');'; $SQL->query($save_transaction); $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']); $user_premium_points = $user_premium_points - $buy_offer['points']; $main_content .= '<center><h2>Container of items added!</h2><b>'.$buy_offer['name'].'</b> added to player <b>'.$buy_player->getName().'</b> for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br><br><a href="index.php?subtopic=shopsystem">GO TO MAIN SHOP SITE</a><br>'; } } else { if($buy_offer['type'] != 'changename') { $set_session = TRUE; $_SESSION['viewed_confirmation_page'] = 'yes'; $main_content .= '<center><h2>Confirm transaction</h2> <table border="0" cellpadding="1" cellspacing="1" width="700"> <tr bgcolor="#505050"><td colspan="3"><font color="white" size="4"><b>Confirm transaction</b></font></td></tr> <tr bgcolor="#D4C0A1"><td width="100"><b>Name:</b></td><td width="550" colspan="2">'.$buy_offer['name'].'</td></tr> <tr bgcolor="#F1E0C6"><td width="100"><b>Description:</b></td><td width="550" colspan="2">'.$buy_offer['description'].'</td></tr> <tr bgcolor="#D4C0A1"><td width="100"><b>Cost:</b></td><td width="550" colspan="2"><b>'.$buy_offer['points'].' premium points</b> from your account</td></tr> <tr bgcolor="#F1E0C6"><td width="100"><b>For Player:</b></td><td width="550" colspan="2"><font color="red">'.$buy_player->getName().'</font></td></tr> <tr bgcolor="#D4C0A1"><td width="100"><b>From:</b></td><td width="550" colspan="2"><font color="red">'.$buy_from.'</font></td></tr> <tr bgcolor="#F1E0C6"><td width="100"><b>Transaction?</b></td><td width="275" align="left"> <form action="index.php?subtopic=shopsystem&action=confirm_transaction" method="POST"><input type="hidden" name="buy_confirmed" value="yes"><input type="hidden" name="buy_id" value="'.$buy_id.'"><input type="hidden" name="buy_from" value="'.urlencode($new_name).'"><input type="hidden" name="buy_name" value="'.urlencode($buy_name).'"><input type="submit" value="Accept"></form></td> <td align="right"><form action="index.php?subtopic=shopsystem" method="POST"><input type="submit" value="Cancel"></form></td></tr> </table>'; } else { $set_session = TRUE; $_SESSION['viewed_confirmation_page'] = 'yes'; $main_content .= '<center><h2>Confirm Name Changing</h2> <table border="0" cellpadding="1" cellspacing="1" width="700"> <tr bgcolor="#505050"><td colspan="3"><font color="white" size="4"><b>Confirm transaction</b></font></td></tr> <tr bgcolor="#D4C0A1"><td width="130"><b>Name:</b></td><td width="550" colspan="2">'.$buy_offer['name'].'</td></tr> <tr bgcolor="#F1E0C6"><td width="130"><b>Description:</b></td><td width="550" colspan="2">'.$buy_offer['description'].'</td></tr> <tr bgcolor="#D4C0A1"><td width="130"><b>Cost:</b></td><td width="550" colspan="2"><b>'.$buy_offer['points'].' premium points</b> from your account</td></tr> <tr bgcolor="#F1E0C6"><td width="130"><b>Current Name:</b></td><td width="550" colspan="2"><font color="red">'.$buy_player->getName().'</font></td></tr> <tr bgcolor="#D4C0A1"><td width="130"><b>New Name:</b></td><td width="550" colspan="2"><font color="red">'.$buy_from.'</font></td></tr> <tr bgcolor="#F1E0C6"><td width="130"><b>Change Name?</b></td><td width="275" align="left"> <form action="index.php?subtopic=shopsystem&action=confirm_transaction" method="POST"><input type="hidden" name="buy_confirmed" value="yes"><input type="hidden" name="buy_id" value="'.$buy_id.'"><input type="hidden" name="buy_from" value="'.urlencode($buy_from).'"><input type="hidden" name="buy_name" value="'.urlencode($buy_name).'"><input type="submit" value="Accept"></form></td> <td align="right"><form action="index.php?subtopic=shopsystem" method="POST"><input type="submit" value="Cancel"></form></td></tr> </table>'; } } } else { $main_content .= 'Player with name <b>'.$buy_name.'</b> doesn\'t exist. Please <a href="index.php?subtopic=shopsystem&action=select_player&buy_id='.$buy_id.'">select other name</a>.'; } } else { $main_content .= 'Invalid name format. Please <a href="index.php?subtopic=shopsystem&action=select_player&buy_id='.$buy_id.'">select other name</a> or contact with administrator.'; } } else { $main_content .= 'For this item you need <b>'.$buy_offer['points'].'</b> points. You have only <b>'.$user_premium_points.'</b> premium points. Please <a href="index.php?subtopic=shopsystem">select other item</a> or buy premium points.'; } } else { $main_content .= 'Offer with ID <b>'.$buy_id.'</b> doesn\'t exist. Please <a href="index.php?subtopic=shopsystem">select item</a> again.'; } } } } if(!$set_session) { unset($_SESSION['viewed_confirmation_page']); } } elseif($action == 'show_history') { if(!$logged) { $main_content .= 'Please login first.'; } else{ $items_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_history_item').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';'); if(is_object($items_history_received)) { foreach($items_history_received as $item_received) { if($account_logged->getId() == $item_received['to_account']) $char_color = 'green'; else $char_color = 'red'; $items_received_text .= '<tr bgcolor="#F1E0C6"><td><font color="'.$char_color.'">'.$item_received['to_name'].'</font></td><td>'; if($account_logged->getId() == $item_received['from_account']) $items_received_text .= '<i>Your account</i>'; else $items_received_text .= $item_received['from_nick']; $items_received_text .= '</td><td>'.$item_received['offer_id'].'</td><td>'.date("j F Y, H:i:s", $item_received['trans_start']).'</td>'; if($item_received['trans_real'] > 0) $items_received_text .= '<td>'.date("j F Y, H:i:s", $item_received['trans_real']).'</td>'; else $items_received_text .= '<td><b><font color="red">Not realized yet.</font></b></td>'; $items_received_text .= '</tr>'; } } $paccs_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_history_pacc').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';'); if(is_object($paccs_history_received)) { foreach($paccs_history_received as $pacc_received) { if($account_logged->getId() == $pacc_received['to_account']) $char_color = 'green'; else $char_color = 'red'; $paccs_received_text .= '<tr bgcolor="#F1E0C6"><td><font color="'.$char_color.'">'.$pacc_received['to_name'].'</font></td><td>'; if($account_logged->getId() == $pacc_received['from_account']) $paccs_received_text .= '<i>Your account</i>'; else $paccs_received_text .= $pacc_received['from_nick']; $paccs_received_text .= '</td><td>'.$pacc_received['pacc_days'].' days</td><td>'.$pacc_received['price'].' Points</td><td>'.date("j F Y, H:i:s", $pacc_received['trans_real']).'</td></tr>'; } } $main_content .= '<center><h1>Transactions History</h1></center>'; if(!empty($items_received_text)) $main_content .= '<center><table BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=95%><tr width="100%" bgcolor="#505050"><td colspan="5"><font color="white" size="4"><b> Item Transactions</b></font></td></tr><tr bgcolor="#D4C0A1"><td><b>To:</b></td><td><b>From:</b></td><td><b>Offer name</b></td><td><b>Bought on page</b></td><td><b>Received on '.$config['server']['serverName'].'</b></td></tr>'.$items_received_text.'</table><br />'; if(!empty($paccs_received_text)) $main_content .= '<center><table BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=95%><tr width="100%" bgcolor="#505050"><td colspan="5"><font color="white" size="4"><b> Pacc Transactions</b></font></td></tr><tr bgcolor="#D4C0A1"><td><b>To:</b></td><td><b>From:</b></td><td><b>Duration</b></td><td><b>Cost</b></td><td><b>Added:</b></td></tr>'.$paccs_received_text.'</table><br />'; if(empty($paccs_received_text) && empty($items_received_text)) $main_content .= 'You did not buy/receive any items or PACC.'; } } if(!$logged) $main_content .= 'Please login to see how much points you have.'; else $main_content .= '<br><b><font color="green">You have premium points: </font></b>'.$user_premium_points; } else $main_content .= '<br><center><b>Shop System is currently disabled for this server.Please ask the admin for more information.</b></center>'; ?>
  18. Se for possivél quero 3 imagens que pra você Designer é muito facil. 1° Queria dois botões mais ou menos desse tipo com o nome do meus servers. Tamanha de preferência 64x64 ou de acordo com o seu gosto ;p Não precisar ser igual isso ae é so uma dica. ==> Server1: MegaTibia <== ==> Server2: TibiaMax <== 2° Queria uma propaganda mais ou menos desse estilo mais não precisa ser igual: So que muda aonde tem TibiaMax bota MegaTibia! O fundo da imagem eu quero com essa cor pra ficar compativél com o site quando eu posta na notícia: As menssagens seriam essas porque as que tem na imagem tem erros de português e não está em ordem. Você comprando 30 pontos -> Ganha 2 addon dolls + soft! Você comprando 50 pontos -> Ganha 3 addon dolls + soft + vip boots! Você comprando 80 pontos -> Ganha 4 addon dolls + 2 vip boots! Bom galera, desde já ficarei muito grato a quem poder meda essa força, e o que estiver ao meu alcance que eu possa ajudar ou retribuir farei.
    1. Joazan

      Joazan

      Mano volta pra sua Pokebola , e para de posta essa merda ja cansei de ver isso

    2. Natanael Beckman
  19. Talvez você tenha alterado o seu install.php vejo se isso resolve: <?PHP $config['site'] = parse_ini_file('config/config.ini'); session_start(); //save config in ini file function saveconfig_ini($config) { $file = fopen("config/config.ini", "w"); foreach($config as $param => $data) { $file_data .= $param.' = "'.str_replace('"', '', $data).'" '; } rewind($file); fwrite($file, $file_data); fclose($file); } function check_password($pass) { $temp = strspn("$pass", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890"); if ($temp != strlen($pass)) { return false; } else { $ok = "/[a-zA-Z0-9]{1,40}/"; return (preg_match($ok, $pass))? true: false; } } function password_ency($password) { $ency = $GLOBALS['passwordency']; if($ency == 'sha1') return sha1($password); elseif($ency == 'md5') return md5($password); elseif($ency == '') return $password; } if($_REQUEST['page'] == '' && !isset($_REQUEST['step'])) echo '<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" /> <title>Installation of account maker</title> </head> <frameset cols="230,*"> <frame name="menu" src="install.php?page=menu" /> <frame name="step" src="install.php?page=step&step=0" /> <noframes><body>Frames don\'t work. Install Firefox </body></noframes> </frameset> </html>'; if($_REQUEST['page'] == 'menu') echo '<h2>MENU</h2><br><b>IF NOT INSTALLED:</b><br> <a href="install.php?page=step&step=start" target="step">0. Informations</a><br> <a href="install.php?page=step&step=1" target="step">1. Set server path</a><br> <a href="install.php?page=step&step=2" target="step">2. Check DataBase connection</a><br> <a href="install.php?page=step&step=3&server_conf=yes" target="step">3. Add tables and columns to DB</a><br> <a href="install.php?page=step&step=4&server_conf=yes" target="step">4. Add samples to DB</a><br> <a href="install.php?page=step&step=5&server_conf=yes" target="step">5. Set Admin Account</a><br> <b>FOR ADMINS:</b><br> <a href="index.php?subtopic=adminpanel&action=install_monsters" target="step">6. Load Monsters from OTS</a><br> <a href="index.php?subtopic=adminpanel&action=install_spells" target="step">7. Load Spells from OTS</a><br>'; if($_REQUEST['page'] == 'step') { if($config['site']['install'] != "no") { if($_REQUEST['server_conf'] == 'yes' || ($_REQUEST['step'] > 2 && $_REQUEST['step'] < 6)) { $config['server'] = parse_ini_file($config['site']['server_path'].'config.lua'); if(isset($config['server']['mysqlHost'])) { $mysqlhost = $config['server']['mysqlHost']; $mysqluser = $config['server']['mysqlUser']; $mysqlpass = $config['server']['mysqlPass']; $mysqldatabase = $config['server']['mysqlDatabase']; } elseif(isset($config['server']['sqlHost'])) { $mysqlhost = $config['server']['sqlHost']; $mysqluser = $config['server']['sqlUser']; $mysqlpass = $config['server']['sqlPass']; $mysqldatabase = $config['server']['sqlDatabase']; } $sqlitefile = $config['server']['sqliteDatabase']; $passwordency = ''; if(strtolower($config['server']['useMD5Passwords']) == 'yes' || strtolower($config['server']['passwordType']) == 'md5') $passwordency = 'md5'; if(strtolower($config['server']['passwordType']) == 'sha1') $passwordency = 'sha1'; // loads #####POT mainfile##### include('pot/OTS.php'); // PDO and POT connects to database $ots = POT::getInstance(); if(strtolower($config['server']['sqlType']) == "mysql") { try { $ots->connect(POT::DB_MYSQL, array('host' => $mysqlhost, 'user' => $mysqluser, 'password' => $mysqlpass, 'database' => $mysqldatabase) ); } catch(PDOException $error) { echo 'Database error - can\'t connect to MySQL database. Possible reasons:<br>1. MySQL server is not running on host.<br>2. MySQL user, password, database or host isn\'t configured in: <b>'.$config['site']['server_path'].'config.lua</b> .<br>3. MySQL user, password, database or host is wrong.'; exit; } } elseif(strtolower($config['server']['sqlType']) == "sqlite") { $link_to_sqlitedatabase = $config['site']['server_path'].$sqlitefile; try { $ots->connect(POT::DB_SQLITE, array('database' => $link_to_sqlitedatabase)); } catch(PDOException $error) { echo 'Database error - can\'t open SQLite database. Possible reasons:<br><b>'.$link_to_sqlitedatabase.'</b> - file isn\'t valid SQLite database.<br><b>'.$link_to_sqlitedatabase.'</b> - doesn\'t exist.'; exit; } } else { echo 'Database error. Unknown database type in <b>'.$config['site']['server_path'].'config.lua</b> . Must be equal to: "<b>mysql</b>" or "<b>sqlite</b>". Now is: "<b>'.strtolower($config['server']['sqlType']).'"</b>'; exit; } $SQL = POT::getInstance()->getDBHandle(); } $step = $_REQUEST['step']; if(empty($step)) $step = $config['site']['install']; if($step == 'start') { echo '<h1>STEP '.$step.'</h1>Informations<br>'; echo 'Welcome to Gesior Account Maker installer. <b>First do steps 1-5 one by one, later (when you will be logged on admin account) press on links to steps 6-8 to load configuration from OTS.</b>'; } if($step == '1') { if(isset($_REQUEST['server_path'])) { echo '<h1>STEP '.$step.'</h1>Check server configuration<br>'; $config['site']['server_path'] = $_REQUEST['server_path']; $config['site']['server_path'] = trim($config['site']['server_path'])."\\"; $config['site']['server_path'] = str_replace("\\\\", "/", $config['site']['server_path']); $config['site']['server_path'] = str_replace("\\", "/", $config['site']['server_path']); $config['site']['server_path'] = str_replace("//", "/", $config['site']['server_path']); saveconfig_ini($config['site']); if(file_exists($config['site']['server_path'].'config.lua')) { $config['server'] = parse_ini_file($config['site']['server_path'].'config.lua'); if(isset($config['server']['sqlType'])) { $config['site']['install'] = 2; saveconfig_ini($config['site']); echo 'File <b>config.lua</b> loaded from <font color="red"><i>'.$config['site']['server_path'].'config.lua</i></font> and looks like fine server config file. Now you can check database('.$config['server']['sqlType'].') connection: <a href="install.php?page=step&step=2">STEP 2 - check database connection</a>'; } else { echo 'File <b>config.lua</b> loaded from <font color="red"><i>'.$config['site']['server_path'].'config.lua</i></font> and it\'s not valid TFS config.lua file. <a href="install.php?page=step&step=1">Go to STEP 1 - select other directory.</a> If it\'s your config.lua file from TFS contact with acc. maker author.'; } } else { echo 'Can\'t load file <b>config.lua</b> from <font color="red"><i>'.$config['site']['server_path'].'config.lua</i></font> File doesn\'t exist in selected directory. <a href="install.php?page=step&step=1">Go to STEP 1 - select other directory.</a>'; } } else { echo 'Please write you TFS directory below. Like: <i>C:\Documents and Settings\Gesior\Desktop\TFS 0.3.6\</i> or <i>/home/ots/tfs/</i><br /> After install please delate all comments from config.lua <br />Example: <pre>-- Account manager</pre> <form action="install.php"> <input type="text" name="server_path" size="90" value="'.$config['site']['server_path'].'" /><input type="hidden" name="page" value="step" /><input type="hidden" name="step" value="1" /><input type="submit" value="Set server path" /></form>'; } } if($step == '2') { echo '<h1>STEP '.$step.'</h1>Check database connection<br>'; echo 'If you don\'t see any errors press <a href="install.php?page=step&step=3&server_conf=yes">link to STEP 3 - Add tables and columns to DB</a>. If you see some errors it mean server has wrong configuration. Check FAQ or ask author of acc. maker.'; //load server config $config['server'] = parse_ini_file($config['site']['server_path'].'config.lua'); if(isset($config['server']['mysqlHost'])) { //new (0.2.6+) ots config.lua file $mysqlhost = $config['server']['mysqlHost']; $mysqluser = $config['server']['mysqlUser']; $mysqlpass = $config['server']['mysqlPass']; $mysqldatabase = $config['server']['mysqlDatabase']; } elseif(isset($config['server']['sqlHost'])) { //old (0.2.4) ots config.lua file $mysqlhost = $config['server']['sqlHost']; $mysqluser = $config['server']['sqlUser']; $mysqlpass = $config['server']['sqlPass']; $mysqldatabase = $config['server']['sqlDatabase']; } $sqlitefile = $config['server']['sqliteDatabase']; $passwordency = ''; if(strtolower($config['server']['useMD5Passwords']) == 'yes' || strtolower($config['server']['passwordType']) == 'md5') $passwordency = 'md5'; if(strtolower($config['server']['passwordType']) == 'sha1') $passwordency = 'sha1'; // loads #####POT mainfile##### include('pot/OTS.php'); $ots = POT::getInstance(); if(strtolower($config['server']['sqlType']) == "mysql") { try { $ots->connect(POT::DB_MYSQL, array('host' => $mysqlhost, 'user' => $mysqluser, 'password' => $mysqlpass, 'database' => $mysqldatabase) ); } catch(PDOException $error) { echo 'Database error - can\'t connect to MySQL database. Possible reasons:<br>1. MySQL server is not running on host.<br>2. MySQL user, password, database or host isn\'t configured in: <b>'.$config['site']['server_path'].'config.lua</b> .<br>3. MySQL user, password, database or host is wrong.'; exit; } } elseif(strtolower($config['server']['sqlType']) == "sqlite") { $link_to_sqlitedatabase = $config['site']['server_path'].$sqlitefile; try { $ots->connect(POT::DB_SQLITE, array('database' => $link_to_sqlitedatabase)); } catch(PDOException $error) { echo 'Database error - can\'t open SQLite database. Possible reasons:<br><b>'.$link_to_sqlitedatabase.'</b> - file isn\'t valid SQLite database.<br><b>'.$link_to_sqlitedatabase.'</b> - doesn\'t exist.'; exit; } } else { echo 'Database error. Unknown database type in <b>'.$config['site']['server_path'].'config.lua</b> . Must be equal to: "<b>mysql</b>" or "<b>sqlite</b>". Now is: "<b>'.strtolower($config['server']['sqlType']).'"</b>'; exit; } $SQL = POT::getInstance()->getDBHandle(); $config['site']['install'] = 3; saveconfig_ini($config['site']); } if($step == '3') { echo '<h1>STEP '.$step.'</h1>Add tables and columns to DB<br>'; echo 'Installer try to add new tables and columns to database.<br>'; $config['server'] = parse_ini_file($config['site']['server_path'].'config.lua'); if($config['server']['sqlType'] == "sqlite") { try { $SQL->query('ALTER TABLE accounts ADD "key" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "page_lastday" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "email_new" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "email_new_time" INTEGER(15) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "created" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "rlname" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "location" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "page_access" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "email_code" VARCHAR(255) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "next_email" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "premium_points" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} echo "Added columns to table <b>accounts</b>.<br/>"; try { $SQL->query('ALTER TABLE guilds ADD "description" TEXT NOT NULL DEFAULT "";'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE guilds ADD "logo_gfx_name" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {} echo "Added columns to table <b>guilds</b>.<br/>"; try { $SQL->query('ALTER TABLE players ADD "online" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE players ADD "created" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE players ADD "nick_verify" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE players ADD "old_name" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE players ADD "hide_char" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE players ADD "comment" TEXT NOT NULL DEFAULT "";'); } catch(PDOException $error) {} echo "Added columns to table <b>players</b>.<br/>"; try { $SQL->query('CREATE TABLE "z_news_tickers" ( "date" INTEGER NOT NULL, "author" INTEGER NOT NULL, "image_id" INTEGER NOT NULL DEFAULT 0, "text" TEXT NOT NULL, "hide_ticker" INTEGER NOT NULL DEFAULT 0);'); } catch(PDOException $error) {} echo "Added table <b>z_news_tickers</b> (tickers).<br/>"; try { $SQL->query('CREATE TABLE "z_spells" ( "name" VARCHAR(255) NOT NULL, "spell" VARCHAR(255) NOT NULL, "spell_type" VARCHAR(255) NOT NULL, "mana" INTEGER NOT NULL DEFAULT 0, "lvl" INTEGER NOT NULL DEFAULT 0, "mlvl" INTEGER NOT NULL DEFAULT 0, "soul" INTEGER NOT NULL DEFAULT 0, "pacc" VARCHAR(255) NOT NULL, "vocations" VARCHAR(255) NOT NULL, "conj_count" INTEGER NOT NULL DEFAULT 0, "hide_spell" INTEGER NOT NULL DEFAULT 0);'); } catch(PDOException $error) {} echo "Added table <b>z_spells</b> (spells list).<br/>"; try { $SQL->query('CREATE TABLE "z_monsters" ( "hide_creature" INTEGER NOT NULL DEFAULT 0, "name" VARCHAR(255) NOT NULL, "mana" INTEGER NOT NULL, "exp" INTEGER NOT NULL, "health" INTEGER NOT NULL, "speed_lvl" INTEGER NOT NULL DEFAULT 1, "use_haste" INTEGER NOT NULL, "voices" text NOT NULL, "immunities" VARCHAR(255) NOT NULL, "summonable" INTEGER NOT NULL, "convinceable" INTEGER NOT NULL, "race" VARCHAR(255) NOT NULL, "gfx_name" VARCHAR(255) NOT NULL)'); } catch(PDOException $error) {} echo "Added table <b>z_monsters</b> (monsters list).<br/>"; } elseif($config['server']['sqlType'] == "mysql") { echo "<h3>Add columns to table <b>accounts</b></h3>"; try { $SQL->query("ALTER TABLE `accounts` ADD `page_lastday` INT( 11 ) NOT NULL;"); echo "<font color=\"green\">Added column</font> <b>page_lastday</b> to table <b>accounts</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>page_lastday</b> to table <b>accounts</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `accounts` ADD `email_new` VARCHAR( 255 ) NOT NULL;"); echo "<font color=\"green\">Added column</font> <b>email_new</b> to table <b>accounts</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>email_new</b> to table <b>accounts</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `accounts` ADD `email_new_time` INT( 15 ) NOT NULL;"); echo "<font color=\"green\">Added column</font> <b>email_new_time</b> to table <b>accounts</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>email_new_time</b> to table <b>accounts</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `accounts` ADD `created` INT( 11 ) NOT NULL DEFAULT '0';"); echo "<font color=\"green\">Added column</font> <b>created</b> to table <b>accounts</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>created</b> to table <b>accounts</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `accounts` ADD `rlname` VARCHAR( 255 ) NOT NULL DEFAULT '';"); echo "<font color=\"green\">Added column</font> <b>rlname</b> to table <b>accounts</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>rlname</b> to table <b>accounts</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `accounts` ADD `location` VARCHAR( 255 ) NOT NULL DEFAULT '';"); echo "<font color=\"green\">Added column</font> <b>location</b> to table <b>accounts</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>location</b> to table <b>accounts</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `accounts` ADD `page_access` INT( 11 ) NOT NULL DEFAULT '0';"); echo "<font color=\"green\">Added column</font> <b>page_access</b> to table <b>accounts</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>page_access</b> to table <b>accounts</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `accounts` ADD `email_code` VARCHAR( 255 ) NOT NULL DEFAULT '0';"); echo "<font color=\"green\">Added column</font> <b>email_code</b> to table <b>accounts</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>email_code</b> to table <b>accounts</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `accounts` ADD `next_email` INT( 11 ) NOT NULL DEFAULT '0';"); echo "<font color=\"green\">Added column</font> <b>next_email</b> to table <b>accounts</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>next_email</b> to table <b>accounts</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `accounts` ADD `premium_points` INT( 11 ) NOT NULL DEFAULT '0';"); echo "<font color=\"green\">Added column</font> <b>premium_points</b> to table <b>accounts</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>premium_points</b> to table <b>accounts</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `accounts` ADD `vote` INT( 11 ) NOT NULL;"); echo "<font color=\"green\">Added column</font> <b>vote</b> to table <b>players</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>vote</b> to table <b>players</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `accounts` ADD `last_post` INT( 11 ) NOT NULL DEFAULT '0';"); echo "<font color=\"green\">Added column</font> <b>last post</b> to table <b>accounts</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>last posts</b> to table <b>accounts</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `accounts` ADD `flag` VARCHAR( 255 ) NOT NULL;"); echo "<font color=\"green\">Added column</font> <b>flag</b> to table <b>accounts</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>flag</b> to table <b>accounts</b>, already exist?<br/>";} echo "<h3>Add columns to table <b>guilds</b></h3>"; try { $SQL->query('ALTER TABLE `guilds` ADD `description` TEXT NOT NULL DEFAULT "";'); echo "<font color=\"green\">Added column</font> <b>description</b> to table <b>guilds</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>description</b> to table <b>guilds</b>, already exist?<br/>";} try { $SQL->query('ALTER TABLE `guilds` ADD `logo_gfx_name` VARCHAR( 255 ) NOT NULL DEFAULT "";'); echo "<font color=\"green\">Added column</font> <b>logo_gfx_name</b> to table <b>guilds</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>logo_gfx_name</b> to table <b>guilds</b>, already exist?<br/>";} echo "<h3>Add columns to table <b>players</b></h3>"; try { $SQL->query("ALTER TABLE `players` ADD `created` INT( 11 ) NOT NULL DEFAULT '0';"); echo "<font color=\"green\">Added column</font> <b>created</b> to table <b>players</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>created</b> to table <b>players</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `players` ADD `nick_verify` INT( 11 ) NOT NULL DEFAULT '0';"); echo "<font color=\"green\">Added column</font> <b>nick_verify</b> to table <b>players</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>nick_verify</b> to table <b>players</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `players` ADD `old_name` VARCHAR( 255 ) NOT NULL DEFAULT '';"); echo "<font color=\"green\">Added column</font> <b>old_name</b> to table <b>players</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>old_name</b> to table <b>players</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `players` ADD `hide_char` INT( 11 ) NOT NULL DEFAULT '0';"); echo "<font color=\"green\">Added column</font> <b>hide_char</b> to table <b>players</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>hide_char</b> to table <b>players</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `players` ADD `worldtransfer` int(11) NOT NULL DEFAULT '0';"); echo "<font color=\"green\">Added column</font> <b>worldtransfer</b> to table <b>players</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>worldtransfer</b> to table <b>players</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `players` ADD `comment` TEXT NOT NULL;"); echo "<font color=\"green\">Added column</font> <b>comment</b> to table <b>players</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>comment</b> to table <b>players</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `players` ADD `show_outfit` TINYINT( 4 ) NOT NULL DEFAULT '1';"); echo "<font color=\"green\">Added column</font> <b>show_outfit</b> to table <b>players</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>comment</b> to table <b>players</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `players` ADD `show_eq` TINYINT( 4 ) NOT NULL DEFAULT '1';"); echo "<font color=\"green\">Added column</font> <b>show_eq</b> to table <b>players</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>comment</b> to table <b>players</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `players` ADD `show_bars` TINYINT( 4 ) NOT NULL DEFAULT '1';"); echo "<font color=\"green\">Added column</font> <b>show_bars</b> to table <b>players</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>comment</b> to table <b>players</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `players` ADD `show_skills` TINYINT( 4 ) NOT NULL DEFAULT '1';"); echo "<font color=\"green\">Added column</font> <b>show_skills</b> to table <b>players</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>comment</b> to table <b>players</b>, already exist?<br/>";} try { $SQL->query("ALTER TABLE `players` ADD `show_quests` TINYINT( 4 ) NOT NULL DEFAULT '1';"); echo "<font color=\"green\">Added column</font> <b>show_quests</b> to table <b>players</b><br />";} catch(PDOException $error) { echo "<font color=\"red\">Can't add column</font> <b>comment</b> to table <b>players</b>, already exist?<br/>";} echo "<h3>Add new tables to database</h3>"; try { $SQL->query("CREATE TABLE `z_news_tickers` ( `date` int(11) NOT NULL default '1', `author` int(11) NOT NULL, `image_id` int(3) NOT NULL default '0', `text` text NOT NULL, `hide_ticker` tinyint(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1;"); echo '<font color=\"green\">Added table <b>z_news_tickers</b></font><br/>'; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>z_news_tickers</b> not added.</font> Already exist?<br/>";} try { $SQL->query('CREATE TABLE `z_spells` ( `name` VARCHAR(255) NOT NULL, `spell` VARCHAR(255) NOT NULL, `spell_type` VARCHAR(255) NOT NULL, `mana` INTEGER NOT NULL DEFAULT 0, `lvl` INTEGER NOT NULL DEFAULT 0, `mlvl` INTEGER NOT NULL DEFAULT 0, `soul` INTEGER NOT NULL DEFAULT 0, `pacc` VARCHAR(255) NOT NULL, `vocations` VARCHAR(255) NOT NULL, `conj_count` INTEGER NOT NULL DEFAULT 0, `hide_spell` INTEGER NOT NULL DEFAULT 0);'); echo '<font color=\"green\">Added table <b>z_spells</b></font><br/>'; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>z_spells</b> not added.</font> Already exist?<br/>";} try { $SQL->query('CREATE TABLE `z_monsters` ( `hide_creature` tinyint(1) NOT NULL default \'0\', `name` varchar(255) NOT NULL, `mana` int(11) NOT NULL, `exp` int(11) NOT NULL, `health` int(11) NOT NULL, `speed_lvl` int(11) NOT NULL default \'1\', `use_haste` tinyint(1) NOT NULL, `voices` text NOT NULL, `immunities` varchar(255) NOT NULL, `summonable` tinyint(1) NOT NULL, `convinceable` tinyint(1) NOT NULL, `race` varchar(255) NOT NULL, `gfx_name` varchar(255) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1;'); echo"<font color=\"green\">Added table <b>z_monsters</b></font><br/>"; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>z_monsters</b> not added.</font> Already exist?<br/>";} try { $SQL->query("CREATE TABLE `z_ots_comunication` ( `id` int(11) NOT NULL auto_increment, `name` varchar(255) NOT NULL, `type` varchar(255) NOT NULL, `action` varchar(255) NOT NULL, `param1` varchar(255) NOT NULL, `param2` varchar(255) NOT NULL, `param3` varchar(255) NOT NULL, `param4` varchar(255) NOT NULL, `param5` varchar(255) NOT NULL, `param6` varchar(255) NOT NULL, `param7` varchar(255) NOT NULL, `delete_it` int(2) NOT NULL default '1', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;"); echo "<font color=\"green\">Added table <b>z_ots_comunication</b> (shopsystem).<br/></font>"; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>z_ots_comunication</b> not added.</font> Already exist?<br/>";} try { $SQL->query("CREATE TABLE `z_shop_offer` ( `id` int(11) NOT NULL auto_increment, `points` int(11) NOT NULL default '0', `itemid1` int(11) NOT NULL default '0', `count1` int(11) NOT NULL default '0', `itemid2` int(11) NOT NULL default '0', `count2` int(11) NOT NULL default '0', `offer_type` varchar(255) default NULL, `offer_description` text NOT NULL, `offer_name` varchar(255) NOT NULL, `pid` INT(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;"); echo "<font color=\"green\">Added table <b>z_shop_offer</b> (shopsystem).<br/></font>"; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>z_shop_offer</b> not added.</font> Already exist?<br/>";} try { $SQL->query("CREATE TABLE `z_shop_history_item` ( `id` int(11) NOT NULL auto_increment, `to_name` varchar(255) NOT NULL default '0', `to_account` int(11) NOT NULL default '0', `from_nick` varchar(255) NOT NULL, `from_account` int(11) NOT NULL default '0', `price` int(11) NOT NULL default '0', `offer_id` int(11) NOT NULL default '0', `trans_state` varchar(255) NOT NULL, `trans_start` int(11) NOT NULL default '0', `trans_real` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;"); echo "<font color=\"green\">Added table <b>z_shop_history_item</b> (shopsystem).<br/></font>"; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>z_shop_history_item</b> not added.</font> Already exist?<br/>";} try { $SQL->query("CREATE TABLE `z_shop_history_pacc` ( `id` int(11) NOT NULL auto_increment, `to_name` varchar(255) NOT NULL default '0', `to_account` int(11) NOT NULL default '0', `from_nick` varchar(255) NOT NULL, `from_account` int(11) NOT NULL default '0', `price` int(11) NOT NULL default '0', `pacc_days` int(11) NOT NULL default '0', `trans_state` varchar(255) NOT NULL, `trans_start` int(11) NOT NULL default '0', `trans_real` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;"); echo "<font color=\"green\">Added table <b>z_shop_history_pacc</b> (shopsystem).<br/></font>"; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>z_shop_history_pacc</b> not added.</font> Already exist?<br/>";} try { $SQL->query("CREATE TABLE `z_polls` ( `id` int(11) NOT NULL auto_increment, `question` varchar(255) NOT NULL, `end` int(11) NOT NULL, `start` int(11) NOT NULL, `answers` int(11) NOT NULL, `votes_all` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;"); echo "<font color=\"green\">Added table <b>z_polls</b> (poll-system).<br/></font>"; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>z_polls</b> not added.</font> Already exist?<br/>";} try { $SQL->query("CREATE TABLE `z_polls_answers` ( `poll_id` int(11) NOT NULL, `answer_id` int(11) NOT NULL, `answer` varchar(255) NOT NULL, `votes` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1;"); echo "<font color=\"green\">Added table <b>z_polls_answers</b> (poll-system).<br/></font>"; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>z_polls_answers</b> not added.</font> Already exist?<br/>";} try { $SQL->query("CREATE TABLE `zaypay_payment` ( `payID` bigint(30) NOT NULL, `account_id` int(20) NOT NULL, `status` varchar(255) NOT NULL, PRIMARY KEY (`payID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;"); echo "<font color=\"green\">Added table <b>zaypay_payment</b>.<br/></font>"; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>zaypay_payment</b> not added.</font> Already exist?<br/>";} try { $SQL->query("CREATE TABLE z_bug_tracker ( `account` varchar(255) NOT NULL, `type` int(11) NOT NULL, `status` int(11) NOT NULL, `text` text NOT NULL, `id` int(11) NOT NULL, `subject` varchar(255) NOT NULL, `priority` int(11) NOT NULL, `reply` int(11) NOT NULL, `who` int(11) NOT NULL, `uid` int(11) NOT NULL AUTO_INCREMENT, `tag` int(11) NOT NULL, PRIMARY KEY (uid) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;"); echo "<font color=\"green\">Added table <b>z_bug_tracker</b> (bug tracker).<br/></font>"; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>z_bug_tracker</b> not added.</font> Already exist?<br/>";} try { $SQL->query("CREATE TABLE `z_changelog` ( `id` int(11) NOT NULL auto_increment, `type` varchar(255) NOT NULL default '', `where` varchar(255) NOT NULL default '', `date` int(11) NOT NULL default '0', `description` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=0;"); echo "<font color=\"green\">Added table <b>z_changelog</b> (changelog).<br/></font>"; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>z_changelog</b> not added.</font> Already exist?<br/>";} try { $SQL->query("CREATE TABLE `z_forum` ( `id` int(11) NOT NULL auto_increment, `sticky` tinyint(1) NOT NULL DEFAULT '0', `closed` tinyint(1) NOT NULL DEFAULT '0', `first_post` int(11) NOT NULL default '0', `last_post` int(11) NOT NULL default '0', `section` int(3) NOT NULL default '0', `icon_id` int(3) NOT NULL default '1', `replies` int(20) NOT NULL default '0', `views` int(20) NOT NULL default '0', `author_aid` int(20) NOT NULL default '0', `author_guid` int(20) NOT NULL default '0', `post_text` text NOT NULL, `post_topic` varchar(255) NOT NULL, `post_smile` tinyint(1) NOT NULL default '0', `post_date` int(20) NOT NULL default '0', `last_edit_aid` int(20) NOT NULL default '0', `edit_date` int(20) NOT NULL default '0', `post_ip` varchar(32) NOT NULL default '0.0.0.0', PRIMARY KEY (`id`), KEY `section` (`section`) ) ENGINE=MyISAM AUTO_INCREMENT=1;"); echo "<font color=\"green\">Added table <b>z_forum</b> (forum).<br/></font>"; } catch(PDOException $error) { echo "<font color=\"red\">Table <b>z_forum</b> not added.</font> Already exist?<br/>";} } $config['site']['install'] = 4; saveconfig_ini($config['site']); echo '<br>Tables and columns added to database.<br>Go to <a href="install.php?page=step&step=4&server_conf=yes">STEP 4 - Add samples</a>'; } if($step == '4') { echo '<h1>STEP '.$step.'</h1>Add samples to DB:<br>'; $check_news_ticker = $SQL->query('SELECT * FROM z_news_tickers WHERE image_id = 1 AND author = 1 AND hide_ticker = 0 LIMIT 1 OFFSET 0')->fetch(); if(!isset($check_news_ticker['author'])) { $SQL->query('INSERT INTO z_news_tickers (date, author, image_id, text, hide_ticker) VALUES ('.time().', 1, 1, "Hello! Gesior account manager 0.3.6 installed. Report bugs Otland.Net Thread. Thanks to widnet and Norix.", 0)'); echo "Added first news ticker.<br/>"; } else { echo "News ticker sample is already in database. New sample is not needed.<br/>"; } $check_voc_0 = $SQL->query('SELECT * FROM players WHERE name = "Rook Sample" LIMIT 1 OFFSET 0')->fetch(); if(!isset($check_voc_0['name'])) { $SQL->query('INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `comment`) VALUES (NULL, "Rook Sample", 0, 1, 1, 1, 0, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, "", 400, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, "", 0, 0, "", 0, "")'); echo "Added 'Rook Sample' character.<br/>"; } else { echo "Character 'Rook Sample' already in database.<br/>"; } $check_voc_1 = $SQL->query('SELECT * FROM players WHERE name = "Sorcerer Sample" LIMIT 1 OFFSET 0')->fetch(); if(!isset($check_voc_1['name'])) { $SQL->query('INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `comment`) VALUES (NULL, "Sorcerer Sample", 0, 1, 1, 1, 1, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, "", 400, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, "", 0, 0, "", 0, "")'); echo "Added 'Sorcerer Sample' character.<br/>"; } else { echo "Character 'Sorcerer Sample' already in database.<br/>"; } $check_voc_2 = $SQL->query('SELECT * FROM players WHERE name = "Druid Sample" LIMIT 1 OFFSET 0')->fetch(); if(!isset($check_voc_2['name'])) { $SQL->query('INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `comment`) VALUES (NULL, "Druid Sample", 0, 1, 1, 1, 2, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, "", 400, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, "", 0, 0, "", 0, "")'); echo "Added 'Druid Sample' character.<br/>"; } else { echo "Character 'Druid Sample' already in database.<br/>"; } $check_voc_3 = $SQL->query('SELECT * FROM players WHERE name = "Paladin Sample" LIMIT 1 OFFSET 0')->fetch(); if(!isset($check_voc_3['name'])) { $SQL->query('INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `comment`) VALUES (NULL, "Paladin Sample", 0, 1, 1, 1, 3, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, "", 400, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, "", 0, 0, "", 0, "")'); echo "Added 'Paladin Sample' character.<br/>"; } else { echo "Character 'Paladin Sample' already in database.<br/>"; } $check_voc_4 = $SQL->query('SELECT * FROM players WHERE name = "Knight Sample" LIMIT 1 OFFSET 0')->fetch(); if(!isset($check_voc_4['name'])) { $SQL->query('INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `comment`) VALUES (NULL, "Knight Sample", 0, 1, 1, 1, 4, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, "", 400, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, "", 0, 0, "", 0, "")'); echo "Added 'Knight Sample' character.<br/>"; echo 'All samples added to database. Now you can go to <a href="install.php?page=step&step=5&server_conf=yes">STEP 5 - Set Admin Account</a>'; } else { echo "Character 'Knight Sample' already in database.<br/>"; $config['site']['install'] = 5; saveconfig_ini($config['site']); echo 'All samples added to database. Now you can go to <a href="install.php?page=step&step=5&server_conf=yes">STEP 5 - Set Admin Account</a><br/>'; } } if($step == '5') { echo '<h1>STEP '.$step.'</h1>Set Admin Account<br>'; $config['server'] = parse_ini_file($config['site']['server_path'].'config.lua'); if(empty($_REQUEST['saveaccpassword'])) { echo 'Admin account number is: <b>1</b><br/>Set new password to this account.<br>'; echo 'New password: <form action="install.php" method=POST><input type="text" name="newpass" size="35">(Don\'t give it password to anyone!)'; echo '<input type="hidden" name="saveaccpassword" value="yes"><input type="hidden" name="page" value="step"><input type="hidden" name="step" value="5"><input type="submit" value="SET"></form><br>If account with number 1 doesn\'t exist installator will create it and set your password.'; } else { $newpass = $_POST['newpass']; if(!check_password($newpass)) echo 'Password contains illegal characters. Please use only a-Z and 0-9. <a href="install.php?page=step&step=5&server_conf=yes">GO BACK</a> and write other password.'; else { $newpass_to_db = password_ency($newpass); $account = new OTS_Account(); $account->load(1); if($account->isLoaded()) { $account->setPassword($newpass_to_db); $account->save(); $account->setCustomField("page_access", 3); } else { $number = $account->create(1,1,1); $account->setPassword($newpass_to_db); $account->unblock(); $account->save(); $account->setCustomField("page_access", 3); } $_SESSION['account'] = 1; $_SESSION['password'] = $newpass; $logged = TRUE; $account->setCustomField("page_lastday", time()); echo '<h1>Admin account number: 1<br>Admin account password: '.$_POST['newpass'].'</h1><br/><h3>It\'s end of first part of installation. Installation is blocked. From now don\'t modify file config.ini!<br>Press links to STEPs 6 and 7 in menu.</h3>'; $config['site']['install'] = 'no'; saveconfig_ini($config['site']); } } } } else echo "Account maker is already installed! To reinstall open file 'config.ini' in directory 'config' and change:<br/><b>install = \"no\"</b><br/>to:</br><b>install = \"start\"</b><br/>and enter this site again."; } ?>
  20. Eu aconselho o UolHost trabalho com eles e é muito bom, te oferece seu propio sistema de smtp, hospedagems, email profissionais, suporte muito bom.
  • Quem Está Navegando   0 membros estão online

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