d2jsp
Log InRegister
d2jsp Forums > d2jsp > Ladder Slasher > Guide: How-to Make A Dynamic Ladder-slasher Sig > In A Few Easy Steps With Pics
Prev1404142434460Next
Add Reply New Topic New Poll
Banned
Posts: 4,682
Joined: Jul 11 2008
Gold: 26,791.50
Warn: 20%
Jun 2 2009 04:03pm
Quote (coldguy @ Tue, Jun 2 2009, 03:47pm)
just have no clue what to do with the code alone :(


Quote
3. The code explained

Did you read the first post?
Member
Posts: 4,921
Joined: Mar 25 2008
Gold: 1.02
Jun 3 2009 02:57pm
did you?

this is the explination of the calculation part:

'I believe you can figure this easy math out . It is used to calculate the exp bar values. Fmod is a modulo math function'

SOOOOO...


> ? <
Member
Posts: 4,921
Joined: Mar 25 2008
Gold: 1.02
Jun 4 2009 02:24am
still can't get the MQ exp bar fixed.

i put in the code... try to make an exp bar but i allready get stuck in the beginning.. i just get the value 0 out of the calculation...
Member
Posts: 20,664
Joined: Aug 20 2006
Gold: 620.00
Jun 4 2009 05:55am
Quote (coldguy @ Thu, Jun 4 2009, 09:24am)
still can't get the MQ exp bar fixed.

i put in the code... try to make an exp bar but i allready get stuck in the beginning.. i just get the value 0 out of the calculation...


thats what I'm using and it works 100% ;)

MQ Bar

Code
$brpixelX = calcBrPixelX($level,$xpbar_width);


Code
imagefilledrectangle($image, 155, 129, $brpixelX, 136, $white);


calc part
Code
/***
* calculate the exp bar width.
***/
function calcBrPixelX($xpbar_width,$level)
 {
$temp1 = ($xpbar_width/71);
$temp1 = ($temp1*$level);
$temp1 = $temp1 + 155;

return (int)$temp1;
 }
 





Percent

Code
$passrate = calcPassRate($level);


calc part
Code
/***
* Calculate the percentage of pass rate
***/
function calcPassRate($level)

{


$temp1 = ($level/71);
$temp1 = $temp1 * 100;

       return (int)$temp1;
}
Member
Posts: 4,921
Joined: Mar 25 2008
Gold: 1.02
Jun 4 2009 06:07am
doesn't do it for me.. ffs
Member
Posts: 20,664
Joined: Aug 20 2006
Gold: 620.00
Jun 4 2009 06:08am
Quote (coldguy @ Thu, Jun 4 2009, 01:07pm)
doesn't do it for me.. ffs


sent me your complete code and I'll check it ;)
Member
Posts: 4,921
Joined: Mar 25 2008
Gold: 1.02
Jun 4 2009 11:30am
Member
Posts: 4,921
Joined: Mar 25 2008
Gold: 1.02
Jun 4 2009 02:37pm
allright,

special thanks to guMKa for helping me with the % to MQ function. now i can't figure out how to get those proficiency's in.
who has some time to explain it to me?
Member
Posts: 4,921
Joined: Mar 25 2008
Gold: 1.02
Jun 4 2009 03:17pm
next issue:

Code

$cprof = array(
                      ice => 0,      
                     fire => 0,      
                lightning => 0,      
                     wind => 0,      
                    earth => 0,      
                 wildheal => 0,      
                     heal => 0,      
              focusedheal => 0 );    



$c = split(";",$data->cprof);
      foreach ($c as $a)
      {
    $cpn = array( 0 => 'ice', 1 => 'fire', 2 => 'lightning', 3 => 'wind', 4 => 'earth', 5 => 'wildheal', 6 => 'heal', 7 => 'focusedheal');  
    $temp = split(",",$a);
    $cpname =  $temp[0];
    $cpdata =  $temp[1];
    $cpname = $cpn[(int)$cpname];
    $cprof[$cpname] = $cpdata;
}


$temp = explode(";",$data["cprof"]);
foreach ((array) $temp as $value) {
$temp2 = explode(",",$value);
$cprof[(int)$temp2[0]] = (int)$temp2[1];
}


if i put that code in and i call for $cprof[0]
i do get a 0 like the ice proficiency (0)

but if i want to call for $cprof[5] (wild heal) it doesn't give me any result.
how can i get a result from $cprof[5] (or $wprof[2,3,4]) just like i get with $cprof[0]?
Member
Posts: 4,921
Joined: Mar 25 2008
Gold: 1.02
Jun 5 2009 04:18am
B
U
M
P
Go Back To Ladder Slasher Topic List
Prev1404142434460Next
Add Reply New Topic New Poll