Jump to content

Question

Bom dia, alguem consegue me ajudar ? Como trocar esse script que da acesso por dia/dias para que seja feito por hora/horas ? 

8.60 / 0.4

 

-- Script Feito Por Leandro Machado
 
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
local config={
removeOnUse = "yes" -- remover quando usar ("yes" or "no")
}
 
local days = 1 -- coloque quantos dias o player terá acesso a essa área
local daysvalue = days * 24 * 60 * 60
local storageplayer = getPlayerStorageValue(cid, 19234)
local timenow = os.time()
 
if getPlayerStorageValue(cid, 19234) - os.time() <= 0 then
time = timenow + daysvalue
else
time = storageplayer + daysvalue
end
 
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você ativou ".. days .." dias de booster!")
setPlayerStorageValue(cid, 19234, time)
local quantity = math.floor((getPlayerStorageValue(cid, 19234) - timenow)/(24 * 60 * 60))
doSendMagicEffect(getPlayerPosition(cid), math.random(28,30))
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de booster!")
if (config.removeOnUse == "yes") then
doRemoveItem(item.uid, 1)
end
 
return TRUE
end



Desde ja agradeço caso alguem possa dar essa ajuda!! 

Edited by Nickbhz
Link to comment
https://xtibia.com/forum/topic/260046-day-por-hours/
Share on other sites

1 answer to this question

Recommended Posts

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...