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

Solved [SPELL] Help me in this Script Server 8.60

samuel157

/root
Joined
Mar 19, 2010
Messages
190
Solutions
1
Reaction score
17
Location
São Paulo, Brazil
GitHub
Samuel10M
Lua:
local combat1 = createCombatObject()
local combat2 = createCombatObject()
local combat3 = createCombatObject()
local combat4 = createCombatObject()
local combat5 = createCombatObject()
local combat6 = createCombatObject()
local combat7 = createCombatObject()
local combat8 = createCombatObject()
local combat9 = createCombatObject()
local combat10 = createCombatObject()
local combat11 = createCombatObject()
local combat12 = createCombatObject()


setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_MEELEFFECT, CONST_ME_MORTAREA)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_FIRE)
setCombatParam(combat2, COMBAT_PARAM_MEELEFFECT, CONST_ANI_FIRE)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_DEATH)
setCombatParam(combat1, COMBAT_PARAM_MEELEFFECT, CONST_ME_HOLYAREA)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

local combat2 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_DRUNK)
setCombatParam(combat2, COMBAT_PARAM_MEELEFFECT, CONST_ME_BIGPLANTS)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_OUTFIT)
setCombatParam(combat1, COMBAT_PARAM_MEELEFFECT, CONST_ME_TUTORIALARROW)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

local combat2 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_ENERGY)
setCombatParam(combat2, COMBAT_PARAM_MEELEFFECT, CONST_ME_WATERSPLASH)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)



local combat2 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_POISON)
setCombatParam(combat2, COMBAT_PARAM_MEELEFFECT, CONST_ME_PLANTATTACK)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_LIFEDRAIN)
setCombatParam(combat1, COMBAT_PARAM_MEELEFFECT, CONST_ME_EXPLOSIONHIT)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

local combat2 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PARALIZE)
setCombatParam(combat2, COMBAT_PARAM_MEELEFFECT, CONST_ME_BLOCKHIT)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)



local combat2 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_INVISIBLE)
setCombatParam(combat2, COMBAT_PARAM_MEELEFFECT, CONST_ME_STUN)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)




local combat2 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_ICE)
setCombatParam(combat2, COMBAT_PARAM_MEELEFFECT, CONST_ME_WATERCREATURE)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)


local combat2 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_HOLY)
setCombatParam(combat2, COMBAT_PARAM_MEELEFFECT, CONST_ME_HEARTS)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

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

arr2 = {
{0, 0, 0, 0, 0, 1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, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
}

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local area5 = createCombatArea(arr4)
local area6 = createCombatArea(arr5)
local area7 = createCombatArea(arr6)
local area8 = createCombatArea(arr7)
local area9 = createCombatArea(arr8)
local area10 = createCombatArea(ar9)
local area211 = createCombatArea(arr10)
local area12 = createCombatArea(arr11)
local area12 = createCombatArea(arr12)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)
setCombatArea(combat1, area4)
setCombatArea(combat2, area5)
setCombatArea(combat3, area6)
setCombatArea(combat1, area7)
setCombatArea(combat2, area8)
setCombatArea(combat3, area9)
setCombatArea(combat1, area10)
setCombatArea(combat2, area211)
setCombatArea(combat3, area312)

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

local function onCastSpell2(parameters)
    doCombat(parameters.cid, parameters.combat2, parameters.var)
end

local function onCastSpell3(parameters)
    doCombat(parameters.cid, parameters.combat3, parameters.var)
end

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

local function onCastSpell5(parameters)
    doCombat(parameters.cid, parameters.combat2, parameters.var)
end

local function onCastSpell6(parameters)
    doCombat(parameters.cid, parameters.combat3, parameters.var)
end

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

local function onCastSpell8(parameters)
    doCombat(parameters.cid, parameters.combat2, parameters.var)
end

local function onCastSpell9(parameters)
    doCombat(parameters.cid, parameters.combat3, parameters.var)
end

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


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

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



function onCastSpell(cid, var)
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3, combat3 = combat4, combat4 = combat5, combat5 = combat6, combat6 = combat7, combat7 = combat7, combat8 = combat8, combat9 = combat9, combat10 = combat10, combat11 = combat11, combat12 = combat12 }
addEvent(onCastSpell1, 1, parameters)
addEvent(onCastSpell2, 2, parameters)
addEvent(onCastSpell3, 3, parameters)
addEvent(onCastSpell1, 4, parameters)
addEvent(onCastSpell2, 5, parameters)
addEvent(onCastSpell3, 6, parameters)
addEvent(onCastSpell1, 7, parameters)
addEvent(onCastSpell2, 8, parameters)
addEvent(onCastSpell3, 9, parameters)
addEvent(onCastSpell1, 10, parameters)
addEvent(onCastSpell2, 11, parameters)
addEvent(onCastSpell3, 12, parameters)
end
Code:
7777.PNG
 
Solution
It works, I just tested it on TFS 0.4 (Because functions looks like 0.4 or 0.3.6) and no errors on startup or reload spells.
Where you got this spell? How you want the area to look like?
DexSoft Name Software of Distro Version 8.60 Tibia-=[OWN]=-

I made a new source software from 0, ie 0 to 100 distro, thanks everyone for your attention. ^^ SOLVED

Crazytoeee

Member
Joined
Feb 12, 2021
Messages
24
Reaction score
14
Twitch
Crazytoeee
You don't have area4 or area312 in your script and you have repeated local area12

Never have I ever used LUA. But I guess the script has been fixed now? If not more errors shows up of course. :D


Lua:
local combat1 = createCombatObject()
local combat2 = createCombatObject()
local combat3 = createCombatObject()
local combat4 = createCombatObject()
local combat5 = createCombatObject()
local combat6 = createCombatObject()
local combat7 = createCombatObject()
local combat8 = createCombatObject()
local combat9 = createCombatObject()
local combat10 = createCombatObject()
local combat11 = createCombatObject()
local combat12 = createCombatObject()


setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_MEELEFFECT, CONST_ME_MORTAREA)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_FIRE)
setCombatParam(combat2, COMBAT_PARAM_MEELEFFECT, CONST_ANI_FIRE)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_DEATH)
setCombatParam(combat1, COMBAT_PARAM_MEELEFFECT, CONST_ME_HOLYAREA)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

local combat2 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_DRUNK)
setCombatParam(combat2, COMBAT_PARAM_MEELEFFECT, CONST_ME_BIGPLANTS)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_OUTFIT)
setCombatParam(combat1, COMBAT_PARAM_MEELEFFECT, CONST_ME_TUTORIALARROW)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

local combat2 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_ENERGY)
setCombatParam(combat2, COMBAT_PARAM_MEELEFFECT, CONST_ME_WATERSPLASH)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)



local combat2 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_POISON)
setCombatParam(combat2, COMBAT_PARAM_MEELEFFECT, CONST_ME_PLANTATTACK)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_LIFEDRAIN)
setCombatParam(combat1, COMBAT_PARAM_MEELEFFECT, CONST_ME_EXPLOSIONHIT)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

local combat2 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PARALIZE)
setCombatParam(combat2, COMBAT_PARAM_MEELEFFECT, CONST_ME_BLOCKHIT)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)



local combat2 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_INVISIBLE)
setCombatParam(combat2, COMBAT_PARAM_MEELEFFECT, CONST_ME_STUN)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)




local combat2 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_ICE)
setCombatParam(combat2, COMBAT_PARAM_MEELEFFECT, CONST_ME_WATERCREATURE)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)


local combat2 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_HOLY)
setCombatParam(combat2, COMBAT_PAR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1, 1, 1, 1, 3, 1, 1, 1, 1, 1},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
}

arr12 = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
}

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local area4 = createCombatArea(arr4)
local area5 = createCombatArea(arr5)
local area6 = createCombatArea(arr6)
local area7 = createCombatArea(arr7)
local area8 = createCombatArea(arr8)
local area9 = createCombatArea(arr9)
local area10 = createCombatArea(arr10)
local area11 = createCombatArea(arr11)
local area12 = createCombatArea(arr12)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)
setCombatArea(combat1, area4)
setCombatArea(combat2, area5)
setCombatArea(combat3, area6)
setCombatArea(combat1, area7)
setCombatArea(combat2, area8)
setCombatArea(combat3, area9)
setCombatArea(combat1, area10)
setCombatArea(combat2, area11)
setCombatArea(combat3, area12)

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

local function onCastSpell2(parameters)
    doCombat(parameters.cid, parameters.combat2, parameters.var)
end

local function onCastSpell3(parameters)
    doCombat(parameters.cid, parameters.combat3, parameters.var)
end

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

