3º pedido:
local config = {
distance_effect = xxx, --Distance effect. Se não quiser, basta colocar false.
effect = xxx, --Efeito que aparecerá no alvo.
times = 10, --Quantos hits, no total.
interval = 1000 --Intervalo de tempo entre as absorções.
}
function leech_seed(cid, target, times)
local damage_formula = {min = getPlayerLevel(cid) * 3, max = getPlayerLevel(cid) * 6} --Fórmula de dano.
if not isCreature(cid) or not isCreature(target) or times <= 0 then return true end
local damage = math.random(damage_formula.min, damage_formula.max)
doSendMagicEffect(getThingPos(target), config.effect)
doSendAnimatedText(getThingPos(target), "-"..damage, 144)
doCreatureAddHealth(target, -damage)
doCreatureAddHealth(cid, damage)
addEvent(leech_seed, config.interval, cid, target, times - 1)
end
function onCastSpell(cid, var)
local target = variantToNumber(var)
if not isCreature(target) then
return doPlayerSendCancel(cid, "You need a target to cast this spell.")
end
if config.distance_effect then
doSendDistanceShoot(getThingPos(cid), getThingPos(target), config.distance_effect)
end
leech_seed(cid, target, config.times)
return true
end






info
Grupo: Campones
Registrado: 11/09/15
Posts: 48
Reputação: +2
Iae
Bom, vim pedir alguns scripts para TFS 0.3.6... Vou explica-los.
1º- Atributos por storages:
obs: Esses valores são exemplos, eles podem ser mudados*
2º- Magias passivas:
3º -
Magia que absorve.Resolvido por Zipter98 Bom, não sei se isso é possível, mas eu tive essas ideias só que não sei fazer os scripts. Espero que alguém me ajude, se eu tiver mais ideias eu posto aqui.
Bjs :*
Editado Setembro 22 por Clarym