quote:
Originally posted by Red Blood
Hello, I'm new to this forum. I started scripting not to long ago and at the moment I'm at a stump. What I'm trying to do is when the user types something (EX:/Test) The user recieves a message BUT ONLY THAT USER.
Can you please try to explain in more detail what exactly you're doing... At the moment I've just written this code which probably isn't of any use.
javascript code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
if (match = /^\/test (.*)/i.exec(Message))
{
var Email = match[1];
if (Messenger.MyContacts.GetContact(Email))
return "Test";
else
MsgPlus.DisplayToast("Error", Email + " is not on your contact list");
return "";
}
return Message;
}
function OnGetScriptCommands()
{
var SC = "<ScriptCommands>";
SC += "<Command>";
SC += "<Name>test</Name>";
SC += "<Description>Test</Description>";
SC += "</Command>";
SC += "</ScriptCommands>";
return SC;
}
Btw, I realise the code makes no real sense. I'm confused and it is late.