DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • April 24, 2018, 02:13:23 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1] 2 3   Go Down
  Print  
Author Topic: Bars  (Read 10419 times)
0 Members and 1 Guest are viewing this topic.
DeathDragon
Guest
« on: June 08, 2004, 02:47:57 PM »

I went on Lonny's site and saw that he had a mod that has bars that show hunger odor and stuff...does anyone have any idea how to do that?
Logged
Spider
Guest
« Reply #1 on: June 08, 2004, 03:08:29 PM »

there is a hunger script available here (I dont' recall who wrote it though), and if you get hold of that and look it over, it shouldn't be too hard to figure out how to add other stats such as odor.

There are also a few extras which work with the hunger mod around.  Have fun searching... Wink
Logged
DeathDragon
Guest
« Reply #2 on: June 08, 2004, 03:10:50 PM »

Well I don't want the hunger script if you go to lonny's site you will see what I mean...I want to know how to make bars...
Logged
kodysumter
Guest
« Reply #3 on: June 08, 2004, 03:16:12 PM »

you mean in the stats are like under Vital info? if that is right open the common(*CAREFUL MAKE BACKUP VERY DANGEROUS IF YOU SCREW UP AND FORGET OR DONT KNOW WHAT YOU DID!*) and press control+f and type in vital info. and youl come to the vital info section
Logged
DeathDragon
Guest
« Reply #4 on: June 08, 2004, 03:17:54 PM »

Huh? I just want to know how to make bars..
Logged
lonnyl
Guest
« Reply #5 on: June 08, 2004, 03:20:43 PM »

He means graphical status meters..... kind of like the meters in the battle arena script...

and when the mod is tweaked... and ready... I'll post it here...WHEN it's ready.
Logged
DeathDragon
Guest
« Reply #6 on: June 08, 2004, 03:23:40 PM »

OK do you have any idea when that will be?
Logged
DeathDragon
Guest
« Reply #7 on: June 08, 2004, 03:25:17 PM »

do you mean the pvparena script by anpera?
Logged
lonnyl
Guest
« Reply #8 on: June 08, 2004, 03:36:59 PM »

no the battle arena by me....

oh , and don't take the battle arena graphics script too literally... I will be updating that to diplay better and without sending so many images over the wire...
« Last Edit: June 08, 2004, 03:40:10 PM by lonnyl » Logged
DeathDragon
Guest
« Reply #9 on: June 08, 2004, 04:12:02 PM »

Is there anyway to make there be a percent next to the bars?
I have this thing called evil and good points and i want to have a bar and a percent next to it showing the percent of evil and good points they have
Logged
lonnyl
Guest
« Reply #10 on: June 08, 2004, 07:30:52 PM »

Yes a percent would actually be very easy to do...

although on our game you can build unlimited evil points... so we simply do evil, neutral and good.
« Last Edit: June 08, 2004, 07:31:49 PM by lonnyl » Logged
DeathDragon
Guest
« Reply #11 on: June 08, 2004, 08:28:57 PM »

well when you get the bars thing working can u put in how to do a percent?
Logged
DeathDragon
Guest
« Reply #12 on: June 13, 2004, 01:41:11 PM »

OK i kind of got the bars working...in common.php after the function charstats i added
insert_once("odor.php");
then after the .templatereplace("statrow",array("title"=>"Gold","value"=>$u['gold']))

I added:

.templatereplace("statrow",array("title"=>"Odor","value"=>displayOdor($u)))

then my odor.php looks like so...

<?

function displayOdor($u)///The Images with links that are displayed in the Vitals come from here
{
if ($session['user']['odor']<3){
$theDisplay=$theDisplay."<img src=\"images/odor.gif\">";}
if ($session['user']['odor']>2 && $session['user']['odor']<5){
$theDisplay=$theDisplay."<img src=\"images/odor.gif\"><img src=\"images/odor.gif\">";}
if ($session['user']['odor']>4 && $session['user']['odor']<7){
$theDisplay=$theDisplay."<img src=\"images/odor.gif\"><img src=\"images/odor.gif\"><img src=\"images/odor.gif\">";}
if ($session['user']['odor']>6){
$theDisplay=$theDisplay."<img src=\"images/odor.gif\"><img src=\"images/odor.gif\"><img src=\"images/odor.gif\"><img src=\"images/odor.gif\">";}

return($theDisplay);
}
?>

it displays the bar but it doesnt go up if you have more...anyone have any suggestios?

I give credit to Genis (I used his potions mod and changed it around)
and Lonny (Used his chart pics from the battlearena.php)

Thanks ~DD~
Logged
dvd871
Guest
« Reply #13 on: June 13, 2004, 02:50:26 PM »

Time to give a little back to the cause.  Here is a nice little function that I did to generate an experience bar.  Keep in mind that it hasn't been tested for very long, but it does seem to work and it uses no images which cuts down on the datatransfer.

Code:
// exp bar mod coded by: dvd871

function expbar() {
    global $session;
    $exparray=array(1=>100,400,602,1012,1540,2207,3041,4085,5395,7043,9121,11740,15037,19171,24330);
   while (list($key,$val)=each($exparray)){
      $exparray[$key]= round(
         $val + ($session['user']['dragonkills']/4) * $session['user']['level'] * 100,0);
   }
    $exp = $session[user][experience];
   $reqexp=$exparray[$session[user][level]];
    $u = "<font face=\"verdana\" size=1>" . $exp . "/" . $reqexp . "<br><table style=\"border: solid 1px #000000\" cellspacing=\"0\" width=\"70\" height=\"5\"><tr><td width=\"" . ($exp / $reqexp * 100 + 1) . "%\" bgcolor=\"red\"></td><td></td></tr></table>";
return($u);
}
// end exp bar mod

Any improvements or suggestions are welcome. Smiley
Logged
DeathDragon
Guest
« Reply #14 on: June 13, 2004, 02:56:28 PM »

So how would you make it so it calls that in the Vital Info?
Logged
Pages: [1] 2 3   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Play LoGD on Dragonprime

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
39 Guests, 1 User
pharis
Home Forums News Downloads Login Register Advanced Search