• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Spellrotation

Joined
Feb 16, 2017
Messages
53
Solutions
2
Reaction score
9
Hey, I searched spellrotation function for bot (vithrax/cave) in forum/internet but found like nothing...
In vithrax is AttackBot function but casts like only 1 spell.
Anyone here know how to make (or have already) working attackbot with spellrotation?
 
Not the best solution but I'd try that for a start:
change this:
to this:
Lua:
    if not justStartedAttack and config.attackSpell and config.attackSpell:len() > 0 then
      if context.now > lastAttackSpell + 1000 and context.player:getHealthPercent() > 30 then
        local spells={}
        for spell in string.gmatch(config.attackSpell, "([^,]+)") do
          table.insert(spells, spell)
        end
        for i = 1, #spells, 1 do
          if context.saySpell(spells[i], 1500) then
            lastAttackRune = context.now
            break
          end
        end
      end
    end
then add spells separated by a comma
 
Not the best solution but I'd try that for a start:
change this:
to this:
Lua:
    if not justStartedAttack and config.attackSpell and config.attackSpell:len() > 0 then
      if context.now > lastAttackSpell + 1000 and context.player:getHealthPercent() > 30 then
        local spells={}
        for spell in string.gmatch(config.attackSpell, "([^,]+)") do
          table.insert(spells, spell)
        end
        for i = 1, #spells, 1 do
          if context.saySpell(spells[i], 1500) then
            lastAttackRune = context.now
            break
          end
        end
      end
    end
then add spells separated by a comma
/Edit - Works better, but still not well. Any another ideas?
 
Last edited:
Back
Top