Ir para conteúdo
  • 0

spell bugada ajudem aee plz


tiuguedor

Pergunta

[local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 52)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -17.0, -190, -17.5, -200)

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 52)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -17.0, -190, -17.5, -200)

 

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, 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, 2, 0, 0, 0, 0, 0},

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

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

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

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

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

{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)

local area2 = createCombatArea(arr2)

setCombatArea(combat1, area1)

setCombatArea(combat2, area2)

 

local function onCastSpell2(parameters)

doCombat(parameters.combat2, parameters.var)

end

 

local function onCastSpell3(parameters)

doCombat(parameters.combat3, parameters.var)

end

 

function onCastSpell(cid, var)

if exhaustion.check(cid, 23006) == false then

exhaustion.set(cid, 23006, 10)

return doCombat(cid, combat, var)

else

doPlayerSendCancel(cid, "Cooldown[" ..exhaustion.get(cid, 23006).."]")

end

end]

Link para o comentário
Compartilhar em outros sites

4 respostass a esta questão

Posts Recomendados

  • 0

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 52)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -17.0, -190, -17.5, -200)

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 52)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -17.0, -190, -17.5, -200)

 

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, 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, 2, 0, 0, 0, 0, 0},

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

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

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

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

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

{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)

local area2 = createCombatArea(arr2)

setCombatArea(combat1, area1)

setCombatArea(combat2, area2)

 

local function onCastSpell2(parameters)

doCombat(parameters.combat2, parameters.var)

end

 

local function onCastSpell3(parameters)

doCombat(parameters.combat3, parameters.var)

end

 

function onCastSpell(cid, var)

if exhaustion.check(cid, 23006) == false then

exhaustion.set(cid, 23006, 10)

return doCombat(cid, combat, var)

else

doPlayerSendCancel(cid, "Cooldown[" ..exhaustion.get(cid, 23006).."]")

end

return TRUE

end

Link para o comentário
Compartilhar em outros sites

  • 0

da dano isoo olha ae

 

[07/05/2013 23:22:50] [Error - Spell Interface]

[07/05/2013 23:22:50] data/spells/scripts/attack/housenka.lua:onCastSpell

[07/05/2013 23:22:50] Description:

[07/05/2013 23:22:50] (luaDoCombat) Combat not found

Link para o comentário
Compartilhar em outros sites

  • 0
local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 52)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -17.0, -190, -17.5, -200)

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 52)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -17.0, -190, -17.5, -200)

 

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, 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, 2, 0, 0, 0, 0, 0},

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

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

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

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

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

{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)

local area2 = createCombatArea(arr2)

setCombatArea(combat1, area1)

setCombatArea(combat2, area2)

 

local function onCastSpell1(parameters)

doCombat(parameters.combat1, parameters.var)

end

 

local function onCastSpell2(parameters)

doCombat(parameters.combat2, parameters.var)

end

 

function onCastSpell(cid, var)

if exhaustion.check(cid, 23006) == false then

exhaustion.set(cid, 23006, 10)

return doCombat(cid, combat, var)

else

doPlayerSendCancel(cid, "Cooldown[" ..exhaustion.get(cid, 23006).."]")

end

return TRUE

end

Editado por PsyMcKenzie
Link para o comentário
Compartilhar em outros sites

  • 0

ta dano erro na spell ainda

 

 

 

[07/05/2013 23:30:36] [Error - Spell Interface]

[07/05/2013 23:30:36] data/spells/scripts/attack/housenka.lua:onCastSpell

[07/05/2013 23:30:36] Description:

[07/05/2013 23:30:36] (luaDoCombat) Combat not found

 

to tentano arruma essa magia fais umas 3 hrs nao consigo

 

como posta em spolier?

 

vo manda uma que ta serta olha ae

 

 

 

local function doPullCreature(target, cid)

if target > 0 then

if not isNpc(target) then

local position = getThingPosition(cid)

local fromPosition = getThingPosition(target)

local x = ((fromPosition.x - position.x) < 0 and 1 or ((fromPosition.x - position.x) == 0 and 0 or -1))

local y = ((fromPosition.y - position.y) < 0 and 1 or ((fromPosition.y - position.y) == 0 and 0 or -1))

local toPosition = {x = fromPosition.x + x, y = fromPosition.y + y, z = fromPosition.z}

if doTileQueryAdd(target, toPosition) == 1 and getTileInfo(toPosition).house == false then

doTeleportThing(target, toPosition, true)

end

end

end

end

local spell = {}

spell.config = {

[3] = {

damageType = 1,

areaEffect = 2,

area = {

{0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 3, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0}

}

},

[2] = {

damageType = 1,

areaEffect = 2,

area = {

{0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 3, 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] = {

damageType = 1,

areaEffect = 2,

area = {

{0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 3, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0}

}

}

}

 

spell.combats = {}

for _, config in ipairs(spell.config) do

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_TYPE, config.damageType)

setCombatParam(combat, COMBAT_PARAM_EFFECT, config.areaEffect)

setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -12.0, -20, -1.0, 0)

function onTargetCreature(cid, target)

doPullCreature(target, cid)

end

setCombatCallback(combat, CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature")

setCombatArea(combat, createCombatArea(config.area))

table.insert(spell.combats, combat)

end

function onCastSpell(cid, var)

if exhaustion.get(cid, 23008) == false then

exhaustion.set(cid, 23008, 25)

for n = 1, #spell.combats do

addEvent(doCombat, (n * 150) - 150, cid, spell.combats[n], var)

end

return true

else

doPlayerSendCancel(cid, "Cooldown[" ..exhaustion.get(cid, 23008).."]")

end

 

end

 

ali no combat----coloquei combat1 mais dai so saiu um efeito

 

consegu arruma ja mais vlw a tentativa e noiz

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...