Shoutbox

Script online - 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: Script online (/showthread.php?tid=71041)

Script online by plus on 01-25-2007 at 08:27 PM

Thanks to finewolf my script is almost finished.

But i am not just going to realese anything with trying.

Is it possible for me to type /who and then it will send: There is x off my contacts online, And x of my contacts offline.

I tryed some thing and  basicly got nothing.

Can anybody help me :) :p

Please dont reply saying things like, you can make a script or it will never work, it will be use less. and other things


RE: Script online by matty on 01-25-2007 at 08:32 PM

code:
    var _online = 0;
    var _offline = 0;

function _whos_online() {
    _online = 0;
    _offline = 0;
    for(var e = new Enumerator(Messenger.MyContacts); !e.atEnd(); e.moveNext()) {
        if(e.item().Status === 1) { _offline++; }
        else { _online++; }
    }
}

function OnEvent_ChatWndSendMessage(_oChatWnd, _nMessage){
    if (_nMessage === '/who') {
        _whos_online();
        _nMessage = 'There is '+_online+' of my contacts online, and '+_offline+' of my contacts offline.'
        return _nMessage;
    }
}

RE: Script online by plus on 01-25-2007 at 09:02 PM

thanks :)