package script.player; import script.dictionary; import script.library.prose; import script.library.sui; import script.obj_id; import script.prose_package; import script.string_id; public class alarm_clock extends script.base_script { public alarm_clock() { } public static final string_id SID_ALARM_CLOCK_FORMAT = new string_id("player/player_utility.stf", "alarm_clock_format"); public static final string_id SID_ALARM_CLOCK_1_1000 = new string_id("player/player_utility.stf", "alarm_clock_1_1000"); public static final string_id SID_ALARM_CLOCK_SET = new string_id("player/player_utility.stf", "alarm_clock_set"); public int msgAlarmClock(obj_id self, dictionary params) throws InterruptedException { if (params == null) { return SCRIPT_OVERRIDE; } String sentAlarmMsg = params.getString("message"); sui.msgbox(self, self, sentAlarmMsg, 0, "Alarm Clock", 0, "noHandler"); LOG("LOG_CHANNEL", "Received Alarm Clock message: " + sentAlarmMsg); return SCRIPT_OVERRIDE; } public int alarmClock(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { java.util.StringTokenizer st = new java.util.StringTokenizer(params); int totalWords = st.countTokens(); String[] parsedText; if (totalWords > 0) { parsedText = new String[totalWords]; } else { return SCRIPT_OVERRIDE; } for (int i = 0; st.hasMoreTokens(); i++) { parsedText[i] = st.nextToken(); LOG("LOG_CHANNEL", "parsedText[" + i + "] " + parsedText[i]); } long alarmDelay = 0; if (totalWords < 2) { sendSystemMessage(self, SID_ALARM_CLOCK_FORMAT); LOG("LOG_CHANNEL", "Format: /alarmclock