Ir para conteúdo
  • 0

erro na spell


rohfagundes

Pergunta

gente eu to tendo um erro aqui q n sei como arrumar

 

o erro q aparece é esse

 

[13/03/2013 18:04:40] [Warning - Event::loadScript] Cannot load script (data/spells/scripts/teste.lua)

[13/03/2013 18:04:40] data/spells/scripts/teste.lua:493: function at line 457 has more than 60 upvalues

 

a parte do erro é essa \/

 

function onCastSpell(cid, var)

local startPos = getCreaturePosition(cid)

local spell_storage = 1243545

if getPlayerStorageValue(cid, spell_storage) < 100 then

RunPart(combat1_lv1,cid,var,dfcombat1_lv1,startPos)

addEvent(RunPart,200,combat2_lv1,cid,var,dfcombat2_lv1,startPos)

addEvent(RunPart,400,combat3_lv1,cid,var,dfcombat3_lv1,startPos)

addEvent(RunPart,600,combat4_lv1,cid,var,dfcombat4_lv1,startPos)

addEvent(RunPart,800,combat5_lv1,cid,var,dfcombat5_lv1,startPos)

addEvent(RunPart,1000,combat6_lv1,cid,var,dfcombat6_lv1,startPos)

addEvent(RunPart,1200,combat7_lv1,cid,var,dfcombat7_lv1,startPos)

addEvent(RunPart,1400,combat8_lv1,cid,var,dfcombat8_lv1,startPos)

addEvent(RunPart,1600,combat9_lv1,cid,var,dfcombat9_lv1,startPos)

addEvent(RunPart,1800,combat10_lv1,cid,var,dfcombat10_lv1,startPos)

addEvent(RunPart,2000,combat11_lv1,cid,var,dfcombat11_lv1,startPos)

addEvent(RunPart,2200,combat12_lv1,cid,var,dfcombat12_lv1,startPos)

addEvent(RunPart,2700,combat13_lv1,cid,var,dfcombat13_lv1,startPos)

addEvent(RunPart,3000,combat14_lv1,cid,var,dfcombat14_lv1,startPos)

addEvent(RunPart,3300,combat15_lv1,cid,var,dfcombat15_lv1,startPos)

addEvent(RunPart,3600,combat16_lv1,cid,var,dfcombat16_lv1,startPos)

setPlayerStorageValue(cid, spell_storage, getPlayerStorageValue(cid, spell_storage)+1)

elseif getPlayerStorageValue(cid, spell_storage) == 100 then

RunPart(combat0_lv2,cid,var,dfcombat0_lv2,startPos)

addEvent(RunPart,200,combat2_lv2,cid,var,dfcombat2_lv2,startPos)

addEvent(RunPart,400,combat4_lv2,cid,var,dfcombat4_lv2,startPos)

addEvent(RunPart,600,combat6_lv2,cid,var,dfcombat6_lv2,startPos)

addEvent(RunPart,800,combat8_lv2,cid,var,dfcombat8_lv2,startPos)

addEvent(RunPart,1000,combat10_lv2,cid,var,dfcombat10_lv2,startPos)

addEvent(RunPart,1200,combat12_lv2,cid,var,dfcombat12_lv2,startPos)

addEvent(RunPart,1400,combat14_lv2,cid,var,dfcombat14_lv2,startPos)

addEvent(RunPart,1600,combat16_lv2,cid,var,dfcombat16_lv2,startPos)

addEvent(RunPart,1800,combat18_lv2,cid,var,dfcombat18_lv2,startPos)

addEvent(RunPart,2000,combat20_lv2,cid,var,dfcombat20_lv2,startPos)

addEvent(RunPart,2200,combat22_lv2,cid,var,dfcombat22_lv2,startPos)

addEvent(RunPart,2700,combat27_lv2,cid,var,dfcombat27_lv2,startPos)

addEvent(RunPart,3000,combat30_lv2,cid,var,dfcombat30_lv2,startPos)

addEvent(RunPart,3300,combat33_lv2,cid,var,dfcombat33_lv2,startPos)

addEvent(RunPart,3600,combat36_lv2,cid,var,dfcombat36_lv2,startPos)

setPlayerStorageValue(cid, spell_storage, getPlayerStorageValue(cid, spell_storage)+1)

doPlayerSendTextMessage(cid, 22, "Your teste advanced to level 2")

elseif getPlayerStorageValue(cid, spell_storage) > 100 then

RunPart(combat0_lv2,cid,var,dfcombat0_lv2,startPos)

addEvent(RunPart,200,combat2_lv2,cid,var,dfcombat2_lv2,startPos)

addEvent(RunPart,400,combat4_lv2,cid,var,dfcombat4_lv2,startPos)

addEvent(RunPart,600,combat6_lv2,cid,var,dfcombat6_lv2,startPos)

addEvent(RunPart,800,combat8_lv2,cid,var,dfcombat8_lv2,startPos)

addEvent(RunPart,1000,combat10_lv2,cid,var,dfcombat10_lv2,startPos)

