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

ACtion Spell!

Rikrdo

New Member
Joined
Mar 6, 2010
Messages
38
Reaction score
1
Well I want to know how to put a spell type exevo flam hur in a action ... I want her skirt in front sqm of i look.
I hope to understand what I want to do.

tks.
 
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 1.2, 2)

local area = createCombatArea({
	{1, 1, 1, 1, 1},
	{0, 1, 1, 1, 0},
	{0, 1, 1, 1, 0},
	{0, 0, 3, 0, 0}
},{
	{0, 0, 0, 0, 1, 0},
	{0, 0, 0, 1, 1, 0},
	{0, 0, 1, 1, 1, 0},
	{0, 1, 1, 1, 1, 0},
	{1, 1, 1, 1, 1, 0},
	{0, 0, 0, 0, 0, 3}
})
setCombatArea(combat, area)
function onUse(cid, item, fromPosition, itemEx, toPosition)
	return doCombat(cid, combat, var)
end
 
Last edited:
still wont work

Should be like that
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 1.2, 2)
 
local area = createCombatArea({
	{1, 1, 1, 1, 1},
	{0, 1, 1, 1, 0},
	{0, 1, 1, 1, 0},
	{0, 0, 3, 0, 0}
},{
	{0, 0, 0, 0, 1, 0},
	{0, 0, 0, 1, 1, 0},
	{0, 0, 1, 1, 1, 0},
	{0, 1, 1, 1, 1, 0},
	{1, 1, 1, 1, 1, 0},
	{0, 0, 0, 0, 0, 3}
})
setCombatArea(combat, area)
function onUse(cid, item, fromPosition, itemEx, toPosition)
	
	return doCombat(cid, combat, positionToVariant(toPosition))
end
 
Last edited:
Thanks for the help ... but when I click on the item and it is inside the bag it does nothing, but when I put him on the ground it works

How to Arrange It?
 
This

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 1.2, 2)

local area = createCombatArea({
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
{0, 1, 1, 1, 0},
{0, 0, 3, 0, 0}
},{
{0, 0, 0, 0, 1, 0},
{0, 0, 0, 1, 1, 0},
{0, 0, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 0},
{0, 0, 0, 0, 0, 3}
})
setCombatArea(combat, area)
function onUse(cid, item, fromPosition, itemEx, toPosition)

return doCombat(cid, combat, positionToVariant(toPosition))
end
 
Try this:
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 1.2, 2)

local area = createCombatArea({
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
{0, 1, 1, 1, 0},
{0, 0, 3, 0, 0}
},{
{0, 0, 0, 0, 1, 0},
{0, 0, 0, 1, 1, 0},
{0, 0, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 0},
{0, 0, 0, 0, 0, 3}
})
setCombatArea(combat, area)
function onUse(cid, item, fromPosition, itemEx, toPosition)

return doCombat(cid, combat, positionToVariant(getThingPos(cid)))
end
 
Change this:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
return doCombat(cid, combat, positionToVariant(getThingPos(cid)))
end

For this:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
return doCombat(cid, combat, positionToVariant(getCreatureLookPos(cid)))
end

And if not works I do not know.
 
error in console

[17/10/2010 10:55:02] Description:
[17/10/2010 10:55:02] data/actions/scripts/changegold.lua:24: attempt to call global 'getCreatureLookPos' (a nil value)
[17/10/2010 10:55:02] stack traceback:
[17/10/2010 10:55:02] data/actions/scripts/changegold.lua:24: in function <data/actions/scripts/changegold.lua:22>

=x ...ty for you to try to help me ^^
 
Sorry. haha. I have one error with the function. Change to this. sorry...
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
return doCombat(cid, combat, positionToVariant(getPlayerLookPos(cid)))
end
 
:p
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)

	return doCombat(cid, combat, positionToVariant(getCreatureLookPosition(cid)) )
end
 
Back
Top