Exedion
Active Member
- Joined
- Jun 11, 2007
- Messages
- 628
- Reaction score
- 30
Hello, i remake my olds scripts based in deprecated but legendarys spells of tibia
Only one thing: i need help to add poison condition to poison storm's rain, but i get error and TFS crash, please some help to fix (i will include credits)
Ultimate Eplosion:
Poison Storm Bugged Edition(you can deleted the condition part and will work):
Thanks in advance if any help me
and Enjoy!
Only one thing: i need help to add poison condition to poison storm's rain, but i get error and TFS crash, please some help to fix (i will include credits)
Ultimate Eplosion:
Code:
function spellCallbackUE(cid, position, count)
if Creature(cid) then
if count > 0 or math.random(0, 1) == 1 then
position:sendMagicEffect(CONST_ME_FIREAREA)
doAreaCombatHealth(cid, COMBAT_PHYSICALDAMAGE, position, 0, -50, -100, CONST_ME_EXPLOSIONHIT)
end
if count < 1 then
count = count + 1
addEvent(spellCallbackUE, math.random(500, 1000), cid, position, count)
end
end
end
function onTargetTile(creature, position)
spellCallbackUE(creature:getId(), position, 0)
end
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
combat:setArea(createCombatArea(AREA_CIRCLE6X6))
function onGetFormulaValues(player, level, maglevel)
local min = (level / 5) + (maglevel * 4) + 225
local max = (level / 5) + (maglevel * 10) + 300
return -min, -max
end
combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile")
function onCastSpell(creature, variant, isHotkey)
return combat:execute(creature, variant)
end
Poison Storm Bugged Edition(you can deleted the condition part and will work):
Code:
local poison = Condition(CONDITION_POISON)
poison:setParameter(CONDITION_PARAM_DELAYED, true)
poison:setParameter(CONDITION_PARAM_MINVALUE, 20)
poison:setParameter(CONDITION_PARAM_MAXVALUE, 70)
poison:setParameter(CONDITION_PARAM_STARTVALUE, 50)
poison:setParameter(CONDITION_PARAM_TICKINTERVAL, 6000)
poison:setParameter(CONDITION_PARAM_FORCEUPDATE, true)
function spellCallbackStorm(cid, position, count)
local origin = Position(position.x - 8, position.y - 8, position.z)
if Creature(cid) then
if count > 0 or math.random(0, 1) == 1 then
position:sendMagicEffect(CONST_ME_GREEN_RINGS)
origin:sendDistanceEffect(position, CONST_ANI_POISON)
doAreaCombatCondition(cid, position, 0, poison, 0)
end
if count < 2 then
count = count + 1
addEvent(spellCallbackStorm, math.random(500, 2000), cid, position, count)
end
end
end
function onTargetTile(creature, position)
spellCallbackStorm(creature:getId(), position, 0)
end
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREENSMOKE)
combat:setArea(createCombatArea(AREA_CIRCLE6X6))
function onGetFormulaValues(player, level, maglevel)
local min = (level / 5) + (maglevel * 4) + 225
local max = (level / 5) + (maglevel * 10) + 300
return -min, -max
end
combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile")
function onCastSpell(creature, variant, isHotkey)
return combat:execute(creature, variant)
end
Thanks in advance if any help me
and Enjoy!