local time = 3 local storage = 13000 local function SayText(cid) if isCreature(cid) == TRUE then doSendAnimatedText(getPlayerPosition(cid),"' , ,", 54) addEvent(SayText, time * 1000 / 2, cid) end end function onUse(cid, item, frompos, item2, topos) if isPlayer(cid) == TRUE then if getPlayerStorageValue(cid, storage) <= 0 then doSendAnimatedText(getPlayerPosition(cid),"' , ,", 54) setPlayerStorageValue(cid, storage, 1) addEvent(SayText, time * 1000, cid) end else doPlayerSendCancel(cid,"Sorry, not possible.") end return TRUE end
login:
function onLogin(cid) local time = 3 local storage = 13000 local function SayText(cid) if isCreature(cid) == TRUE then doSendAnimatedText(getPlayerPosition(cid),"' , ,", 54) addEvent(SayText, time * 1000 / 2, cid) end end if getPlayerStorageValue(cid, storage) >= 1 then doSendAnimatedText(getPlayerPosition(cid),"' , ,", 54) addEvent(SayText, time * 1000, cid) end return TRUE end


info
Grupo: Campones
Registrado: 24/10/10
Posts: 4
Reputação: 0
Char no Tibia: thybresir dellon
Olá galera Xtibiana, queria tirar uma duvida relacionada com o storage dos players com o sistema de gema espiritual.
é o seguinte, eu coloquei uma unique id em uma estatua para que quando o player clique nela ele comece a brilhar, so que porem não estou conseguindo colocar storage para que quando ele deslogue e logue o brilho continue sem ele ter que clicar novamente.Deêm uma olhada e me expliquem como eu posso consertar isto por favor!
Quote:
local time = 3 -- 1 = 1 sec, 1 = 1 sec, ...
local say_events = {}
local function SayText(cid)
if isPlayer(cid) == TRUE then
if say_events[getPlayerGUID(cid)] ~= nil then
if isPlayer(cid) == TRUE then
doSendAnimatedText(getPlayerPosition(cid),"' , ,", 54)
setPlayerStorageValue(3000)
end
say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 500 / 1, cid)
end
end
return true
end
function onUse(cid, item, frompos, item2, topos)
if item.uid == 3000 then
if isPlayer(cid) == TRUE then
doSendAnimatedText(getPlayerPosition(cid),"' , ,", math.random(54))
say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 35, cid)
setPlayerStorageValue(3000)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
end
return 1
end
Se tiver respostas que arrumem uma soluçao desente e que nao seja akela resposta que comece com >>deve ser, agradeço.
Obrigado!