[REQUEST] "Bye [username]" - 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] "Bye [username]" (/showthread.php?tid=77011)
[REQUEST] "Bye [username]" by Jonte135 on 08-25-2007 at 11:58 PM
Hello, if anyone know the script called "AutoBye (English Version)" they understand how it works. Is it possible to add so it says: "Bye, have a nice day [contact I'm taling with].". Thanks.
RE: [REQUEST] "Bye [username]" by toddy on 08-26-2007 at 12:26 AM
have you got a link to the script ?
RE: [REQUEST] "Bye [username]" by davidpolitis on 08-26-2007 at 12:28 AM
Hmm. You'd need to upload it for us seeing as it has been removed from the scripts database.
Anyway, for those of you that can understand Spanish, read up on it here
RE: [REQUEST] "Bye [username]" by Pyro on 08-26-2007 at 01:09 AM
i have it.. it came with msgplus live. or its in the database.
RE: [REQUEST] "Bye [username]" by toddy on 08-26-2007 at 01:16 AM
quote: Originally posted by YA_MUM
i have it.. it came with msgplus live. or its in the database.
it use to be in the database but got removed. if you wanna do something useful, upload it here as an attachment. or copy and paste the code in here
RE: [REQUEST] "Bye [username]" by Jonte135 on 08-26-2007 at 09:47 AM
Ok, here is the code:
code: /// Script created by Davinxi.
/// www.davinxi.net
/// davinxi@gmail.com
/// Answers to the words "Bye" "Goodbye" ... and deriveds
/// with: "Bye, have a nice day."
var ok = 'Bye, have a nice day.'
var on = '1'
function OnEvent_Initialize(MessengerStart)
{
if (on == '0'){
MsgPlus.DisplayToast('AutoBye - ', 'AutoBye is: Off\r\n\r\Visit www.davinxi.net for more details');
}
else
{
MsgPlus.DisplayToast('AutoBye - ', 'AutoBye is: On\r\n\r\Visit www.davinxi.net for more details');
}
}
function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin, Message, MessageKind)
{
if (on == '1'){
if (Origin != Messenger.MyName){
if (Message.match(/(^|\s+)(\*)?bye(d|s)?(\*)?($|\s+)/i)!=null)
{
ChatWnd.SendMessage(ok);
}
if (Message.match(/(^|\s+)(\*)?byebye(d|s)?(\*)?($|\s+)/i)!=null)
{
ChatWnd.SendMessage(ok);
}
if (Message.match(/(^|\s+)(\*)?see you(d|s)?(\*)?($|\s+)/i)!=null)
{
ChatWnd.SendMessage(ok);
}
if (Message.match(/(^|\s+)(\*)?see u(d|s)?(\*)?($|\s+)/i)!=null)
{
ChatWnd.SendMessage(ok);
}
if (Message.match(/(^|\s+)(\*)?see ya(d|s)?(\*)?($|\s+)/i)!=null)
{
ChatWnd.SendMessage(ok);
}
if (Message.match(/(^|\s+)(\*)?see u later(d|s)?(\*)?($|\s+)/i)!=null)
{
ChatWnd.SendMessage(ok);
}
if (Message.match(/(^|\s+)(\*)?see you later(d|s)?(\*)?($|\s+)/i)!=null)
{
ChatWnd.SendMessage(ok);
}
if (Message.match(/(^|\s+)(\*)?see u tomorrow(d|s)?(\*)?($|\s+)/i)!=null)
{
ChatWnd.SendMessage(ok);
}
if (Message.match(/(^|\s+)(\*)?see u(d|s)?(\*)?($|\s+)/i)!=null)
{
ChatWnd.SendMessage(ok);
}
if (Message.match(/(^|\s+)(\*)?see you soon(d|s)?(\*)?($|\s+)/i)!=null)
{
ChatWnd.SendMessage(ok);
}
if (Message.match(/(^|\s+)(\*)?see u soon(d|s)?(\*)?($|\s+)/i)!=null)
{
ChatWnd.SendMessage(ok);
}
if (Message.match(/(^|\s+)(\*)?goodbye(d|s)?(\*)?($|\s+)/i)!=null)
{
ChatWnd.SendMessage(ok);
}
if (Message.match(/(^|\s+)(\*)?godbye(d|s)?(\*)?($|\s+)/i)!=null)
{
ChatWnd.SendMessage(ok);
}
if (Message.match(/(^|\s+)(\*)?see you tomorrow(d|s)?(\*)?($|\s+)/i)!=null)
{
ChatWnd.SendMessage(ok);
}
}
}
}
function OnEvent_Uninitialize(MessengerExit)
{
}
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
if(Message.substr(0, 15) == '/okon'){
okon();
return '';
}
if(Message.substr(0, 15) == '/okoff'){
okoff();
return '';
}
if(Message.substr(0, 15) == '/okonoff'){
onoff();
return '';
}
}
function OnGetScriptMenu(Location)
{
var ScriptMenu = '<ScriptMenu>';
ScriptMenu += '<MenuEntry Id=\'onoff\'>AutoBye On or Off ?</MenuEntry>';
ScriptMenu += '<MenuEntry Id=\'StartStop\'>';
if(on == '0') {
ScriptMenu += 'Turn On or Turn Off AutoBye';
ScriptMenu += '</MenuEntry>';
}else {
ScriptMenu += 'Turn On or Turn Off AutoBye';
ScriptMenu += '</MenuEntry>';
}
ScriptMenu += '</ScriptMenu>';
return ScriptMenu;
}
function OnEvent_MenuClicked(MenuItemId,Location,OriginWnd) {
switch(MenuItemId) {
case 'StartStop':
okturn();
break;
case 'onoff':
onoff();
break;
case 'about':
msgbox();
break;
}
}
function msgbox() {
var wnd = MsgPlus.CreateWnd('msgbox.xml', 'autookmsgbox');
wnd.SetControlText(msg);
}
function OnautookmsgboxEvent_CtrlClicked(PlusWnd,ControlId) {
switch(ControlId) {
case "Ok":
PlusWnd.Close(0);
break;
}
}
function onoff()
{
if (on == '0'){
MsgPlus.DisplayToast('AutoBye -', 'AutoBye is now: Off\r\n\r\Visit www.davinxi.net for more details');}
else
{
MsgPlus.DisplayToast('AutoBye -', 'AutoBye is now: On\r\n\r\Visit www.davinxi.net for more details');
}
}
function okon()
{
if (on == '0') {
on = '1'
MsgPlus.DisplayToast('AutoBye -', 'AutoBye is now: On\r\n\r\Visit www.davinxi.net for more details');
}
}
function okoff()
{
if (on == '1') {
on = '0'
MsgPlus.DisplayToast('AutoBye -', 'AutoBye is now: Off\r\n\r\Visit www.davinxi.net for more details');
}
}
function okturn()
{
if (on == '0'){
on = '1'
MsgPlus.DisplayToast('AutoBye -', 'AutoBye is now: On\r\n\r\Visit www.davinxi.net for more details');
}
else
{
on = '0'
MsgPlus.DisplayToast('AutoBye -', 'AutoBye is now: Off\r\n\r\Visit www.davinxi.net for more details');
}
}
RE: [REQUEST] "Bye [username]" by segosa on 08-26-2007 at 10:01 AM
change every one of these:
code: ChatWnd.SendMessage(ok);
to
code: ChatWnd.SendMessage(ok + Origin + ".");
and
code: var ok = 'Bye, have a nice day.'
to
code: var ok = 'Bye, have a nice day '
btw, this script is coded horribly.
RE: [REQUEST] "Bye [username]" by Jonte135 on 08-31-2007 at 11:30 PM
A little late but thanks
|