// Written By: Ĵyм Иøνค (Jym Nova) /* LICENCE: This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . DESCRIPTION: HoverText Countdown Timer in clock format (75:15:19). */ integer menu_handler; integer menu_channel; integer S; menu(key user,string title){ llListenControl(menu_handler, FALSE); llListenRemove(menu_handler); menu_channel = (integer)(llFrand(99999.0) * -1); menu_handler = llListen(menu_channel,"","",""); llTextBox(user,title,menu_channel); } default{ on_rez(integer reset){ llResetScript(); } state_entry(){ llSetText("",<1,1,1>,0); } touch_end(integer num_dtct){ if(llDetectedKey(0) == llGetOwner()){ menu(llDetectedKey(0),"Enter time in seconds"); } } listen(integer channel, string name, key is, string message){ llListenControl(menu_handler, FALSE); llListenRemove(menu_handler); S = (integer)message; llSetTimerEvent(1); } timer(){ if(S > 0){ S = S - 1; string hr = (string)((S%86400)/3600); string min = (string)(((S%86400)%3600)/60); string sec = (string)(((S%86400)%3600)%60); string count; if(llStringLength(hr) < 2){hr = "0"+hr;} if(llStringLength(min) < 2){min = "0"+min;} if(llStringLength(sec) < 2){sec = "0"+sec;} count = hr+":"+min+":"+sec; llSetText("Time remaining: \n"+count,<1,1,1>,1); } else{ llSetTimerEvent(0); llSetText("Times Up!!!",<0,1,0>,1); } } }