• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

[spell] request

Kopi

New Member
Joined
Apr 13, 2009
Messages
4
Reaction score
0
hi !
i have problem with my spell's on ots.
when im use spell, spell names not shows on myself...

i have tfs 0.3.6pl1

and its one script of my spells...
Code:
local acombat1 = createCombatObject()
local acombat2 = createCombatObject()
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, true)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1, -30, -2, -90, 5, 5, 2.4, 2.1)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_BLOCKARMOR, true)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 27)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1, -30, -2, -90, 5, 5, 2.4, 2.1)


arr1 = {
{0, 1, 1, 1, 0},
{0, 1, 1, 1, 0},
{0, 1, 1, 1, 0},
{0, 0, 3, 0, 0},
}

arr2 = {
{0, 0, 1, 0, 0},
{0, 0, 1, 0, 0},
{0, 0, 1, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 3, 0, 0},
}

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
local function onCastSpell1(parameters)
doCombat(parameters.cid, parameters.combat1, parameters.var)
end
local function onCastSpell2(parameters)
doCombat(parameters.cid, parameters.combat2, parameters.var)
end
function onCastSpell(cid, var)
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, }
addEvent(onCastSpell1, 0, parameters)
addEvent(onCastSpell2, 320, parameters)
end

what is wrong ?! help
 
Try this:
Code:
local acombat1 = createCombatObject()
local acombat2 = createCombatObject()
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, true)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1, -30, -2, -90, 5, 5, 2.4, 2.1)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_BLOCKARMOR, true)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 27)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1, -30, -2, -90, 5, 5, 2.4, 2.1)


arr1 = {
{0, 1, 1, 1, 0},
{0, 1, 1, 1, 0},
{0, 1, 1, 1, 0},
{0, 0, 3, 0, 0},
}

arr2 = {
{0, 0, 1, 0, 0},
{0, 0, 1, 0, 0},
{0, 0, 1, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 3, 0, 0},
}

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
local function onCastSpell1(parameters)
doCombat(parameters.cid, parameters.combat1, parameters.var)
end
local function onCastSpell2(parameters)
doCombat(parameters.cid, parameters.combat2, parameters.var)
end
function onCastSpell(cid, var)
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, }
addEvent(onCastSpell1, 0, parameters)
addEvent(onCastSpell2, 320, parameters)
return TRUE
end
 
Back
Top