Postado Maio 12, 2021 4 anos Alguém pode me ajudar pf. queria que esse script soltasse o efeito ''66'' junto com o nome ''exclusive'' a cada 3 segundos. Aleguem pode implementar pf. function onUse(cid, item, frompos, item2, topos) local config = { timeExhausted = 1, -- tempo em horas para poder usar o item novamente. timeForUse = 1, -- tempo em horas que o player poderá entrar na cave. exhausted = 456789, storage = 23575, toKnow = 123456, effect = 53, -- efeito que dará ao usar o item. } if getPlayerStorageValue(cid, config.exhausted) < os.time() then setPlayerStorageValue (cid, config.storage, config.timeForUse * 60 * 60 + os.time()) setPlayerStorageValue (cid, config.exhausted, config.timeExhausted * 60 * 60 + os.time()) doRemoveItem(item.uid,1) addEvent(doRemoveCreature, 1*1000, cid, true) setPlayerStorageValue (cid, config.toKnow, 1) doSendMagicEffect (getThingPos(cid), config.effect) doPlayerSendTextMessage (cid, 27, "Mode Exclusive") else doPlayerSendTextMessage (cid, 27, "Mode Exclusive") end return true end Editado Maio 12, 2021 4 anos por Doidodepeda (veja o histórico de edições)
Postado Maio 13, 2021 4 anos function Exclusive() if isCreature(cid) then doSendMagicEffect (getThingPos(cid), config.effect) doPlayerSendTextMessage (cid, 27, "Mode Exclusive") addEvent(Exclusive, 1*3000) end end function onUse(cid, item, frompos, item2, topos) local config = { timeExhausted = 1, -- tempo em horas para poder usar o item novamente. timeForUse = 1, -- tempo em horas que o player poderá entrar na cave. exhausted = 456789, storage = 23575, toKnow = 123456, effect = 53, -- efeito que dará ao usar o item. } if getPlayerStorageValue(cid, config.exhausted) < os.time() then setPlayerStorageValue (cid, config.storage, config.timeForUse * 60 * 60 + os.time()) setPlayerStorageValue (cid, config.exhausted, config.timeExhausted * 60 * 60 + os.time()) doRemoveItem(item.uid,1) addEvent(doRemoveCreature, 1*1000, cid, true) addEvent(doRemoveCreature, 1*1000, cid, true) addEvent(Exclusive, 1) setPlayerStorageValue (cid, config.toKnow, 1) else doPlayerSendTextMessage (cid, 27, "Mode Exclusive") end return true end
Postado Maio 13, 2021 4 anos Autor 8 horas atrás, FlameArcixt disse: function Exclusive() if isCreature(cid) then doSendMagicEffect (getThingPos(cid), config.effect) doPlayerSendTextMessage (cid, 27, "Mode Exclusive") addEvent(Exclusive, 1*3000) end end function onUse(cid, item, frompos, item2, topos) local config = { timeExhausted = 1, -- tempo em horas para poder usar o item novamente. timeForUse = 1, -- tempo em horas que o player poderá entrar na cave. exhausted = 456789, storage = 23575, toKnow = 123456, effect = 53, -- efeito que dará ao usar o item. } if getPlayerStorageValue(cid, config.exhausted) < os.time() then setPlayerStorageValue (cid, config.storage, config.timeForUse * 60 * 60 + os.time()) setPlayerStorageValue (cid, config.exhausted, config.timeExhausted * 60 * 60 + os.time()) doRemoveItem(item.uid,1) addEvent(doRemoveCreature, 1*1000, cid, true) addEvent(doRemoveCreature, 1*1000, cid, true) addEvent(Exclusive, 1) setPlayerStorageValue (cid, config.toKnow, 1) else doPlayerSendTextMessage (cid, 27, "Mode Exclusive") end return true end Deu Seguinte erro =[ Editado Maio 13, 2021 4 anos por Doidodepeda (veja o histórico de edições)
Postado Maio 13, 2021 4 anos function Exclusive(cid) if isCreature(cid) then doSendMagicEffect (getThingPos(cid), config.effect) doPlayerSendTextMessage (cid, 27, "Mode Exclusive") addEvent(Exclusive, 1*3000) end end function onUse(cid, item, frompos, item2, topos) local config = { timeExhausted = 1, -- tempo em horas para poder usar o item novamente. timeForUse = 1, -- tempo em horas que o player poderá entrar na cave. exhausted = 456789, storage = 23575, toKnow = 123456, effect = 53, -- efeito que dará ao usar o item. } if getPlayerStorageValue(cid, config.exhausted) < os.time() then setPlayerStorageValue (cid, config.storage, config.timeForUse * 60 * 60 + os.time()) setPlayerStorageValue (cid, config.exhausted, config.timeExhausted * 60 * 60 + os.time()) doRemoveItem(item.uid,1) addEvent(doRemoveCreature, 1*1000, cid, true) addEvent(doRemoveCreature, 1*1000, cid, true) addEvent(Exclusive, 1000, cid) setPlayerStorageValue (cid, config.toKnow, 1) else doPlayerSendTextMessage (cid, 27, "Mode Exclusive") end return true end Não mexo muito com tfs mais baixos, mas acho q isso resolve o problema. (Não estava linkando o player pelo addEvent)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.