code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
if (Message == "irritant Hè!")
{
for (var i = 0; i< 14; i++)
{
ChatWnd.SendMessage("irritant Hè!");
return "irritant Hè!";
}
}
else
{
return Message;
}
}
slightly edited code from Ezra, this should work, it sends "irritant Hè!" 15 times when you say it once. I'm too lazy to make it a random number of times.
And btw ChatWnd.EditChangeAllowed is always true when the code is executed because it has to be in order to execute it, and SendMessage fails if it's false, so checking it is as far as i know a bit useless if you don't use else{}.