can anyone help me on making an exp bar for my proficieny?
i can't figure out how to make the code that well.
<wprof>1,1,64;2,1,184;
3,4,2241;9,0,30</wprof>
<cprof>1,0,1;2,0,8;5,1,541;6,0,13;7,1,1566</cprof>
<sprof>0,1,66;1,0,60;2,0,5</sprof>
i want the bolded proficiency (my dagger) and then make an exp bar so 0 is 0% and 5000 is 100%
can someone please help me with the code?
i got this as far:
Code
$wprof = array(
sword => 0, // set names and fill them with 0's so we always get a result from a call
club => 0,
axe => 0,
dagger => 0,
staff => 0,
longsword => 0,
warhammer => 0,
battleaxe => 0,
spear => 0,
polearm => 0 );
$w = split(";",$data->wprof);
foreach ($w as $a)
{
$wpn = array( 0 => 'sword', 1 => 'club', 2 => 'axe', 3 => 'dagger', 4 => 'staff', 5 => 'longsword', 6 => 'warhammer', 7 => 'battleaxe', 8 => 'spear', 9 => 'polearm');
$temp = split(",",$a);
$wpname = $temp[0];
$wpdata = $temp[1];
$wprof[$wpname] = $wpdata;
}
$temp = explode(";",$data->wprof);
foreach ((array) $temp as $value) {
$temp2 = explode(",",$value);
$wprof[(int)$temp2[0]] = (int)$temp2[1];
}
This post was edited by coldguy on Jun 10 2009 11:46am