View Single Post
  #2  
Old 05-15-2009, 03:00 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
It's a GANI shown; usually a player attribute, but it can also be a showani. Tig recommended using a player attribute rather than a showani to me a while back.

Here's a hint; since it's a GANI, you can peek inside Era's. It was written by Skyld, and it's in use on GK and Era, so you shouldn't just copy it. Just get some "ideas" from it.

PHP Code:
GANI0001
SPRITE    0         SPRITES   24    0   16    8 sprite

SINGLEDIRECTION
DEFAULTHEAD head19
.png
DEFAULTBODY body
.png

SCRIPT
function getAlignmentShadowColor(redgreenblue)
{
  if (
red 0.75 || green 0.75)
  {  
    
red2 0
    
green2 0
  }
    else
  { 
    
red2 1
    
green2 1
  } 

  return {
red2green2blue};
}

function 
onCreated()
{
  if (
client.dmgdisplay)
  {
    return;
  }

  
temp.ix 1;

  
this.styles = {
    
// {checktype, textcheck, r, g, b, zoom}
    // check type is 1 for params[0].starts(check)
    //            or 0 for params[0] == check
    
{1"+"00.311},
    {
0"No damage"11, (client.yellow 1), 0.65},
    {
1"-"1001},
    {
0"Dead"1001},
    {
1"*"0101},
    {
1"^"0.210.21}
  };

  for (
temp.2temp.>= 0temp.-= 0.1)
  {
    
this.alpha = (temp.temp.1);

    
showtext(temp.ix1.5, (2) + temp.i"""bc"params[0]);
    
changeimgvis(temp.ix2);
    
changeimgzoom(temp.ix0.9);
    
changeimgcolors(temp.ix111this.alpha);

    
showtext(temp.ix 11.6, (2) + temp.0.05"""bc"params[0]);
    
changeimgvis(temp.ix 11);
    
changeimgzoom(temp.ix 10.9);
    
changeimgcolors(temp.ix 1000this.alpha);

    for (
temp.stylethis.styles)
    {
      if (
temp.style[0] == 1)
      {
        
temp.cond params[0].starts(temp.style[1]);
      }
        else
      {
        
temp.cond params[0] == temp.style[1];
      }
    
      if (
temp.cond)
      {
        
changeimgcolors(temp.ixtemp.style[2], temp.style[3], temp.style[4], this.alpha);
        
changeimgzoom(temp.ixtemp.style[5]);
        
changeimgzoom(temp.ix 1temp.style[5]);

        
this.shadow getAlignmentShadowColor(temp.style[2], temp.style[3], temp.style[4]);
        
changeimgcolors(temp.ix 1this.shadow[0], this.shadow[1], this.shadow[2], this.alpha);

        break;
      }
    }

    
sleep(0.05);
  }

  
hideimgs(temp.ixtemp.ix 1);
}
SCRIPTEND

ANI
ANIEND 
__________________
Reply With Quote