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
Use custom item on monster

Is there any way to make this script use the item/rune on the targetted monster instead of random one 

local Monsters = { 'Rotworm', 'Another monster', 'Demon', 'Creature name', 'Goblin' }
local Rune_Monsters = 5107 -- Rune to shoot on listed monsters above.

if connected() and cancast() and mppc() >= 50 then

    local creatures = getcreatures('mfs')

    for _, creature in ipairs(creatures) do
            if table.find(Monsters, creature.name:lower()) ~= nil then
            useitemoncreature(Rune_Monsters, creature.id)
            wait(1000, 1200)


useitemoncreature() works with item name (when bot knows it) or item id, also creature name or creature id.
The script above will work, you just need to setup Rune with the rune id instead of name.
local MIN_HEALTH = 80 -- Min. health pc to shoot runes. Only shoot runes if your characters hp% is higher than this value.
local Monsters = {
    { Name = 'Demon', HpMin = 0, HpMax = 100, Rune = 5107 }, -- Monster name, Hp min and max to shoot runes and which rune.
    { Name = 'Orc', HpMin = 20, HpMax = 100, Rune = 5107 }, -- On this case, it will only shoot runes when orc has hp% between 20 and 100%.

local attacked_creature = attacked()
if attacked_creature.id > 0 and hppc() >= MIN_HEALTH and cancast() then
    for _, monster in ipairs(Monsters) do
        if monster.Name:lower() == attacked_creature.name:lower() and attacked_creature.hppc >= monster.HpMin and attacked_creature.hppc <= monster.HpMax then
            useitemoncreature(monster.Rune, attacked_creature.id)
            wait(1000, 1300)


Sorry I just edited my main post after I found another script working. Is there a way to make it shoot on the targeted monster instead of random?

The script above does that.

Forum Jump:

Forum software by © MyBB Theme © iAndrew 2016