View Single Post
  #6  
Old 05-05-2012, 08:36 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by Gunderak View Post
@ffcmike
Your method seems a tad better, but I really don't know how you drew yourself to make the arrays. Wouldn't that of taken a very long time?
PHP Code:
//#CLIENTSIDE
function onCreated(){
  for(
temp.0temp.101temp.++){
    
temp.this.getAlignmentColor(temp.i);
    
temp.a.add("{" temp."},");
    
temp.s.add("{" this.getAlignmentShadow(temp.itemp.c) @ "},");
  }
  
temp.a.savelines("apvalues.txt"0);
  
temp.s.savelines("shadowvalues.txt"0);

function 
getAlignmentColor(value) { 
  if (
value<=0) return {64,0,0}; 
  if (
value<=26) return {128+int(127*(value-1)/25),64-int(64*(value-1)/25),64-int(64*(value-1)/25)}; 
  if (
value<=49) return {255,int(255*(value-26)/24),int(255*(value-26)/24)}; 
  if (
value<=55) return {255,255,255}; 
  if (
value<=60) return {255-int(127*(value-55)/5),255,255-int(127*(value-55)/5)}; 
  if (
value<=70) return {128-int(128*(value-61)/10),255,128+int(127*(value-61)/10)}; 
  if (
value<=99) return {0,255-int(255*(value-70)/29),255}; 
  return {
231,199,0}; 
}  

function 
getAlignmentShadow(temp.aptemp.c) { 
  if (
temp.ap == 100
    
temp.= {255,255,0}; 
  else 
    
temp.c[0] = temp.c[1] = 255 * !(temp.c[0]>191.25 || temp.c[1]>191.25); 
  return 
temp.c

Reply With Quote