• 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!

Spell Ice Storm

Code:
local effects, area, combat = {41, 41, 41, 41, 43, 42, 43, 42, 43, 42},
{
	{
		{1},
		{3},
		{1}
	},
	{
		{0, 1, 0},
		{1, 3, 1},
		{0, 1, 0}
	},
	{
		{0, 0, 1, 0, 0},
		{1, 1, 3, 1, 1},
		{0, 0, 1, 0, 0}
	},
	{
		{0, 0, 1, 0, 0},
		{0, 0, 1, 0, 0},
		{1, 1, 3, 1, 1},
		{0, 0, 1, 0, 0},
		{0, 0, 1, 0, 0}
	},
	{
		{0, 0, 1, 0, 0},
		{0, 1, 1, 1, 0},
		{1, 1, 3, 1, 1},
		{0, 1, 1, 1, 0},
		{0, 0, 1, 0, 0}
	},
	{
		{1, 1, 1},
		{1, 3, 1},
		{1, 1, 1}
	},
	{
		{0, 1, 0},
		{1, 3, 1},
		{0, 1, 0}
	},
	{
		{1, 3, 1}
	},
	{
		{1, 0, 1},
		{0, 3, 0},
		{1, 0, 1}
	},
	{
		{1, 1, 1},
		{0, 3, 0},
		{1, 1, 1}
	}
}, {}
for i = 1, 10 do
	table.insert(combat, createCombatObject())
	setCombatParam(combat[i], COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
	setCombatParam(combat[i], COMBAT_PARAM_EFFECT, effects[i])
	setCombatFormula(combat[i], COMBAT_FORMULA_LEVELMAGIC, -0.8, 0, -1.3, 0)
	setCombatArea(combat[i], createCombatArea(area[i]))
end
local function castSpell(cid, var, i)
	if isCreature(cid) == TRUE then
		doCombat(cid, combat[i], var)
	end
end
function onCastSpell(cid, var)
	for i = 1, 10 do
		addEvent(castSpell, i*100, cid, var, i)
	end
end
 
Code:
local effects, area, combat = {41, 41, 41, 41, 43, 42, 43, 42, 43, 42},
{
	{
		{1},
		{3},
		{1}
	},
	{
		{0, 1, 0},
		{1, 3, 1},
		{0, 1, 0}
	},
	{
		{0, 0, 1, 0, 0},
		{1, 1, 3, 1, 1},
		{0, 0, 1, 0, 0}
	},
	{
		{0, 0, 1, 0, 0},
		{0, 0, 1, 0, 0},
		{1, 1, 3, 1, 1},
		{0, 0, 1, 0, 0},
		{0, 0, 1, 0, 0}
	},
	{
		{0, 0, 1, 0, 0},
		{0, 1, 1, 1, 0},
		{1, 1, 3, 1, 1},
		{0, 1, 1, 1, 0},
		{0, 0, 1, 0, 0}
	},
	{
		{1, 1, 1},
		{1, 3, 1},
		{1, 1, 1}
	},
	{
		{0, 1, 0},
		{1, 3, 1},
		{0, 1, 0}
	},
	{
		{1, 3, 1}
	},
	{
		{1, 0, 1},
		{0, 3, 0},
		{1, 0, 1}
	},
	{
		{1, 1, 1},
		{0, 3, 0},
		{1, 1, 1}
	}
}, {}
for i = 1, 10 do
	table.insert(combat, createCombatObject())
	setCombatParam(combat[i], COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
	setCombatParam(combat[i], COMBAT_PARAM_EFFECT, effects[i])
	setCombatFormula(combat[i], COMBAT_FORMULA_LEVELMAGIC, -0.8, 0, -1.3, 0)
	setCombatArea(combat[i], createCombatArea(area[i]))
end
local function castSpell(cid, var, i)
	if isCreature(cid) == TRUE then
		doCombat(cid, combat[i], var)
	end
end
function onCastSpell(cid, var)
	for i = 1, 10 do
		addEvent(castSpell, i*100, cid, var, i)
	end
end

Looks great. It's short.
 
Could be shorter if you trim the new lines, but it's somewhat readable like this.
 
not bad.
:)
i have make one like ur spell before.
i'll post as soon as possible.
:'(
see u.
 
Back
Top