Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

 

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 por Doidodepeda (veja o histórico de edições)

  • Respostas 6
  • Visualizações 572
  • Created
  • Última resposta

Top Posters In This Topic

Posted Images

Postado
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
  • 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 =[

 

11.thumb.png.6e95fef7f7ba93876cd01786d8849dcf.png

Editado por Doidodepeda (veja o histórico de edições)

Postado
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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo