Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Acmlmboard support?.
Acmlm's Board - I2 Archive - Acmlmboard support? - Trouble with PHP image | | Thread closed
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
Rainbow Yoshi

Level: 30

Posts: 489/496
EXP: 159486
For next: 6383

Since: 04-08-05

Since last post: 14 hours
Last activity: 4 hours
Posted on 10-17-05 05:43 AM Link
First off I am a total n00b.
2nd What I want is basically just a little square image telling me my Item Stats
I copied this from another image _level.php and edited a little anybody know how to get it to work?

require 'lib/function.php';
require 'lib/rpg.php';

if(!$u) die();
$user=mysql_fetch_array(mysql_query("SELECT name,attack,defence,hp,hpoff,mana,manaoff,speed FROM users WHERE id=$u"));

Header('Content-type:image/png');
$img=ImageCreate(184,96);
$c[bg]= ImageColorAllocate($img, 40, 40, 90);
$c[bxb0]=ImageColorAllocate($img, 0, 0, 0);
$c[bxb1]=ImageColorAllocate($img,225,200,180);
$c[bxb2]=ImageColorAllocate($img,190,160,130);
$c[bxb3]=ImageColorAllocate($img,130,110, 90);
for($i=0;$i<100;$i++)
$c[$i]=ImageColorAllocate($img,10,16,80+$i);
ImageColorTransparent($img,0);

box( 0, 0,23,12);

$fontY=fontc(255,250,240, 255,240, 80, 0, 0, 0);
$fontR=fontc(255,230,220, 240,160,150, 0, 0, 0);
$fontG=fontc(190,255,190, 60,220, 60, 0, 0, 0);
$fontB=fontc(160,240,255, 120,190,240, 0, 0, 0);
$fontW=fontc(255,255,255, 210,210,210, 0, 0, 0);

twrite($fontW, 1, 1,0,"$user[name]");
twrite($fontW, 1, 2,0,"Item Shop Stats");
twrite($fontB, 1, 5,0,'HP:');
twrite($fontB, 1, 6,0,'MP:');
twrite($fontY, 7, 5,7,$user[hp]/$user[hpoff]);
twrite($fontY, 6, 6,8,$user[mana]/$user[mana]);
twrite($fontB, 1, 9,0,'Attack:');
twrite($fontB, 1,10,0,'Defence:');
twrite($fontY, 7, 9,7,$user[attack]);
twrite($fontY, 6,10,8,$user[defence]);

ImagePNG($img);
ImageDestroy($img);

function twrite($font,$x,$y,$l,$text){
global $img;
$x*=8;
$y*=8;
$text.='';
if(strlen($text)<$l) $x+=($l-strlen($text))*8;
for($i=0;$i ImageCopy($img,$font,$i*8+$x,$y,(ord($text[$i])%16)*8,floor(ord($text[$i])/16)*8,8,8);
}
function fontc($r1,$g1,$b1,$r2,$g2,$b2,$r3,$g3,$b3){
$font=ImageCreateFromPNG('images/rpg/font.png');
ImageColorTransparent($font,1);
ImageColorSet($font,6,$r1,$g1,$b1);
ImageColorSet($font,5,($r1*2+$r2)/3,($g1*2+$g2)/3,($b1*2+$b2)/3);
ImageColorSet($font,4,($r1+$r2*2)/3,($g1+$g2*2)/3,($b1+$b2*2)/3);
ImageColorSet($font,3,$r2,$g2,$b2);
ImageColorSet($font,0,$r3,$g3,$b3);
return $font;
}
function box($x,$y,$w,$h){
global $img,$c;
$x*=8;
$y*=8;
$w*=8;
$h*=8;
ImageRectangle($img,$x+0,$y+0,$x+$w-1,$y+$h-1,$c[bxb0]);
ImageRectangle($img,$x+1,$y+1,$x+$w-2,$y+$h-2,$c[bxb3]);
ImageRectangle($img,$x+2,$y+2,$x+$w-3,$y+$h-3,$c[bxb1]);
ImageRectangle($img,$x+3,$y+3,$x+$w-4,$y+$h-4,$c[bxb2]);
ImageRectangle($img,$x+4,$y+4,$x+$w-5,$y+$h-5,$c[bxb0]);
for($i=5;$i<$h-5;$i++){
$n=(1-$i/$h)*100;
ImageLine($img,$x+5,$y+$i,$x+$w-6,$y+$i,$c[$n]);
}
}
?>
Elric

Chasupa


Currently Playing:
You Like A Lute.
Level: 40

Posts: 660/687
EXP: 440016
For next: 1293

Since: 03-15-04
From: Melniboné

Since last post: 6 hours
Last activity: 6 hours
Posted on 10-17-05 08:42 AM Link
You're just a flat out asshole, aren't you? You must get some perverse joy stealing my shit and claiming it as your own. First you steal my AnnCP AcmlmBoard mod, and claim it as your own over on GamingG, and now you steal my layout, CSS file and all!

I hope you burn in hell.
Uzumaki285

Level: 6

Posts: 16/16
EXP: 576
For next: 331

Since: 08-13-05
From: sairutoshrine.fiftypounds.com

Since last post: 15 days
Last activity: 6 days
Posted on 10-17-05 03:04 PM Link
Ok, that's messed up....and the 2nd thing, you're more of a newb then I am. I never studied CSS in my life and I know what to do to make it work. Am I stupid enugh to actually explain how it works? No...make your own layout.
::uses Kirby Finger of burnination in hell card and pwns Rainbow Yoshi:: t('-'t)
Sandy53215
Acmlm (10:55:31 PM): they're having fun for the first time in so long
Level: 47

Posts: 931/948
EXP: 713034
For next: 53169

Since: 03-15-04
From: Milwaukee, Wisconsin (U.S.A)

Since last post: 1 day
Last activity: 4 hours
Posted on 10-17-05 11:30 PM Link
I refuse to help people who have stolen code and claimed it as theres. That and im not good with the GD library, used it once.:/
TheGreatWhiteDope

Koopa
Banned
Level: 16

Posts: 104/108
EXP: 19462
For next: 794

Since: 01-05-05

Since last post: 8 days
Last activity: 4 days
Posted on 10-18-05 12:34 AM Link
*Has also stole many of my codes*

Yeah, be glad your board is not gone yet, you have seen what I am capible of already.

DIE NOOB!

But, how to get the code to work: Put forth some effort and make it yourself, noob.


(edited by TheGreatWhiteDope on 10-17-05 03:36 PM)
Rainbow Yoshi

Level: 30

Posts: 490/496
EXP: 159486
For next: 6383

Since: 04-08-05

Since last post: 14 hours
Last activity: 4 hours
Posted on 10-18-05 03:04 AM Link
Okay someone just close this please .
And I didnt steal your Anncp, GamingG wanted yours and never even put mine
Chris

Boo
Level: 46

Posts: 853/922
EXP: 663200
For next: 48574

Since: 04-20-04

Since last post: 7 hours
Last activity: 4 hours
Posted on 10-18-05 03:56 AM Link
Ah, Rainbow Yoshi. You've still yet to learn, eh? I think what I am hearing here is true... I thought it wasn't at first, but it seems to me that everyones beginning to think you're stealing almost everything.

I don't know what to say... (Sorry, I can't close this for you.)
Rainbow Yoshi

Level: 30

Posts: 491/496
EXP: 159486
For next: 6383

Since: 04-08-05

Since last post: 14 hours
Last activity: 4 hours
Posted on 10-18-05 04:02 AM Link
What havent I learned Chris, I didnt steal anything but the layout , AND BTW I CHANGE LAYOUTS TO ANOTHER ONE I FIND ABOUT EVERY WEEK (SO DONT THINK YOU SPECIAL ELRIC , and whoever your hearing from is probably an idiot , and to TheGreatWhiteDope, you said I could take them that you didnt mind because they stuff you made as a n00b.


(edited by Rainbow Yoshi on 10-17-05 07:03 PM)
Sandy53215
Acmlm (10:55:31 PM): they're having fun for the first time in so long
Level: 47

Posts: 932/948
EXP: 713034
For next: 53169

Since: 03-15-04
From: Milwaukee, Wisconsin (U.S.A)

Since last post: 1 day
Last activity: 4 hours
Posted on 10-18-05 08:12 AM Link
Ok enough of the arguing...

[closes per request]
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Acmlmboard support? - Trouble with PHP image | | Thread closed


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.015 seconds.