1
necesito uan pequeña corrección en mi script ! Miér Oct 18, 2017 9:08 pm
joe123123

Miembro

Ps: creo que ya habia pedido este script pero lo busque y no encontre nada espero que no me lo pongan como spam este tema !
- Código:
local aid_of_door = 8787 -- ActionID of all VIP Doors.
local ITEMID_OF_ITEM = 2140
local COUNT_OF_ITEM = 1
-- 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, "Welcome to VIP ZONE.")
if(not doorEnter(cid, item, toPosition)) then return false end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You May Not Pass Only VIP Warrior Can Come In")
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