local function onCastSpell5(parameters)
    doCombat(parameters.cid, parameters.combat2, parameters.var)
end

local function onCastSpell6(parameters)
    doCombat(parameters.cid, parameters.combat3, parameters.var)
end

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

local function onCastSpell8(parameters)
    doCombat(parameters.cid, parameters.combat2, parameters.var)
end

local function onCastSpell9(parameters)
    doCombat(parameters.cid, parameters.combat3, parameters.var)
end

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


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

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



function onCastSpell(cid, var)
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3, combat3 = combat4, combat4 = combat5, combat5 = combat6, combat6 = combat7, combat7 = combat7, combat8 = combat8, combat9 = combat9, combat10 = combat10, combat11 = combat11, combat12 = combat12 }
addEvent(onCastSpell1, 1, parameters)
addEvent(onCastSpell2, 2, parameters)
addEvent(onCastSpell3, 3, parameters)
addEvent(onCastSpell1, 4, parameters)
addEvent(onCastSpell2, 5, parameters)
addEvent(onCastSpell3, 6, parameters)
addEvent(onCastSpell1, 7, parameters)
addEvent(onCastSpell2, 8, parameters)
addEvent(onCastSpell3, 9, parameters)
addEvent(onCastSpell1, 10, parameters)
addEvent(onCastSpell2, 11, parameters)
addEvent(onCastSpell3, 12, parameters)
end

I changed
Line
282-283
268 arr instead of ar.
Changed the numbers too.
189 rr to arr

Try now

samuel157

 

M0ustafa

1337
Senator
Joined
Mar 4, 2017
Messages
2,565
Solutions
315
Reaction score
1,141
Location
Egypt
This spell looks like a copy/paste mess, I edited it to work (Typo fixes only) but I don't think it will even show the area in-game.
Lua:
local combat1 = createCombatObject()
local combat2 = createCombatObject()
local combat3 = createCombatObject()
local combat4 = createCombatObject()
local combat5 = createCombatObject()
local combat6 = createCombatObject()
local combat7 = createCombatObject()
local combat8 = createCombatObject()
local combat9 = createCombatObject()
local combat10 = createCombatObject()
local combat11 = createCombatObject()
local combat12 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_MEELEFFECT, CONST_ME_MORTAREA)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_FIRE)
setCombatParam(combat2, COMBAT_PARAM_MEELEFFECT, CONST_ANI_FIRE)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

setCombatParam(combat3, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_DEATH)
setCombatParam(combat3, COMBAT_PARAM_MEELEFFECT, CONST_ME_HOLYAREA)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

setCombatParam(combat4, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_DRUNK)
setCombatParam(combat4, COMBAT_PARAM_MEELEFFECT, CONST_ME_BIGPLANTS)
setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

setCombatParam(combat5, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_OUTFIT)
setCombatParam(combat5, COMBAT_PARAM_MEELEFFECT, CONST_ME_TUTORIALARROW)
setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

