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
Swap Rod (weapon) when attacking certain monster
#1
Hello,

I searched but couldn't find something for this. 

Example :  I want to use moonlight rod for "Skeletons, larva, hyaena etc" but want to swap to Hailstorm Rod for "Mummy, Ghoul, Stalker"
Reply

#2
Hello.

I know that you already found it.
local KNIFE_ID = 3070 -- Knife id.
local WEAPON_ID = 3067 -- Strong weapon id.
local Monsters = { 'Scarab', 'Ghoul', 'stalker' }


if maround(7, table.unpack(Monsters)) > 0 then
    local left_hand = lhand()
    if left_hand.id == 0 or left_hand.id ~= WEAPON_ID then
        moveitems(WEAPON_ID, 'lhand', '', 100)
        wait(500, 800)
    end
else
    local left_hand = lhand()
    if left_hand.id == 0 or left_hand.id ~= KNIFE_ID then
        moveitems(KNIFE_ID, 'lhand', '', 100)
        wait(500, 800)
    end
end

But i also developed this
local CONFIGS = {
    { Weapon = 'Hailstorm Rod', Monsters = { 'Ghoul', 'stalker' } }, -- Weapon must be name or id, but id is better.
    { Weapon = 'moonlight rod', Monsters = { 'Skeleton', 'larva' } },
}

if connected() then
    local creature = attacked()
    if creature.id > 0 then
        local leftHand = lhand()
        for _, config in ipairs(CONFIGS) do
            table.lower(config.Monsters)
            if table.find(config.Monsters, creature.name:lower()) ~= nil then
                local weaponId = itemid(config.Weapon)
                if weaponId > 0 and leftHand.id ~= weaponId then
                    moveitems(weaponId, 'lhand', '', 100)
                    wait(500, 800)
                    break
                end
            end
        end
    end
end
Reply

#3
|Only Registered members can see download links. | Click here to buy subscription or here to register.
Reply

#4
Hello.

If know its IDS then use instead names.
local CONFIGS = {
    { Weapon = 1234, Monsters = { 'Ghoul', 'stalker' } }, -- Weapon must be name or id, but id is better.
    { Weapon = 4321, Monsters = { 'Skeleton', 'larva' } },
}

if connected() then
    local creature = attacked()
    if creature.id > 0 then
        local leftHand = lhand()
        for _, config in ipairs(CONFIGS) do
            table.lower(config.Monsters)
            if table.find(config.Monsters, creature.name:lower()) ~= nil then
                local weaponId = itemid(config.Weapon)
                if weaponId > 0 and leftHand.id ~= weaponId then
                    moveitems(weaponId, 'lhand', '', 100)
                    wait(500, 800)
                    break
                end
            end
        end
    end
end
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016