Ir para conteúdo
  • 0

Erro Ao Matar Um Monstro


lordrai

Pergunta

errocompilb377.jpg

 

esse erro se dá sempre muitas vezes quando um monstro é morto...

gostaria de saber como ajeitar...

 

se puder fazer nessas 2 spells, eu pego de exemplo e faço em todas as outras...

agradeceria muito!

 

SPELL1:

 

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 87)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -4.0, 0, -4.1, 0)

local arr1 = {

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

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

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

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

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

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

}

local area1 = createCombatArea(arr1)

setCombatArea(combat1, area1)

local combat10 = createCombatObject()

setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)

setCombatParam(combat10, COMBAT_PARAM_EFFECT, 88)

setCombatFormula(combat10, COMBAT_FORMULA_LEVELMAGIC, -4.0, 0, -4.1, 0)

local arr10 = {

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

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

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

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

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

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

{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 area10 = createCombatArea(arr10)

setCombatArea(combat10, area10)

local combat100 = createCombatObject()

setCombatParam(combat100, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)

setCombatParam(combat100, COMBAT_PARAM_EFFECT, 89)

setCombatFormula(combat100, COMBAT_FORMULA_LEVELMAGIC, -4.0, 0, -4.1, 0)

local arr100 = {

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

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

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

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

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

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

{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 area100 = createCombatArea(arr100)

setCombatArea(combat100, area100)

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 89)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -4.0, 0, -4.1, 0)

local arr2 = {

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

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

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

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

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

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

}

local area2 = createCombatArea(arr2)

setCombatArea(combat2, area2)

local combat20 = createCombatObject()

setCombatParam(combat20, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)

setCombatParam(combat20, COMBAT_PARAM_EFFECT, 88)

setCombatFormula(combat20, COMBAT_FORMULA_LEVELMAGIC, -4.0, 0, -4.1, 0)

local arr20 = {

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

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

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

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

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

}

local area20 = createCombatArea(arr20)

setCombatArea(combat20, area20)

local combat200 = createCombatObject()

setCombatParam(combat200, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)

setCombatParam(combat200, COMBAT_PARAM_EFFECT, 87)

setCombatFormula(combat200, COMBAT_FORMULA_LEVELMAGIC, -4.0, 0, -4.1, 0)

local arr200 = {

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

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

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

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

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

}

local area200 = createCombatArea(arr200)

setCombatArea(combat200, area200)

 

local combat3 = createCombatObject()

setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)

setCombatParam(combat3, COMBAT_PARAM_EFFECT, 92)

setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -4.0, 0, -4.1, 0)

 

local arr3 = {

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

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

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

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

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

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

}

local area3 = createCombatArea(arr3)

setCombatArea(combat3, area3)

local combat30 = createCombatObject()

setCombatParam(combat30, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)

setCombatParam(combat30, COMBAT_PARAM_EFFECT, 91)

setCombatFormula(combat30, COMBAT_FORMULA_LEVELMAGIC, -4.0, 0, -4.1, 0)

local arr30 = {

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

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

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

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

}

local area30 = createCombatArea(arr30)

setCombatArea(combat30, area30)

 

local combat300 = createCombatObject()

setCombatParam(combat300, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)

setCombatParam(combat300, COMBAT_PARAM_EFFECT, 90)

setCombatFormula(combat300, COMBAT_FORMULA_LEVELMAGIC, -4.0, 0, -4.1, 0)

local arr300 = {

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

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

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

}

local area300 = createCombatArea(arr300)

setCombatArea(combat300, area300)

 

local combat4 = createCombatObject()

setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)

setCombatParam(combat4, COMBAT_PARAM_EFFECT, 90)

setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -4.0, 0, -4.1, 0)

local arr4 = {

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

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

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

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

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

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

}

local area4 = createCombatArea(arr4)

setCombatArea(combat4, area4)

 

local combat40 = createCombatObject()

setCombatParam(combat40, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)

setCombatParam(combat40, COMBAT_PARAM_EFFECT, 91)

setCombatFormula(combat40, COMBAT_FORMULA_LEVELMAGIC, -4.0, 0, -4.1, 0)

local arr40 = {

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

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

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

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

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

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

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

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

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

{0, 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 area40 = createCombatArea(arr40)

setCombatArea(combat40, area40)

 

local combat400 = createCombatObject()

setCombatParam(combat400, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)

setCombatParam(combat400, COMBAT_PARAM_EFFECT, 92)

setCombatFormula(combat400, COMBAT_FORMULA_LEVELMAGIC, -4.0, 0, -4.1, 0)

local arr400 = {

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

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

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

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

}

local area400 = createCombatArea(arr400)

setCombatArea(combat400, area400)

 

 

 

function hih10(cid)

if getPatrzJacolos(cid) == 1 and isCreature(cid) then

 

doCombat(cid, combat1, numberToVariant(cid))

doCombat(cid, combat10, numberToVariant(cid))

doCombat(cid, combat100, numberToVariant(cid))

doPlayerSay(cid, 'Haaa!', TALKTYPE_ORANGE_1)

elseif getPatrzJacolos(cid) == 2 and isCreature(cid) then

 

doCombat(cid, combat4, numberToVariant(cid))

doCombat(cid, combat40, numberToVariant(cid))

doCombat(cid, combat400, numberToVariant(cid))

doPlayerSay(cid, 'Haaa!', TALKTYPE_ORANGE_1)

elseif getPatrzJacolos(cid) == 3 and isCreature(cid) then

 

doCombat(cid, combat2, numberToVariant(cid))

doCombat(cid, combat20, numberToVariant(cid))

doCombat(cid, combat200, numberToVariant(cid))

doPlayerSay(cid, 'Haaa!', TALKTYPE_ORANGE_1)

elseif getPatrzJacolos(cid) == 0 and isCreature(cid) then

 

doCombat(cid, combat3, numberToVariant(cid))

doCombat(cid, combat30, numberToVariant(cid))

doCombat(cid, combat300, numberToVariant(cid))

doPlayerSay(cid, 'Haaa!', TALKTYPE_ORANGE_1)

end

end

function mi2h10(cid)

doPlayerSay(cid, 'Ka...', TALKTYPE_ORANGE_1)

addEvent(hih10,0,cid)

end

function hi2h10(cid)

doPlayerSay(cid, 'Me...', TALKTYPE_ORANGE_1)

addEvent(mi2h10,0,cid)

end

function mih10(cid)

doPlayerSay(cid, 'Ha...', TALKTYPE_ORANGE_1)

addEvent(hi2h10,0,cid)

end

function kih10(cid)

doPlayerSay(cid, 'Me...', TALKTYPE_ORANGE_1)

addEvent(mih10,0,cid)

end

function onCastSpell(cid, var)

addEvent(kih10,0,cid)

end

 

 

SPELL2:

 

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 233)

setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 34)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1.0, 0, -1.0, 0)

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 233)

setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 34)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1.0, 0, -1.0, 0)

local combat3 = createCombatObject()

setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat3, COMBAT_PARAM_EFFECT, 233)

setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 34)

setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -1.0, 0, -1.0, 0)

local combat4 = createCombatObject()

setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat4, COMBAT_PARAM_EFFECT, 233)

setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, 34)

setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -1.0, 0, -1.0, 0)

local combat5 = createCombatObject()

setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat5, COMBAT_PARAM_EFFECT, 233)

setCombatParam(combat5, COMBAT_PARAM_DISTANCEEFFECT, 34)

setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -1.0, 0, -1.0, 0)

local combat6 = createCombatObject()

setCombatParam(combat6, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat6, COMBAT_PARAM_EFFECT, 233)

setCombatParam(combat6, COMBAT_PARAM_DISTANCEEFFECT, 34)

setCombatFormula(combat6, COMBAT_FORMULA_LEVELMAGIC, -1.0, 0, -1.0, 0)

local combat7 = createCombatObject()

setCombatParam(combat7, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat7, COMBAT_PARAM_EFFECT, 233)

setCombatParam(combat7, COMBAT_PARAM_DISTANCEEFFECT, 34)

setCombatFormula(combat7, COMBAT_FORMULA_LEVELMAGIC, -1.0, 0, -1.1, 0)

