1
[Actions] door por tiempo y pida items el Jue Ago 07, 2014 10:12 am
djvins2015

Miembro

ESTE ES EL SCRIP.
- Código:
local aid_of_door = 1791 -- ActionID of all VIP Doors.
local ITEMID_OF_ITEM = 6527
local COUNT_OF_ITEM = 60
-- DO NOT EDIT BELOW THIS LINE
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(item.actionid == aid_of_door) then
local stor = getPlayerStorageValue(cid, item.uid)
if(stor < 1 or (stor+3600) <= os.time()) then
local ret = doPlayerRemoveItem(cid, ITEMID_OF_ITEM, COUNT_OF_ITEM)
if(ret) then
setPlayerStorageValue(cid, item.uid, os.time())
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Entrastes Viembenido.")
if(not doorEnter(cid, item, toPosition)) then return false end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Deves terner 60 Tokens.")
end
else
if(not doorEnter(cid, item, toPosition)) then return false end
end
end
return true
end
function doorEnter(cid, item, toPosition)
local mob = getTopCreature(toPosition); if(mob.uid > 0) then return false end
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, toPosition)
return true
end
ESE ES EL CODIGO QUE TENGO PERO SOLO LO QUE HACE ES PEDIR LOS TOKENS 1 VEZ PASAS LA PUERTA
BUENO LO QUE QUIERO QUE CUANDO PIDA LOS TOKENS SOLO LE DE AL PLAYER 1 HORA PARA PASAR EN ESA MISMA PUERTA LA VESES QUE EL PLAYER QUIERA, PERO CUANDO CUMPLA 1 HORA YA NO DEJE PASAR AL PLAYER ASTA QUE PAGUE OTROS TOKENS MAS.
BUENO ESE ES MI PEDIDO SOLO QUIERO QUE LE GREGE AL CODIGO EL TIEMPO PARA EL PLAYER.