Results 1 to 3 of 3

Thread: Ajuda com actions spell area

  1. #1
    iBot User
    Join Date
    Jun 2012
    Posts
    10
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    5 Post(s)
    Reputation
    10
    Rep Power
    5

    Question Ajuda com actions spell area

    to com uma scrip de spell area que ta com um debug, gostaria de conseguir reparar, a action eh a seguinte:

    local MonsterToAva = {"Behemoth", "Cyclops Smith"}
    local MonsterToSD = {"Behemoth"}
    local MonsterToUe = {"Behemoth"}

    AreaRunes = true -- Use area runes?
    MobsToAreaRune = 2 -- Monsters to use Avalanche Runes.
    UseAva = true -- Use Avalanche Rune?
    ShootAreaRuneFunction = true -- False will shoot in target
    HpToUe = 30 -- Avarage hp of monsters to cast Ue.

    table.lower(MonsterToSD)

    local monster = getcreatures("ms")
    local monster_count = monster.count - 1

    local Creature = 0
    local Creaturehppc = 0
    for i=0, monster_count do
    if (monster[i].name == "Behemoth") and Self.MonstersAroundSpell("5x5", false, monster[i]) then
    Creature = Creature + 1
    Creaturehppc = Creaturehppc + monster[i].hpperc
    end
    end
    local CountedHealth = Creaturehppc/Creature

    if (Self.CoolDown(SPELL_GROUP_ATTACK)) == 0 then
    if ((paround(10, true) == 0 and lasttimeplayeronscreen >= 5000) or not PvP_Server) then
    while Self.MonstersAroundSpell("5x5", false, unpack(MonsterToUe)) >= AmountToUe and cancast("exevo gran mas frigo") and CountedHealth <= HpToUe and Ue do
    cast("exevo gran mas frigo")
    updateworld()
    break
    end
    if UseAva then
    if maround(10, unpack(MonsterToAva)) >= MobsToAreaRune then
    if ShootAreaRuneFunction and shootarearune('avalanche rune', MobsToAreaRune, unpack(MonsterToAva)) then
    while shootarearune('avalanche rune', MobsToAreaRune, unpack(MonsterToAva)) do
    shootarearune('avalanche rune', MobsToAreaRune, unpack(MonsterToAva))
    updateworld()
    break
    end
    elseif not shootarearune('avalanche rune', MobsToAreaRune, unpack(MonsterToAva)) then
    if (SdRunes and table.find(MonsterToSD, target.name:lower()) and maround(10, unpack(MonsterToSD)) >= MobsToSd) and target.hppc >= 10 and target.id ~= 0 then
    useitemontarget("sudden death rune", target.id)
    updateworld()
    elseif (not SdRunes or target.hppc < 10 or (not (table.find(MonsterToSD, target.name:lower()))) or maround(10, unpack(MonsterToSD)) < MobsToSd)and target.id ~= 0 then
    if target.dist <= 3 then
    if UltimateStrikes and target.hppc >= 30 and cancast('exori max frigo') then
    cast('exori max frigo')
    elseif cancast('exori gran frigo') and target.hppc >= 20 then
    cast('exori gran frigo')
    elseif cancast('exori frigo') then
    cast('exori frigo')
    end
    end
    end
    end
    if not ShootAreaRuneFunction and target.id ~= 0 then
    useitemontarget('avalanche rune', target.id)
    updateworld()
    end
    end
    end
    end
    if SdRunes then
    if maround(10, unpack(MonsterToSD)) >= MobsToSd then
    if ((maround(10, unpack(MonsterToAva)) < MobsToAreaRune) or (AreaRunes == false) or (paround(10, true) > 0 and PvP_Server)) and target.hppc >= 10 and target.id ~= 0 and table.find(MonsterToSD, target.name:lower()) then
    useitemontarget("sudden death rune", target.id)
    updateworld()
    elseif target.hppc < 10 and target.dist <= 3 and target.id ~= 0 then
    if target.hppc < 10 and target.dist <= 3 then
    if UltimateStrikes and target.hppc >= 30 and cancast('exori max frigo') then
    cast('exori max frigo')
    elseif cancast('exori gran frigo') and target.hppc >= 20 then
    cast('exori gran frigo')
    elseif cancast('exori frigo') then
    cast('exori frigo')
    end
    end
    end
    end
    end
    if target.id ~= 0 and target.dist <= 3 and ((((maround(10, unpack(MonsterToSD)) < MobsToSd) and (maround(10, unpack(MonsterToAva)) < MobsToAreaRune)) and AreaRunes and SdRunes) or (((maround(10, unpack(MonsterToAva)) < MobsToAreaRune)) and AreaRunes and not SdRunes) or (((maround(10, unpack(MonsterToSD)) < MobsToSd) ) and not AreaRunes and SdRunes) or (not AreaRunes and not SdRunes) or (maround(10, "Behemoth") > 1 and maround(10, unpack(MonsterToSD)) < MobsToSd and (paround(10, true) > 0 and PvP_Server))) then
    if UltimateStrikes and target.hppc >= 30 and cancast('exori max frigo') then
    cast('exori max frigo')
    elseif cancast('exori gran frigo') and target.hppc >= 20 then
    cast('exori gran frigo')
    elseif cancast('exori frigo') then
    cast('exori frigo')
    end
    end
    end




    e o debug eh o seguinte

    Action SpellsAtack : [string "local MonsterToAva ={"Behemoth" , "Cyclops S..."]:21: attempt to perform arithmetic on field 'hpperc' (a nil value)




    se alguem puder ajuda ai plx

  2. #2
    Administrator Tamapumper's Avatar
    Join Date
    Apr 2012
    Posts
    480
    Mentioned
    214 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    167 Post(s)
    Reputation
    177
    Rep Power
    10
    Quote Originally Posted by an3dre View Post
    to com uma scrip de spell area que ta com um debug, gostaria de conseguir reparar, a action eh a seguinte:

    local MonsterToAva = {"Behemoth", "Cyclops Smith"}
    local MonsterToSD = {"Behemoth"}
    local MonsterToUe = {"Behemoth"}

    AreaRunes = true -- Use area runes?
    MobsToAreaRune = 2 -- Monsters to use Avalanche Runes.
    UseAva = true -- Use Avalanche Rune?
    ShootAreaRuneFunction = true -- False will shoot in target
    HpToUe = 30 -- Avarage hp of monsters to cast Ue.

    table.lower(MonsterToSD)

    local monster = getcreatures("ms")
    local monster_count = monster.count - 1

    local Creature = 0
    local Creaturehppc = 0
    for i=0, monster_count do
    if (monster[i].name == "Behemoth") and Self.MonstersAroundSpell("5x5", false, monster[i]) then
    Creature = Creature + 1
    Creaturehppc = Creaturehppc + monster[i].hpperc
    end
    end
    local CountedHealth = Creaturehppc/Creature

    if (Self.CoolDown(SPELL_GROUP_ATTACK)) == 0 then
    if ((paround(10, true) == 0 and lasttimeplayeronscreen >= 5000) or not PvP_Server) then
    while Self.MonstersAroundSpell("5x5", false, unpack(MonsterToUe)) >= AmountToUe and cancast("exevo gran mas frigo") and CountedHealth <= HpToUe and Ue do
    cast("exevo gran mas frigo")
    updateworld()
    break
    end
    if UseAva then
    if maround(10, unpack(MonsterToAva)) >= MobsToAreaRune then
    if ShootAreaRuneFunction and shootarearune('avalanche rune', MobsToAreaRune, unpack(MonsterToAva)) then
    while shootarearune('avalanche rune', MobsToAreaRune, unpack(MonsterToAva)) do
    shootarearune('avalanche rune', MobsToAreaRune, unpack(MonsterToAva))
    updateworld()
    break
    end
    elseif not shootarearune('avalanche rune', MobsToAreaRune, unpack(MonsterToAva)) then
    if (SdRunes and table.find(MonsterToSD, target.name:lower()) and maround(10, unpack(MonsterToSD)) >= MobsToSd) and target.hppc >= 10 and target.id ~= 0 then
    useitemontarget("sudden death rune", target.id)
    updateworld()
    elseif (not SdRunes or target.hppc < 10 or (not (table.find(MonsterToSD, target.name:lower()))) or maround(10, unpack(MonsterToSD)) < MobsToSd)and target.id ~= 0 then
    if target.dist <= 3 then
    if UltimateStrikes and target.hppc >= 30 and cancast('exori max frigo') then
    cast('exori max frigo')
    elseif cancast('exori gran frigo') and target.hppc >= 20 then
    cast('exori gran frigo')
    elseif cancast('exori frigo') then
    cast('exori frigo')
    end
    end
    end
    end
    if not ShootAreaRuneFunction and target.id ~= 0 then
    useitemontarget('avalanche rune', target.id)
    updateworld()
    end
    end
    end
    end
    if SdRunes then
    if maround(10, unpack(MonsterToSD)) >= MobsToSd then
    if ((maround(10, unpack(MonsterToAva)) < MobsToAreaRune) or (AreaRunes == false) or (paround(10, true) > 0 and PvP_Server)) and target.hppc >= 10 and target.id ~= 0 and table.find(MonsterToSD, target.name:lower()) then
    useitemontarget("sudden death rune", target.id)
    updateworld()
    elseif target.hppc < 10 and target.dist <= 3 and target.id ~= 0 then
    if target.hppc < 10 and target.dist <= 3 then
    if UltimateStrikes and target.hppc >= 30 and cancast('exori max frigo') then
    cast('exori max frigo')
    elseif cancast('exori gran frigo') and target.hppc >= 20 then
    cast('exori gran frigo')
    elseif cancast('exori frigo') then
    cast('exori frigo')
    end
    end
    end
    end
    end
    if target.id ~= 0 and target.dist <= 3 and ((((maround(10, unpack(MonsterToSD)) < MobsToSd) and (maround(10, unpack(MonsterToAva)) < MobsToAreaRune)) and AreaRunes and SdRunes) or (((maround(10, unpack(MonsterToAva)) < MobsToAreaRune)) and AreaRunes and not SdRunes) or (((maround(10, unpack(MonsterToSD)) < MobsToSd) ) and not AreaRunes and SdRunes) or (not AreaRunes and not SdRunes) or (maround(10, "Behemoth") > 1 and maround(10, unpack(MonsterToSD)) < MobsToSd and (paround(10, true) > 0 and PvP_Server))) then
    if UltimateStrikes and target.hppc >= 30 and cancast('exori max frigo') then
    cast('exori max frigo')
    elseif cancast('exori gran frigo') and target.hppc >= 20 then
    cast('exori gran frigo')
    elseif cancast('exori frigo') then
    cast('exori frigo')
    end
    end
    end




    e o debug eh o seguinte

    Action SpellsAtack : [string "local MonsterToAva ={"Behemoth" , "Cyclops S..."]:21: attempt to perform arithmetic on field 'hpperc' (a nil value)




    se alguem puder ajuda ai plx
    Mude essa linha
    Creaturehppc = Creaturehppc + monster[i].hpperc


    para

    Creaturehppc = Creaturehppc + monster[i].hppc

  3. #3
    iBot User
    Join Date
    Jun 2012
    Posts
    10
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    5 Post(s)
    Reputation
    10
    Rep Power
    5
    Obrigado cara, deu certo aki

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •