[PHP] t_item display class, armor and weapon for website
#4

Very nice!

 

I seen u write there that u wanted to display the icons of a item also.

 

if u use this as GD image then u will.

All u have to do is convert the ItemBtn*.tex files to jpg/gif/png

 

 

// Create image instances
$src = imagecreatefromgif(ItemBtn.$_GET[i]..gif);
$dest = imagecreatetruecolor(32, 32);

$row_start = $_GET[r] * 32;
$row_end = $row_start + 32;

$col_start = $_GET[c] * 32;
$col_end = $col_start + 32;

// Copy
imagecopy($dest, $src, 0, 0, $col_start, $row_start, $col_end, $row_end);

// Output and free from memory
header(Content-Type: image/gif);
imagegif($dest);

imagedestroy($dest);
imagedestroy($src);
?>

 

Then u can just get the icon with

 

 

This will display icon id 0 (ItemBtn0)

Row 0 , Column 0 (gold coin icon)

 

The values are in the t_item database



Messages In This Thread
[No subject] - by Sycohazza - 07-06-2011, 07:33 PM
[No subject] - by Sutz - 07-06-2011, 07:46 PM
[No subject] - by Mega123 - 07-06-2011, 07:58 PM
[No subject] - by Wizatek - 07-06-2011, 09:32 PM
[No subject] - by pako71 - 07-06-2011, 09:45 PM
[No subject] - by Sutz - 07-06-2011, 09:48 PM
[No subject] - by Wizatek - 07-06-2011, 10:23 PM
[No subject] - by Sycohazza - 07-06-2011, 10:29 PM
[No subject] - by Sycohazza - 07-07-2011, 11:14 AM
[No subject] - by Sycohazza - 07-07-2011, 12:25 PM
[No subject] - by Sutz - 07-07-2011, 03:52 PM
[No subject] - by LooniboonS - 07-07-2011, 03:55 PM
[No subject] - by Sycohazza - 07-07-2011, 04:08 PM
[No subject] - by Sutz - 07-07-2011, 04:45 PM
[No subject] - by Sycohazza - 07-07-2011, 05:17 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)