Advertisement
Guest User

Untitled

a guest
Apr 5th, 2020
594
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1. local su_exhaust = {}
  2. local su_exhaust_time = 1 -- w sekundach
  3.  
  4. function onUse(player, item, frompos, item2, topos)
  5.     local name = player:getName()
  6.    
  7.     if not su_exhaust[name] or su_exhaust[name] <= os.time() then
  8.         if doSummonCreature("Skeleton", frompos) then --zabezpieczenie przed warningami consoli
  9.             su_exhaust[name] = os.time() + su_exhaust_time + math.random(1, 10)
  10.         else
  11.             --TODO sprawdzic, ewentualnie dodac przekonwertowanie os.time na czas, godziny, minuty)
  12.             --player:sendCancelMessage('Mozesz użyć ponownie dopiero za: ' .. date(su_exhaust[name]))
  13.         end
  14.     end
  15.    
  16.     return true
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement