Thread: Mailing System
View Single Post
  #16  
Old 05-29-2007, 01:57 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
Class: postoffice-getmail
PHP Code:
function onCreated(){
  
setshape(1,32,32);
}

function 
onActionGrabbed(){
  if (
clientr.sentmail == false)
  {
    if (
clientr.sendmailto == null)
    {
      
findNPC("Mail").calcMostSent();
      
temp.num findNPC("Mail").mailIDs.size();
      
temp.mailID findNPC("Mail").mailIDs[random(0,temp.num)];
      
clientr.sendmailto temp.mailID;
      
temp.msg "Hmm... this letter is for someone at " clientr.sendmailto;
      
player.chat temp.msg;
      return;
    }
    else
    {
    
temp.msg clientr.sendmailto " is expecting a letter from you!";
    
player.chat temp.msg
    
return;
    }
  }
  
    if (
clientr.sentmail == true)
  {
    
findNPC("Mail").calcMostSent();
    
temp.paydol int(random(4,6));
    
player.rupees += temp.paydol;
    
clientr.sendmailto null;
    
clientr.sentmail false;
    
player.chat format("Recieved %i rupees"temp.paydol);
    return;
  }
}

//#CLIENTSIDE
function onCreated() {
  
setshape(1,32,32);

Error Received:
Script compiler output for Class postoffice-getmail:
error: missing semicolon at line 22: return;
Reply With Quote