addEvent(RunPart,1200,combat12_lv2,cid,var,dfcombat12_lv2,startPos)

addEvent(RunPart,1400,combat14_lv2,cid,var,dfcombat14_lv2,startPos)

addEvent(RunPart,1600,combat16_lv2,cid,var,dfcombat16_lv2,startPos)

addEvent(RunPart,1800,combat18_lv2,cid,var,dfcombat18_lv2,startPos)

addEvent(RunPart,2000,combat20_lv2,cid,var,dfcombat20_lv2,startPos)

addEvent(RunPart,2200,combat22_lv2,cid,var,dfcombat22_lv2,startPos)

addEvent(RunPart,2700,combat27_lv2,cid,var,dfcombat27_lv2,startPos)

addEvent(RunPart,3000,combat30_lv2,cid,var,dfcombat30_lv2,startPos)

addEvent(RunPart,3300,combat33_lv2,cid,var,dfcombat33_lv2,startPos)

addEvent(RunPart,3600,combat36_lv2,cid,var,dfcombat36_lv2,startPos)

setPlayerStorageValue(cid, spell_storage, getPlayerStorageValue(cid, spell_storage)+1)

end

return TRUE

end

 

 

 

 

alguem ai pode me ajudar

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

7 respostass a esta questão

Posts Recomendados

  • 0

eu posto mas sao 515 linhas kkkk

 

 

 

-- Areas/Combat for 0ms

local combat1_lv1 = createCombatObject()

