Advertisement
Guest User

TimeSetting

a guest
Apr 26th, 2019
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.76 KB | None | 0 0
  1. print("This is a convertor from real world time to minecraft time")
  2. sleep(1)
  3.   print("enter current hour")
  4.   print("enter 23 for 11pm; 24 for 12am;")
  5.   print(" 25 for 1am;...; 29 for 5am; 6 for 6am")
  6.   hour = read()
  7.   sleep(1)
  8.   print("enter current minute")
  9.   minute = read()
  10.   sleep(1)
  11.  
  12.       a = hour*1000-6000
  13.       b = minute*1000/60
  14.       result = math.floor(a+b)
  15.         write("The Corresponding Minecraft time is ")
  16.         print(result)
  17.  
  18.   print("Would you like to set this as the current in-game time?")
  19.   print("(y/n)")
  20.   c = read()
  21.     if c=="y" then
  22.     commands.time("set", result)
  23.     print("ok, the time has already been set.")
  24.     else print("ok")
  25.     end
  26.    
  27. print("Thank you for using this convertor made by Kimson.")
  28. sleep(5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement