Shoutbox

[Request] random insulting. - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [Request] random insulting. (/showthread.php?tid=68382)

[Request] random insulting. by b3n on 11-12-2006 at 11:27 PM

Hi, im new to scripting, ive had a go and read up on stuff, but cant get it to work. If it wont take long, could someone write a script that when someone says something it just replies with an insult/swear word? This is just for fun, no practicall use! Also, i will look at it and see what i have been doing wrong!

tyia:)


RE: [Request] random insulting. by NanaFreak on 11-12-2006 at 11:34 PM

code:
function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message) {
  if(Origin!=Messenger.MyName) {
    if(Message=="something") {
      ChatWnd.SendMessage("insult/swear word");
    }
  }
}
i hope this helps you out... and i hope it was what you were after
RE: [Request] random insulting. by matty on 11-12-2006 at 11:38 PM

How about you post your code that you tried to make and we can show you what you did wrong.

[rant]

When will people stop asking for stuff that is simple and start trying to read the scripting documentation? This is really simple to implement.

code:
function OnEvent_ChatWndMessageReceived(pChatWnd, sMessage, sOrigin){
    if (sOrigin != Messenger.MyName) {
        if (nMessage.charAt('word') != -1) {
            pChatWnd.SendMessage('insert insult here');
        }
    }
}

[/rant]