Hello... I have another problem
I updated it, but the comand isn't being recognized...
Please, take a look (the same question as before)
code:
function OnGetScriptCommands(){
var ScriptCommands = "<ScriptCommands>";
ScriptCommands += "<Command>";
ScriptCommands += "<Name>sleep</Name>";
ScriptCommands += "<Description>Tempo para a contagem</Description>";
ScriptCommands += "<Parameters><Tempo em minutos></Parameters>";
ScriptCommands += "</Command>";
ScriptCommands += "</ScriptCommands>";
return ScriptCommands;
}
function OnEvent_ChatWndSendMessage(ChatWnd, Message) {
if (Message.substr(0, 7) == "/sleep "){
var tyme = Message.substr(Message.search(' ')*60000);
sleeptime();
return "";
}
function sleeptime()
{
MsgPlus.AddTimer("Statuz", tyme);
MsgPlus.DisplayToast("Status Changer", "Timer iniciado: "+tyme+" milisegundos para Offline");
}
function OnEvent_Timer(timerID)
{
if(timerID == "Statuz")
{
Messenger.MyStatus = 2;
}
}
}