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

Lua Can this spell be made?

Mithaz

Nightimp Mapper/Scripter
Joined
Nov 7, 2007
Messages
120
Reaction score
1
Location
Sweden
I want a spell that moves with the player.

Say the player stands on X : 1 Y: 1 Z: 7 and cast the spell and the spell shold do 3 waves.
But if the player moves i want the spell to move with him and not stay on the same location were the player casted it.

The spell im making is a aoe low damage spell for one of my new vocation and shold be used when fleeing from the monster to hurt it whil running away.

This is how it shold look like around the player

[ - x x x - ]
[ x x x x x ]
[ x x p x x ]
[ x x x x x ]
[ - x x x - ]

x : spell effect area
p : player

Note : I do not want a whole written code for it i just want to know if this can be made and a little point in the right direction.
 
works.
maay hard to write just but can be made.
lika if player z and x = there he stands the spell will be executed there and on other sqm and etc.
sorry busy.
 
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_POFF)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

local area = createCombatArea({
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 3, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0}
})
setCombatArea(combat, area)

function onCastSpell(cid, var)
	time = -1000
	for i = 1, 3 do
		addEvent(doCombat, time + 1000, cid, combat, var)
		time = time + 1000
	end
	return true
end
 
Back
Top