Thread: Script errors
View Single Post
  #1  
Old 03-29-2008, 10:13 PM
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
Script errors

I'm not sure why It's doing this...

NPC Code:

Script compiler output for Class bloo_intercom:
Script bloo_intercom updated by bscharff


Here's the script
PHP Code:
function onCreated(){
  
join("bloofunctions");
  
setimg("angel_speaker.png");
  
setshape(1, 32, 32);
  
setTimer(0.05);
}

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.05);
}

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);
} 
I can't find anything wrong with it...
Can y'all?

This is a request for help, NOT A REQUEST FOR CRITIQUE/HARASSMENT!
__________________
Trying to be nice now...
Reply With Quote