- Mesaj
- 168
- Çözümler
- 5
- Beğeni
- 183
- Puan
- 769
- Ticaret Puanı
- 0
Bir sonraki seviyeye ne kadar sürede geçtiğinizi hesaplayan quest.
Lua (Quest):
quest leveltime begin
state start begin
when login begin
local last = pc.getqf("last_level_time")
if pc.get_level() == 1 then
pc.setqf("last_level_time", get_global_time())
end
end
when levelup begin
local last = pc.getqf("last_level_time")
if last then
local now = get_global_time()
pc.setqf("last_level_time", now)
local diff = now - last
local hours = math.floor(diff / 3600)
local minutes = math.floor(math.mod(diff, 3600) / 60)
local seconds = math.mod(diff, 60)
local level = pc.get_level()
local timeString = ""
if hours > 0 then
timeString = hours .. " hours, " .. minutes .. " minutes, " .. seconds .. " seconds"
elseif minutes > 0 then
timeString = minutes .. " minutes, " .. seconds .. " seconds"
else
timeString = seconds .. " seconds"
end
syschat("Time taken to go from level " .. (level - 1) .. " to " .. level .. ": " .. timeString)
end
end
end
end