• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

[Spell] Fire, Ice & Poison Volley

Synergy

New Member
Joined
Nov 24, 2011
Messages
334
Reaction score
0
Hello guys!


I request 3 spells, they will look alike just a change of elements..

I want the spell to shoot a volley of arrows in front of you

Like this:

> > >
Player> > > > >
> > >


The first one Fire Volley, the second Ice Volley, and the third Poison volley


So also I want the arrows shot to be those, ice fire and poison arrows.



Thanks!! rep++
 
Fire Volley:
LUA:
local acombat = createCombatObject()
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 255)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 33)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.5, -150, -1.1, -150)
 
local arr = {
{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, 1, 1, 1, 1, 1, 1, 1, 0, 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, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}
 
local area = createCombatArea(arr)
setCombatArea(acombat, area)
 
function onTargetTile(cid, pos)
	doCombat(cid,combat,positionToVariant(pos))
end
 
setCombatCallback(acombat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
 
function onCastSpell(cid, var)
	return doCombat(cid, acombat, var)
end


Ice Volley:
LUA:
local acombat = createCombatObject()
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 255)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 34)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.5, -150, -1.1, -150)
 
local arr = {
{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, 1, 1, 1, 1, 1, 1, 1, 0, 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, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}
 
local area = createCombatArea(arr)
setCombatArea(acombat, area)
 
function onTargetTile(cid, pos)
	doCombat(cid,combat,positionToVariant(pos))
end
 
setCombatCallback(acombat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
 
function onCastSpell(cid, var)
	return doCombat(cid, acombat, var)
end

Poison Volley:
LUA:
local acombat = createCombatObject()
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 255)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 5)  -- or 39 (earth arrow)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.5, -150, -1.1, -150)
 
local arr = {
{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, 1, 1, 1, 1, 1, 1, 1, 0, 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, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}
 
local area = createCombatArea(arr)
setCombatArea(acombat, area)
 
function onTargetTile(cid, pos)
	doCombat(cid,combat,positionToVariant(pos))
end
 
setCombatCallback(acombat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
 
function onCastSpell(cid, var)
	return doCombat(cid, acombat, var)
end

Not sure if that's what you wanted it to look like tho
 
Just one problem luigilc, when I look NORTH and shoot it, it shoots south... :(


BTW IT shoots only south, it cant be shot at different directions
 
LOL you used the wring tag in spells.xml...
Here use this one:
LUA:
	<instant name="Fire Volley" words="exori volley" lvl="20" mana="35" direction="1" exhaustion="2000" needlearn="0" event="script" value="attack/fire volley.lua">
		<vocation id="3"/>
		<vocation id="7"/>
	</instant>
Edit it as you wish.
 
Thank you so much! it works now


If it isn't too much i want to ask for one more favor..

Can you make the ice volley slow down the enemy it hits and the fire volley burn them and poison, poison them? :D
 
It's fairly easy to do so, just add a condition on the spells.
Anyways:
Poison Volley:
LUA:
local acombat = createCombatObject()
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 255)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 5)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.5, -150, -1.1, -150)

local condition = createConditionObject(CONDITION_POISON)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
 
addDamageCondition(condition, 1, 1000, -45)
addDamageCondition(condition, 1, 1000, -40)
addDamageCondition(condition, 1, 1000, -35)
addDamageCondition(condition, 1, 1000, -34)
addDamageCondition(condition, 2, 1000, -33)
addDamageCondition(condition, 2, 1000, -32)
addDamageCondition(condition, 2, 1000, -31)
addDamageCondition(condition, 2, 1000, -30)
addDamageCondition(condition, 3, 1000, -29)
addDamageCondition(condition, 3, 1000, -25)
addDamageCondition(condition, 3, 1000, -24)
addDamageCondition(condition, 4, 1000, -23)
addDamageCondition(condition, 4, 1000, -20)
addDamageCondition(condition, 5, 1000, -19)
addDamageCondition(condition, 5, 1000, -15)
addDamageCondition(condition, 6, 1000, -10)
addDamageCondition(condition, 10, 1000, -5)
setCombatCondition(combat, condition)
 
local arr = {
{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, 1, 1, 1, 1, 1, 1, 1, 0, 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, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}
 
local area = createCombatArea(arr)
setCombatArea(acombat, area)
 
function onTargetTile(cid, pos)
	doCombat(cid,combat,positionToVariant(pos))
end
 
setCombatCallback(acombat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
 
function onCastSpell(cid, var)
	return doCombat(cid, acombat, var)
end

Fire Volley:
LUA:
local acombat = createCombatObject()
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 255)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 33)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.5, -150, -1.1, -150)

local condition = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
 
addDamageCondition(condition, 1, 1000, -45)
addDamageCondition(condition, 1, 1000, -40)
addDamageCondition(condition, 1, 1000, -35)
addDamageCondition(condition, 1, 1000, -34)
addDamageCondition(condition, 2, 1000, -33)
addDamageCondition(condition, 2, 1000, -32)
addDamageCondition(condition, 2, 1000, -31)
addDamageCondition(condition, 2, 1000, -30)
addDamageCondition(condition, 3, 1000, -29)
addDamageCondition(condition, 3, 1000, -25)
addDamageCondition(condition, 3, 1000, -24)
addDamageCondition(condition, 4, 1000, -23)
addDamageCondition(condition, 4, 1000, -20)
addDamageCondition(condition, 5, 1000, -19)
addDamageCondition(condition, 5, 1000, -15)
addDamageCondition(condition, 6, 1000, -10)
addDamageCondition(condition, 10, 1000, -5)
setCombatCondition(combat, condition)
 
local arr = {
{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, 1, 1, 1, 1, 1, 1, 1, 0, 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, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}
 
local area = createCombatArea(arr)
setCombatArea(acombat, area)
 
function onTargetTile(cid, pos)
	doCombat(cid,combat,positionToVariant(pos))
end
 
setCombatCallback(acombat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
 
function onCastSpell(cid, var)
	return doCombat(cid, acombat, var)
end

Ice Volley:
LUA:
local acombat = createCombatObject()
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 255)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 34)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.5, -150, -1.1, -150)

local condition = createConditionObject(CONDITION_PARALYZE) 
setConditionParam(condition, CONDITION_PARAM_TICKS, 5000) 
setConditionParam(condition, CONDITION_PARAM_SPEED, -200) 
setCombatCondition(combat, condition) 
 
local arr = {
{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, 1, 1, 1, 1, 1, 1, 1, 0, 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, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}
 
local area = createCombatArea(arr)
setCombatArea(acombat, area)
 
function onTargetTile(cid, pos)
	doCombat(cid,combat,positionToVariant(pos))
end
 
setCombatCallback(acombat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
 
function onCastSpell(cid, var)
	return doCombat(cid, acombat, var)
end

Note that these are in no way advanced and could be improved but I'm too lazy now and those should be working perfectly.
 
Back
Top