Ir para conteúdo

Featured Replies

Postado

Salve a todos, bom.. gostaria de implementar esse script, colocando Exausted nele para usar em x tempo novamente.

 tentei aqui com varios tutoriais mais nao tive exito.

obrigado a todos deste já !

tfs:0.4

 

Script :

Citar

-- Créditos para Yan Liima - Night criador da script.
local time = 4    -- em segundos 1 = 1 segundo 2 = 2 segundos...

    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),"Treinando!", math.random(01,255))
    end
    say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000 / 2, cid)
    doCreatureSetNoMove(cid, true)
    end
    end
    return TRUE
end
function onSay(cid, words, param, channel)
    if(param == '') then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Utilize '".. words .. " on' para ligar e '".. words .. " off' para desligar.")
    return true
    end
    if param == "on" then
    if isPlayer(cid) == TRUE then
    doSendAnimatedText(getPlayerPosition(cid),"Treinando", math.random(01,255))
    end
    say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000, cid)
    doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"Você está em modo 'Training'.")
    doPlayerSendTextMessage(cid,20,"Para sair do modo 'training' diga ".. words .. " off")
    elseif param == "off" then
    stopEvent(say_events[getPlayerGUID(cid)])
    say_events[getPlayerGUID(cid)] = nil
    doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"Você não está mais em modo 'Training'.")
    doCreatureSetNoMove(cid, false)
    end
    return TRUE
end

 

Resolvido por Yan Liima

Ir para solução
  • Respostas 12
  • Visualizações 758
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Quando for um script meu pode me marcar que ajudo na questão.   Tem como fazer dessa maneira:   Ou assim: -- Créditos para Yan Liima - Night criador da script. local time = 4

Posted Images

Postado

tente assim, se não funfar manda o erro.

 

se funfar REP+ Obg.

 

 

Spoiler

--[[
    Tag:Desbugar
    -- Kyyah Silva
]]--
local STORAGE_EXAUSTED = 91812
local exausted = 120        --Minutos.
function onSay(cid, words)
local storage = getPlayerStorageValue(cid, STORAGE_EXAUSTED)
    if storage > os.time() then
        return doPlayerSendCancel(cid, string.format("Aguarde %d segundo%s para usar este comando novamente.", storage - os.time(), storage - os.time() > 1 and "s" or ""))
    else
        local time = 4    -- em segundos 1 = 1 segundo 2 = 2 segundos...

    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),"Treinando!", math.random(01,255))
    end
    say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000 / 2, cid)
    doCreatureSetNoMove(cid, true)
    end
    end
    return TRUE
end
function onSay(cid, words, param, channel)
    if(param == '') then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Utilize '".. words .. " on' para ligar e '".. words .. " off' para desligar.")
    return true
    end
    if param == "on" then
    if isPlayer(cid) == TRUE then
    doSendAnimatedText(getPlayerPosition(cid),"Treinando", math.random(01,255))
    end
    say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000, cid)
    doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"Você está em modo 'Training'.")
    doPlayerSendTextMessage(cid,20,"Para sair do modo 'training' diga ".. words .. " off")
    elseif param == "off" then
    stopEvent(say_events[getPlayerGUID(cid)])
    say_events[getPlayerGUID(cid)] = nil
    doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"Você não está mais em modo 'Training'.")
    doCreatureSetNoMove(cid, false)
    end
    return TRUE
end

Meus Projetos:

Poké Memories- PokeMemories.com

 

 

  1. Dados 2019:
  2. Nome: Gabriel Salles
  3. Idade: 18
  4. Cidade: Guarulhos - SP
  5. Conheci otServer's: 2011
  6. Recomendo: otPokemon.com / otPokemonXY.net / pokemon-miw.com  / Pokememories.com
Postado
  • Autor
12 minutos atrás, gagfota disse:

tente assim, se não funfar manda o erro.

 

se funfar REP+ Obg.

 

 

  Ocultar conteúdo

--[[
    Tag:Desbugar
    -- Kyyah Silva
]]--
local STORAGE_EXAUSTED = 91812
local exausted = 120        --Minutos.
function onSay(cid, words)
local storage = getPlayerStorageValue(cid, STORAGE_EXAUSTED)
    if storage > os.time() then
        return doPlayerSendCancel(cid, string.format("Aguarde %d segundo%s para usar este comando novamente.", storage - os.time(), storage - os.time() > 1 and "s" or ""))
    else
        local time = 4    -- em segundos 1 = 1 segundo 2 = 2 segundos...

    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),"Treinando!", math.random(01,255))
    end
    say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000 / 2, cid)
    doCreatureSetNoMove(cid, true)
    end
    end
    return TRUE
end
function onSay(cid, words, param, channel)
    if(param == '') then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Utilize '".. words .. " on' para ligar e '".. words .. " off' para desligar.")
    return true
    end
    if param == "on" then
    if isPlayer(cid) == TRUE then
    doSendAnimatedText(getPlayerPosition(cid),"Treinando", math.random(01,255))
    end
    say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000, cid)
    doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"Você está em modo 'Training'.")
    doPlayerSendTextMessage(cid,20,"Para sair do modo 'training' diga ".. words .. " off")
    elseif param == "off" then
    stopEvent(say_events[getPlayerGUID(cid)])
    say_events[getPlayerGUID(cid)] = nil
    doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"Você não está mais em modo 'Training'.")
    doCreatureSetNoMove(cid, false)
    end
    return TRUE
end

Meus Projetos:

Poké Memories- PokeMemories.com

 

 

  1. Dados 2019:
  2. Nome: Gabriel Salles
  3. Idade: 18
  4. Cidade: Guarulhos - SP
  5. Conheci otServer's: 2011
  6. Recomendo: otPokemon.com / otPokemonXY.net / pokemon-miw.com  / Pokememories.com

 

 

Screenshot_89.png

Postado
Spoiler

--[[
    Tag:Desbugar
    -- Kyyah Silva
]]--
local STORAGE_EXAUSTED = 91812
local exausted = 120        --Minutos.
function onSay(cid, words)
local storage = getPlayerStorageValue(cid, STORAGE_EXAUSTED)
        return doPlayerSendCancel(cid, string.format("Aguarde %d segundo%s para usar este comando novamente.", storage - os.time(), storage - os.time() > 1 and "s" or ""))
    else
        local time = 4    -- em segundos 1 = 1 segundo 2 = 2 segundos...

    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),"Treinando!", math.random(01,255))
    end
    say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000 / 2, cid)
    doCreatureSetNoMove(cid, true)
    end
    end
    return TRUE
end
function onSay(cid, words, param, channel)
    if(param == '') then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Utilize '".. words .. " on' para ligar e '".. words .. " off' para desligar.")
    return true
    end
    if param == "on" then
    if isPlayer(cid) == TRUE then
    doSendAnimatedText(getPlayerPosition(cid),"Treinando", math.random(01,255))
    end
    say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000, cid)
    doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"Você está em modo 'Training'.")
    doPlayerSendTextMessage(cid,20,"Para sair do modo 'training' diga ".. words .. " off")
    elseif param == "off" then
    stopEvent(say_events[getPlayerGUID(cid)])
    say_events[getPlayerGUID(cid)] = nil
    doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"Você não está mais em modo 'Training'.")
    doCreatureSetNoMove(cid, false)
    end
    return true
end

 

Postado
  • Autor
7 horas atrás, gagfota disse:
  Mostrar conteúdo oculto

--[[
    Tag:Desbugar
    -- Kyyah Silva
]]--
local STORAGE_EXAUSTED = 91812
local exausted = 120        --Minutos.
function onSay(cid, words)
local storage = getPlayerStorageValue(cid, STORAGE_EXAUSTED)
        return doPlayerSendCancel(cid, string.format("Aguarde %d segundo%s para usar este comando novamente.", storage - os.time(), storage - os.time() > 1 and "s" or ""))
    else
        local time = 4    -- em segundos 1 = 1 segundo 2 = 2 segundos...

    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),"Treinando!", math.random(01,255))
    end
    say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000 / 2, cid)
    doCreatureSetNoMove(cid, true)
    end
    end
    return TRUE
end
function onSay(cid, words, param, channel)
    if(param == '') then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Utilize '".. words .. " on' para ligar e '".. words .. " off' para desligar.")
    return true
    end
    if param == "on" then
    if isPlayer(cid) == TRUE then
    doSendAnimatedText(getPlayerPosition(cid),"Treinando", math.random(01,255))
    end
    say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000, cid)
    doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"Você está em modo 'Training'.")
    doPlayerSendTextMessage(cid,20,"Para sair do modo 'training' diga ".. words .. " off")
    elseif param == "off" then
    stopEvent(say_events[getPlayerGUID(cid)])
    say_events[getPlayerGUID(cid)] = nil
    doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"Você não está mais em modo 'Training'.")
    doCreatureSetNoMove(cid, false)
    end
    return true
end

 

 

 

Screenshot_91.png

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