Thread: Script errors
View Single Post
  #4  
Old 04-06-2008, 04:08 AM
bscharff bscharff is offline
Bloo
bscharff's Avatar
Join Date: Sep 2006
Location: San Antonio, Texas
Posts: 185
bscharff has a little shameless behaviour in the past
Send a message via AIM to bscharff Send a message via MSN to bscharff Send a message via Yahoo to bscharff
Would a space after //#CLIENTSIDE actually do that?
Wow...

Oh wait... on RC it doesn't show a space after the //#CLIENTSIDE

and I think I recently changed the this.id varname to this.intid
Thanks lol.

New version:
PHP Code:
function onCreated(){
  
join("bloofunctions");
  
setimg("angel_speaker.png");
  
setshape(1, 32, 32);
  
onTimeout();
}

function 
onTimeout(){
  if (
this.id != NULL){
    
this.attr[2] = findnpc("BlooIntercoms").(@this.intid).message; //Message
    
this.attr[3] = findnpc("BlooIntercoms").(@this.intid).from; //From
  
}
  
setTimer(0.1);
}

function 
onActionLeftMouse(){
  if (
player.chat.starts("/intercom") && queryRight("intercom")){
    
tokens = player.chat.tokenize();
    
command = tokens[1];
    
p1 = tokens[2];
    
p2 = tokens[3];
    
p3 = tokens[4];
    if (
command == "register"){
      
this.intid = abs(int(p1));
      
findnpc("BlooIntercoms").doRegister(this.intid, this.level, this.x, this.y);
    }
    if (
command == "clear"){
      
findnpc("BlooIntercoms").sendMessage(this.intid, "", (player.nick@" ("@player.account@")"));
    }
  }
}

//#CLIENTSIDE
function onCreated(){
  
join("bloofunctions");
  
setTimer(0.05);
}

function 
onTimeout(){
  if (
this.attr[2] != NULL && this.attr[2] != ""){ //Message
    
showtext(1, x+0.5, y-1, "Arial", "b", doParse(this.attr[2]));
    
changeimgzoom(1, 0.5);
    
changeimgcolors(1, 1, 1, 1, 0.9);
  }else{
    
hideimg(1);
  }
  if (
this.attr[3] != NULL && this.attr[3] != ""){ //From
    
showtext(2, x+0.5, y-2, "Arial", "b", doParse(this.attr[3]));
    
changeimgzoom(2, 0.5);
    
changeimgcolors(2, 1, 1, 1, 0.9);
  }else{
    
hideimg(2);
  }
  
setTimer(0.05);
} 
__________________
Trying to be nice now...
Reply With Quote