Ir para conteúdo
Entre para seguir isso  
Eddie Murphy

Signature System Para OTServ Mysql

Recommended Posts

Eddie Murphy    0
Eddie Murphy

Bom, o propio Nome ja diz, para OTServ Mysql, quem tem sqlite desiste desse Tópico.

 

Exemplo: http://pot.servegame.org/signature.php?name=guerreiro do pot

signature.php?name=guerreiro%20do%20pot

Requerimentos

Você precisa ter xampp (qualquer versão)

 

Abra um arquivo com o bloco de notas e coloque isto

 

<?PHP

 

// --Script by: TibiaGameHost/Igor -- //

// --Tutorial de como instalar --//

// --Voce precisa ter OTServ Mysql utilizando xampp --//

// --Coloque este arquivo na pasta htdocs, se ja tiver deixe --//

// --Mude apenas o mysql host, user, password, database, name, adress, description, mais nada --//

// --Salve e teste o Script --//

 

//------------------------------------------------------------------------------------------------------------------- //

$bgcolor = $config['site']['darkborder'];

//--informaçao do servidor mysql

$Mysql_Host = 'localhost'; //Host mysql

$Mysql_User = 'root'; //Usuario mysql

$Mysql_Password = 'senha'; //Password mysql

$Mysql_Database = 'DbOt'; //Database mysql

 

$Server_Name = 'POT OTServ'; //Coloque o nome do seu Servidor

$Server_Address = 'http://pot.servegame.org/'; //Coloque o website do seu servidor

$Server_Description = 'Descriçao'; //Se nao quiser uma descriçao deixe em branco entre os '.'

 

$Font_File = 'arial.ttf'; //Fonte deixe como esta

$Background_Picture = 'background.png'; //Fundo da imagem deixe como esta

 

//------------------------------------------------------------------------------------------------------------------- //

 

 

//--Conectando com o servidor mysql

mysql_connect ( $Mysql_Host, $Mysql_User, $Mysql_Password ) or die ( 'Error connecting to the MYSQL Server.' );

mysql_select_db ( $Mysql_Database ) or die ( 'Error selecting the database.' );

 

//--Criando fundo de imagem

$final_image = imageCreateFromPng ( $Background_Picture );

 

//--Checando se o Player existe

if ( isset( $_GET['name'] ) ) {

 

//Informaçoes da mysql e imagem

$Player_Query = mysql_query ( "SELECT * FROM `players` WHERE `name`='".$_GET['name']."'" );

 

if ( mysql_num_rows ( $Player_Query ) > 0 ) {

 

$Player_Info = mysql_fetch_array ( $Player_Query, MYSQL_ASSOC );

 

imagettftext($final_image, 10, 0, 10, 55, imagecolorallocate($final_image, 0, 0, 0), $Font_File, "Nome: ".$Player_Info['name'] );

imagettftext($final_image, 10, 0, 11, 56, imagecolorallocate($final_image, 255, 255, 255), $Font_File, "Nome: ".$Player_Info['name'] );

 

imagettftext($final_image, 10, 0, 10, 70, imagecolorallocate($final_image, 0, 0, 0), $Font_File, "Level: ".$Player_Info['level'] );

imagettftext($final_image, 10, 0, 11, 71, imagecolorallocate($final_image, 255, 255, 255), $Font_File, "Level: ".$Player_Info['level'] );

 

imagettftext($final_image, 10, 0, 10, 85, imagecolorallocate($final_image, 0, 0, 0), $Font_File, "Magic Level: ".$Player_Info['maglevel'] );

imagettftext($final_image, 10, 0, 11, 86, imagecolorallocate($final_image, 255, 255, 255), $Font_File, "Magic Level: ".$Player_Info['maglevel'] );

 

imagettftext($final_image, 10, 0, 10, 117, imagecolorallocate($final_image, 0, 0, 0), $Font_File, "Health: ".$Player_Info['health'] );

imagettftext($final_image, 10, 0, 11, 118, imagecolorallocate($final_image, 255, 255, 255), $Font_File, "Health: ".$Player_Info['health'] );

 

 

imagettftext($final_image, 10, 0, 10, 133, imagecolorallocate($final_image, 0, 0, 0), $Font_File, "Mana: ".$Player_Info['mana'] );

imagettftext($final_image, 10, 0, 11, 134, imagecolorallocate($final_image, 255, 255, 255), $Font_File, "Mana: ".$Player_Info['mana'] );

 

imagettftext($final_image, 10, 0, 10, 149, imagecolorallocate($final_image, 0, 0, 0), $Font_File, "Cap: ".$Player_Info['cap'] );

imagettftext($final_image, 10, 0, 11, 150, imagecolorallocate($final_image, 255, 255, 255), $Font_File, "Cap: ".$Player_Info['cap'] );

 

imagettftext($final_image, 10, 0, 10, 165, imagecolorallocate($final_image, 0, 0, 0), $Font_File, "Exp: ".$Player_Info['experience'] );

imagettftext($final_image, 10, 0, 11, 166, imagecolorallocate($final_image, 255, 255, 255), $Font_File, "Exp: ".$Player_Info['experience'] );

 

imagettftext($final_image, 10, 0, 10, 181, imagecolorallocate($final_image, 0, 0, 0), $Font_File, "Soul: ".$Player_Info['soul'] );

imagettftext($final_image, 10, 0, 11, 182, imagecolorallocate($final_image, 255, 255, 255), $Font_File, "Soul: ".$Player_Info['soul'] );

 

 

if ( $Player_Info['vocation'] > 0 ) {

 

switch ( $Player_Info['vocation'] ) {

 

case 1:

$Vocation = 'Sorcerer';

break;

case 2:

$Vocation = 'Druid';

break;

case 3:

$Vocation = 'Paladin';

break;

case 4:

$Vocation = 'Knight';

break;

case 5:

$Vocation = 'Master Sorcerer';

break;

case 6:

$Vocation = 'Elder Druid';

break;

case 7:

$Vocation = 'Royal Paladin';

break;

case 8:

$Vocation = 'Elite Knight';

break;

 

}

 

imagettftext($final_image, 10, 0, 10, 100, imagecolorallocate($final_image, 0, 0, 0), $Font_File, "Vocation: ".$Vocation );

imagettftext($final_image, 10, 0, 11, 101, imagecolorallocate($final_image, 255, 255, 255), $Font_File, "Vocation: ".$Vocation );

 

}

 

} else {

 

imagettftext($final_image, 12, 0, 90, 90, imagecolorallocate($final_image, 0, 0, 0), $Font_File, "Player nao existe!!" );

imagettftext($final_image, 12, 0, 91, 91, imagecolorallocate($final_image, 255, 255, 255), $Font_File, "Player nao existe!!!" );

 

}

 

} else {

 

imagettftext($final_image, 12, 0, 90, 90, imagecolorallocate($final_image, 0, 0, 0), $Font_File, "Player nao existe!!!" );

imagettftext($final_image, 12, 0, 91, 91, imagecolorallocate($final_image, 255, 255, 255), $Font_File, "Player nao existe!!!" );

 

}

 

