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

Special Spell Request

Reyn

On to the next One
Joined
May 15, 2010
Messages
259
Reaction score
1
Location
Germany ;3
Hei all,

I'm searching for a spell script or any way to do that a spell works like this:
if u look <- it uses the effect 1 to that site
if u look -> it uses the effect 2 to that site
if u look v it uses the effect 3 to that site and
if u look ^ it uses the effect 4 to that site for example

should all have the same Spell words/name
is that possible?
 
What do you want?
Just a normal spell like exori vis and such? or do you want the damage type to depend of the direction you look?

Explain what it should do..
North = fire, south = ice and such?
 
Yeah same damage, spell name and spell words
just that if u look north it makes holy to north direction, when u look south it makes fire to south direction and so on :P
 
KK here:
PHP:
local combat = {createCombatObject(),createCombatObject(),createCombatObject(),createCombatObject()}

for i = 1, #combat do
	setAttackFormula(combat[i], COMBAT_FORMULA_LEVELMAGIC, 5, 5, 1.2, 2)
end

local param = {
[combat[1]] = {{setCombatParam,COMBAT_PARAM_TYPE,COMBAT_FIREDAMAGE},{setCombatParam,COMBAT_PARAM_EFFECT,CONST_ME_FIREATTACK}},
[combat[2]] = {{setCombatParam,COMBAT_PARAM_TYPE,COMBAT_ICEDAMAGE},{setCombatParam,COMBAT_PARAM_EFFECT,CONST_ME_ICEAREA}},
[combat[3]] = {{setCombatParam,COMBAT_PARAM_TYPE,COMBAT_EARTHDAMAGE},{setCombatParam,COMBAT_PARAM_EFFECT,CONST_ME_SMALLPLANTS}},
[combat[4]] = {{setCombatParam,COMBAT_PARAM_TYPE,COMBAT_ENERGYDAMAGE},{setCombatParam,COMBAT_PARAM_EFFECT,CONST_ME_ENERGYAREA}}
}

for combat, params in pairs(param) do
	for i = 1,#params do
		params[i][1](combat, params[i][2],params[i][3])
	end
end



function onCastSpell(cid, var)
	return doCombat(cid, combat[(getCreatureLookDirection(cid)+1)], var)
end

Damage formula - setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 1.2, 2)

If you want to change the effect and damage type just edit these lines:
PHP:
{{setCombatParam,COMBAT_PARAM_TYPE,COMBAT_FIREDAMAGE},{setCombatParam,COMBAT_PARAM_EFFECT,CONST_ME_FIREATTACK}}


North - combat[1]
East - combat[2]
South - combat[3]
West - combat[4]
 
Yay thanks man :) rep++ :)
And how do i add areas + more effects to that script? :x

Like if i want it like this to north (x=nothing effects=1,2,3, 0=me)
xxx3xxx
xxx2xxx
xxx1xxx
xxx0xxx

1 should be fire , 2 other fire and 3 something else for example..
and the same for other sides
 
Lol thats a completly different script. You wanted a script thats shows different effect depending on your look direction.
 
KK here:
PHP Code:
local combat = {createCombatObject(),createCombatObject(),createCombatObject(),createCombatObject()}

for i = 1, #combat do
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 1.2, 2)
end

local param = {
[combat[1]] = {{setCombatParam,COMBAT_PARAM_TYPE,COMBAT_FIREDAMAGE},{setCombatParam,COMBAT_PARAM_EFFECT,CONST_ME_FIREATTACK}},
[combat[2]] = {{setCombatParam,COMBAT_PARAM_TYPE,COMBAT_ICEDAMAGE},{setCombatParam,COMBAT_PARAM_EFFECT,CONST_ME_ICEAREA}},
[combat[3]] = {{setCombatParam,COMBAT_PARAM_TYPE,COMBAT_EARTHDAMAGE},{setCombatParam,COMBAT_PARAM_EFFECT,CONST_ME_SMALLPLANTS}},
[combat[4]] = {{setCombatParam,COMBAT_PARAM_TYPE,COMBAT_ENERGYDAMAGE},{setCombatParam,COMBAT_PARAM_EFFECT,CONST_ME_ENERGYAREA}}
}

for combat, params in pairs(param) do
for i = 1,#params do
params[1](combat, params[2],params[3])
end
end




could anyone implent areas into this script..? :S i tried it but anyhow it doesnt work
 
Well just areas are easy:
PHP:
local area = createCombatArea(AREA_WAVE4) --Put real area here instead of AREA_WAVE4. (area like fire wave now..)

local combat = {createCombatObject(),createCombatObject(),createCombatObject(),createCombatObject()}

for i = 1, #combat do
    setAttackFormula(combat[i], COMBAT_FORMULA_LEVELMAGIC, 5, 5, 1.2, 2)
end

local param = {
[combat[1]] = {{setCombatParam,COMBAT_PARAM_TYPE,COMBAT_FIREDAMAGE},{setCombatParam,COMBAT_PARAM_EFFECT,CONST_ME_FIREATTACK}},
[combat[2]] = {{setCombatParam,COMBAT_PARAM_TYPE,COMBAT_ICEDAMAGE},{setCombatParam,COMBAT_PARAM_EFFECT,CONST_ME_ICEAREA}},
[combat[3]] = {{setCombatParam,COMBAT_PARAM_TYPE,COMBAT_EARTHDAMAGE},{setCombatParam,COMBAT_PARAM_EFFECT,CONST_ME_SMALLPLANTS}},
[combat[4]] = {{setCombatParam,COMBAT_PARAM_TYPE,COMBAT_ENERGYDAMAGE},{setCombatParam,COMBAT_PARAM_EFFECT,CONST_ME_ENERGYAREA}}
}

for combat, params in pairs(param) do
    for i = 1,#params do
        params[i][1](combat, params[i][2],params[i][3])
    end
end

for i = 1,#combat do
    setCombatArea(combat[i], area)
end
function onCastSpell(cid, var)
    return doCombat(cid, combat[(getCreatureLookDirection(cid)+1)], var)
end
 
Can i write instead of AREA_WAVE4 this stuff like
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
{0, 1, 1, 1, 0},
{0, 0, 3, 0, 0}
also?
Thanks btw :p
 
Ye but you need to put it in correct.
You need to put brakes around your example like that:
PHP:
{{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
{0, 1, 1, 1, 0},
{0, 0, 3, 0, 0}}

Now you can replace with AREA_WAVE4
 
By the way. U know any Transformation script which gives u outfit + vocation forever? not disapearing after logout? :P if not its okai either xD
 
Back
Top