View Single Post
  #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