setCombatParam(combat1_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat1_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat1_lv1,createCombatArea({

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

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

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

 

local dfcombat1_lv1 = {CONST_ANI_FIRE,3,3,-3,3,-3,-3,3,-3}

 

-- Areas/Combat for 200ms

local combat2_lv1 = createCombatObject()

setCombatParam(combat2_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat2_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat2_lv1,createCombatArea({

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

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

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

 

local dfcombat2_lv1 = {CONST_ANI_FIRE,2,3,-3,2,-2,-3,3,-2}

 

-- Areas/Combat for 400ms

local combat3_lv1 = createCombatObject()

setCombatParam(combat3_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat3_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat3_lv1,createCombatArea({

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

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

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

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

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

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

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

 

local dfcombat3_lv1 = {CONST_ANI_FIRE,1,3,-3,1,-1,-3,3,-1}

 

-- Areas/Combat for 600ms

local combat4_lv1 = createCombatObject()

setCombatParam(combat4_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat4_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat4_lv1,createCombatArea({

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

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

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

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

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

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

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

 

local dfcombat4_lv1 = {CONST_ANI_FIRE,0,3,-3,0,0,-3,3,0}

 

-- Areas/Combat for 800ms

local combat5_lv1 = createCombatObject()

setCombatParam(combat5_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat5_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat5_lv1,createCombatArea({

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

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

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

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

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

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

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

 

local dfcombat5_lv1 = {CONST_ANI_FIRE,-1,3,-3,-1,1,-3,3,1}

 

-- Areas/Combat for 1000ms

local combat6_lv1 = createCombatObject()

setCombatParam(combat6_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat6_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat6_lv1,createCombatArea({

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

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

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

 

local dfcombat6_lv1 = {CONST_ANI_FIRE,-2,3,-3,-2,2,-3,3,2}

 

-- Areas/Combat for 1200ms

local combat7_lv1 = createCombatObject()

setCombatParam(combat7_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat7_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat7_lv1,createCombatArea({

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

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

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

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

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

 

local dfcombat7_lv1 = {CONST_ANI_FIRE,2,2,-2,2,-2,-2,2,-2}

 

-- Areas/Combat for 1400ms

local combat8_lv1 = createCombatObject()

setCombatParam(combat8_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat8_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat8_lv1,createCombatArea({

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

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

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

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

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

 

local dfcombat8_lv1 = {CONST_ANI_FIRE,1,2,-2,1,-1,-2,2,-1}

 

-- Areas/Combat for 1600ms

local combat9_lv1 = createCombatObject()

setCombatParam(combat9_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat9_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat9_lv1,createCombatArea({

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

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

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

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

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

 

local dfcombat9_lv1 = {CONST_ANI_FIRE,0,2,-2,0,0,-2,2,0}

 

-- Areas/Combat for 1800ms

local combat10_lv1 = createCombatObject()

setCombatParam(combat10_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat10_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat10_lv1,createCombatArea({

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

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

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

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

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

 

local dfcombat10_lv1 = {CONST_ANI_FIRE,-1,2,-2,-1,1,-2,2,1}

 

-- Areas/Combat for 2000ms

local combat11_lv1 = createCombatObject()

setCombatParam(combat11_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat11_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat11_lv1,createCombatArea({

{1, 0, 1},

{0, 2, 0},

{1, 0, 1}}))

 

local dfcombat1_lv1 = {CONST_ANI_FIRE,1,1,-1,1,-1,-1,1,-1}

 

-- Areas/Combat for 2200ms

local combat12_lv1 = createCombatObject()

setCombatParam(combat12_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat12_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat12_lv1,createCombatArea({

{0, 1, 0},

{1, 2, 1},

{0, 1, 0}}))

 

local dfcombat12_lv1 = {CONST_ANI_FIRE,0,1,-1,0,0,-1,1,0}

 

-- Areas/Combat for 2700ms

local combat13_lv1 = createCombatObject()

setCombatParam(combat13_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat13_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat13_lv1,createCombatArea({

{1, 1, 1},

{1, 2, 1},

{1, 1, 1}}))

 

local dfcombat13_lv1 = {CONST_ANI_FIRE,1,-1,1,0,1,1,0,1,-1,1,-1,0,-1,-1,0,-1}

 

-- Areas/Combat for 3000ms

local combat14_lv1 = createCombatObject()

setCombatParam(combat14_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat14_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat14_lv1,createCombatArea({

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

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

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

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

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

 

local dfcombat14_lv1 = {CONST_ANI_FIRE,1,2,0,2,-1,2,-2,1,-2,0,-2,-1,-1,-2,0,-2,1,-2,2,-1,2,0,2,1}

 

-- Areas/Combat for 3300ms

local combat15_lv1 = createCombatObject()

setCombatParam(combat15_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat15_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat15_lv1,createCombatArea({

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

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

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

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

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

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

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

 

local dfcombat15_lv1 = {CONST_ANI_FIRE,1,3,0,3,-1,3,-2,2,-3,1,-3,0,-3,-1,-2,-2,-1,-3,0,-3,1,-3,2,-2,3,-1,3,0,3,1,2,2}

 

-- Areas/Combat for 3600ms

local combat16_lv1 = createCombatObject()

setCombatParam(combat16_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat16_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat16_lv1,createCombatArea({

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

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

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

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

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

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

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

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

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

 

local dfcombat16_lv1 = {CONST_ANI_FIRE,1,4,0,4,-1,4,-2,3,-3,2,-4,1,-4,0,-4,-1,-3,-2,-2,-3,-1,-4,0,-4,1,-4,2,-3,3,-2,4,-1,4,0,4,1,3,2,2,3}

 

-- Lv2

local combat0_lv2 = createCombatObject()

setCombatParam(combat0_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat0_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat0_lv2,createCombatArea({

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

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

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

 

local dfcombat0_lv2 = {47,3,3,-3,3,-3,-3,3,-3}

 

-- Areas/Combat for 200ms

local combat2_lv2 = createCombatObject()

setCombatParam(combat2_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat2_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat2_lv2,createCombatArea({

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

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

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

 

local dfcombat2_lv2 = {47,2,3,-3,2,-2,-3,3,-2}

 

-- Areas/Combat for 400ms

local combat4_lv2 = createCombatObject()

setCombatParam(combat4_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat4_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat4_lv2,createCombatArea({

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

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

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

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

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

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

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

 

local dfcombat4_lv2 = {47,1,3,-3,1,-1,-3,3,-1}

 

-- Areas/Combat for 600ms

local combat6_lv2 = createCombatObject()

setCombatParam(combat6_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat6_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat6_lv2,createCombatArea({

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

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

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

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

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

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

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

 

local dfcombat6_lv2 = {47,0,3,-3,0,0,-3,3,0}

 

-- Areas/Combat for 800ms

local combat8_lv2 = createCombatObject()

setCombatParam(combat8_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat8_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat8_lv2,createCombatArea({

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

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

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

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

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

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

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

 

local dfcombat8_lv2 = {47,-1,3,-3,-1,1,-3,3,1}

 

-- Areas/Combat for 1000ms

local combat10_lv2 = createCombatObject()

setCombatParam(combat10_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat10_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat10_lv2,createCombatArea({

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

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

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

 

local dfcombat10_lv2 = {47,-2,3,-3,-2,2,-3,3,2}

 

-- Areas/Combat for 1200ms

local combat12_lv2 = createCombatObject()

setCombatParam(combat12_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat12_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat12_lv2,createCombatArea({

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

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

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

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

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

 

local dfcombat12_lv2 = {47,2,2,-2,2,-2,-2,2,-2}

 

-- Areas/Combat for 1400ms

local combat14_lv2 = createCombatObject()

setCombatParam(combat14_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat14_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat14_lv2,createCombatArea({

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

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

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

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

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

 

local dfcombat14_lv2 = {47,1,2,-2,1,-1,-2,2,-1}

 

-- Areas/Combat for 1600ms

local combat16_lv2 = createCombatObject()

setCombatParam(combat16_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat16_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat16_lv2,createCombatArea({

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

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

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

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

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

 

local dfcombat16_lv2 = {47,0,2,-2,0,0,-2,2,0}

 

-- Areas/Combat for 1800ms

local combat18_lv2 = createCombatObject()

setCombatParam(combat18_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat18_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat18_lv2,createCombatArea({

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

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

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

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

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

 

local dfcombat18_lv2 = {47,-1,2,-2,-1,1,-2,2,1}

 

-- Areas/Combat for 2000ms

local combat20_lv2 = createCombatObject()

setCombatParam(combat20_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat20_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat20_lv2,createCombatArea({

{1, 0, 1},

{0, 2, 0},

{1, 0, 1}}))

 

local dfcombat20_lv2 = {47,1,1,-1,1,-1,-1,1,-1}

 

-- Areas/Combat for 2200ms

local combat22_lv2 = createCombatObject()

setCombatParam(combat22_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat22_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat22_lv2,createCombatArea({

{0, 1, 0},

{1, 2, 1},

{0, 1, 0}}))

 

local dfcombat22_lv2 = {47,0,1,-1,0,0,-1,1,0}

 

-- Areas/Combat for 2700ms

local combat27_lv2 = createCombatObject()

setCombatParam(combat27_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat27_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat27_lv2,createCombatArea({

{1, 1, 1},

{1, 2, 1},

{1, 1, 1}}))

 

local dfcombat27_lv2 = {47,1,-1,1,0,1,1,0,1,-1,1,-1,0,-1,-1,0,-1}

 

-- Areas/Combat for 3000ms

local combat30_lv2 = createCombatObject()

setCombatParam(combat30_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat30_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat30_lv2,createCombatArea({

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

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

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

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

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

 

local dfcombat30_lv2 = {47,1,2,0,2,-1,2,-2,1,-2,0,-2,-1,-1,-2,0,-2,1,-2,2,-1,2,0,2,1}

 

-- Areas/Combat for 3300ms

local combat33_lv2 = createCombatObject()

setCombatParam(combat33_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat33_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat33_lv2,createCombatArea({

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

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

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

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

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

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

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

 

local dfcombat33_lv2 = {47,1,3,0,3,-1,3,-2,2,-3,1,-3,0,-3,-1,-2,-2,-1,-3,0,-3,1,-3,2,-2,3,-1,3,0,3,1,2,2}

 

-- Areas/Combat for 3600ms

local combat36_lv2 = createCombatObject()

setCombatParam(combat36_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat36_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat36_lv2,createCombatArea({

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

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

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

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

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

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

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

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

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

 

local dfcombat36_lv2 = {47,1,4,0,4,-1,4,-2,3,-3,2,-4,1,-4,0,-4,-1,-3,-2,-2,-3,-1,-4,0,-4,1,-4,2,-3,3,-2,4,-1,4,0,4,1,3,2,2,3}

 

-- =============== CORE FUNCTIONS ===============

local function RunPart(c,cid,var,dirList,dirEmitPos) -- Part

if (isCreature(cid)) then

doCombat(cid, c, var)

if (dirList ~= nil) then -- Emit distance effects

local i = 2;

while (i < #dirList) do

doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList,y=dirEmitPos.y-dirList[i+1],z=dirEmitPos.z},dirList[1])

i = i + 2

end

end

end

end

 

function onCastSpell(cid, var)

local startPos = getCreaturePosition(cid)

local spell_storage = 1243545

if getPlayerStorageValue(cid, spell_storage) < 100 then

RunPart(combat1_lv1,cid,var,dfcombat1_lv1,startPos)

addEvent(RunPart,200,combat2_lv1,cid,var,dfcombat2_lv1,startPos)

addEvent(RunPart,400,combat3_lv1,cid,var,dfcombat3_lv1,startPos)

addEvent(RunPart,600,combat4_lv1,cid,var,dfcombat4_lv1,startPos)

addEvent(RunPart,800,combat5_lv1,cid,var,dfcombat5_lv1,startPos)

addEvent(RunPart,1000,combat6_lv1,cid,var,dfcombat6_lv1,startPos)

addEvent(RunPart,1200,combat7_lv1,cid,var,dfcombat7_lv1,startPos)

addEvent(RunPart,1400,combat8_lv1,cid,var,dfcombat8_lv1,startPos)

addEvent(RunPart,1600,combat9_lv1,cid,var,dfcombat9_lv1,startPos)

addEvent(RunPart,1800,combat10_lv1,cid,var,dfcombat10_lv1,startPos)

addEvent(RunPart,2000,combat11_lv1,cid,var,dfcombat11_lv1,startPos)

addEvent(RunPart,2200,combat12_lv1,cid,var,dfcombat12_lv1,startPos)

addEvent(RunPart,2700,combat13_lv1,cid,var,dfcombat13_lv1,startPos)

addEvent(RunPart,3000,combat14_lv1,cid,var,dfcombat14_lv1,startPos)

addEvent(RunPart,3300,combat15_lv1,cid,var,dfcombat15_lv1,startPos)

addEvent(RunPart,3600,combat16_lv1,cid,var,dfcombat16_lv1,startPos)

setPlayerStorageValue(cid, spell_storage, getPlayerStorageValue(cid, spell_storage)+1)

elseif getPlayerStorageValue(cid, spell_storage) == 100 then

RunPart(combat0_lv2,cid,var,dfcombat0_lv2,startPos)

addEvent(RunPart,200,combat2_lv2,cid,var,dfcombat2_lv2,startPos)

addEvent(RunPart,400,combat4_lv2,cid,var,dfcombat4_lv2,startPos)

addEvent(RunPart,600,combat6_lv2,cid,var,dfcombat6_lv2,startPos)

addEvent(RunPart,800,combat8_lv2,cid,var,dfcombat8_lv2,startPos)

addEvent(RunPart,1000,combat10_lv2,cid,var,dfcombat10_lv2,startPos)

addEvent(RunPart,1200,combat12_lv2,cid,var,dfcombat12_lv2,startPos)

addEvent(RunPart,1400,combat14_lv2,cid,var,dfcombat14_lv2,startPos)

addEvent(RunPart,1600,combat16_lv2,cid,var,dfcombat16_lv2,startPos)

addEvent(RunPart,1800,combat18_lv2,cid,var,dfcombat18_lv2,startPos)

addEvent(RunPart,2000,combat20_lv2,cid,var,dfcombat20_lv2,startPos)

addEvent(RunPart,2200,combat22_lv2,cid,var,dfcombat22_lv2,startPos)

addEvent(RunPart,2700,combat27_lv2,cid,var,dfcombat27_lv2,startPos)

addEvent(RunPart,3000,combat30_lv2,cid,var,dfcombat30_lv2,startPos)

addEvent(RunPart,3300,combat33_lv2,cid,var,dfcombat33_lv2,startPos)

addEvent(RunPart,3600,combat36_lv2,cid,var,dfcombat36_lv2,startPos)

setPlayerStorageValue(cid, spell_storage, getPlayerStorageValue(cid, spell_storage)+1)

doPlayerSendTextMessage(cid, 22, "Your Fire teste advanced to level 2")

elseif getPlayerStorageValue(cid, spell_storage) > 100 then

RunPart(combat0_lv2,cid,var,dfcombat0_lv2,startPos)

addEvent(RunPart,200,combat2_lv2,cid,var,dfcombat2_lv2,startPos)

addEvent(RunPart,400,combat4_lv2,cid,var,dfcombat4_lv2,startPos)

addEvent(RunPart,600,combat6_lv2,cid,var,dfcombat6_lv2,startPos)

addEvent(RunPart,800,combat8_lv2,cid,var,dfcombat8_lv2,startPos)

addEvent(RunPart,1000,combat10_lv2,cid,var,dfcombat10_lv2,startPos)

addEvent(RunPart,1200,combat12_lv2,cid,var,dfcombat12_lv2,startPos)

addEvent(RunPart,1400,combat14_lv2,cid,var,dfcombat14_lv2,startPos)

addEvent(RunPart,1600,combat16_lv2,cid,var,dfcombat16_lv2,startPos)

addEvent(RunPart,1800,combat18_lv2,cid,var,dfcombat18_lv2,startPos)

addEvent(RunPart,2000,combat20_lv2,cid,var,dfcombat20_lv2,startPos)

addEvent(RunPart,2200,combat22_lv2,cid,var,dfcombat22_lv2,startPos)

addEvent(RunPart,2700,combat27_lv2,cid,var,dfcombat27_lv2,startPos)

addEvent(RunPart,3000,combat30_lv2,cid,var,dfcombat30_lv2,startPos)

addEvent(RunPart,3300,combat33_lv2,cid,var,dfcombat33_lv2,startPos)

addEvent(RunPart,3600,combat36_lv2,cid,var,dfcombat36_lv2,startPos)

setPlayerStorageValue(cid, spell_storage, getPlayerStorageValue(cid, spell_storage)+1)

end

return TRUE

end

 

Link para o comentário
Compartilhar em outros sites

  • 0

Use assim .

 

 

-- Areas/Combat for 0ms

local combat1_lv1 = createCombatObject()

setCombatParam(combat1_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat1_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat1_lv1,createCombatArea({

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

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

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

local dfcombat1_lv1 = {CONST_ANI_FIRE,3,3,-3,3,-3,-3,3,-3}

-- Areas/Combat for 200ms

local combat2_lv1 = createCombatObject()

setCombatParam(combat2_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat2_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat2_lv1,createCombatArea({

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

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

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

local dfcombat2_lv1 = {CONST_ANI_FIRE,2,3,-3,2,-2,-3,3,-2}

-- Areas/Combat for 400ms

local combat3_lv1 = createCombatObject()

setCombatParam(combat3_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat3_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat3_lv1,createCombatArea({

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

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

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

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

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

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

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

local dfcombat3_lv1 = {CONST_ANI_FIRE,1,3,-3,1,-1,-3,3,-1}

-- Areas/Combat for 600ms

local combat4_lv1 = createCombatObject()

setCombatParam(combat4_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat4_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat4_lv1,createCombatArea({

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

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

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

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

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

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

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

local dfcombat4_lv1 = {CONST_ANI_FIRE,0,3,-3,0,0,-3,3,0}

-- Areas/Combat for 800ms

local combat5_lv1 = createCombatObject()

setCombatParam(combat5_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat5_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat5_lv1,createCombatArea({

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

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

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

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

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

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

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

local dfcombat5_lv1 = {CONST_ANI_FIRE,-1,3,-3,-1,1,-3,3,1}

-- Areas/Combat for 1000ms

local combat6_lv1 = createCombatObject()

setCombatParam(combat6_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat6_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat6_lv1,createCombatArea({

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

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

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

local dfcombat6_lv1 = {CONST_ANI_FIRE,-2,3,-3,-2,2,-3,3,2}

-- Areas/Combat for 1200ms

local combat7_lv1 = createCombatObject()

setCombatParam(combat7_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat7_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat7_lv1,createCombatArea({

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

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

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

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

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

local dfcombat7_lv1 = {CONST_ANI_FIRE,2,2,-2,2,-2,-2,2,-2}

-- Areas/Combat for 1400ms

local combat8_lv1 = createCombatObject()

setCombatParam(combat8_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat8_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat8_lv1,createCombatArea({

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

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

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

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

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

local dfcombat8_lv1 = {CONST_ANI_FIRE,1,2,-2,1,-1,-2,2,-1}

-- Areas/Combat for 1600ms

local combat9_lv1 = createCombatObject()

setCombatParam(combat9_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat9_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat9_lv1,createCombatArea({

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

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

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

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

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

local dfcombat9_lv1 = {CONST_ANI_FIRE,0,2,-2,0,0,-2,2,0}

-- Areas/Combat for 1800ms

local combat10_lv1 = createCombatObject()

setCombatParam(combat10_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat10_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat10_lv1,createCombatArea({

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

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

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

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

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

local dfcombat10_lv1 = {CONST_ANI_FIRE,-1,2,-2,-1,1,-2,2,1}

-- Areas/Combat for 2000ms

local combat11_lv1 = createCombatObject()

setCombatParam(combat11_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat11_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat11_lv1,createCombatArea({

{1, 0, 1},

{0, 2, 0},

{1, 0, 1}}))

local dfcombat1_lv1 = {CONST_ANI_FIRE,1,1,-1,1,-1,-1,1,-1}

-- Areas/Combat for 2200ms

local combat12_lv1 = createCombatObject()

setCombatParam(combat12_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat12_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat12_lv1,createCombatArea({

{0, 1, 0},

{1, 2, 1},

{0, 1, 0}}))

local dfcombat12_lv1 = {CONST_ANI_FIRE,0,1,-1,0,0,-1,1,0}

-- Areas/Combat for 2700ms

local combat13_lv1 = createCombatObject()

setCombatParam(combat13_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat13_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat13_lv1,createCombatArea({

{1, 1, 1},

{1, 2, 1},

{1, 1, 1}}))

local dfcombat13_lv1 = {CONST_ANI_FIRE,1,-1,1,0,1,1,0,1,-1,1,-1,0,-1,-1,0,-1}

-- Areas/Combat for 3000ms

local combat14_lv1 = createCombatObject()

setCombatParam(combat14_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat14_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat14_lv1,createCombatArea({

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

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

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

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

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

local dfcombat14_lv1 = {CONST_ANI_FIRE,1,2,0,2,-1,2,-2,1,-2,0,-2,-1,-1,-2,0,-2,1,-2,2,-1,2,0,2,1}

-- Areas/Combat for 3300ms

local combat15_lv1 = createCombatObject()

setCombatParam(combat15_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat15_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat15_lv1,createCombatArea({

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

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

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

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

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

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

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

local dfcombat15_lv1 = {CONST_ANI_FIRE,1,3,0,3,-1,3,-2,2,-3,1,-3,0,-3,-1,-2,-2,-1,-3,0,-3,1,-3,2,-2,3,-1,3,0,3,1,2,2}

-- Areas/Combat for 3600ms

local combat16_lv1 = createCombatObject()

setCombatParam(combat16_lv1, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)

setCombatParam(combat16_lv1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat16_lv1,createCombatArea({

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

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

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

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

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

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

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

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

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

local dfcombat16_lv1 = {CONST_ANI_FIRE,1,4,0,4,-1,4,-2,3,-3,2,-4,1,-4,0,-4,-1,-3,-2,-2,-3,-1,-4,0,-4,1,-4,2,-3,3,-2,4,-1,4,0,4,1,3,2,2,3}

-- Lv2

local combat0_lv2 = createCombatObject()

setCombatParam(combat0_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat0_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat0_lv2,createCombatArea({

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

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

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

local dfcombat0_lv2 = {47,3,3,-3,3,-3,-3,3,-3}

-- Areas/Combat for 200ms

local combat2_lv2 = createCombatObject()

setCombatParam(combat2_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat2_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat2_lv2,createCombatArea({

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

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

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

local dfcombat2_lv2 = {47,2,3,-3,2,-2,-3,3,-2}

-- Areas/Combat for 400ms

local combat4_lv2 = createCombatObject()

setCombatParam(combat4_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat4_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat4_lv2,createCombatArea({

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

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

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

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

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

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

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

local dfcombat4_lv2 = {47,1,3,-3,1,-1,-3,3,-1}

-- Areas/Combat for 600ms

local combat6_lv2 = createCombatObject()

setCombatParam(combat6_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat6_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat6_lv2,createCombatArea({

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

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

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

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

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

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

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

local dfcombat6_lv2 = {47,0,3,-3,0,0,-3,3,0}

-- Areas/Combat for 800ms

local combat8_lv2 = createCombatObject()

setCombatParam(combat8_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat8_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat8_lv2,createCombatArea({

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

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

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

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

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

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

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

local dfcombat8_lv2 = {47,-1,3,-3,-1,1,-3,3,1}

-- Areas/Combat for 1000ms

local combat10_lv2 = createCombatObject()

setCombatParam(combat10_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat10_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat10_lv2,createCombatArea({

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

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

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

local dfcombat10_lv2 = {47,-2,3,-3,-2,2,-3,3,2}

-- Areas/Combat for 1200ms

local combat12_lv2 = createCombatObject()

setCombatParam(combat12_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat12_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat12_lv2,createCombatArea({

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

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

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

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

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

local dfcombat12_lv2 = {47,2,2,-2,2,-2,-2,2,-2}

-- Areas/Combat for 1400ms

local combat14_lv2 = createCombatObject()

setCombatParam(combat14_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat14_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat14_lv2,createCombatArea({

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

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

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

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

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

local dfcombat14_lv2 = {47,1,2,-2,1,-1,-2,2,-1}

-- Areas/Combat for 1600ms

local combat16_lv2 = createCombatObject()

setCombatParam(combat16_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat16_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat16_lv2,createCombatArea({

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

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

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

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

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

local dfcombat16_lv2 = {47,0,2,-2,0,0,-2,2,0}

-- Areas/Combat for 1800ms

local combat18_lv2 = createCombatObject()

setCombatParam(combat18_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat18_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat18_lv2,createCombatArea({

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

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

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

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

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

local dfcombat18_lv2 = {47,-1,2,-2,-1,1,-2,2,1}

-- Areas/Combat for 2000ms

local combat20_lv2 = createCombatObject()

setCombatParam(combat20_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat20_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat20_lv2,createCombatArea({

{1, 0, 1},

{0, 2, 0},

{1, 0, 1}}))

local dfcombat20_lv2 = {47,1,1,-1,1,-1,-1,1,-1}

-- Areas/Combat for 2200ms

local combat22_lv2 = createCombatObject()

setCombatParam(combat22_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat22_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat22_lv2,createCombatArea({

{0, 1, 0},

{1, 2, 1},

{0, 1, 0}}))

local dfcombat22_lv2 = {47,0,1,-1,0,0,-1,1,0}

-- Areas/Combat for 2700ms

local combat27_lv2 = createCombatObject()

setCombatParam(combat27_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat27_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat27_lv2,createCombatArea({

{1, 1, 1},

{1, 2, 1},

{1, 1, 1}}))

local dfcombat27_lv2 = {47,1,-1,1,0,1,1,0,1,-1,1,-1,0,-1,-1,0,-1}

-- Areas/Combat for 3000ms

local combat30_lv2 = createCombatObject()

setCombatParam(combat30_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat30_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat30_lv2,createCombatArea({

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

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

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

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

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

local dfcombat30_lv2 = {47,1,2,0,2,-1,2,-2,1,-2,0,-2,-1,-1,-2,0,-2,1,-2,2,-1,2,0,2,1}

-- Areas/Combat for 3300ms

local combat33_lv2 = createCombatObject()

setCombatParam(combat33_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat33_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat33_lv2,createCombatArea({

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

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

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

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

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

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

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

local dfcombat33_lv2 = {47,1,3,0,3,-1,3,-2,2,-3,1,-3,0,-3,-1,-2,-2,-1,-3,0,-3,1,-3,2,-2,3,-1,3,0,3,1,2,2}

-- Areas/Combat for 3600ms

local combat36_lv2 = createCombatObject()

setCombatParam(combat36_lv2, COMBAT_PARAM_EFFECT, 69)

setCombatParam(combat36_lv2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatArea(combat36_lv2,createCombatArea({

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

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

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

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

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

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

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

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

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

local dfcombat36_lv2 = {47,1,4,0,4,-1,4,-2,3,-3,2,-4,1,-4,0,-4,-1,-3,-2,-2,-3,-1,-4,0,-4,1,-4,2,-3,3,-2,4,-1,4,0,4,1,3,2,2,3}

-- =============== CORE FUNCTIONS ===============

local function RunPart(c,cid,var,dirList,dirEmitPos) -- Part

if (isCreature(cid)) then

doCombat(cid, c, var)

if (dirList ~= nil) then -- Emit distance effects

local i = 2;

while (i < #dirList) do

doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList,y=dirEmitPos.y-dirList[i+1],z=dirEmitPos.z},dirList[1])

i = i + 2

end

end

end

end

function onCastSpell(cid, var, startPos)

local startPos = getCreaturePosition(cid)

local spell_storage = 1243545

if getPlayerStorageValue(cid, spell_storage) < 100 then

RunPart(combat1_lv1,cid,var,dfcombat1_lv1,startPos)

addEvent(RunPart,200,combat2_lv1,cid,var,dfcombat2_lv1,startPos)

addEvent(RunPart,400,combat3_lv1,cid,var,dfcombat3_lv1,startPos)

addEvent(RunPart,600,combat4_lv1,cid,var,dfcombat4_lv1,startPos)

addEvent(RunPart,800,combat5_lv1,cid,var,dfcombat5_lv1,startPos)

addEvent(RunPart,1000,combat6_lv1,cid,var,dfcombat6_lv1,startPos)

addEvent(RunPart,1200,combat7_lv1,cid,var,dfcombat7_lv1,startPos)

addEvent(RunPart,1400,combat8_lv1,cid,var,dfcombat8_lv1,startPos)

addEvent(RunPart,1600,combat9_lv1,cid,var,dfcombat9_lv1,startPos)

addEvent(RunPart,1800,combat10_lv1,cid,var,dfcombat10_lv1,startPos)

addEvent(RunPart,2000,combat11_lv1,cid,var,dfcombat11_lv1,startPos)

addEvent(RunPart,2200,combat12_lv1,cid,var,dfcombat12_lv1,startPos)

addEvent(RunPart,2700,combat13_lv1,cid,var,dfcombat13_lv1,startPos)

addEvent(RunPart,3000,combat14_lv1,cid,var,dfcombat14_lv1,startPos)

addEvent(RunPart,3300,combat15_lv1,cid,var,dfcombat15_lv1,startPos)

addEvent(RunPart,3600,combat16_lv1,cid,var,dfcombat16_lv1,startPos)

setPlayerStorageValue(cid, spell_storage, getPlayerStorageValue(cid, spell_storage)+1)

elseif getPlayerStorageValue(cid, spell_storage) == 100 then

addEvent(RunPart,200,combat2_lv2,cid,var,dfcombat2_lv2,startPos)

addEvent(RunPart,400,combat4_lv2,cid,var,dfcombat4_lv2,startPos)

addEvent(RunPart,600,combat6_lv2,cid,var,dfcombat6_lv2,startPos)

addEvent(RunPart,800,combat8_lv2,cid,var,dfcombat8_lv2,startPos)

addEvent(RunPart,1000,combat10_lv2,cid,var,dfcombat10_lv2,startPos)

addEvent(RunPart,1200,combat12_lv2,cid,var,dfcombat12_lv2,startPos)

addEvent(RunPart,1400,combat14_lv2,cid,var,dfcombat14_lv2,startPos)

addEvent(RunPart,1600,combat16_lv2,cid,var,dfcombat16_lv2,startPos)

addEvent(RunPart,1800,combat18_lv2,cid,var,dfcombat18_lv2,startPos)

addEvent(RunPart,2000,combat20_lv2,cid,var,dfcombat20_lv2,startPos)

addEvent(RunPart,2200,combat22_lv2,cid,var,dfcombat22_lv2,startPos)

addEvent(RunPart,2700,combat27_lv2,cid,var,dfcombat27_lv2,startPos)

addEvent(RunPart,3000,combat30_lv2,cid,var,dfcombat30_lv2,startPos)

addEvent(RunPart,3300,combat33_lv2,cid,var,dfcombat33_lv2,startPos)

setPlayerStorageValue(cid, spell_storage, getPlayerStorageValue(cid, spell_storage)+1)

doPlayerSendTextMessage(cid, 22, "Your Fire teste advanced to level 2")

elseif getPlayerStorageValue(cid, spell_storage) > 100 then

addEvent(RunPart,200,combat2_lv2,cid,var,dfcombat2_lv2,startPos)

addEvent(RunPart,400,combat4_lv2,cid,var,dfcombat4_lv2,startPos)

addEvent(RunPart,600,combat6_lv2,cid,var,dfcombat6_lv2,startPos)

addEvent(RunPart,800,combat8_lv2,cid,var,dfcombat8_lv2,startPos)

addEvent(RunPart,1000,combat10_lv2,cid,var,dfcombat10_lv2,startPos)

addEvent(RunPart,1200,combat12_lv2,cid,var,dfcombat12_lv2,startPos)

addEvent(RunPart,1400,combat14_lv2,cid,var,dfcombat14_lv2,startPos)

addEvent(RunPart,1600,combat16_lv2,cid,var,dfcombat16_lv2,startPos)

addEvent(RunPart,1800,combat18_lv2,cid,var,dfcombat18_lv2,startPos)

addEvent(RunPart,2000,combat20_lv2,cid,var,dfcombat20_lv2,startPos)

addEvent(RunPart,2200,combat22_lv2,cid,var,dfcombat22_lv2,startPos)

addEvent(RunPart,2700,combat27_lv2,cid,var,dfcombat27_lv2,startPos)

addEvent(RunPart,3000,combat30_lv2,cid,var,dfcombat30_lv2,startPos)

addEvent(RunPart,3300,combat33_lv2,cid,var,dfcombat33_lv2,startPos)

setPlayerStorageValue(cid, spell_storage, getPlayerStorageValue(cid, spell_storage)+1)

end

return TRUE

end

 

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...