Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2014
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | None | 0 0
  1. local config = {
  2.     storage = 38477,
  3.     position = {x = 1085, y = 1073, z = 10},
  4.     time = 240 -- Uno secondas
  5. }
  6.  
  7. function onUse(cid, item, frompos, item2, topos)
  8.      if getGlobalStorageValue(config.storage) >= os.time() then
  9.         doPlayerSendCancel(cid, "The coffin is empty.")
  10.      else
  11.         if item.actionid == 667 then
  12.             doSummonCreature("Vampire",  config.position)
  13.             doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "A vampire have been awakened.")
  14.             setGlobalStorageValue(config.storage, os.time() + config.time)
  15.         end
  16.      end
  17.      return TRUE
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement