Everyone who has never used our Bots before, can test each one for 2 days without any limitation.
The trial is given automatically when you login on the Bot, but in some cases it wouldn't work (security reasons).
If this happens, send me a private message and i will be checking the failed trials manually and adding it for those who didn't get it.
We are looking for resellers who may accept payment methods different from ours, including classictibia's cash, realesta's cash, mastercores' cash, etc. Interested? Click here at anytime.



Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Exeta res when summons take damage
#1
Hello, I would like to bot with my knight while my friend summons demon skeletons.
Is there any way to make the character go next to the DS/player and exeta res?

I was thinking something like below:
If the persistent notice a change in hp (on both summon and friendly player) since last itteration the character should walk next and do a exeta res.

Maybe it is possible to rework the heal summon script?

local Summon = 'demon skeleton' -- Summon name
local Creatures = getcreatures('mfs')
for _, creature in ipairs(Creatures) do
   if creature.name:lower() == Summon:lower() and creature.hppc <= Health_Heal then
    print('id:', creature.id)
   end
end

I would love to have this and appriciate all the help I can get!
end
Reply

#2
Hello.

I've created the following script that will check for health of the friendly creatures. If the hp% of those changes (lower only) since last iteration then it will reach monster ("hydra") and cast exeta res.
Depending on WHAT and HOW you're hunting, this will be enough. But if there are multiple monsters on the screen, then you will need something slightly more advanced like checking which monster is closest to the creature that lost hp%.
local Monster = 'hydra' -- monster name
local FRIENDLY_CREATURES = {'player name', 'friend', 'summon name', 'demon skeleton' } -- Friendly creatures to protect like your friends or summons

if connected() then
   table.lower(FRIENDLY_CREATURES)

   local dmgedCreatured = 0
   local CURRENT_HEALTHS = { }

   local creatures = getcreatures('pmfs')
   for _, creature in ipairs(creatures) do
      if table.find(FRIENDLY_CREATURES, creature.name:lower()) ~= nil then
         if dmgedCreatured == 0 and LAST_HEALTHS ~= nil then
            for key, entry in ipairs(LAST_HEALTHS) do
               if entry.id == creature.id and creature.hppc < entry.hppc then
                  dmgedCreatured = entry.id
                  break
               end
            end
         end

         table.insert(CURRENT_HEALTHS, { id = creature.id, hppc = creature.hppc })
      end
   end

   if dmgedCreatured > 0 and reachcreature(Monster) then
      wait(100, 300)
      cast('exeta res')
   end

   LAST_HEALTHS = CURRENT_HEALTHS
else
   LAST_HEALTHS = nil
end

If there are multiple monsters on the screen, then you will need this:
local MONSTERS = { 'hydra' } -- monsters name
local FRIENDLY_CREATURES = {'player name', 'friend', 'summon name', 'demon skeleton' } -- Friendly creatures to protect like your friends or summons

if connected() then
   table.lower(FRIENDLY_CREATURES)
   table.lower(MONSTERS)

   local DMGED_CREATURE = { id = 0, posx = 0, posy = 0 }
   local CURRENT_HEALTHS = { }

   local creatures = getcreatures('pmfs')
   for _, creature in ipairs(creatures) do
      if table.find(FRIENDLY_CREATURES, creature.name:lower()) ~= nil then
         if DMGED_CREATURE.id == 0 and LAST_HEALTHS ~= nil then
            for key, entry in ipairs(LAST_HEALTHS) do
               if entry.id == creature.id and creature.hppc < entry.hppc then
                  DMGED_CREATURE = { id = entry.id, posx = entry.posx, posy = entry.posy }
                  break
               end
            end
         end

         table.insert(CURRENT_HEALTHS, { id = creature.id, hppc = creature.hppc })
      end
   end

   local CLOSEST_CREATURE = { id = 0, dist = -1 }
   for _, creature in ipairs(creatures) do
      if table.find(MONSTERS, creature.name:lower()) ~= nil then
         local dist = proximity(DMGED_CREATURE.posx, DMGED_CREATURE.posy, creature.posx, creature.posy)
         if CLOSEST_CREATURE.dist == -1 or dist < CLOSEST_CREATURE.dist then
            CLOSEST_CREATURE = { id = creature.id, dist = dist }
         end
      end
   end

   if DMGED_CREATURE.id > 0 and CLOSEST_CREATURE.id > 0 and reachcreature(CLOSEST_CREATURE.id) then
      wait(100, 300)
      cast('exeta res')
   end

   LAST_HEALTHS = CURRENT_HEALTHS
else
   LAST_HEALTHS = nil
end
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016