- Joined
- Sep 9, 2008
- Messages
- 1,052
- Reaction score
- 475
По вероятно Gasolincho да помогне тук:
Ето как изглежда картинката:
ето кода :
Къде е проблема че така разбъркано ги дава?
Също така уш трябва да показва на потребителя героя с левел ресет и т.н а той дава само името ехп и дроп и колко са онлайн.
Сложил съм твоя фикс signature v2 но видях че 1 ред си изпуснал за връзка с дб-то опраих го но другото нз.
Ето как изглежда картинката:
ето кода :
Code:
<?php
error_reporting(E_ALL);
session_start();
$sql['address'] = 'localhost';
$sql['db'] = 'MuOnline';
$sql['user'] = 'myuser';
$sql['passwd'] = 'mypassword';
$mu['name'] = 'Muonline-bg.eu';
$mu['url'] = 'muonline-bg.eu'; // Dont use http:// or www. //
$mu['xpdrps'] = '[9999x][70%]';
header("Content-type: image/jpg");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
$muimage = imagecreatefromjpeg("signature.jpg");
$class[0] = 'DW';
$class[1] = 'SM';
$class[2] = 'GrM'; // Season 3 class
$class[16] = 'DK';
$class[17] = 'BK';
$class[18] = 'BM'; // Season 3 class
$class[32] = 'Elf';
$class[33] = 'ME';
$class[34] = 'HE'; // Season 3 class
$class[48] = 'MG';
$class[49] = 'DM'; // Season 3 class
$class[64] = 'DL';
$class[65] = 'LE'; // Season 3 class
mssql_connect($sql['address'], $sql['user'], $sql['passwd']);
mssql_select_db($sql['db']);
$mufont = 'segoepr.ttf';
$mufont2 = 'Candara.ttf';
$mucolor = ImageColorAllocate($muimage, 0xFF, 0xFF, 0xFF);
$mucolor1 = ImageColorAllocate($muimage, 0x99, 0x99, 0x99);
$mucolor2 = ImageColorAllocate($muimage, 0x22, 0x22, 0x22);
$mucolor3 = ImageColorAllocate($muimage, 0xDD, 0xDD, 0xDD);
imagefttext($muimage, 10, -20, 300-strlen($mu['name'])*8-33, 39, $mucolor1, $mufont, $mu['name']);
imagefttext($muimage, 10, -20, 300-strlen($mu['name'])*8-33, 39, $mucolor, $mufont, $mu['name']);
imagefttext($muimage, 10, -0, 320-strlen($mu['url'])*8-33, 25, $mucolor, $mufont, $mu['url']);
if (@$_GET['player']) {
$character = str_replace("'","''", $_GET['player']);
$sql = mssql_query("select * from [Character] where name='".$character."'");
$character = mssql_fetch_array($sql);
$sql = mssql_query("select [connectstat] from [MEMB_STAT] join [AccountCharacter] on [MEMB_STAT].[memb___id]=[AccountCharacter].[Id] where [MEMB_STAT].[memb___id]='".$character['AccountID']."'");
$amionline = mssql_fetch_row($sql);
$sql = mssql_query("select count(*) from [Character] where [ctlCode]>32");
$result = mssql_fetch_row($sql);
$gms = $result[0];
$sql = mssql_query("select count(*) from [Character] where [Resets]>".$character['Resets']);
$result = mssql_fetch_row($sql);
$myrank = $result[0]+=$gms*-1+1;
if ($myrank>100)
$myrank = "unranked";
switch($amionline[0]) {
case 1:
$status="Online";
break;
default:
$status="Offline";
}
$sql = mssql_query("select [G_Name] from [GuildMember] where [Name]='".$character['Name']."'");
$myguild = @mssql_fetch_row($sql);
if (!@$myguild[0])
$guild = 'none';
else
$guild = $myguild[0];
}
$sql = mssql_query("select count(*) from [MEMB_STAT] where [connectstat]=1;");
$result = mssql_fetch_row($sql);
$online = number_format($result[0]);
$sql = mssql_query("select count(*) from [MEMB_INFO]");
$result = mssql_fetch_row($sql);
$accts = number_format($result[0]);
$sql = mssql_query("select count(*) from [Character]");
$result = mssql_fetch_row($sql);
$chars = number_format($result[0]);
$sql = mssql_query("select count(*) from [Guild]");
$result = mssql_fetch_row($sql);
$guilds = number_format($result[0]);
imagefttext($muimage, 11, 3, 190, 90, $mucolor, $mufont2, $online.' online players');
imageline($muimage,5,15,240,15,$mucolor2);
imageline($muimage,5,16,240,16,$mucolor2);
if (@$character) {
imagefttext($muimage, 15, 0, 14, 35, $mucolor3, $mufont, 'Char:');
imagefttext($muimage, 10, 0, 70, 35, $mucolor, $mufont, $character['Name'].' ('.$class[$character['Class']].')');
imagefttext($muimage, 15, 0, 14, 55, $mucolor3, $mufont, 'Level:');
imagefttext($muimage, 15, 0, 70, 55, $mucolor, $mufont, $character['cLevel']);
imagefttext($muimage, 15, 0, 15, 75, $mucolor3, $mufont, 'Resets:');
imagefttext($muimage, 15, 0, 83, 75, $mucolor, $mufont, $character['Resets'].' / #'.$myrank);
imagefttext($muimage, 15, 0, 15, 95, $mucolor3, $mufont, 'Guild:');
imagefttext($muimage, 15, 0, 74, 95, $mucolor, $mufont, $guild);
imagefttext($muimage, 15, 0, 15, 115, $mucolor3, $mufont, 'Status:');
imagefttext($muimage, 15, 0, 86, 115, $mucolor, $mufont, $status);
}
imagefttext($muimage, 13,10,225, 128, $mucolor, $mufont, $mu['xpdrps']);
imagejpeg($muimage);
imagedestroy($muimage);
?>
Къде е проблема че така разбъркано ги дава?
Също така уш трябва да показва на потребителя героя с левел ресет и т.н а той дава само името ехп и дроп и колко са онлайн.
Сложил съм твоя фикс signature v2 но видях че 1 ред си изпуснал за връзка с дб-то опраих го но другото нз.