local combat8 = createCombatObject()

setCombatParam(combat8, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat8, COMBAT_PARAM_EFFECT, 233)

setCombatParam(combat8, COMBAT_PARAM_DISTANCEEFFECT, 34)

setCombatFormula(combat8, COMBAT_FORMULA_LEVELMAGIC, -1.1, 0, -1.1, 0)

local combat9 = createCombatObject()

setCombatParam(combat9, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat9, COMBAT_PARAM_EFFECT, 233)

setCombatParam(combat9, COMBAT_PARAM_DISTANCEEFFECT, 34)

setCombatFormula(combat9, COMBAT_FORMULA_LEVELMAGIC, -1.1, 0, -1.1, 0)

 

local combat10 = createCombatObject()

setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat10, COMBAT_PARAM_EFFECT, 233)

setCombatParam(combat10, COMBAT_PARAM_DISTANCEEFFECT, 34)

setCombatFormula(combat10, COMBAT_FORMULA_LEVELMAGIC, -1.1, 0, -1.1, 0)

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

 

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 }

addEvent(onCastSpell1, 0, parameters)

addEvent(onCastSpell2, 300, parameters)

addEvent(onCastSpell3, 600, parameters)

addEvent(onCastSpell4, 900, parameters)

addEvent(onCastSpell5, 1200, parameters)

addEvent(onCastSpell6, 1500, parameters)

addEvent(onCastSpell7, 1800, parameters)

addEvent(onCastSpell8, 2100, parameters)

addEvent(onCastSpell9, 2400, parameters)

addEvent(onCastSpell10, 2700, parameters)

end

 

Link para o comentário
Compartilhar em outros sites

5 respostass a esta questão

Posts Recomendados

  • 0

Não parece ser um Erro no monstro, e sim na magia. Poste essa magia chamada genki.

 

se puder fazer nessas 2 spells, eu pego de exemplo e faço em todas as outras...

agradeceria muito!

 

Não entendi muito bem esse seu pedido, esclareça melhor!

Link para o comentário
Compartilhar em outros sites

  • 0

todas as magias do meu servidor dão esse erro, por isso postei somente essas 2.

se alguem ajeitasse pra mim essas 2,eu as usaria como exemplo para ajeitar todas as outras magias do server.

 

ajuda porfavor :/

 

.

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

  • 0
local err = createCombatArea(AREA_BEAM7)
function onCastSpell(cid, var) -- Spell 'KameHame HAA' by Jedian
local teibou = {[1] = 30, [2] = 37}
for i = 1, 40 do
	doSendDistanceShoot({x = getCreaturePosition(cid).x + math.random(-5, 5), y = getCreaturePosition(cid).y + math.random(-4, 4), z = getCreaturePosition(cid).z}, getCreaturePosition(cid), teibou[math.random(1,2)])
end
addEvent(doAreaCombatHealth, 300, cid, COMBAT_HOLYDAMAGE, getPlayerLookPos(cid), err, -800, -1500, 39)
doSendAnimatedText(getPlayerPosition(cid), 'Kame Hame', 210)
addEvent(doSendAnimatedText, 300, getPlayerPosition(cid), 'HAAA!', 210)
return true
end

Link para o comentário
Compartilhar em outros sites

  • 0

Aah eu reparei que na sua "Spells 1" tem algo parecido como "KaMeHaMe-Haa".

 

function mi2h10(cid)

doPlayerSay(cid, 'Ka...', TALKTYPE_ORANGE_1)

addEvent(hih10,0,cid)

end

function hi2h10(cid)

doPlayerSay(cid, 'Me...', TALKTYPE_ORANGE_1)

addEvent(mi2h10,0,cid)

end

function mih10(cid)

doPlayerSay(cid, 'Ha...', TALKTYPE_ORANGE_1)

addEvent(hi2h10,0,cid)

end

function kih10(cid)

doPlayerSay(cid, 'Me...', TALKTYPE_ORANGE_1)

addEvent(mih10,0,cid)

end

 

Então eu postei uma outra magia igual á sua, só com poucas linhas. E detalhe: Essa funciona!

Abraços !!

Link para o comentário
Compartilhar em outros sites

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