Hello,
I use OTSERVER-BR Global 12.61
TFS 1.3
I need to add visual timer effect to magic wall and wild growth for i know when disappear is possible?
My scripts:
magic wall.lua
=========================================
Wild Growth.lua
If need to change something in the source .. where?
Thank !!
I use OTSERVER-BR Global 12.61
TFS 1.3
I need to add visual timer effect to magic wall and wild growth for i know when disappear is possible?
My scripts:
magic wall.lua
local combat = Combat()
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
function onCreateMagicWall(creature, tile)
local item = Game.createItem(Game.getWorldType() == WORLD_TYPE_NO_PVP and ITEM_MAGICWALL_SAFE or ITEM_MAGICWALL, 1, tile)
item:setAttribute(ITEM_ATTRIBUTE_DURATION, math.random(14000, 20000))
end
combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onCreateMagicWall")
local spell = Spell("rune")
function spell.onCastSpell(creature, variant, isHotkey)
return combat:execute(creature, variant)
end
spell:name("Magic Wall Rune")
spell:group("attack")
spell:id(86)
spell:cooldown(1 * 1500)
spell:groupCooldown(1 * 1500)
spell:level(32)
spell:magicLevel(9)
spell:runeId(2293)
spell:charges(3)
spell:isBlocking(true, true)
spell:allowFarUse(true)
spell:register()
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
function onCreateMagicWall(creature, tile)
local item = Game.createItem(Game.getWorldType() == WORLD_TYPE_NO_PVP and ITEM_MAGICWALL_SAFE or ITEM_MAGICWALL, 1, tile)
item:setAttribute(ITEM_ATTRIBUTE_DURATION, math.random(14000, 20000))
end
combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onCreateMagicWall")
local spell = Spell("rune")
function spell.onCastSpell(creature, variant, isHotkey)
return combat:execute(creature, variant)
end
spell:name("Magic Wall Rune")
spell:group("attack")
spell:id(86)
spell:cooldown(1 * 1500)
spell:groupCooldown(1 * 1500)
spell:level(32)
spell:magicLevel(9)
spell:runeId(2293)
spell:charges(3)
spell:isBlocking(true, true)
spell:allowFarUse(true)
spell:register()
=========================================
Wild Growth.lua
local combat = Combat()
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH)
function onCreateMagicWall(creature, tile)
local item = Game.createItem(Game.getWorldType() == WORLD_TYPE_NO_PVP and ITEM_WILDGROWTH_SAFE or ITEM_WILDGROWTH, 1, tile)
item:setAttribute(ITEM_ATTRIBUTE_DURATION, math.random(38000, 45000))
end
combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onCreateMagicWall")
local spell = Spell("rune")
function spell.onCastSpell(creature, variant, isHotkey)
return combat:execute(creature, variant)
end
spell:name("Wild Growth Rune")
spell:group("attack")
spell:id(94)
spell:cooldown(1 * 1000)
spell:groupCooldown(1 * 1000)
spell:level(27)
spell:magicLevel(8)
spell:runeId(2269)
spell:charges(2)
spell:isBlocking(true, true)
spell:allowFarUse(true)
spell:vocation("druid;true", "elder druid")
spell:register()[/b]
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH)
function onCreateMagicWall(creature, tile)
local item = Game.createItem(Game.getWorldType() == WORLD_TYPE_NO_PVP and ITEM_WILDGROWTH_SAFE or ITEM_WILDGROWTH, 1, tile)
item:setAttribute(ITEM_ATTRIBUTE_DURATION, math.random(38000, 45000))
end
combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onCreateMagicWall")
local spell = Spell("rune")
function spell.onCastSpell(creature, variant, isHotkey)
return combat:execute(creature, variant)
end
spell:name("Wild Growth Rune")
spell:group("attack")
spell:id(94)
spell:cooldown(1 * 1000)
spell:groupCooldown(1 * 1000)
spell:level(27)
spell:magicLevel(8)
spell:runeId(2269)
spell:charges(2)
spell:isBlocking(true, true)
spell:allowFarUse(true)
spell:vocation("druid;true", "elder druid")
spell:register()[/b]
If need to change something in the source .. where?
Thank !!