View Single Post
  #18  
Old 02-07-2008, 04:40 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Yeah, I've figured that the nick display gani stops showing when you go into the overworld, even if you come back into another level.
This is what I have for that script:
PHP Code:
function onPlayerEnters() {
  
this.nick "";
  
this.guild "";
  
onTimeOut();
}
function 
onTimeOut() {
  if (!
clientr.stealth) {
    if (
this.nick != player.attr[10] || this.guild != player.attr[11])
      
updateNick();
    for (
i=0i<4i++) {
      
changeimgcolors(200+iplayer.attr[17], player.attr[18], player.attr[19], .8);
      
changeimgzoom(200+ithis.size);
    }
    
changeimgcolors(202000.3);
    
changeimgcolors(203000.3);
  }
  else 
hideimgs(200,203);
  if (
this.font != player.attr[21] || this.style != player.attr[22] || this.size != player.attr[23])
    
updateNick();
  
setTimer(0.05);
}
function 
updateNick() {
  
hideimgs(200,203);
  
this.font player.attr[21];
  
this.style player.attr[22];
  
this.size player.attr[23];
  
this.nick player.attr[10];
  
this.guild player.attr[11];
  
temp.this.nick.tokenize("(");
  
temp.width1 gettextwidth(this.sizethis.fontthis.styletemp.n[0])/16;
  
temp.width2 gettextwidth(this.sizethis.fontthis.stylethis.guild)/16;
  
showtext(200player.x+1.5-(temp.width1/2), player.y+3this.fontthis.styletemp.n[0]);
  
showtext(201player.x+1.5-(temp.width2/2), player.y+3.75this.fontthis.stylethis.guild);
  
showtext(202player.x+1.5+(1/8)-(temp.width1/2), player.y+3+(1/8), this.fontthis.styletemp.n[0]);
  
showtext(203player.x+1.5+(1/8)-(temp.width2/2), player.y+3.75+(1/8), this.fontthis.stylethis.guild);
  for (
i=0i<4i++) {
    
changeimgcolors(200+iplayer.attr[17], player.attr[18], player.attr[19], .85);
    
changeimgzoom(200+ithis.size);
    
findImg(200+i).attachtoowner true;
  }
  
changeimgcolors(202000.85);
  
changeimgcolors(203000.85);
  
findImg(200).layer++;
  
findImg(201).layer++;

Also, my heart display keeps turning black at random times, and I can't really figure out why...
PHP Code:
function onCreated() {
  
showimg(200"mal_heartanim.gif", (player.0.5)%64, (player.2)%64);
  
setTimer(0.05);
}
function 
onPlayerEnters() {
  
showimg(200"mal_heartanim.gif", (player.0.5)%64, (player.2)%64);
  
setTimer(0.05);
}
function 
onTimeout() {
  
findimg(200).player.0.5;
  
findimg(200).player.2;

  
temp.healthcheck player.attr[4]*100;

  
findimg(200).player.0.5;
  
findimg(200).player.2;
  if (
temp.healthcheck in |96100|) temp.colors = {0,1};
  else if (
temp.healthcheck in |9195|) temp.colors = {.05,.95};
  else if (
temp.healthcheck in |8690|) temp.colors = {.1,.9};
  else if (
temp.healthcheck in |8185|) temp.colors = {.15,.85};
  else if (
temp.healthcheck in |7680|) temp.colors = {.2,.8};
  else if (
temp.healthcheck in |7175|) temp.colors = {.25,.75};
  else if (
temp.healthcheck in |6670|) temp.colors = {.3,.7};
  else if (
temp.healthcheck in |6165|) temp.colors = {.35,.65};
  else if (
temp.healthcheck in |5660|) temp.colors = {.4,.6};
  else if (
temp.healthcheck in |5155|) temp.colors = {.45,.55};
  else if (
temp.healthcheck in |4650|) temp.colors = {.5,.5};
  else if (
temp.healthcheck in |4145|) temp.colors = {.55,.45};
  else if (
temp.healthcheck in |3640|) temp.colors = {.6,.4};
  else if (
temp.healthcheck in |3135|) temp.colors = {.65,.35};
  else if (
temp.healthcheck in |2630|) temp.colors = {.7,.3};
  else if (
temp.healthcheck in |2125|) temp.colors = {.75,.25};
  else if (
temp.healthcheck in |1620|) temp.colors = {.8,.2};
  else if (
temp.healthcheck in |1115|) temp.colors = {.85,.15};
  else if (
temp.healthcheck in |610|) temp.colors = {.9,.1};
  else if (
temp.healthcheck in |15|) temp.colors = {.95,.05};
  
findImg(200).red temp.colors[0];
  
findImg(200).green temp.colors[1];
  
findImg(200).blue 0;
  
setTimer(0.05);

__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote