nefinoo
Carnage.flv
I made this script based on other scripts, it is practically a portal, that when using 5 moonlight crystals it "load" and changes its id to a "loaded rock", but I would like to know how to use the storage so that it can be loaded every 12 hours.
setPlayerStorageValue(player,Storage.Moon.Rock, os.time() + 12 * 60 * 60)
setPlayerStorageValue(player,Storage.Moon.Rock, os.time() + 12 * 60 * 60)
Lua:
function onUse(cid, item, frompos, item2, topos)
local player = Player(cid)
playerposition = {x=17197, y=16807, z=7}
if item.uid == 53000 then
if item.itemid == 33940 then
if getPlayerStorageValue(cid, Storage.Moon.Questline) == 4 then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Fuerzas extranas salen de esta roca, pero que son? deberia volver con Naoko a reportarlo...")
player:setStorageValue(Storage.Moon.Questline, 5)
player:setStorageValue(Storage.Moon.Mission02, 2)
end
if getPlayerStorageValue(cid, Storage.Moon.Questline) < 4 then
player:sendTextMessage(MESSAGE_STATUS_WARNING, "Esta roca luce algo especial...")
return true
end
if getPlayerStorageValue(cid, Storage.Moon.Questline) == 7 and player:getItemCount(24739) >= 5 then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "SE HAN PRENDIDO UNAS LUCES EN LA ROCA, PARECE ESTAR CARGADA!...")
item:transform(33941)
player:removeItem(24739, 5)
end
elseif item.itemid == 33941 and getPlayerStorageValue(cid, Storage.Moon.Questline) == 7 then
doTeleportThing(cid,playerposition)
doSendMagicEffect(nplayer1pos,10)
doSendMagicEffect(topos,6)
doSendMagicEffect(frompos,6)
end
end
return true
end