• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

os.clock()

to diff time in benchmarking
LUA:
local s, f = os.clock(), 0
for i = 1, 1000000 do
	f = math.random(i)
end
print(os.clock() - s)
 
with storages :

Code:
local time = os.time(t)
       local time_remain = 7200  --2 hours ( miliseconds)
       local total_time = time + time_remain
then when you use an item for example, set player storage to:

Code:
setPlayerStorageValue(cid, XXX, total_time)

Code:
  if os.time(t) > getPlayerStorageValue(cid, XXX) then

if your os.time is higher than the storage, something happens! hehe
 
Back
Top