Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   changing image parts (https://forums.graalonline.com/forums/showthread.php?t=68342)

excaliber7388 08-25-2006 03:35 AM

changing image parts
 
I've been using this script:
PHP Code:

 changeimgpart(2005,0,0,imgwidth(imagename)/clientr.exp_level*clientr.exp,10); 

to change the width of the bar for the exp.
Except, I've found that when the exp_level (the max value) variable gets too high, the bar will not change size. Is there a solution to this? I've seen other servers that have a higher variable, so there has to be some way.

Tolnaftate2004 08-25-2006 09:00 AM

Quote:

Originally Posted by excaliber7388
PHP Code:

 changeimgpart(2005,0,0,imgwidth(imagename)/clientr.exp_level*clientr.exp,10); 


You want to use clientr.exp/clientr.exp_level*getimgwidth(image);
And only display the image when that value is greater than 0.

Admins 08-25-2006 10:08 AM

Yes the image is displayed fully if the width or height of the image part is zero, so don't display it in that case


All times are GMT +2. The time now is 08:52 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.