Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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(13232);
  
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.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);

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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:08 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.