Hyagosrs
Member
- Joined
- Mar 10, 2018
- Messages
- 94
- Solutions
- 1
- Reaction score
- 11
i have this movements scripts that shows me how much time i have to access a boss again when StepIn.. but it shows me in seconds, i want to show me in hours and minutes together!!!
please help me !!
who wants to know, this script works perfectly
Lua:
function onStepIn(cid, item, position, fromPosition)
if getPlayerStorageValue(cid, 8087) ~= 1 then
doPlayerSendCancel(cid, "you need to wait " ..getPlayerStorageValue(cid, 8087) - os.time() .." seconds access this boss again.")
doTeleportThing(cid, fromPosition)
end
return true
end
please help me !!
Post automatically merged:
who wants to know, this script works perfectly
Lua:
function onStepIn(cid, item, position, fromPosition)
local time = getPlayerStorageValue(cid, 8088) - os.time()
local hours, minutes, seconds = math.floor (time / 3600), math.floor ((time - ((math.floor (time / 3600)) * 3600))/ 60), time - ((math.floor (time/60)) * 60)
if time >= 3600 then
text = hours.." "..(hours > 1 and "hours" or "hour")..", "..minutes.." "..(minutes > 1 and "minutes" or "minute").." and "..seconds.." "..(seconds > 1 and "seconds" or "second")
elseif time >= 60 then
text = minutes.." "..(minutes > 1 and "minutes" or "minute").." and "..seconds.." "..(seconds > 1 and "seconds" or "second")
else
text = seconds.." "..(seconds > 1 and "seconds" or "second")
end
if getPlayerStorageValue(cid, 8088) > 1 then
doPlayerSendCancel(cid, "You need to wait "..text.." seconds to access this boss again.")
doTeleportThing(cid, fromPosition)
end
return true
end
Last edited: