local scom1 = createCombatObject()local scom2 = createCombatObject()
local scom3 = createCombatObject()
local scom1 = createCombatObject()
setCombatParam(scom1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(scom1, COMBAT_PARAM_DISTANCEEFFECT, 24)
setCombatFormula(scom1, COMBAT_FORMULA_LEVELMAGIC, 2.5, 300, 3.0, 500)
local scom2 = createCombatObject()
setCombatParam(scom2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(scom2, COMBAT_PARAM_DISTANCEEFFECT, 23)
setCombatFormula(scom2, COMBAT_FORMULA_LEVELMAGIC, 2.5, 300, 3.0, 500)
local scom3 = createCombatObject()
setCombatParam(scom3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(scom3, COMBAT_PARAM_DISTANCEEFFECT, 22)
setCombatFormula(scom3, COMBAT_FORMULA_LEVELMAGIC, 2.5, 300, 3.0, 500)
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, 0, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 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, 0}
}
arr2 = {
{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, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0},
{0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0},
{0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 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}
}
arr3 = {
{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, 1, 1, 0, 0, 0},
{0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0},
{0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0},
{0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0},
{0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 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}
}
local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
setCombatArea(scom1, area1)
setCombatArea(scom2, area2)
setCombatArea(scom3, area3)
local function onCastSpell1(parameters)
doCombat(parameters.cid, scom1, parameters.var)
end
local function onCastSpell2(parameters)
doCombat(parameters.cid, scom2, parameters.var)
end
local function onCastSpell3(parameters)
doCombat(parameters.cid, scom3, parameters.var)
end
function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 100, parameters)
addEvent(onCastSpell2, 200, parameters)
addEvent(onCastSpell3, 300, parameters)
return TRUE
end
Oque foi mudado?
Retirado:
function onTargetTile(cid, pos)doCombat(cid,combat1,positionToVariant(pos))
end
function onTargetTile2(cid, pos)
doCombat(cid,combat2,positionToVariant(pos))
end
function onTargetTile3(cid, pos)
doCombat(cid,combat3,positionToVariant(pos))
end
setCombatCallback(scom1, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
setCombatCallback(scom2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")
setCombatCallback(scom3, CALLBACK_PARAM_TARGETTILE, "onTargetTile3")
/\ Qual era o objetivo disso?
________________________________
Renomeados os combats combat1,combat2,combat3 para scom1,scom2 e scom3
________________________________
setAttackFormula foi retirado e posto setCombatFormula
________________________________
Nessas Partes:
local combat3 = createCombatObject()setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 22)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 2.5, 300, 3.0, 500)
As partes em vermelho tem que concorda com a azul






info
Grupo: Campones
Registrado: 22/04/10
Posts: 6
Reputação: 0
Char no Tibia: Ryuuh
Protocolo: 8.54
Server: SQL
Mapa: Alissow
Tipo: TFS
Gente, eu criei essa magia:
e da esse erro: