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(13232);
  
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.intidthis.levelthis.xthis.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(1x+0.5y-1"Arial""b"doParse(this.attr[2]));
    
changeimgzoom(10.5);
    
changeimgcolors(11110.9);
  }else{
    
hideimg(1);
  }
  if (
this.attr[3] != NULL && this.attr[3] != ""){ //From
    
showtext(2x+0.5y-2"Arial""b"doParse(this.attr[3]));
    
changeimgzoom(20.5);
    
changeimgcolors(21110.9);
  }else{
    
hideimg(2);
  }
  
setTimer(0.05);

__________________
Trying to be nice now...
Reply With Quote