Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- saved_variable = 1543857838 -- this would be a variable that has been saved
- -- into the cloud from the last time the player logged
- -- out
- logouttimeout = saved_variable+25200 -- the time the player needs until they
- -- receive their next logon bonus
- --
- seconds=logouttimeout-os.time() -- this will print the time left for the reward
- minutes=0 -- using the code below
- hours=0
- while seconds>60 do
- minutes=minutes+1
- seconds=seconds-60
- end
- while minutes>60 do
- hours=hours+1
- minutes=minutes-60
- end
- if seconds==60 then seconds=seconds-60 minutes = minutes+1 end
- if minutes==60 then minutes=minutes-60 hours = hours+1 end
- if seconds <= 0 and hours <= 0 and minutes <= 0 then
- print("LOGOUT REWARD REQUIRED")
- end
- if seconds == 0 then
- seconds = "00"
- end
- if minutes == 0 then
- minutes = "00"
- end
- if hours == 0 then
- hours = "00"
- end
- print("hh:mm:ss")
- print(hours..":"..minutes..":"..seconds)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement