renancs
New Member
- Joined
- Jul 8, 2008
- Messages
- 252
- Reaction score
- 3
Guys, how i can edit the flame strike to have a ''meteor effect''...
I want to put the effect of this script in only one hit of flame strike don't this 'meteor rain..':
and my flame strike script:
and if possible, how i can create for ''ice', energy and tera' bolt too?
I want to put the effect of this script in only one hit of flame strike don't this 'meteor rain..':
Lua:
local spellConfig = {
{effect = CONST_ME_FIREATTACK,
area = createCombatArea({
{1, 0, 1},
{0, 2, 0},
{0, 1, 0}})
},
{effect = CONST_ME_FIREAREA,
area = createCombatArea({
{0, 1, 0, 0, 0},
{1, 0, 0, 1, 0},
{0, 0, 2, 0, 0},
{0, 0, 1, 0, 1},
{1, 0, 0, 1, 0}})
},
{effect = CONST_ME_FIREATTACK,
area = createCombatArea({
{0, 0, 1, 0, 1},
{1, 0, 0, 0, 1},
{0, 0, 2, 1, 0},
{0, 1, 0, 0, 1},
{1, 0, 1, 0, 0}})
},
{effect = CONST_ME_HITBYFIRE,
area = createCombatArea({
{0, 0, 1, 0, 1},
{1, 0, 0, 0, 1},
{0, 0, 2, 1, 0},
{0, 1, 0, 0, 1},
{1, 0, 1, 0, 0}})
},
{effect = CONST_ME_FIREAREA,
area = createCombatArea({
{0, 0, 1, 0, 1, 0, 0},
{0, 0, 0, 0, 0, 1, 0},
{1, 0, 0, 0, 0, 0, 1},
{0, 0, 1, 2, 1, 0, 0},
{1, 0, 0, 0, 0, 0, 1},
{0, 0, 1, 0, 0, 0, 0},
{0, 0, 1, 0, 1, 0, 0}})
},
{effect = CONST_ME_HITBYFIRE,
area = createCombatArea({
{0, 0, 1, 0, 1, 0, 0},
{0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 0, 0, 0, 1},
{0, 0, 0, 2, 1, 0, 0},
{0, 1, 0, 0, 0, 0, 1},
{1, 0, 0, 1, 0, 1, 0},
{0, 0, 1, 0, 1, 0, 0}})
},
{effect = CONST_ME_FIREAREA,
area = createCombatArea({
{0, 0, 1, 0, 1, 0, 0},
{0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 0, 0, 0, 1},
{0, 0, 0, 2, 1, 0, 0},
{0, 1, 0, 0, 0, 0, 1},
{1, 0, 0, 1, 0, 1, 0},
{0, 0, 1, 0, 1, 0, 0}})
}
}
local combats = {}
for k, config in ipairs(spellConfig) do
combats[k] = createCombatObject()
onTargetTile = function(cid, pos)
local basePos = getThingPosition(cid)
local fromPos = {x=basePos.x-6, y=basePos.y-8, z=basePos.z}
doSendDistanceShoot(fromPos, pos, CONST_ANI_FIRE)
end
setCombatCallback(combats[k], CALLBACK_PARAM_TARGETTILE, "onTargetTile")
setCombatParam(combats[k], COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combats[k], COMBAT_PARAM_EFFECT, config.effect)
setCombatFormula(combats[k], COMBAT_FORMULA_LEVELMAGIC, -0.593, -50, -0.929, -100)
setCombatArea(combats[k], config.area)
end
local function castingSpellTime(p)
if(isCreature(p[1]) == TRUE) then
doCombat(unpack(p))
end
end
function onCastSpell(cid, var)
for k, combat in ipairs(combats) do
addEvent(castingSpellTime, (250*k), {cid, combat, var})
end
return true
end
and my flame strike script:
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)
function onCastSpell(cid, var)
if exhaustion.check(cid, 23000) == false then
exhaustion.set(cid, 23000, 10)
return doCombat(cid, combat, var)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need wait [" ..exhaustion.get(cid, 23000).."] seconds to use Fireball again.")
end
end
and if possible, how i can create for ''ice', energy and tera' bolt too?
Last edited: