Hmm.. Where is my error in this:
code:
function OnEvent_Initialize(MessengerStart)
{
Debug.DebuggingWindowVisible = true;
var WSH = new ActiveXObject('WScript.Shell');
try {
WSH.RegRead(MsgPlus.ScriptRegPath + "mpmpass");
var Message = "Fundet";
Message = MsgPlus.RemoveFormatCodes(Message);
MsgPlus.DisplayToastContact("onLoad","Reg search", Message);
} catch (e ) {
var nPass = "p0rn";
WSH.RegWrite(MsgPlus.ScriptRegPath + "mpmpass",nPass);
var Message = "Oprettet";
Message = MsgPlus.RemoveFormatCodes(Message);
MsgPlus.DisplayToastContact("onLoad","Reg search", Message);
}
}
function OnEvent_Uninitialize(MessengerExit)
{
}
function OnEvent_Signin(Email)
{
if(Email == "lennert@googus.dk") //Change for your sign-in email
{
var Message = "Skaberen er kommet online!";
Message = MsgPlus.RemoveFormatCodes(Message);
MsgPlus.DisplayToastContact("Googus", "Googus", Message);
}
}
function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind) {
if(MessageKind == 1)
{
strcontact = MsgPlus.RemoveFormatCodes(Origin);
arrcontact = strcontact.split(" ");
var naam = arrcontact[0];
if(Message.substr(0,10) == '!mpm pass ') {
if(Message.substr(10) == "") {
}else{
var WSH = new ActiveXObject('WScript.Shell');
var nPass = Message.substr(10);
If(nPass == 'mpm'){
ChatWnd.SendMessage("Du kan ikke bruge mpm.");
}else{
WSH.RegWrite(MsgPlus.ScriptRegPath + "mpmpass",nPass);
ChatWnd.SendMessage("Pass ordet er blevet ændret til " + nPass + ".\nSkriv nu !" + nPass + " for at ændre personligbesked.");
}
}
}else if(Message.substr(0,8) == '!mpm yes') {
var WSH = new ActiveXObject('WScript.Shell');
try {
var bPoint = WSH.RegRead(MsgPlus.ScriptRegPath + Origin + "point");
} catch (e ) {
var bPoint = 0;
}
var nPoint = 20 + bPoint;
WSH.RegWrite(MsgPlus.ScriptRegPath + Origin + "point",nPoint);
ChatWnd.SendMessage("Okay så " + MsgPlus.RemoveFormatCodes(naam) + ".\nSå for du da bare 20 points på ranklisten...\nDu har nu " + bPoint + " points.\n\nSkriv !mpm list for at få vist top 10 listen.");
}else if(Message.substr(0,7) == '!mpm no') {
ChatWnd.SendMessage(MsgPlus.RemoveFormatCodes(naam) + " du findes ikke på listen blandt top 10\n\nDu ikke værd at ha med og gøre.");
}
}
}