foxfire230 0 Postado Outubro 16, 2006 Share Postado Outubro 16, 2006 Olá, Gostaria de postar aqui, um tutorial retirado da otfans.net, ensinando como fazer seu servido em SQL. Eu não vou traduzir o tutorial e postar, vou por as partes mais importantes do que eu entendi =P. Porque SQL? Rapido Simples Facil Mais eficiente Primeiro: pegue o XAMPP (Pode ser outros programas com suporte MySQL também)AQUI. Depois, intale o XAMPP e rode os servidores Apache e MySQL Va para http://localhost/xampp e clique em Security. E em http://localhost/security/xamppsecurity.php. Escolha uma nova senha. E reinicie os servidores Apache e MySQL. Segundo: Vá para http://localhost/phpmyadmin e faça o seu login com o root com sua nova senha. Crie um novo banco de dados com o nome otserv. Terceiro: Na pasta do seu otserver SQL, abra o arquivo sample.sql e remova todas as linhas de comentarios que comecem com /* e termine com */ Deverá ficar algo assim: ---- Host: localhost Database: otserv-- -------------------------------------------------------- Server version 4.1.12a-ntUSE `otserv`;---- Table structure for table `accounts`--DROP TABLE IF EXISTS `accounts`;CREATE TABLE `accounts` ( `id` int(11) NOT NULL auto_increment, `accno` int(11) unsigned NOT NULL default '0', `password` varchar(32) NOT NULL default '', `type` int(11) NOT NULL default '0', `premDays` int(11) NOT NULL default '0', `email` varchar(50) NOT NULL default '', `blocked` tinyint(4) NOT NULL default '0', UNIQUE KEY `id` (`id`), KEY `accno` (`accno`)) ENGINE=InnoDB DEFAULT CHARSET=latin1;---- Dumping data for table `accounts`--LOCK TABLES `accounts` WRITE;INSERT INTO `accounts` VALUES (1,1,'test',0,0,'',0);UNLOCK TABLES;---- Table structure for table `items`--DROP TABLE IF EXISTS `items`;CREATE TABLE `items` ( `player` int(11) NOT NULL default '0', `slot` tinyint(4) NOT NULL default '0', `sid` int(11) NOT NULL default '0', `pid` int(11) NOT NULL default '0', `type` int(11) NOT NULL default '0', `number` tinyint(4) NOT NULL default '0', `actionid` int(5) NOT NULL default '0', `text` text NOT NULL default '', `specialdesc` text NOT NULL default '', KEY `player` (`player`)) ENGINE=InnoDB DEFAULT CHARSET=latin1;---- Dumping data for table `items`--LOCK TABLES `items` WRITE;INSERT INTO `items` VALUES (1,0,15,14,1968,0,0,'MySQL test',''),(1,0,14,13,2594,0,0,'',''),(1,101,13,0,2590,0,0,'',''),(1,10,12,0,2544,100,0,'',''),(1,9,11,0,2169,0,0,'',''),(1,8,10,0,2195,0,0,'',''),(1,7,9,0,2477,0,0,'',''),(1,6,8,0,2542,0,0,'',''),(1,5,7,0,2419,0,0,'',''),(1,4,6,0,2653,0,0,'',''),(1,0,5,3,2456,0,0,'',''),(1,0,4,3,2544,100,0,'',''),(1,3,3,0,2002,0,0,'',''),(1,2,2,0,2199,0,0,'',''),(1,1,1,0,2496,0,0,'','');UNLOCK TABLES;---- Table structure for table `guilds`--DROP TABLE IF EXISTS `guilds`;CREATE TABLE `guilds` ( `guildid` int(11) NOT NULL auto_increment, `guildname` varchar(100) NOT NULL default '', `ownerid` int(11) NOT NULL default '0', PRIMARY KEY (`guildid`)) ENGINE=InnoDB DEFAULT CHARSET=latin1;---- Table structure for table `players`--DROP TABLE IF EXISTS `players`;CREATE TABLE `players` ( `id` int(11) unsigned NOT NULL auto_increment, `name` varchar(32) NOT NULL default '', `access` int(11) NOT NULL default '0', `account` int(11) NOT NULL default '0', `level` int(11) NOT NULL default '0', `vocation` int(11) NOT NULL default '0', `cid` int(11) NOT NULL default '0', `health` int(11) NOT NULL default '0', `healthmax` int(11) NOT NULL default '0', `direction` int(11) NOT NULL default '0', `experience` int(11) NOT NULL default '0', `lookbody` int(11) NOT NULL default '0', `lookfeet` int(11) NOT NULL default '0', `lookhead` int(11) NOT NULL default '0', `looklegs` int(11) NOT NULL default '0', `looktype` int(11) NOT NULL default '0', `maglevel` int(11) NOT NULL default '0', `mana` int(11) NOT NULL default '0', `manamax` int(11) NOT NULL default '0', `manaspent` int(11) NOT NULL default '0', `masterpos` varchar(16) NOT NULL default '', `pos` varchar(16) NOT NULL default '', `speed` int(11) NOT NULL default '0', `cap` int(11) NOT NULL default '0', `maxdepotitems` int(11) NOT NULL default '1000', `food` int(11) NOT NULL default '0', `sex` int(11) NOT NULL default '0', `guildid` int(11) unsigned NOT NULL default '0', `guildrank` varchar(32) NOT NULL default '', `guildnick` varchar(32) NOT NULL default '', `lastlogin` int(11) unsigned NOT NULL default '0', `lastip` int(11) unsigned NOT NULL default '0', `save` int(11) unsigned NOT NULL default '1', `redskulltime` int(11) unsigned NOT NULL default '0', `redskull` tinyint(1) unsigned NOT NULL default '0', UNIQUE KEY `id` (`id`), KEY `name` (`name`)) ENGINE=InnoDB DEFAULT CHARSET=latin1;---- Dumping data for table `players`--LOCK TABLES `players` WRITE;INSERT INTO `players` VALUES (1,'Hurz',1,1,18,1,675,840,840,2,76000,20,30,40,50,128,20,640,640,21700,'20;20;7','29;30;7',900,300,1000,129,1,0,'','',0,0,1,0,0);INSERT INTO `players` VALUES (2,'Player',0,1,18,1,675,840,840,2,76000,20,30,40,50,128,20,640,640,21700,'27;23;7','27;23;7',900,300,1000,129,1,0,'','',0,0,1,0,0);UNLOCK TABLES;---- Table structure for table `playerstorage`--DROP TABLE IF EXISTS `playerstorage`;CREATE TABLE `playerstorage` ( `player` int(11) NOT NULL default '0', `key` int(11) unsigned NOT NULL default '0', `value` int(11) NOT NULL default '0', KEY `player` (`player`)) ENGINE=InnoDB DEFAULT CHARSET=latin1;---- Dumping data for table `playerstorage`--LOCK TABLES `playerstorage` WRITE;INSERT INTO `playerstorage` VALUES (1,1000,4);UNLOCK TABLES;---- Table structure for table `skills`--DROP TABLE IF EXISTS `skills`;CREATE TABLE `skills` ( `player` int(11) NOT NULL default '0', `id` tinyint(4) NOT NULL default '0', `skill` int(11) unsigned NOT NULL default '0', `tries` int(11) unsigned NOT NULL default '0', KEY `player` (`player`)) ENGINE=InnoDB DEFAULT CHARSET=latin1;---- Dumping data for table `skills`--LOCK TABLES `skills` WRITE;INSERT INTO `skills` VALUES (1,6,10,0),(1,5,10,0),(1,4,10,0),(1,3,10,0),(1,2,10,0),(1,1,10,0),(1,0,10,0);UNLOCK TABLES;---- Table structure for table `viplist`--DROP TABLE IF EXISTS `viplist`;CREATE TABLE `viplist` ( `player` int(10) unsigned NOT NULL default '0', `vip_id` int(10) unsigned NOT NULL default '0', KEY `player` TYPE BTREE (`player`)) ENGINE=InnoDB DEFAULT CHARSET=latin1;CREATE TABLE `tilelist` ( `tileid` int(11) unsigned NOT NULL, `x` int(11) unsigned NOT NULL, `y` int(11) unsigned NOT NULL, `z` int(11) unsigned NOT NULL, PRIMARY KEY (tileid), UNIQUE (`x`,`y`,`z`)) ENGINE=InnoDB DEFAULT CHARSET=latin1;CREATE TABLE `tileitems` ( `tileid` int(11) NOT NULL default '0', `sid` int(11) NOT NULL default '0', `pid` int(11) NOT NULL default '0', `type` int(11) NOT NULL default '0', `attributes` blob, KEY (tileid)) ENGINE=InnoDB DEFAULT CHARSET=latin1;CREATE TABLE `houses` ( `houseid` int(10) unsigned NOT NULL default '0', `owner` int(10) unsigned default '0', `paid` int(10) unsigned default '0', `warnings` int(10) unsigned default '0', PRIMARY KEY (`houseid`)) ENGINE=InnoDB DEFAULT CHARSET=latin1;CREATE TABLE `houseaccess` ( `houseid` int(10) unsigned NOT NULL default '0', `listid` int(10) unsigned default '0', `list` text, KEY `houseid` TYPE BTREE (`houseid`)) ENGINE=InnoDB DEFAULT CHARSET=latin1;CREATE TABLE `bans` ( `type` int(10) unsigned NOT NULL default '0', `ip` int(10) unsigned NOT NULL default '0', `mask` int(10) unsigned NOT NULL default '0', `player` int(10) unsigned NOT NULL default '0', `account` int(10) unsigned NOT NULL default '0', `time` int(10) unsigned NOT NULL default '0') ENGINE=InnoDB DEFAULT CHARSET=latin1; Agora, importe o sample.sql para o banco de dados otserv. Entre no banco de dados otserv, procure um botão import, aperte ele, escolha o sample.sql e execute. No config.lua: Na parte de SQL: --- SQL partsql_host = "localhost" - Onde ficará o banco de dados.sql_user = "root" - Nome do usuario.sql_pass = "Sua senha aqui"sql_db = "otserv" - O Banco de dados onde ficará todas as informações Tutorial original por Shadows Tópico original: http://otfans.net/showthread.php?t=50169 Link para o comentário https://xtibia.com/forum/topic/29623-sql-server/ Compartilhar em outros sites More sharing options...
afk 2 Postado Outubro 16, 2006 Share Postado Outubro 16, 2006 Otimo tutorial. bem explicadinho tudo 100% perfeito Topico and tutorial aprovado Link para o comentário https://xtibia.com/forum/topic/29623-sql-server/#findComment-157378 Compartilhar em outros sites More sharing options...
Eigenlieb 9 Postado Outubro 18, 2006 Share Postado Outubro 18, 2006 Movido! Abraços Link para o comentário https://xtibia.com/forum/topic/29623-sql-server/#findComment-158092 Compartilhar em outros sites More sharing options...
HaVaNa 0 Postado Outubro 22, 2006 Share Postado Outubro 22, 2006 FoxFire !! Muito Boa essa sua explicação parabéns continue assim //HaVaNa Link para o comentário https://xtibia.com/forum/topic/29623-sql-server/#findComment-160140 Compartilhar em outros sites More sharing options...
DeToNaTiOnS 2 Postado Outubro 22, 2006 Share Postado Outubro 22, 2006 Depois de quebrar a cabeça fazendo o meu server SQL eu acho esse tutorial... Consigui sem tutorial mesmo agora que achei... Tive que atualizar o site para que ficasse compativel com o servidor =/ demorou 2 horas mais funcionou... SQL 100% mais rápido! Link para o comentário https://xtibia.com/forum/topic/29623-sql-server/#findComment-160178 Compartilhar em outros sites More sharing options...
Huntres 0 Postado Outubro 22, 2006 Share Postado Outubro 22, 2006 Isso q o detonations falo eu vi... eu tava na casa dele qndo ele tava fazendo... por umas paradinha n tava dando soh q fico mais meia hora tentando e conseguiu. No otro dia inclusive ele falto na aula pra fica arumando o site, ve se pode.... Mais fico mt loko. Meio dia ja tinha uns 20 players. Link para o comentário https://xtibia.com/forum/topic/29623-sql-server/#findComment-160224 Compartilhar em outros sites More sharing options...
Lukituz 3 Postado Outubro 22, 2006 Share Postado Outubro 22, 2006 Isso vai transformar o servidor em SQL ? XAMPP não é para sites? Então como fica o site? Link para o comentário https://xtibia.com/forum/topic/29623-sql-server/#findComment-160321 Compartilhar em outros sites More sharing options...
foxfire230 0 Postado Outubro 22, 2006 Autor Share Postado Outubro 22, 2006 Isso vai transformar o servidor em SQL ?XAMPP não é para sites? Então como fica o site? <{POST_SNAPBACK}> Não, primeiramente você deve conseguir um servidor SQL, tipo o darkonia 7.81 ou outros do tipo. XAMPP é para sites sim, mais ele e outros do genero, contém o serviço de banco de dados, por isso basta pegar um site feito para sql e configurar para o acesso ao banco de dados que será usado. Link para o comentário https://xtibia.com/forum/topic/29623-sql-server/#findComment-160335 Compartilhar em outros sites More sharing options...
Lukituz 3 Postado Outubro 22, 2006 Share Postado Outubro 22, 2006 Isso complica minha vida, meu webmaster só sabe fazer site com SQL, e não concigo converter para SQL o meu OT. Obrigado por me responder. Link para o comentário https://xtibia.com/forum/topic/29623-sql-server/#findComment-160354 Compartilhar em outros sites More sharing options...
SnOoP 0 Postado Outubro 23, 2006 Share Postado Outubro 23, 2006 na hora de instala o Apache ele da 1 erro dizendo que a porta 80 ta bloqueada. Tem como arruma isso? ___Edit____ Consegui liga o apache + ele nun abre os localhost. Sempre diz HTTP 404 vlw Pra faze funciona o Apache eu fui na pasta do apache e so tinha 80 dai coloquei 8090. dai entro + se alguem soube como que faiz pra entra no localhost, me ajude plizz Link para o comentário https://xtibia.com/forum/topic/29623-sql-server/#findComment-160875 Compartilhar em outros sites More sharing options...
Fusion32 1 Postado Novembro 7, 2006 Share Postado Novembro 7, 2006 BOA CARA MUITO ROOX ES TEU TUTORIAL PARABÉNS !!!!!! Link para o comentário https://xtibia.com/forum/topic/29623-sql-server/#findComment-170110 Compartilhar em outros sites More sharing options...
Maresia ® 0 Postado Novembro 8, 2006 Share Postado Novembro 8, 2006 (editado) Fiz tudo certinho e talz, mas eu nao consigo entrar no Server //Maresia Editado Novembro 8, 2006 por Maresia ® Link para o comentário https://xtibia.com/forum/topic/29623-sql-server/#findComment-170160 Compartilhar em outros sites More sharing options...
FoDoX 0 Postado Novembro 8, 2006 Share Postado Novembro 8, 2006 Muito bom esse tutor ensina direitinho passo por passo vai ajudar muito na criação de site e etc...Muito bom bem explicado muito bom mesmo vlw por ter trago esse tutor para o xtibia ira ajudar muito as pessoas....(principalmente os web master)...xD Vlws... @Lukituz Mano não poste 2 vezes para aumentar seu tanto de posts poderia editar seu post vou lhi reporta por ultrapassar as regras... Obrigado:By FoDoX Link para o comentário https://xtibia.com/forum/topic/29623-sql-server/#findComment-170491 Compartilhar em outros sites More sharing options...
Sonic Extreme 0 Postado Novembro 15, 2006 Share Postado Novembro 15, 2006 e Depois??o server ira rodar certinho?? e o Site do Server??onde fica?? Meu DEUS, que tutorial mal explikado, q q adianta a gente saber isso, se a gente n sabe onde o Site que salva tudo vai ir.. Link para o comentário https://xtibia.com/forum/topic/29623-sql-server/#findComment-175205 Compartilhar em outros sites More sharing options...
foxfire230 0 Postado Novembro 16, 2006 Autor Share Postado Novembro 16, 2006 Sonic Extreme lol, primeiro, o site para SQL você consegue aqui mesmo no xtibia é o E-Server, outro, as contas, chars, skills e etc, podem todas serem encontradas no phpmyadmin no próprio xampp ou qualquer coisa parecida. Espero ter tirado sua duvida. Link para o comentário https://xtibia.com/forum/topic/29623-sql-server/#findComment-175892 Compartilhar em outros sites More sharing options...
Posts Recomendados