setCombatParam(combat6, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat6, COMBAT_PARAM_TYPE, COMBAT_ENERGY)
setCombatParam(combat6, COMBAT_PARAM_MEELEFFECT, CONST_ME_WATERSPLASH)
setCombatFormula(combat6, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

setCombatParam(combat7, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat7, COMBAT_PARAM_TYPE, COMBAT_POISON)
setCombatParam(combat7, COMBAT_PARAM_MEELEFFECT, CONST_ME_PLANTATTACK)
setCombatFormula(combat7, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

setCombatParam(combat8, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat8, COMBAT_PARAM_TYPE, COMBAT_LIFEDRAIN)
setCombatParam(combat8, COMBAT_PARAM_MEELEFFECT, CONST_ME_EXPLOSIONHIT)
setCombatFormula(combat8, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

setCombatParam(combat9, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat9, COMBAT_PARAM_TYPE, COMBAT_PARALIZE)
setCombatParam(combat9, COMBAT_PARAM_MEELEFFECT, CONST_ME_BLOCKHIT)
setCombatFormula(combat9, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

setCombatParam(combat10, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_INVISIBLE)
setCombatParam(combat10, COMBAT_PARAM_MEELEFFECT, CONST_ME_STUN)
setCombatFormula(combat10, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

setCombatParam(combat11, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat11, COMBAT_PARAM_TYPE, COMBAT_ICE)
setCombatParam(combat11, COMBAT_PARAM_MEELEFFECT, CONST_ME_WATERCREATURE)
setCombatFormula(combat11, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

setCombatParam(combat12, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat12, COMBAT_PARAM_TYPE, COMBAT_HOLY)
setCombatParam(combat12, COMBAT_PARAM_MEELEFFECT, CONST_ME_HEARTS)
setCombatFormula(combat12, COMBAT_FORMULA_LEVELMAGIC, -1000000000, 1000000000, -1000000000, -1000000000)

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

arr2 = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 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, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
}

arr11 = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
}

arr12 = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
}



local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local area4 = createCombatArea(arr4)
local area5 = createCombatArea(arr5)
local area6 = createCombatArea(arr6)
local area7 = createCombatArea(arr7)
local area8 = createCombatArea(arr8)
local area9 = createCombatArea(arr9)
local area10 = createCombatArea(arr10)
local area11 = createCombatArea(arr11)
local area12 = createCombatArea(arr12)

setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)
setCombatArea(combat4, area4)
setCombatArea(combat5, area5)
setCombatArea(combat6, area6)
setCombatArea(combat7, area7)
setCombatArea(combat8, area8)
setCombatArea(combat9, area9)
setCombatArea(combat10, area10)
setCombatArea(combat11, area11)
setCombatArea(combat12, area12)

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

local function onCastSpell2(parameters)
    doCombat(parameters.cid, parameters.combat2, parameters.var)
end

local function onCastSpell3(parameters)
    doCombat(parameters.cid, parameters.combat3, parameters.var)
end

local function onCastSpell4(parameters)
    doCombat(parameters.cid, parameters.combat4, parameters.var)
end

local function onCastSpell5(parameters)
    doCombat(parameters.cid, parameters.combat5, parameters.var)
end

local function onCastSpell6(parameters)
    doCombat(parameters.cid, parameters.combat6, parameters.var)
end

local function onCastSpell7(parameters)
    doCombat(parameters.cid, parameters.combat7, parameters.var)
end

local function onCastSpell8(parameters)
    doCombat(parameters.cid, parameters.combat8, parameters.var)
end

local function onCastSpell9(parameters)
    doCombat(parameters.cid, parameters.combat9, parameters.var)
end

local function onCastSpell10(parameters)
    doCombat(parameters.cid, parameters.combat10, parameters.var)
end


local function onCastSpell11(parameters)
    doCombat(parameters.cid, parameters.combat11, parameters.var)
end

local function onCastSpell12(parameters)
    doCombat(parameters.cid, parameters.combat12, parameters.var)
end

function onCastSpell(cid, var)
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3, combat4 = combat4, combat5 = combat5, combat6 = combat6, combat7 = combat7, combat8 = combat8, combat9 = combat9, combat10 = combat10, combat11 = combat11, combat12 = combat12 }
addEvent(onCastSpell1, 1, parameters)
addEvent(onCastSpell2, 2, parameters)
addEvent(onCastSpell3, 3, parameters)
addEvent(onCastSpell1, 4, parameters)
addEvent(onCastSpell2, 5, parameters)
addEvent(onCastSpell3, 6, parameters)
addEvent(onCastSpell1, 7, parameters)
addEvent(onCastSpell2, 8, parameters)
addEvent(onCastSpell3, 9, parameters)
addEvent(onCastSpell1, 10, parameters)
addEvent(onCastSpell2, 11, parameters)
addEvent(onCastSpell3, 12, parameters)
end
 

M0ustafa

1337
Senator
Joined
Mar 4, 2017
Messages
2,565
Solutions
315
Reaction score
1,141
Location
Egypt
It works, I just tested it on TFS 0.4 (Because functions looks like 0.4 or 0.3.6) and no errors on startup or reload spells.
Where you got this spell? How you want the area to look like?
 
OP
OP
samuel157

samuel157

/root
Joined
Mar 19, 2010
Messages
190
Solutions
1
Reaction score
17
Location
São Paulo, Brazil
GitHub
Samuel10M
It works, I just tested it on TFS 0.4 (Because functions looks like 0.4 or 0.3.6) and no errors on startup or reload spells.
Where you got this spell? How you want the area to look like?
DexSoft Name Software of Distro Version 8.60 Tibia-=[OWN]=-

I made a new source software from 0, ie 0 to 100 distro, thanks everyone for your attention. ^^ SOLVED

 
Last edited:
Solution
Top