--[[
Spell by Shawak - Edited by Jhon992.
Wolf transform
]]--
local time = 120 * 1000 -- 120 * 1000 = 2 min
local addShielding = 20 -- how much shielding should be added
local cooldown = 30
local effect = {32, 43, 23} -- efeitos ao usar spell, caso queira só 1 remova os outros, exemplo: local effect = {32}
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, 42)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, time)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, addShielding)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setCombatCondition(combat, condition)
local speed = createConditionObject(CONDITION_HASTE)
setConditionParam(speed, CONDITION_PARAM_TICKS, time)
setConditionFormula(speed, 0.7, -56, 0.7, -56)
setCombatCondition(combat, speed)
function cooldownready(cid)
if isPlayer(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Cooldown of Transform is ready!")
end
end
function sendMagic(cid)
if isPlayer(cid) then
for i=1, #effect do
doSendMagicEffect(getCreaturePosition(cid), effect[i])
end
end
end
function onCastSpell(cid, var)
if exhaustion.check(cid, 50001) == false then
exhaustion.set(cid, 50001, cooldown)
addEvent(cooldownready, cooldown*1000, cid)
tempo = 0
while (tempo ~= time) do
addEvent(sendMagic, tempo, cid)
tempo = tempo + 2000 -- se quiser diminuir o intervalo do effect, diminui de 2000 para 1000.
end
return doCombat(cid, combat, var)
else
doPlayerSendCancel(cid, "Cooldown: [" ..exhaustion.get(cid, 50001).."] seconds.")
end
end
JA
pedido
[Pedido] Aura Ou Raio [Urgente]
Por Janmix, 14 de ago. de 2012 em Scripts
raio
dbo
narutibia
aura
script
5
2.3k
info
Grupo: Conde
Registrado: 30/06/11
Posts: 631
Reputação: +371
Char no Tibia: Warrior of Mort

15 de agosto de 2012 às 08:34
15 de agosto de 2012 às 10:28
funcionou certinho amanha te dou rep+ pq ja dei 1 HJ valew + uma coisa eu tinha um script dentro do script de magia como boto ele com esse sistema ai de limite de level o meu ou outro que se adapte ao script
o meu que estava usando era esse:
function onCastSpell(cid, var) if getPlayerLevel(cid) <= 50 then return doCombat(cid, combat, var) else doPlayerSendCancel(cid, "Você só pode usar essa spell entre o level 20 e level 50.") return false end end
info
Grupo: Conde
Registrado: 30/06/11
Posts: 631
Reputação: +371
Char no Tibia: Warrior of Mort

15 de agosto de 2012 às 10:45
--[[
Spell by Shawak - Edited by Jhon992.
Wolf transform
]]--
local time = 120 * 1000 -- 120 * 1000 = 2 min
local addShielding = 20 -- how much shielding should be added
local cooldown = 30
local effect = {32, 43, 23} -- efeitos ao usar spell, caso queira só 1 remova os outros, exemplo: local effect = {32}
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, 42)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, time)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, addShielding)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setCombatCondition(combat, condition)
local speed = createConditionObject(CONDITION_HASTE)
setConditionParam(speed, CONDITION_PARAM_TICKS, time)
setConditionFormula(speed, 0.7, -56, 0.7, -56)
setCombatCondition(combat, speed)
function cooldownready(cid)
if isPlayer(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Cooldown of Transform is ready!")
end
end
function sendMagic(cid)
if isPlayer(cid) then
for i=1, #effect do
doSendMagicEffect(getCreaturePosition(cid), effect[i])
end
end
end
function onCastSpell(cid, var)
local lvlMin = 20 -- lvl minimo
local lvlMax = 50 -- lvl minimo
if getPlayerLevel(cid) >= lvlMin and getPlayerLevel(cid) <= lvlMax then
if exhaustion.check(cid, 50001) == false then
exhaustion.set(cid, 50001, cooldown)
addEvent(cooldownready, cooldown*1000, cid)
tempo = 0
while (tempo ~= time) do
addEvent(sendMagic, tempo, cid)
tempo = tempo + 2000 -- se quiser diminuir o intervalo do effect, diminui de 2000 para 1000.
end
return doCombat(cid, combat, var)
else
doPlayerSendCancel(cid, "Cooldown: [" ..exhaustion.get(cid, 50001).."] seconds.")
end
else
doPlayerSendCancel(cid, "Você só pode usar essa spell entre o level "..lvlMin.." e level "..lvlMax..".")
end
end


info
Grupo: Cavaleiro
Registrado: 26/10/08
Posts: 152
Reputação: +10
Eutou precisando de um script aura ou raio como exemplo serivodores de DBO
uma aura que gaste x de mana por segundos ou que dure tantos segundos depois pare o efeito
exemplo tenho esse script de transformação temporaria que dura 2 minutos:
--[[ Spell by Shawak Wolf transform ]]-- local time = 120 * 1000 -- 120 * 1000 = 2 min local addShielding = 20 -- how much shielding should be added local wolf = {lookType = 50, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, 42) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0) local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, time) setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, addShielding) setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE) setCombatCondition(combat, condition) local speed = createConditionObject(CONDITION_HASTE) setConditionParam(speed, CONDITION_PARAM_TICKS, time) setConditionFormula(speed, 0.7, -56, 0.7, -56) setCombatCondition(combat, speed) local outfit = createConditionObject(CONDITION_OUTFIT) setConditionParam(outfit, CONDITION_PARAM_TICKS, time) addOutfitCondition(outfit, wolf) setCombatCondition(combat, outfit) local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_SUBID, 2) setConditionParam(exhaust, CONDITION_PARAM_TICKS, time) setCombatCondition(combat, exhaust) function onCastSpell(cid, var) return doCombat(cid, combat, var) endtambem se puderem por um cooldown na magia eu agradeceria
esse script ai muda o outfit do player por X tempo se conseguirem com ele fazer um que em vez de dar outfit der Effect (uma aura ou raio) seria de grande ajuda ja serveria.
Espero ter explicado com clareza.
PS: Esqueci de falar servidor TFS 8.54.
Editado Agosto 14 por Janmix