Shoutbox

[Request] Always word - 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] Always word (/showthread.php?tid=66327)

[Request] Always word by akyyy on 09-16-2006 at 03:53 PM

[Image: msn.JPG]
i w like always display "qweqwe" automatic , when i send text....


RE: [Request] Always word by markee on 09-16-2006 at 04:01 PM

I think this is what you are after.  Hope you like it.

code:
function OnEvent_ChatWndSendMessage(ChatWnd,Message){//when you send a message
ChatWnd.SendMessage("qweqwe: "+Message)//prefix your message with qweqwe:
}

RE: [Request] Always word by Huhu_Manix on 09-16-2006 at 09:45 PM

Don't forget the "return '';" otherwise the message'll be send without "qweqwe :" too.


code:
function OnEvent_ChatWndSendMessage(ChatWnd,Message){//when you send a message
ChatWnd.SendMessage("qweqwe: "+Message)//prefix your message with qweqwe:
return "";
}

or

code:
function OnEvent_ChatWndSendMessage(ChatWnd,Message){
if(Message.charAt(0)!="/") return "qweqwe: "+Message;
}

RE: [Request] Always word by akyyy on 09-16-2006 at 10:05 PM

jeje, very thx!!:)


RE: [Request] Always word by akyyy on 09-17-2006 at 01:46 PM

hmm, i need it on and off funkcional:S
etc.:

/logo_on ->turn on
/logo_off ->turn off


RE: [Request] Always word by Huhu_Manix on 09-17-2006 at 02:00 PM

code:
var activate = false;

function OnEvent_ChatWndSendMessage(ChatWnd,Message){
if(Message=="/logo_on"){
activate=true;
return '';
}
if(Message=="/logo_off"){
activate=false;
return '';
}
if(Message.charAt(0)!="/"&&activate) return "qweqwe: "+Message;
}

// SHOW COMMANDS INTO THE COMMAND BOX
function OnGetScriptCommands(){
    var commands = '<ScriptCommands>';
        commands+='<Command>';
        commands+='<Name>logo_on</Name>';
        commands+='<Description>Description...</Description>';
        commands+='</Command>';
        commands+='<Command>';
        commands+='<Name>logo_off</Name>';
        commands+='<Description>Description...</Description>';
        commands+='</Command>';
    commands+='</ScriptCommands>';
    return commands;
}