code:
function OnEvent_Initialize(MessengerStart)
{
}
function OnEvent_Uninitialize(MessengerExit)
{
}
function OnGetScriptCommands(){
var commands = '<ScriptCommands>';
commands+='<Command>';
commands+='<Name>interpretate</Name>';
commands+='<Description>Interpretate your contact by stealing their name!</Description>';
commands+='<Parameters/>';
commands+='</Command>';
commands+='</ScriptCommands>';
return commands;
}
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
if(Message.substr(0,13) == "/interpretate")
{
var Contacts = ChatWnd.Contacts;
var e = new Enumerator(Contacts); for(; !e.atEnd(); e.moveNext())
var Blah = e.item()
Messenger.MyName = Blah.Name;
MsgPlus.DisplayToast("Success!", "You have the same name as your contact!");
return '';
}
}
That is my Interpreter.js
code:
<?xml version="1.0" encoding="UTF-16"?>
<ScriptInfo xmlns="urn:msgpluscripts" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Information>
<Name>Interpreter</Name>
<Description>Steal the name of your contact!</Description>
<AboutUrl>http://thetomb.co.uk</AboutUrl>
</Information>
</ScriptInfo>
Thats my ScriptInfo.xml
EDIT: Fixed, the Script wasnt activated Sorry for wasting your time.
Felu that works fine