• 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] Magic Wall Creator

Ulti

New Member
Joined
Oct 2, 2011
Messages
17
Reaction score
0
Hi, i want simple spell

Spell creating magic wall at position(+2 sqm from player direction).
Magic wall going to remove in 3 seconds.

Thanks for help
 
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1497)

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

local area = createCombatArea(arr)
setCombatArea(combat, area)

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

here u are, in spell set direction = "1".
But if you wanna to remove that wall in 3sec, you must edit that in items.xml.

;3
 
Lua:
local removeTime = 3 * 1000
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1497)
 
local arr = {
{0, 1, 0},
{0, 2, 0},
{0, 0, 0}
}
 
local area = createCombatArea(arr)
setCombatArea(combat, area)
 
function onCastSpell(cid, var)
	area.stackpos = 254
	local magicWall = GetThingFromPos(area)
	addEvent(removeItem, removeTime, magicWall.uid)
	return doCombat(cid, combat, var)
end

Try that out, don't have TFS downloaded at the moment so I can't troubleshoot it, just return here with any errors.
 
Back
Top