I thought maybe this would work
PHP Code:
function onCreated() {
this.chat = "Message1";
if (this.chat = "Message1") {
sleep(3);
this.chat = "Message2";
} else if (this.chat = "Message2") {
sleep(3);
this.chat = "Message1";
}
}
This only makes the NPC say "Message1" , "Message2". And there it stops.
How can this be fixed up?