• 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 / action request

Betoo

Centurion OT Chaos Era
Joined
Jul 24, 2007
Messages
128
Reaction score
1
Location
Mexico
im here to request a simple action spell..
well it works like this:

you click on a weapon(lets say fire sword) so when you click on it the weapon will shoot fire fields. but in a certain order
0 0 0 0 0 3 0 0 0 0 0
0 0 0 0 0 3 0 0 0 0 0
0 0 0 0 0 3 0 0 0 0 0
0 0 0 0 0 3 0 0 0 0 0
1 1 1 1 1 P 2 2 2 2 2
0 0 0 0 0 4 0 0 0 0 0
0 0 0 0 0 4 0 0 0 0 0
0 0 0 0 0 4 0 0 0 0 0
0 0 0 0 0 4 0 0 0 0 0
0 0 0 0 0 4 0 0 0 0 0

were the player is standing and lookig at.. a firefield sprite will travel until it travels 5 sqms. when the sprite hits a player it will stop traveling, but if at the end of the 5 sqms the sprite wont encounter a player it will simply disappear...

im also looking for you to add some configs:
like what type of spirte should it shoot, and how many sqms it will travel

thanks in advance...
YOURS BETOO
 
try this... it may require some fixes...... it's untested, don't forget to change FIRESWORD_ITEMID to the id of firesword.......
Lua:
local combat = createCombatObject()
setCombatParam(cmmbat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_FIRE)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -0.3, -40, -0.4, -50)

local a_norm = {
	{1, 1, 1, 1, 1},
	{1, 1, 1, 1, 1},
	{0, 1, 1, 1, 0},
	{0, 0, 1, 0, 0},
	{0, 0, 2, 0, 0}
}

local a_diag = {
	{0, 0, 1, 0, 0, 0},
	{0, 1, 1, 1, 0, 0},
	{1, 1, 1, 1, 1, 0},
	{0, 1, 1, 1, 1, 0},
	{0, 0, 1, 1, 1, 0},
	{0, 0, 0, 0, 0, 3}
}

local area = createCombatArea(a_norm, a_diag)
setCombatArea(combat, area)

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local ret = destroyItem(cid, itemEx, toPosition)
	if not ret and item.itemid == FIRESWORD_ITEMID then
		local var = positionToVariant(toPosition)
		doCombat(cid, combat, var)
	end
	return ret
end
 
Back
Top