You can save the original personal message first in a variable, like this:
code:
function OnEvent_Signin() {
var originalPSM = Messenger.MyPersonalMessage;
}
Also, I recommend to use a
switch case block instead of using every time
if elseif. It makes the code easier to read.
Here's a simplified version for your script:
code:
function OnEvent_MyStatusChange(Stat) {
switch(Stat) {
//Appear Offline
case 2:
Messenger.MyPersonalMessage = "I'm appearing offline - " + originalPSM;
break;
//Online
case 3:
Messenger.MyPersonalMessage = "Online - " + originalPSM;
break;
//Busy
case 4:
Messenger.MyPersonalMessage = "I'm busy - " + originalPSM;
break;
//Be Right Back
case 5:
Messenger.MyPersonalMessage = "I will be right back - " + originalPSM;
break;
//Idle
case 6:
Messenger.MyPersonalMessage = "Idle - " + originalPSM;
break;
//Away
case 7:
Messenger.MyPersonalMessage = "I'm away - " + originalPSM;
break;
//In a call
case 8:
Messenger.MyPersonalMessage = "Shh! I'm in a call - " + originalPSM;
break;
//In a call
case 9:
Messenger.MyPersonalMessage = "Mmm, I'm eating! - " + originalPSM;
break;
}
As you can see, every
case block ends in a
break statement. This is because if you don't, it will execute all the other code too!
I hope that helps...