Results 1 to 2 of 2

Thread: Thunderstorm/sd action not working

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

    Thunderstorm/sd action not working

    Hello i have a problem with a thunderstorm/sd action.

    It's supposed to sd when 3+ mobs and thunderstorm when 2+ but the bot is trying to do both at the same time and never sd's becous of exhaust.


    local MonsterToUe = {"Quara Hydromancer", "Quara Pincher", "Quara Predator", "Thul", "Massive Water Elemental"}
    local MonsterToARune = {"Quara Constrictor", "Quara Mantassin", "Quara Hydromancer", "Massive Water Elemental", "Quara Pincher", "Quara Predator", "Thul"}
    local MonsterToSd = {"Quara Hydromancer", "Massive Water Elemental", "Quara Pincher", "Quara Predator", "Thul", "Massive Water Elemental"}
    local MonsterToMStrike = {"Quara Mantassin", "Quara Hydromancer", "Quara Pincher", "Quara Predator", "Massive Water Elemental"}
    local MonsterToSStrike = {"Quara Mantassin", "Quara Hydromancer", "Quara Pincher", "Quara Predator"}
    local MonsterToStrike = {"Quara Constrictor", "Quara Mantassin", "Quara Hydromancer", "Massive Water Elemental", "Quara Pincher", "Quara Predator", "Thul"}
    local ue = "exevo gran mas vis"
    local MaxStrike = "exori max vis"
    local StrongStrike = "exori gran vis"
    local Strike = "exori vis"


    local AmountUe = 0
    local Mhp = 0
    for CREATURE in Creature.GetAll([[ms]]) do
    if CREATURE:isShootable() and table.find(MonsterToUe, CREATURE:Name()) and Self.MonstersAroundSpell("5x5", false, unpack(MonsterToUe)) >= 1 then
    AmountUe = AmountUe + 1
    Mhp = Mhp + CREATURE:HealthPercent()
    end
    end
    local AvarageHp = Mhp/AmountUe
    local AmountRune = 0
    for CREATURE in Creature.GetAll([[ms]]) do
    if CREATURE:isShootable() and table.find(MonsterToARune, CREATURE:Name()) then
    AmountRune = AmountRune + 1
    end
    end
    local AmountSd = 0
    for CREATURE in Creature.GetAll([[ms]]) do
    if CREATURE:isShootable() and table.find(MonsterToSd, CREATURE:Name()) then
    AmountSd = AmountSd + 1
    end
    end
    local Amount = 0
    for CREATURE in Creature.GetAll([[ms]]) do
    if CREATURE:isShootable() then
    Amount = Amount + 1
    end
    end

    if Self.CoolDown(SPELL_GROUP_ATTACK) <= 1 then
    if CastUE then
    while AmountUe >= CreatureToUe and AvarageHp <= HppcToUe and cancast(ue) do
    cast(ue)
    updateworld()
    end
    end
    if UseAreaRune then
    if UWC then
    while shootarearune("thunderstorm rune", CreatureToRune, unpack(MonsterToARune)) and AmountRune >= CreatureToRune do
    shootarearune("thunderstorm rune", CreatureToRune, unpack(MonsterToARune))
    updateworld()
    end
    if not shootarearune("thunderstorm rune", CreatureToRune, unpack(MonsterToARune)) and AmountRune >= CreatureToRune then
    if target.hppc > 8 and target.id ~= 0 then
    if UseSdRunes and AmountSd >= CreatureToSd and target.id ~= 0 then
    useitemontarget("sudden death rune", target.id)
    updateworld()
    elseif UseMaxStrike and target.dist <= 3 and target.id ~= 0 and target.hppc > 30 and Amount > 0 and cancast(MaxStrike) and table.find(MonsterToMStrike, target.name) then
    cast(MaxStrike)
    elseif UseStrongStrike and target.id ~= 0 and target.dist <= 3 and target.hppc > 15 and Amount > 0 and cancast(StrongStrike) and table.find(MonsterToSStrike, target.name) then
    cast(StrongStrike)
    elseif Amount > 0 and target.id ~= 0 and target.dist <= 3 and cancast(Strike) then
    cast(Strike)
    end
    elseif target.hppc < 8 and target.id ~= 0 then
    if Amount > 0 and cancast(Strike) and table.find(MonsterToStrike, target.name) and target.dist <= 3 then
    cast(Strike)
    end
    end
    end
    else
    if AmountRune >= CreatureToRune and target.id ~= 0 then
    useitemontarget("thunderstorm rune", target.id)
    updateworld()
    end
    end
    updateworld()
    end
    if UseSdRunes and not UseAreaRune then
    if (Amount > 0 and not UseAreaRune) or (Amount > 0 and UseAreaRune and AmountRune < CreatureToRune) and target.id ~= 0 then
    if target.hppc > 8 then
    if AmountSd >= CreatureToSd then
    useitemontarget("sudden death rune", target.id)
    updateworld()
    elseif Amount > 0 and cancast(Strike) and table.find(MonsterToStrike, target.name) and target.dist <= 3 then
    cast(Strike)
    updateworld()
    end
    end
    end
    updateworld()
    end
    if ((not UseAreaRune) and (not UseSdRunes)) or (UseAreaRune and AmountRune < CreatureToRune and not UseSdRunes) or (not UseAreaRune and UseSdRunes and AmountSd < CreatureToSd) or (UseAreaRune and AmountRune < CreatureToRune and UseSdRunes and AmountSd < CreatureToSd) and target.id ~= 0 and target.dist <= 3 then
    if UseMaxStrike and target.hppc > 30 and Amount > 0 and cancast(MaxStrike) and table.find(MonsterToMStrike, target.name) then
    cast(MaxStrike)
    elseif UseStrongStrike and target.hppc > 15 and Amount > 0 and cancast(StrongStrike) and table.find(MonsterToSStrike, target.name) then
    cast(StrongStrike)
    elseif Amount > 0 and cancast(Strike) and table.find(MonsterToStrike, target.name) then
    cast(Strike)
    end
    end
    end

  2. #2
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    Who wrote this?

    You're probably missing something like sirmates library

    A lot of variables are missing from this as well, so idk wtf is going on, and im not fixing it.

    probably solve the cooldown issue by moving the SD check above the Rune AOE check.

    Lua Code:
    local MonsterToUe = {"Quara Hydromancer", "Quara Pincher", "Quara Predator", "Thul", "Massive Water Elemental"}
    local MonsterToARune = {"Quara Constrictor", "Quara Mantassin", "Quara Hydromancer", "Massive Water Elemental", "Quara Pincher", "Quara Predator", "Thul"}
    local MonsterToSd = {"Quara Hydromancer", "Massive Water Elemental", "Quara Pincher", "Quara Predator", "Thul", "Massive Water Elemental"}
    local MonsterToMStrike = {"Quara Mantassin", "Quara Hydromancer", "Quara Pincher", "Quara Predator", "Massive Water Elemental"}
    local MonsterToSStrike = {"Quara Mantassin", "Quara Hydromancer", "Quara Pincher", "Quara Predator"}
    local MonsterToStrike = {"Quara Constrictor", "Quara Mantassin", "Quara Hydromancer", "Massive Water Elemental", "Quara Pincher", "Quara Predator", "Thul"}
    local ue = "exevo gran mas vis"
    local MaxStrike = "exori max vis"
    local StrongStrike = "exori gran vis"
    local Strike = "exori vis"
     
     
    local AmountUe = 0
    local Mhp = 0
     
    for CREATURE in Creature.GetAll([[ms]]) do
    	if CREATURE:isShootable() and table.find(MonsterToUe, CREATURE:Name()) and Self.MonstersAroundSpell("5x5", false, unpack(MonsterToUe)) >= 1 then
    		AmountUe = AmountUe + 1
    		Mhp = Mhp + CREATURE:HealthPercent()
    	end
    end
     
    local AvarageHp = Mhp/AmountUe
    local AmountRune = 0
    for CREATURE in Creature.GetAll([[ms]]) do
    if CREATURE:isShootable() and table.find(MonsterToARune, CREATURE:Name()) then
    AmountRune = AmountRune + 1
    end
    end
    local AmountSd = 0
    for CREATURE in Creature.GetAll([[ms]]) do
    if CREATURE:isShootable() and table.find(MonsterToSd, CREATURE:Name()) then
    AmountSd = AmountSd + 1
    end
    end
    local Amount = 0
    for CREATURE in Creature.GetAll([[ms]]) do
    if CREATURE:isShootable() then
    Amount = Amount + 1
    end
    end
     
    if UseSdRunes and not UseAreaRune then
    if (Amount > 0 and not UseAreaRune) or (Amount > 0 and UseAreaRune and AmountRune < CreatureToRune) and target.id ~= 0 then
    if target.hppc > 8 then
    if AmountSd >= CreatureToSd then
    useitemontarget("sudden death rune", target.id)
    updateworld()
    elseif Amount > 0 and cancast(Strike) and table.find(MonsterToStrike, target.name) and target.dist <= 3 then
    cast(Strike)
    updateworld()
    end
    end
    end
    updateworld()
    end
     
    if Self.CoolDown(SPELL_GROUP_ATTACK) <= 1 then
    if CastUE then
    while AmountUe >= CreatureToUe and AvarageHp <= HppcToUe and cancast(ue) do
    cast(ue)
    updateworld()
    end
    end
    if UseAreaRune then
    if UWC then
    while shootarearune("thunderstorm rune", CreatureToRune, unpack(MonsterToARune)) and AmountRune >= CreatureToRune do
    shootarearune("thunderstorm rune", CreatureToRune, unpack(MonsterToARune))
    updateworld()
    end
    if not shootarearune("thunderstorm rune", CreatureToRune, unpack(MonsterToARune)) and AmountRune >= CreatureToRune then
    if target.hppc > 8 and target.id ~= 0 then
    if UseSdRunes and AmountSd >= CreatureToSd and target.id ~= 0 then
    useitemontarget("sudden death rune", target.id)
    updateworld()
    elseif UseMaxStrike and target.dist <= 3 and target.id ~= 0 and target.hppc > 30 and Amount > 0 and cancast(MaxStrike) and table.find(MonsterToMStrike, target.name) then
    cast(MaxStrike)
    elseif UseStrongStrike and target.id ~= 0 and target.dist <= 3 and target.hppc > 15 and Amount > 0 and cancast(StrongStrike) and table.find(MonsterToSStrike, target.name) then
    cast(StrongStrike)
    elseif Amount > 0 and target.id ~= 0 and target.dist <= 3 and cancast(Strike) then
    cast(Strike)
    end
    elseif target.hppc < 8 and target.id ~= 0 then
    if Amount > 0 and cancast(Strike) and table.find(MonsterToStrike, target.name) and target.dist <= 3 then
    cast(Strike)
    end
    end
    end
    else
    if AmountRune >= CreatureToRune and target.id ~= 0 then
    useitemontarget("thunderstorm rune", target.id)
    updateworld()
    end
    end
    updateworld()
    end
    if ((not UseAreaRune) and (not UseSdRunes)) or (UseAreaRune and AmountRune < CreatureToRune and not UseSdRunes) or (not UseAreaRune and UseSdRunes and AmountSd < CreatureToSd) or (UseAreaRune and AmountRune < CreatureToRune and UseSdRunes and AmountSd < CreatureToSd) and target.id ~= 0 and target.dist <= 3 then
    if UseMaxStrike and target.hppc > 30 and Amount > 0 and cancast(MaxStrike) and table.find(MonsterToMStrike, target.name) then
    cast(MaxStrike)
    elseif UseStrongStrike and target.hppc > 15 and Amount > 0 and cancast(StrongStrike) and table.find(MonsterToSStrike, target.name) then
    cast(StrongStrike)
    elseif Amount > 0 and cancast(Strike) and table.find(MonsterToStrike, target.name) then
    cast(Strike)
    end
    end
    end

Posting Permissions

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