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

Trying to make area spell [WARNING]

henkas

Well-Known Member
Joined
Jul 8, 2015
Messages
1,067
Solutions
5
Reaction score
63
Hi so i tried to make simple area spell but console gives me warning when i try to run server.
Untitled.png

Code look like this.
xml
Code:
    <instant name="Kiaiho" words="kiaiho" lvl="10" mana="200" prem="0" exhaustion="1000" needlearn="0" event="script" value="LvL10/kiaiho.lua">
    <!-- Goku -->
        <vocation id="1"/>
        <vocation id="5"/>
    </instant>
Lua
Code:
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -35.0, 0, -55.0, 0)


arr1 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}

local area1 = createCombatArea(arr1)

setCombatArea(combat1, area1)


local function onCastSpell1(parameters)
    doCombat(parameters.cid, parameters.combat1, parameters.var)
end

function onCastSpell(cid, var)
local pos1 = {x = getPlayerPosition(cid).x + 1, y = getPlayerPosition(cid).y + 1, z = getPlayerPosition(cid).z}
local parameters = { cid = cid, var = var, combat1 = combat1 }
addEvent(onCastSpell1, 0, parameters)
doSendMagicEffect(pos1, 24)     
return true
end
Where is the problem?
 
event="script" value="LvL10/kiaiho.lua"
to
script="LvL10/kiaiho.lua"
fast answer :D thanks
P.S sorry guys but i have one more question. So i use this line right>?
Code:
local pos1 = {x = getPlayerPosition(cid).x + 2, y = getPlayerPosition(cid).y + 0, z = getPlayerPosition(cid).z}.

But what if i want to change pos with decimal number. Like 2 to 2.5 or what ever how do i have to make it? Because i tried 2.5 but it doesn't change anything
 
Last edited:
Back
Top