d2jsp
Log InRegister
d2jsp Forums > d2jsp > Ladder Slasher > Guide: How-to Make A Dynamic Ladder-slasher Sig > In A Few Easy Steps With Pics
Prev1202122232460Next
Add Reply New Topic New Poll
Member
Posts: 19,516
Joined: Dec 26 2007
Gold: 264.04
Jan 11 2009 02:11pm
does anybody know how to get proficiencies?
Member
Posts: 4,620
Joined: Aug 3 2008
Gold: 525.25
Jan 11 2009 02:43pm
i like them called by name, here is how i do it.



Code





$cprof = array(
                       ice => 0,      // set names and fill them with 0's  so we always get a result from a call
                      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;
 }




This post was edited by SilentXer0 on Jan 11 2009 02:43pm
Member
Posts: 8,928
Joined: Jul 24 2008
Gold: 15.05
Jan 11 2009 03:44pm
Silent have u the "last played" info code? smile.gif
Member
Posts: 4,620
Joined: Aug 3 2008
Gold: 525.25
Jan 11 2009 03:48pm
call it as $lastplayed


Code


               $lastaction = (int)$data->lastaction;
 $time1 = time() - $lastaction;
 $lastplayed = sec2hms($time1);



function sec2hms ($sec, $padHours = false)
{

  $days = intval(intval($sec) / 86400);
  $hours = intval(($sec / 3600) % 24);
  $minutes = intval(($sec / 60) % 60);
 
  if ($days > 0) {
  $hms = $days. ' days, ';

  $hms .= ($padHours)
        ? str_pad($hours, 2, "0", STR_PAD_LEFT). ' hours ago'
        : $hours. ' hours ago';
} else {
   $hms = "";
     $hms .= ($padHours)
      ? str_pad($hours, 2, "0", STR_PAD_LEFT). ' hours, '
      : $hours. ' hours, ';

  $hms .= str_pad($minutes, 2, "0", STR_PAD_LEFT). ' minutes ago';
}

  return $hms;
 
}




This post was edited by SilentXer0 on Jan 11 2009 03:48pm
Member
Posts: 8,928
Joined: Jul 24 2008
Gold: 15.05
Jan 11 2009 04:40pm
tnx a lot m8! smile.gif

i go to try it soon!
Member
Posts: 17,403
Joined: Aug 18 2006
Gold: 0.00
Jan 11 2009 05:56pm
Looks like that code dont work with transparent images. Anyone figured out how to use it with transparent bg ?
Member
Posts: 8,928
Joined: Jul 24 2008
Gold: 15.05
Jan 11 2009 06:38pm
Quote (SilentXer0 @ Sun, 11 Jan 2009, 22:48)
call it as $lastplayed


wow it works!! ^^
GREAT! heart2.gif

Tnx again Silent hug.gif
Member
Posts: 4,620
Joined: Aug 3 2008
Gold: 525.25
Jan 11 2009 08:10pm
Quote (UberTristram @ Sun, Jan 11 2009, 07:38pm)
wow it works!! ^^
GREAT! heart2.gif

Tnx again Silent hug.gif


Glad i could help.
Member
Posts: 1,909
Joined: May 8 2007
Gold: 2,507.26
Jan 12 2009 10:27am
Cool to see people are still using this guide. Thanks to all people providing answer to the questions, I have been really busy and hardly check d2jsp sad.gif. Keep up the good work, will try to check more often and to fix my pictures lol smile.gif.
Member
Posts: 2,056
Joined: Sep 20 2008
Gold: 10.95
Jan 13 2009 04:42pm
i hope this works im trying atm
Go Back To Ladder Slasher Topic List
Prev1202122232460Next
Add Reply New Topic New Poll