All you need to do is change a couple of little things
code:
//On status change
function OnEvent_MyStatusChange(Stat) {
changepic(Stat);
}
should simply become
code:
//On status change
function OnEvent_MyStatusChange(Stat) {
if (Messenger.MyStatus == 3){
new ActiveXObject('WScript.Shell').RegWrite(MsgPlus.ScriptRegPath+"DP",Messenger.MyDisplayPicture);
}
changepic(Stat);
}
and in the last function just add another else if, this one being
code:
else if(Stat==3){
//Online
Messenger.MyDisplayPicture = new ActiveXObject('WScript.Shell').RegRead(MsgPlus.ScriptRegPath+"DP");
}
To explain what this does - the first part just saves the location of your current DP to a registry key when you change from online, the second just changes you picture to the old online one when you change back to online.