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

Compiling Spells Help

Xandoko

Active Member
Joined
Jul 11, 2014
Messages
134
Reaction score
2
Is There is Any Way to Make Wave Spells Like Tera Hur Pass From Magic wall?
 
Use the same area and then as combat param COMBAT_PARAM_CREATEITEM.
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1498)
 
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1498)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

function onCastSpell(cid, var)
local fromPosition = {x = 32617, y = 31364, z = 7} -- top left cornor of the playground
local toPosition = {x = 32643, y = 31364, z = 7 } -- bottom right cornor of the playground
if isInArea(getThingPosition(cid), fromPosition, toPosition) then
return false, doPlayerSendCancel(cid, "You're not allowed to use any rune here.")
end
return doCombat(cid, combat, var)
end

@Limos
 
Last edited:
Add the area from the spell you want, also add it the same way in spells.xml as that spell.
So basicly you can just copy that spell, change names and replace the combat part.
 
Copy the Lua script of the wave spell you wanted, then change the combat params to this.
Code:
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1498)
 
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 15, 15, 10.50, 21)

local area = createCombatArea(AREA_SQUAREWAVE5, AREADIAGONAL_SQUAREWAVE5)
setCombatArea(combat, area)

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

Where Can i Put
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1498)
 
Instead of
Code:
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 15, 15, 10.50, 21)
So remove that and add the createitem line.
 
Like This

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1498)

local area = createCombatArea(AREA_SQUAREWAVE5, AREADIAGONAL_SQUAREWAVE5)
setCombatArea(combat, area)

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

@Limos
 
You can change the magic wall rune script to this.
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 8753)

function onCastSpell(cid, var)
     return doCombat(cid, combat, var)
end
 
You can change the magic wall rune script to this.
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 8753)

function onCastSpell(cid, var)
     return doCombat(cid, combat, var)
end
can you help me iam use tfs 1.2
i need add Tera wave hit from behind Magic wall A wave hit pierces the magic wall
like> Compiling - Spells Help (https://otland.net/threads/spells-help.224842/#post-2163084)
 
Back
Top