Frillinde
Founder: Another Realm
0.3.6pl1
OK.I really like the apocalypse spell and wanted to try to make a different spell out of it. I figured to try energy fields and poison fields instead of the fire fields.When I went to the apocalypse lua, I only saw the 3 combat effects needed to be changed(or so I thought).
Now when I edited these apocalypse worked fine but now the spell lightning storm works fine but swamp gas and apocalypse when cast instead cast lightning storm not their own spells.
I hope somone can help me fix this,thanks in advance
SWAMP GAS:
LIGHTNING STORM:
The original APOCALYPSE:
SPELLS XML:
OK.I really like the apocalypse spell and wanted to try to make a different spell out of it. I figured to try energy fields and poison fields instead of the fire fields.When I went to the apocalypse lua, I only saw the 3 combat effects needed to be changed(or so I thought).
Now when I edited these apocalypse worked fine but now the spell lightning storm works fine but swamp gas and apocalypse when cast instead cast lightning storm not their own spells.
I hope somone can help me fix this,thanks in advance
SWAMP GAS:
local combat = createCombatObject()
arr = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
function spellCallback(param)
if param.count > 0 or math.random(0, 1) == 1 then
doSendMagicEffect(param.pos, CONST_ME_HITBYPOISON)
doAreaCombatHealth(param.cid, COMBAT_EARTHDAMAGE, param.pos, 0, -100, -100, CONST_ME_POISONCLOUD)
end
if(param.count < 5) then
param.count = param.count + 1
addEvent(spellCallback, math.random(1000, 4000), param)
end
end
function onTargetTile(cid, pos)
local param = {}
param.cid = cid
param.pos = pos
param.count = 0
spellCallback(param)
end
setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
LIGHTNING STORM:
local combat = createCombatObject()
arr = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
function spellCallback(param)
if param.count > 0 or math.random(0, 1) == 1 then
doSendMagicEffect(param.pos, CONST_ME_ENERGYHIT)
doAreaCombatHealth(param.cid, COMBAT_ENERGYDAMAGE, param.pos, 0, -100, -100, CONST_ME_ENERGYAREA)
end
if(param.count < 5) then
param.count = param.count + 1
addEvent(spellCallback, math.random(1000, 4000), param)
end
end
function onTargetTile(cid, pos)
local param = {}
param.cid = cid
param.pos = pos
param.count = 0
spellCallback(param)
end
setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
The original APOCALYPSE:
local combat = createCombatObject()
arr = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
function spellCallback(param)
if param.count > 0 or math.random(0, 1) == 1 then
doSendMagicEffect(param.pos, CONST_ME_HITBYFIRE)
doAreaCombatHealth(param.cid, COMBAT_FIREDAMAGE, param.pos, 0, -100, -100, CONST_ME_EXPLOSIONHIT)
end
if(param.count < 5) then
param.count = param.count + 1
addEvent(spellCallback, math.random(1000, 4000), param)
end
end
function onTargetTile(cid, pos)
local param = {}
param.cid = cid
param.pos = pos
param.count = 0
spellCallback(param)
end
setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
SPELLS XML:
<instant name="Lightning Storm" words="arcanus vis" lvl="65" mana="1500" prem="1" exhaustion="3500" needlearn="0" event="script" value="customspells/lightning storm.lua"> <vocation id="5"/> </instant> <instant name="Apocalypse" words="arcanus flam" lvl="65" mana="1500" prem="1" exhaustion="3500" needlearn="0" event="script" value="customspells/apocalypse.lua">
<vocation id="5"/> </instant><instant name="Swamp Gas" words="arcanus pox" lvl="65" mana="1500" prem="1" exhaustion="3500" needlearn="0" event="script" value="customspells/swamp gas.lua"> <vocation id="6"/> </instant>