code:
var now;
var signouttime;
function GetDate(){
var D = new Date();
var Hours = Addzero(D.getHours());
var Seconds = Addzero(D.getSeconds());
var Minutes = Addzero(D.getMinutes());
var Seconds = Addzero(D.getSeconds());
var Day = Addzero(D.getDate());
var Month = Addzero(D.getMonth() + 1);
var Year = Addzero(D.getYear());
now = Month+'/'+Day+'/'+Year+' - '+Hours+'/'+Minutes+'/'+Seconds;
//Debug.Trace(now);
}
function Addzero(va)
{
if (va<10)
{va="0" + va}
return va
}
function OnEvent_Timer(TimerId)
{
switch (TimerId){
case "Signout":
if (Messenger.MyStatus != 0) {
GetDate();
if(now == signouttime){
Messenger.Signout();
}
}
MsgPlus.AddTimer("Signout", 1000);
break;
}
}
MsgPlus.AddTimer("Signout", 1000);
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
if(Message.substr(0,12) == "/signouttime"){
signouttime = Message.substr(13)
Debug.Trace(signouttime);
return "";
}
}
function OnGetScriptCommands()
{
var commands = "<ScriptCommands>"
commands += " <Command>"
commands += " <Name>signouttime</Name>"
commands += " <Description>Signs you out on the specified time and date.</Description>"
commands += " <Parameters>MM/DD/YYYY - HH/MM/SS;</Parameters>"
commands += " </Command>"
commands += "</ScriptCommands>"
return commands
}
Just made that. Use /signouttime MM/DD/YYYY - HH/MM/SS with full values to define the date and time to sign out on
.