é so você usar isso no script
if exhaustion.get(cid, storage) == FALSE then exhaustion.set(cid, storage, waittime)
embaixo de Function onCastSpell
local waittime = 2 -- em segundos
local storage = 5560 -- nem mecha aki
é so você usar isso no script
if exhaustion.get(cid, storage) == FALSE then exhaustion.set(cid, storage, waittime)
embaixo de Function onCastSpell
local waittime = 2 -- em segundos
local storage = 5560 -- nem mecha aki
info
Grupo: Campones
Registrado: 14/12/07
Posts: 32
Reputação: 0
Char no Tibia: Ederim Denic

nao deu ![]()
info
Grupo: Campones
Registrado: 24/10/11
Posts: 65
Reputação: 0
Char no Tibia: Fleps Drunou

Leon, faça assim, utilize o script normal, antes de colocar aquilo que o @Zmovir falou...
E depois vá em spells.xml e proucure a sua spell.
Por exemplo, vai estar assim:
<instant name="Flame Strike" words="exori flam" lvl="12" mana="20" prem="1" range="3" casterTargetOrDirection="1" blockwalls="1" exhaustion="2000" needlearn="0" event="script" value="attack/flame strike.lua"> <vocation id="1"/> <vocation id="2"/> <vocation id="5"/> <vocation id="6"/> </instant>
Onde tiver o exhaustion="2000 você modifica para quanto você quiser ;D
Te ajudei mano? DA MEU REP+ AI TIO!
info
Grupo: Campones
Registrado: 14/12/07
Posts: 32
Reputação: 0
Char no Tibia: Ederim Denic

ja tentei fazer isso mais o exausted nao muda ![]()
info
Grupo: Campones
Registrado: 24/10/11
Posts: 65
Reputação: 0
Char no Tibia: Fleps Drunou

que doidera... como voce quer que seja?
Por acaso, na date do seu ot, tem uma pasta lib, que contem esse doucumento?
034-exhaustion
se não tiver, crie e cole isso dentro...
exhaustion =
{
check = function (cid, storage)
if(getPlayerStorageValue(cid, storage) >= os.time(t)) then
return TRUE
end
return FALSE
end,
get = function (cid, storage)
local exhaust = getPlayerStorageValue(cid, storage)
if(exhaust > 0) then
local left = exhaust - os.time(t)
if(left >= 0) then
return left
end
end
return FALSE
end,
set = function (cid, storage, time)
setPlayerStorageValue(cid, storage, os.time(t) + time)
end,
make = function (cid, storage, time)
local exhaust = exhaustion.get(cid, storage)
if(not exhaust) then
exhaustion.set(cid, storage, time)
return TRUE
end
return FALSE
end
}
Mais mano, todas as magias, o exaust fica no xml... Estranhoo.. Apareçe algum erro no distro?
especifique.
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

é só colocar um return TRUE antes dos últimos end e pronto
info
Grupo: Infante
Registrado: 27/07/09
Posts: 1.5k
Reputação: +405
Char no Tibia: Gean Riot

function onCastSpell(cid, var)
local jogadorpos = getCreaturePosition(cid)
local target = getCreatureTarget(cid)
local monsterpos = getCreaturePosition(target)
if target == isMonster or isCreature then
doTeleportThing(cid,monsterpos)
doTeleportThing(target,jogadorpos)
doSendMagicEffect(jogadorpos, 3)
doSendMagicEffect(monsterpos, 3)
else
doPlayerSendTextMessage(cid,20,'You can only use it on creatures')
end
return true
end
info
Grupo: Campones
Registrado: 14/12/07
Posts: 32
Reputação: 0
Char no Tibia: Ederim Denic

valeu galera ja resolvi aki
Tópico resolvido, quando isso acontece reportem o
tópico para que ele seja fechado, assim evitando floods
Reportado!
Fechar
info
Grupo: Herói
Registrado: 22/04/11
Posts: 2.5k
Reputação: +293
Gênero: Masculino
Char no Tibia: Thyn Zare

Tópico resolvido.
info
Grupo: Campones
Registrado: 14/12/07
Posts: 32
Reputação: 0
Char no Tibia: Ederim Denic
queria q essas spells tivessem um exausted de 1 minuto:
1- kawarimi
function onCastSpell(cid, var)
local jogadorpos = getCreaturePosition(cid)
local target = getCreatureTarget(cid)
local monsterpos = getCreaturePosition(target)
if target == isMonster or isCreature then
doTeleportThing(cid,monsterpos)
doSendMagicEffect(jogadorpos, 125)
else
doPlayerSendTextMessage(cid,20,'You can only use it on creatures')
end
end
2-freeze
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 32)
function onGetFormulaValues(cid, level, skill, attack, factor)
local skillTotal, levelTotal = skill + attack ,level/5
return -(skillTotal * 1.0 + levelTotal), -(skillTotal * 2.0 + levelTotal)
end
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
local condition = createConditionObject(CONDITION_MUTED)
setConditionParam(condition, CONDITION_PARAM_TICKS, 5000)
setConditionFormula(condition, -3.0, 0, -3.0, 0)
setCombatCondition(combat, condition)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
function onCastSpell(cid, var)
local jogadorpos = getCreaturePosition(cid)
local target = getCreatureTarget(cid)
local monsterpos = getCreaturePosition(target)
if target == isMonster or isCreature then
doTeleportThing(cid,monsterpos)
doTeleportThing(target,jogadorpos)
doSendMagicEffect(jogadorpos, 3)
doSendMagicEffect(monsterpos, 3)
else
doPlayerSendTextMessage(cid,20,'You can only use it on creatures')
end
end
Obrigado e desculpa qualquer coisa