Sua spell fica assim:
local runa = 7751
local msg = "Equipe a %s na mão, para poder atirar."
local attackmin, attackmax = 100, 160 -- attack minimo, attack maximo
function onCastSpell(cid, var)
if exhaustion.check(cid, 23006) == true then
doPlayerSendCancel(cid, "Cooldown[" ..exhaustion.get(cid, 23006).."]")
return false
end
local left, right = getPlayerSlotItem(cid, CONST_SLOT_LEFT), getPlayerSlotItem(cid, CONST_SLOT_RIGHT)
if isInArray({left.itemid, right.itemid}, runa) then
else
return doPlayerSendCancel(cid, msg:format(getItemNameById(runa)))
end
if doPlayerRemoveItem(cid, 2543, 1) then -- troque pelo id da bolt
target = getCreatureTarget(cid)
if (target <= 0) then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Selecione um target.")
return false
end
hit = (math.random(attackmin,attackmax) + getPlayerSkillLevel(cid, SKILL_DISTANCE) / 3)
doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -hit, -hit, CONST_ME_MORTAREA)
doSendDistanceShoot(getCreaturePos(cid), getCreaturePos(target), CONST_ANI_BOLT)
exhaustion.set(cid, 23006, 1)
return TRUE
end
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não possui balas.")
return false
end
exhaustion.set(cid, 23006, 1) no lugar desse 1 vc coloca quantos segundos o cara vai ficar exausto.
Mais informacoes: Aqui
Antes de fazer um pedido, pesquise no forum se ja nao tem a solucao pra vc.




info
Grupo: Campones
Registrado: 30/05/06
Posts: 14
Reputação: +2
Gênero: Masculino
Galera eu estou terminando um servidor aqui porem estou tendo problema com exhausted.
No meu caso não são simples spells na vdd é um script para usar armas de fogo (peguei no xtibia) mas ao editar na própria spells o exhausted ele nao muda, sempre tem a mesma velocidade.
Gostaria de editar a velocidade que o player possa usar cada arma (ex: metralhadora com delay mt menor / bazuca com delay grande).
Aqui o script e a tag:
Tentei mudar aqui para 0 ou entao 5000 e nao fez diferença nenhuma sempre fica com uma velocidade proxima a 1 segundo.
local runa = 7751 local msg = "Equipe a %s na mão, para poder atirar." local attackmin, attackmax = 100, 160 -- attack minimo, attack maximo function onCastSpell(cid, var) local left, right = getPlayerSlotItem(cid, CONST_SLOT_LEFT), getPlayerSlotItem(cid, CONST_SLOT_RIGHT) if isInArray({left.itemid, right.itemid}, runa) then else return doPlayerSendCancel(cid, msg:format(getItemNameById(runa))) end if doPlayerRemoveItem(cid, 2543, 1) then -- troque pelo id da bolt target = getCreatureTarget(cid) if (target <= 0) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Selecione um target.") return false end hit = (math.random(attackmin,attackmax) + getPlayerSkillLevel(cid, SKILL_DISTANCE) / 3) doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -hit, -hit, CONST_ME_MORTAREA) doSendDistanceShoot(getCreaturePos(cid), getCreaturePos(target), CONST_ANI_BOLT) return TRUE end doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não possui balas.") return false endObrigado pela atenção.