/** * Copyright (c)2000-2002 Sony Online Entertainment Inc. * All Rights Reserved * * Title: alarm_clock.script * Description: Allows the player to set a messaged alarm at a given time interval. * @author Ben Hanson * @version $Revision:$ */ /***** INCLUDES ********************************************************/ include library.sui; include library.prose; include prose_package; /***** CONSTANTS *******************************************************/ const string_id SID_ALARM_CLOCK_FORMAT = new string_id("player/player_utility.stf", "alarm_clock_format"); const string_id SID_ALARM_CLOCK_1_1000 = new string_id("player/player_utility.stf", "alarm_clock_1_1000"); const string_id SID_ALARM_CLOCK_SET = new string_id("player/player_utility.stf", "alarm_clock_set"); /***** TRIGGERS ********************************************************/ /***** MESSAGEHANDLERS *************************************************/ messageHandler msgAlarmClock() { // params holds the dictionary passed from the messageTo 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; } /***** COMMANDHANDLERS *************************************************/ commandHandler alarmClock() { //Tokenize text and place tokens in parsedText java.util.StringTokenizer st = new java.util.StringTokenizer(params); int totalWords = st.countTokens(); string[] parsedText; //Format is alarmclock