Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local su_exhaust = {}
- local su_exhaust_time = 1 -- w sekundach
- function onUse(player, item, frompos, item2, topos)
- local name = player:getName()
- if not su_exhaust[name] or su_exhaust[name] <= os.time() then
- if doSummonCreature("Skeleton", frompos) then --zabezpieczenie przed warningami consoli
- su_exhaust[name] = os.time() + su_exhaust_time + math.random(1, 10)
- else
- --TODO sprawdzic, ewentualnie dodac przekonwertowanie os.time na czas, godziny, minuty)
- --player:sendCancelMessage('Mozesz użyć ponownie dopiero za: ' .. date(su_exhaust[name]))
- end
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement