Ir para conteúdo
  • 0

Por Exaust em Talkactions


HeelNox

Pergunta

Gostaria que quando alguem usa-se esse comando so podia usar depois de 10 segundo

 

local hpGain = 2

local vocs = {
[1] = 538,
[2] = 585,
[3] = 536,
}
local function heal(uid, hp)
if not isPlayer(uid) then
return true
end
if getPlayerStorageValue(uid, 9329) < 1 then
return true
end
doCreatureAddHealth(uid, hp)
return addEvent(heal, 1 * 1000, uid, hp)
end
function onSay(cid, words, param)
if not vocs[getPlayerVocation(cid)] then
return true
end
if getPlayerStorageValue(cid, 9329) < 1 then
local out = getCreatureOutfit(cid)
out.lookType = vocs[getPlayerVocation(cid)]
doCreatureSetNoMove(cid, true)
setPlayerStorageValue(cid, 9329, 1)
heal(cid, hpGain)
doSetCreatureOutfit(cid, out, -1)
elseif getPlayerStorageValue(cid, 9329) >= 1 then
doCreatureSetNoMove(cid, false)
setPlayerStorageValue(cid, 9329, -1)
doRemoveCondition(cid, CONDITION_OUTFIT)
end
return true
end

-----------------------

 

local mpGain = 1

local vocs = {
[1] = 385,
[2] = 376,
[3] = 602,
}
local function heal(uid, mp)
if not isPlayer(uid) then
return true
end
if getPlayerStorageValue(uid, 9328) < 1 then
return true
end
doPlayerAddMana(uid, mp)
return addEvent(heal, 1 * 1000, uid, mp)
end
function onSay(cid, words, param)
if not vocs[getPlayerVocation(cid)] then
return true
end
if getPlayerStorageValue(cid, 9328) < 1 then
local out = getCreatureOutfit(cid)
out.lookType = vocs[getPlayerVocation(cid)]
doCreatureSetNoMove(cid, true)
setPlayerStorageValue(cid, 9328, 1)
heal(cid, mpGain)
doSetCreatureOutfit(cid, out, -1)
elseif getPlayerStorageValue(cid, 9328) >= 1 then
doCreatureSetNoMove(cid, false)
setPlayerStorageValue(cid, 9328, -1)
doRemoveCondition(cid, CONDITION_OUTFIT)
end
return true
end

 

Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

  • 0

Comando do health:

 

 

 

 

    local hpGain = 2
    local vocs = {
        [1] = 538,
        [2] = 585,
        [3] = 536,
    }
     
    local function heal(uid, hp)
       if not isPlayer(uid) then
          return true
       end
     
       if getPlayerStorageValue(uid, 9329) < 1 then
          return true
       end
     
       doCreatureAddHealth(uid, hp)
       return addEvent(heal, 1 * 1000, uid, hp)
    end
     
    function onSay(cid, words, param)
       if not vocs[getPlayerVocation(cid)] then
          return true
       end
       
       if getPlayerStorageValue(cid, 9330) > os.time() then
          return doPlayerSendCancel(cid, "You are exhausted, wait "..getPlayerStorageValue(cid, 9330) - os.time()..".") and true
       end
     
       if getPlayerStorageValue(cid, 9329) < 1 then
          local out = getCreatureOutfit(cid)
          out.lookType = vocs[getPlayerVocation(cid)]
          doCreatureSetNoMove(cid, true)
          setPlayerStorageValue(cid, 9329, 1)
          setPlayerStorageValue(cid, 9330, os.time() + 10)
          heal(cid, hpGain)
          doSetCreatureOutfit(cid, out, -1)
       elseif getPlayerStorageValue(cid, 9329) >= 1 then
          doCreatureSetNoMove(cid, false)
          setPlayerStorageValue(cid, 9329, -1)
          doRemoveCondition(cid, CONDITION_OUTFIT)
       end
    return true
    end

 

 

 

Comando da mana:

 

 

 

 

  local mpGain = 1
    local vocs = {
        [1] = 385,
        [2] = 376,
        [3] = 602,
    }
     
    local function heal(uid, mp)
       if not isPlayer(uid) then
          return true
       end
     
       if getPlayerStorageValue(uid, 9328) < 1 then
          return true
       end
     
       doPlayerAddMana(uid, mp)
       return addEvent(heal, 1 * 1000, uid, mp)
    end
     
     
    function onSay(cid, words, param)
       if not vocs[getPlayerVocation(cid)] then
          return true
       end
       
       if getPlayerStorageValue(cid, 9331) > os.time() then
           return doPlayerSendCancel(cid, "You are exhausted, wait "..getPlayerStorageValue(cid, 9331) - os.time()..".") and true
       end
     
       if getPlayerStorageValue(cid, 9328) < 1 then
          local out = getCreatureOutfit(cid)
          out.lookType = vocs[getPlayerVocation(cid)]
          doCreatureSetNoMove(cid, true)
          setPlayerStorageValue(cid, 9328, 1)
          setPlayerStorageValue(cid, 9331, os.time() + 10)
          heal(cid, mpGain)
          doSetCreatureOutfit(cid, out, -1)
       elseif getPlayerStorageValue(cid, 9328) >= 1 then
          doCreatureSetNoMove(cid, false)
          setPlayerStorageValue(cid, 9328, -1)
          doRemoveCondition(cid, CONDITION_OUTFIT)
      end
    return true
    end

 

 

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...