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 up, no one cares.;
sleep(1);
player.chat="Ok...";
sleep(1);
message That's right.;
sleep(3);
message(null);
}
}