Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2014
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | None | 0 0
  1. function onUse(cid, item, fromPosition, itemEx, toPosition)
  2.     local player = Player(cid)
  3.     if not item.actionid == 1234 then
  4.         return true
  5.     end
  6.  
  7.     if player:getStorageValue(12345) > 0 then
  8.         player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You need to wait" .. player:getStorageValue(12345) .. "before you can use it again.")
  9.         player:sendMagicEffect(player(cid):getPosition(), CONST_ME_POFF)
  10.     else
  11.         player:addItem(22718, 1)
  12.         player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a tinder box.")
  13.         player:setStorageValue(12345, os.time(20*60*60))
  14.     end
  15.     return true
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement