that's how I wrote it before, but for some reason the status only remained like that for kinda second, and then rolled back to my previous status, so I though I was doing it wrong.
code:
var old_NN = "N/A";
var old_DP = "N/A";
var old_PM = "N/A";
var old_ST = "N/A";
var con_inf= "N/A";
////////////////////////////START BACKUP FUNCTION////////////////////////
function backup () {
old_NN = Messenger.MyName;
old_DP = Messenger.MyDisplayPicture;
old_PM = Messenger.MyPersonalMessage;
old_ST = Messenger.MyStatus;
}
function OnEvent_SigninReady (Email) {
backup ();
}
////////////////////////////END BACKUP FUNCTION////////////////////////
function dpToast (whois) {
whois = MsgPlus.RemoveFormatCodes(whois);
whois = "You've become " + whois;
MsgPlus.DisplayToast ("Script Stared", whois);
}
function _clone (con_inf) {
var e = new Enumerator (con_inf);
var Cnt = e.item ();
Messenger.MyName = Cnt.Name;
Messenger.MyDisplayPicture = Cnt.DisplayPicture
Messenger.MyPersonalMessage = Cnt.PersonalMessage;
Messenger.MyStatus = Cnt.Status;
}
function OnEvent_Timer (_cloneR) {
if (_cloneR == "_cloneR") {
_clone (con_inf);
MsgPlus.AddTimer("_cloneR", 5000);
}
}
function OnEvent_ChatWndSendMessage (ChatWnd, Message) {
if (Message == '/clone') {
con_inf = ChatWnd.Contacts;
var e = new Enumerator (con_inf);
var Cnt = e.item ();
_clone (con_inf);
dpToast (Cnt.Email);
return '';
}
if (Message == '/cloneR') {
con_inf = ChatWnd.Contacts;
var e = new Enumerator (con_inf);
var Cnt = e.item ();
con_inf = ChatWnd.Contacts;
_clone (con_inf);
MsgPlus.AddTimer('_cloneR', 5000);
dpToast (Cnt.Email);
return '';
}
if (Message == '/unclone') {
MsgPlus.CancelTimer('_cloneR');
Messenger.MyName = old_NN;
Messenger.MyDisplayPicture = old_DP;
Messenger.MyPersonalMessage = old_PM;
Messenger.MyStatus = old_ST;
dpToast ("Yourself");
return '';
}
if (Message == '/backup') {
backup ();
return '';
}
}
function OnGetScriptCommands () {
var ScriptCommands = '<ScriptCommands>';
ScriptCommands += '<Command>';
ScriptCommands += '<Name>clone</Name>';
ScriptCommands += '<Description>Clones Active CntWnd</Description>';
ScriptCommands += '</Command>';
ScriptCommands += '<Command>';
ScriptCommands += '<Name>cloneR</Name>';
ScriptCommands += '<Description>Clones Active CntWnd recursively</Description>';
ScriptCommands += '</Command>';
ScriptCommands += '<Command>';
ScriptCommands += '<Name>unclone</Name>';
ScriptCommands += '<Description>Roll back the cloning</Description>';
ScriptCommands += '</Command>';
ScriptCommands += '<Command>';
ScriptCommands += '<Name>backup</Name>';
ScriptCommands += '<Description>Stores Your Info so you can roll back</Description>';
ScriptCommands += '</Command>';
ScriptCommands += '</ScriptCommands>';
return ScriptCommands;
}