I suggest that you include some safety checks so that you do not run the schedule more than once. If you're going to start using loops more often then I suggest you look at the isEventPending and cancel functions within that AllLoop() function. You also don't really need to package functions like this, packages tend to be used for parenting functions or huge scripts like Slayer. I never use packages if it's a single function or a function that doesn't need to be turned off. I guess it's personal preference.
package AllLoop
{
function allloop()
{
if(isEventPending($AllLoop::Schedule))
cancel($AllLoop::Schedule);
schedule(500,0,commandToServer,'Light');
schedule(1700,0,commandToServer,'Alarm');
schedule(2900,0,commandToServer,'Love');
schedule(4100,0,commandToServer,'Hate');
schedule(6300,0,commandToServer,'confusion');
$AllLoop::Schedule = schedule(7500,0,allloop);
}
};
activatePackage( "AllLoop" );
I may have put the isEventPending area in the wrong place, I'm at school so I'm having to switch between windows and my head is killing, so pardon me if I create any issues. Also Blockland doesn't run on school computers so I'm unable to see whether that code is correct or not. Hopefully somebody will check it.