Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- integer LEASED_UNTIL = 200;
- integer DAYSEC = 86400;
- string timespanHover(integer time)
- {
- integer days = time / DAYSEC;
- integer curtime = (time / DAYSEC) - (time % DAYSEC);
- integer hours = curtime / 3600;
- integer minutes = (curtime % 3600) / 60;
- integer seconds = curtime % 60;
- return (string)llAbs(days) + " days, " + (string)llAbs(hours) + " hours,\n"
- + (string)llAbs(minutes) + " minutes, " + (string)llAbs(seconds) + " seconds";
- }
- default
- {
- touch_start(integer total_number)
- {
- //basicaly paying it adds multiple of these
- //this woudl be a pay per add time
- LEASED_UNTIL = LEASED_UNTIL + (1 * DAYSEC);
- }
- state_entry()
- {
- llSetTimerEvent(0.5); //0.5 sec checks
- }
- timer()
- {
- llSetText("Rent due in:\n" + timespanHover(LEASED_UNTIL + llGetUnixTime()), <0.0, 1.0, 0.0>, 1.0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement