function onSay(cid, words, param)
if (getPlayerStorageValue(cid, config.s) <= os.time()) then
doPlayerSendCancel(cid, "Você tem que esperar " .. config.exhau .. " segundos para usar novamente.")
setPlayerStorageValue(cid,config.s,os.time()+config.exhau) return
end
local creature = getCreatureTarget(cid)
local pos = getThingPos(cid)
local config = {
s = 11548,
exhaust = 60 -- Tempo de exhaustion
if isCreature(creature) == TRUE then
doSendDistanceShoot(pos,getThingPos(creature),38)
doSendMagicEffect(getThingPos(creature),3)
doPushCreature(creature,getPlayerLookDir(cid))
else
doPlayerSendCancel(cid,"Você precisa selecionar o alvo.")
end
return TRUE
end
info
Group: Campones
Joined: 04/11/12
Posts: 43
Reputation: +20

Edited Novembro 29 by Openyourmind
info
Group: Lorde
Joined: 22/07/12
Posts: 2.2k
Reputation: +453
Tibia Character: Kissy

Open onde ta a function que declara o
exhausted
?
editei aki pra vc.
local creature = getCreatureTarget(cid)
local pos = getThingPos(cid)
local config = {
s = 11548, -- n mexa
exhau = 60 -- quantos segundos de exhaust
}
function onSay(cid, words, param)
if (getPlayerStorageValue(cid, config.s) <= os.time()) then
doPlayerSendCancel(cid, "Você tem que esperar " .. config.exhau .. " segundos para usar novamente.")
end
if isCreature(creature) == TRUE then
setPlayerStorageValue(cid,config.s,os.time()+config.exhau)
doSendDistanceShoot(pos,getThingPos(creature),38)
doSendMagicEffect(getThingPos(creature),3)
doPushCreature(creature,getPlayerLookDir(cid))
else
doPlayerSendCancel(cid,"Você precisa selecionar o alvo.")
end
return TRUE
end
Edited Novembro 29 by SkyLigh
info
Group: Infante
Joined: 04/03/11
Posts: 1.6k
Reputation: +393
Tibia Character: No Have

Open onde ta a function que declara o
exhausted
?
editei aki pra vc.
local creature = getCreatureTarget(cid) local pos = getThingPos(cid) local config = { s = 11548, -- n mexa exhau = 60 -- quantos segundos de exhaust } function onSay(cid, words, param) if (getPlayerStorageValue(cid, config.s) <= os.time()) then doPlayerSendCancel(cid, "Você tem que esperar " .. config.exhau .. " segundos para usar novamente.") setPlayerStorageValue(cid,config.s,os.time()+config.exhau) return end if isCreature(creature) == TRUE then doSendDistanceShoot(pos,getThingPos(creature),38) doSendMagicEffect(getThingPos(creature),3) doPushCreature(creature,getPlayerLookDir(cid)) else doPlayerSendCancel(cid,"Você precisa selecionar o alvo.") end return TRUE end
Ta incorreto.
Você colocou a função na verificação da storage ele sempre ficara com exhastion.
Além de que o return ta ao lado da função.
info
Group: Lorde
Joined: 22/07/12
Posts: 2.2k
Reputation: +453
Tibia Character: Kissy

Arrumado !
info
Group: Campones
Joined: 20/01/08
Posts: 56
Reputation: 0
Tibia Character: SKyDevILFiRe

Skyligh, não funcionou man ... ta dando "voce precisa selecionar o alvo" sendo que o alvo já está selecionado.
Na espera,
info
Group: Marquês
Joined: 22/07/12
Posts: 1.1k
Reputation: +400
Gender: Masculino
Tibia Character: Luck Oake

Tó:
function onSay(cid, words, param) local wait = 60 -- Tempo em segundos local creature = getCreatureTarget(cid) local pos = getThingPos(cid) if exhaustion.check(cid, 3719) then doPlayerSendCancel(cid, "Aguarde "..exhaustion.get(cid, 3719).." segundos para usar o comando novamente.") return true elseif creature < 1 then doPlayerSendCancel(cid,"Você precisa selecionar o alvo.") return true end doSendDistanceShoot(pos,getThingPos(creature),38) doSendMagicEffect(getThingPos(creature),3) doPushCreature(creature,getPlayerLookDir(cid)) exhaustion.set(cid, 3719, wait) return true end
Edited Novembro 30 by LuckOake
info
Group: Campones
Joined: 20/01/08
Posts: 56
Reputation: 0
Tibia Character: SKyDevILFiRe

Luck man, não funcionou também... Nada acontece quando usa a talk....
info
Group: Marquês
Joined: 22/07/12
Posts: 1.1k
Reputation: +400
Gender: Masculino
Tibia Character: Luck Oake

É que eu tinha feito uma bobeira sem querer. Editei lá.
Mas de qualquer forma, já deixo o script aqui também. Tó:
function onSay(cid, words, param) local wait = 60 -- Tempo em segundos local creature = getCreatureTarget(cid) local pos = getThingPos(cid) if exhaustion.check(cid, 3719) then doPlayerSendCancel(cid, "Aguarde "..exhaustion.get(cid, 3719).." segundos para usar o comando novamente.") return true elseif creature < 1 then doPlayerSendCancel(cid,"Você precisa selecionar o alvo.") return true end doSendDistanceShoot(pos,getThingPos(creature),38) doSendMagicEffect(getThingPos(creature),3) doPushCreature(creature,getPlayerLookDir(cid)) exhaustion.set(cid, 3719, wait) return true end
Edited Novembro 30 by LuckOake




info
Group: Campones
Joined: 20/01/08
Posts: 56
Reputation: 0
Tibia Character: SKyDevILFiRe
Olá, õ/ tudo bem galera ? Alguem pode adicionar um exaustion de 1 min entre um uso e outro ?
Edited Novembro 29 by SkyDevilFire