• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Spell Exori Holy By Assassin21 (my first spell)

assassin21

ASSASSIN
Joined
Nov 23, 2011
Messages
11
Reaction score
2
Location
Poland-Rzeszów
Hey Guys.I Present My First Spell :p

Spell: exori holy - YouTube

scripts/attack/exori holy.lua

Code:
local holyDeathArea = {
	createCombatArea({
		{0, 1, 0},
		{1, 2, 1},
		{0, 1, 0}
	}),
	createCombatArea({
		{0, 0, 0, 0, 0},
		{0, 1, 0, 1, 0},
		{0, 0, 2, 0, 0},
		{0, 1, 0, 1, 0},
		{0, 0, 0, 0, 0}
	}),
	createCombatArea({
		{0, 1, 0},
		{1, 2, 1},
		{0, 1, 0}
	}),

	createCombatArea({
		{0, 0, 0, 0, 0},
		{0, 1, 0, 1, 0},
		{0, 0, 2, 0, 0},
		{0, 1, 0, 1, 0},
		{0, 0, 0, 0, 0}
	}),

}
 
local holyCircleArea = {
	createCombatArea({
		{1, 2}
	}),
	createCombatArea({
		{1, 0},
		{0, 2}
	}),
	createCombatArea({
		{1},
		{2}
	}),
	createCombatArea({
		{0, 1},
		{2, 0}
	}),
	createCombatArea({
		{2, 1}
	}),
	createCombatArea({
		{2, 0},
		{0, 1}
	}),
	createCombatArea({
		{2},
		{1}
	}),
	createCombatArea({
		{0, 2},
		{1, 0}
	})
}
 
 
local holyDeath = {}
for k, area in ipairs(holyDeathArea) do
	holyDeath[k] = createCombatObject()
	setCombatParam(holyDeath[k], COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
	setCombatParam(holyDeath[k], COMBAT_PARAM_EFFECT, CONST_ME_DEATHDAMAGE)
	setCombatFormula(holyDeath[k], COMBAT_FORMULA_LEVELMAGIC, -20.376, -(100 * (#holyDeathArea - k)), -20.841, -(150 * (#holyDeathArea - k)))
 
	setCombatArea(holyDeath[k], area)
 
	loadstring([[onTargetTile]] .. k .. [[ = function(cid, pos)
		doSendDistanceShoot(getCreaturePosition(cid), pos, CONST_ANI_HOLY)
	end]])()
	setCombatCallback(holyDeath[k], CALLBACK_PARAM_TARGETTILE, "onTargetTile" .. k)
end
 
local holyCircle = {}
for k, area in ipairs(holyCircleArea) do
	holyCircle[k] = createCombatObject()
	setCombatParam(holyCircle[k], COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
	setCombatParam(holyCircle[k], COMBAT_PARAM_EFFECT, CONST_ME_DEATHDAMAGE)
	setCombatFormula(holyCircle[k], COMBAT_FORMULA_LEVELMAGIC, -9.466, -400, -9.841, -380)
 
	setCombatArea(holyCircle[k], area)
 
	loadstring([[onTargetTile]] .. k + #holyDeath .. [[ = function(cid, pos)
		doSendDistanceShoot(getCreaturePosition(cid), pos, CONST_ANI_HOLY)
	end]])()
	setCombatCallback(holyCircle[k], CALLBACK_PARAM_TARGETTILE, "onTargetTile" .. k + #holyDeath)
end
 
loadstring([[onTargetTile]] .. #holyDeath + #holyCircle + 1 .. [[ = function(cid, pos)
	doSendDistanceShoot(getCreaturePosition(cid), pos, CONST_ANI_SMALLHOLY)
end]])()
 
local function castSpellDelay(p)
	doCombat(unpack(p))
end
 
local stepDelay = 75
local spins = 2
function onCastSpell(cid, var)
	local delay = 0
	for i = 1, spins do
		for k, area in ipairs(holyCircle) do
			addEvent(castSpellDelay, delay, {cid, holyCircle[k], var})
			delay = delay + stepDelay
		end
	end
	for k, area in ipairs(holyDeath) do
		addEvent(castSpellDelay, delay, {cid, holyDeath[k], var})
		delay = delay + stepDelay
	end
 
	return LUA_NO_ERROR
end

Spells.xml
Code:
<instant name="Knight200" words="Exori Holy" lvl="200" mana="450" selftarget="1" prem="1" exhaustion="1500" needlearn="0" event="script" value="attack/exori holy.lua">
		<vocation id="4"/>
		<vocation id="8"/>
	</instant>

THX.
 
not bad. but if you can help me i knew how to make spell but how to add spell in my server and for your spell i think is nice :D
 
and in spell.xml waht i need to add

<instant name="Knight200" words="Exori Holy" lvl="200" mana="450" selftarget="1" prem="1" exhaustion="1500" needlearn="0" event="script" value="attack/exori holy.lua">
<vocation id="4"/>
<vocation id="8"/>
</instant>
...
 
Back
Top