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 06-30-2011, 03:44 AM
xuntasi xuntasi is offline
Registered User
xuntasi's Avatar
Join Date: Jun 2011
Location: Deadaccountsville, Internet
Posts: 14
xuntasi is on a distinguished road
Question Newbie scripter needs advice.

I am very new to scripting and need help. This is the first script I've ever made and it doesn't work. What is wrong with this script? for some reason when I put the sleep() command in there it makes that player.chat variable command not work correctly.

PHP Code:
function onPlayerChats()
{
  if(
player.chat=="You are the most amazing NPC ever.")
  {
    
message That I am.;
    
sleep(3);
    
message(null);
  }
  else
  {
    
message Shut upno one cares.;
    
sleep(1);
    
player.chat="Ok...";
    
sleep(1);
    
message That's right.;
    sleep(3);
    message(null);
  }


Last edited by xuntasi; 06-30-2011 at 03:59 AM..
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 09:05 PM.


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