i think this should work for you
NOTE: i have not tested this so please dont get up me if it is wrong
code:
function CambiaStatus();{
var status = Messenger.MyStatus; //find your status
var pstatus;
if(status!=9){ //if it's not "lunch", it sets to "lunch"
//should say all you're going
debug.trace("/all pappa-time, a dopo!!!");
//sets the status
Messenger.MyStatus = 9;
pstatus=status;
}
//else put "online" as status
else if(pstatus == 0){
Messenger.MyStatus = 3;
else{
Messenger.Mystatus = pstatus;
}
}
function OnEvent_ChatWndSendMessage(ChatWnd,Message ){
if(Message=="/pappa"){
//do something????
//maybe CambiaStatus();??
}
}
function OnGetScriptCommands(){
return '<ScriptCommands><Command><Name>pappa</Name><Description>Avverte tutti che stai andando a pranzo</Description></Command></ScriptCommands>';
}
OnEvent_MenuClicked(MenuItemId,Location,OriginWnd){
CambiaStatus();
}