imagettftext($final_image, 11, 0, 10, 20, imagecolorallocate($final_image, 0, 0, 0), $Font_File, $Server_Name );

imagettftext($final_image, 11, 0, 11, 21, imagecolorallocate($final_image, 255, 255, 255), $Font_File, $Server_Name );

 

imagettftext($final_image, 9, 0, 10, 32, imagecolorallocate($final_image, 0, 0, 0), $Font_File, $Server_Address );

imagettftext($final_image, 9, 0, 11, 33, imagecolorallocate($final_image, 255, 255, 255), $Font_File, $Server_Address );

 

imagettftext($final_image, 9, 0, 10, 42, imagecolorallocate($final_image, 0, 0, 0), $Font_File, $Server_Description );

imagettftext($final_image, 9, 0, 11, 43, imagecolorallocate($final_image, 255, 255, 255), $Font_File, $Server_Description );

 

//--Verificando a imagem no destino

header ( "Content-type: image/png" );

imagePng ( $final_image );

 

//--Script finalizado - By: Igor

?>

Salve na pasta htdocs como signature.php

 

Agora, salve essa imagem abaixo, na sua pasta htdocs, como background.png

backgroundyhn.png

 

Faça o download da fonte que vai se colocada na imagem, apos fazer o download, coloque o arial.ttf dentro da pasta htdocs > http://rapidshare.com/files/214584562/arial.rar.html <

 

Legenda:

Cor - Tutorial de como Instalar

Cor - Onde será mudado

Cor - Cor da fonte que será usado na imagem

 

Como Usar

 

Acesse:

http://localhost/signature.php?name=Nome de Um char

Ou

http://IP DO SEU OT/signature.php?name=Nome de Um char

 

Legenda de como usar

Cor - Nome de um Character que está cadastrado em sua database mysql

 

Se digitar um char invalido, vai dar Player não existe.

Quando o OT der servesave vai se atualizado altomaticamente a imagem

 

Leia-Me

Espero que tenhão gostado, apos isto você pode fazer varias coisas, colocar no seu site para todos ver, ou até mesmo , colocar em forums (assinaturas) sobre o seu Char do OT! Muito legal né!

 

Gostou? Apenas clique em Thanks no final do tópico.:bye:

 

Editado por Eddie Murphy

Compartilhar este post


Link para o post
SpeeD    1
SpeeD

Obrigado pelo tutorial.

Aprovado e movido.

Compartilhar este post


Link para o post
Durick    0
Durick

Bom Tuto...

^^

Compartilhar este post


Link para o post
Valoes    0
Valoes

Ùtil, E Diferente

- Aprovado,

Compartilhar este post


Link para o post
Nighandy    0
Nighandy

Otimo,tutorial eu queria aprende a faze isso antes,eu ficava vendo a do refugia e queria sabe como eles faziam,agora eu sei vlws

Compartilhar este post


Link para o post
mudox dellaforce    0
mudox dellaforce

mano vlws ae se mi ajudo pakarai

Compartilhar este post


Link para o post
Jake    0
Jake

nossa q system mar madaufockers !

 

Amei lek ;* disinrola esse system aê pra min ! comowfas? :said:

 

 

Parei.

 

 

Bem legal cara, COM CERTEZA vo usa.

 

 

xau (Y)

Compartilhar este post


Link para o post
evertronico    0
evertronico

Lembrando . para se usar algumas funcao do php como imagettf e etc.. e preciso ter a biblioteca GD do php caso nao tenha pode ser que nao consiga gerar a imagem com a assinatura !

Compartilhar este post


Link para o post
kleyne    0
kleyne

downloads ta quebrado.. coserta aew

Compartilhar este post


Link para o post
lbvargas    0
lbvargas

me ajudo vlws

Compartilhar este post


Link para o post
Bvkse    0
Bvkse

eu n achei essa pasta htdocs

Compartilhar este post


Link para o post
Visitante
Este tópico está impedido de receber novos posts.
Entre para seguir isso  
  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×