• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

if isTrapped

lopez65

Member
Joined
May 10, 2012
Messages
294
Solutions
1
Reaction score
16
Location
Barcelona
HelloCan anyone help me with a macro for vBot 4.8? It would be for the caveBot, so that when you go to refill from the cave hunt, when you leave the hunt you activate a function to deactivate the TargetBot. but in some cases, almost always in Scarab, you get trapped by 3 or 4 creatures and the bot stops. The script would be to attack the creatures when you get trapped on the way back to refill your supplies. thanks in advance
 
I have this macro, but I'm not sure if the code is correct:


LUA:
local BossList = {"Scarab [B]"} -- siempre dentro {"mob1","mob2"} aunque sólo sea uno
local spell1 = "Exori San" -- First Boss Spell
local spell2 = "Exori Con" -- Second Boss Spell


macro(250,"Boss Spell & Anti-Stuck",function()
  -- First Check if it's attacking a Boss
  if g_game.isAttacking() then
    local c = g_game.getAttackingCreature()
    if c then
      local cName = string.split(c:getName()," [L.")[1]
      if table.find(BossList,cName) then
        say(spell1) -- try cast spell1
        return
      end
    end
  end
 
  -- Second, if is trapped or attacking any other mob
  if isTrapped() then
    return say(spell2) -- cast last spell
  end
end)
 
Back
Top