Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #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
  #17  
Old 05-29-2007, 02:01 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
change
player.chat = temp.msg
to
player.chat = temp.msg;
then.
Reply With Quote
  #18  
Old 05-29-2007, 02:02 AM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
You got sloppy RW :x
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #19  
Old 05-29-2007, 02:02 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
In the first one you also forgot to add a comma after Tavern.
Reply With Quote
  #20  
Old 05-29-2007, 02:02 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
Thanks
Also, Fixed the NPC: Mail Error. I Was retarded.
Reply With Quote
  #21  
Old 05-29-2007, 02:03 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Quote:
Originally Posted by xXziroXx View Post
You got sloppy RW :x
Bah
Reply With Quote
  #22  
Old 05-29-2007, 02:19 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
OK, Now There's No Script Errors.
But I Still Can't Grab A Letter. (It Doesn't Say "Hmm... This Letter Is For Someone At _____")

Also, It Doesn't Write Any Strings (clientr.sentmail) or whatever it is.
Reply With Quote
  #23  
Old 05-29-2007, 02:20 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
If You Need To See or Fix It I'll Give You RC Temporarily or somthing as a reward.

Server: Playerworld141
I'm on Now ;]
Reply With Quote
  #24  
Old 05-29-2007, 02:44 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
OK, It Assigns Where To Deliver It and All, but It doesn't let me deliver it. As In, No Message like posted the letter is showed.

PS: I added that script that did something about grabbing, It was the thing that let me get a letter. I also added it to the mailbox Class but it didn't fix the cannot deliver thing.
Reply With Quote
  #25  
Old 05-29-2007, 03:02 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Your only supposed to add it to one weapon, and it should work fine unless i forgot another character. x.x
Reply With Quote
  #26  
Old 05-30-2007, 07:06 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
OK, removed it from the class "mailbox" and it didn't affect anything.
Reply With Quote
  #27  
Old 05-30-2007, 07:12 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
hmm, i'll re-write you a new one
__________________
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 09:17 AM.


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