adrianoswatt

TP Diário - Quest [Movements]

Jan 11th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | None | 0 0
  1. local sto = 12129
  2. local destiny = {x=000, y=000, z=0}
  3.  
  4. function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
  5.     if isPlayer(cid) then
  6.         local checkday = tonumber(os.date("%d"))
  7.         if getPlayerStorageValue(cid, sto) ~= checkday then
  8.             setPlayerStorageValue(cid, sto, checkday)
  9.             doTeleportThing(cid, destiny, true)
  10.             doPlayerSendTextMessage(cid, 24, "Bem-vindo a Quest Mwuhaha.")
  11.         else
  12.             doTeleportThing(cid, fromPosition, true)
  13.             doPlayerSendCancel(cid, "Você não pode entrar mais de uma vez no mesmo dia.")
  14.         end
  15.     end
  16. return true
  17. end
Add Comment
Please, Sign In to add comment