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
Script Paladin change bow to mele weapon if low arrows
#1
Is it possible to have script for paladin, attack with bow and arrows ( also making arrows) and when for exemple have less than 30 arrows change to shield(dwarven shield) and put (fire sword or battle hammer) to attack untill char has minimum 100 arrows?
Reply

#2
Hello.

I didn't tested this script, but it should work.
local SETTINGS = {
    MELEE_WEAPON = 'fire sword', -- melee weapon id or name.
    SHIELD = 'dwarven shield', -- shield id or name.
    CONTAINER_WEAPONS = 'blue backpack', -- Container name or index that it will keep weapons.

    DISTANCE_WEAPON = 'bow', -- distance weapon id or name.
    DISTANCE_AMMO = 'arrow', -- distance ammo id or name.

    MIN_AMMO = 30, -- Ammo to unequip distance weapon and equip melee weapon.
    MAX_AMMO = 100, -- Ammo to unequip melee weapon and equip distance weapon.
}

if connected() then

    local AMMO_COUNT = itemcount(SETTINGS.DISTANCE_AMMO, '', true)

    if AMMO_COUNT >= SETTINGS.MAX_AMMO then

        SETTINGS.MELEE_WEAPON = itemid(SETTINGS.MELEE_WEAPON)
        local player_lhand = lhand()
        if player_lhand.id == SETTINGS.MELEE_WEAPON then
            moveitems(SETTINGS.MELEE_WEAPON, SETTINGS.CONTAINER_WEAPONS, 'lhand', 100)
            wait(800, 1200)
            player_lhand = lhand()
        end

        SETTINGS.SHIELD = itemid(SETTINGS.SHIELD)
        local player_rhand = rhand()
        if player_rhand.id == SETTINGS.SHIELD then
            moveitems(SETTINGS.SHIELD, SETTINGS.CONTAINER_WEAPONS, 'rhand', 100)
            wait(800, 1200)
            player_rhand = rhand()
        end

        if player_lhand.id == 0 and player_rhand.id == 0 then
            moveitems(SETTINGS.DISTANCE_WEAPON, 'lhand', SETTINGS.CONTAINER_WEAPONS, 100)
            wait(800, 1200)
        end

    elseif AMMO_COUNT <= SETTINGS.MIN_AMMO then

        SETTINGS.DISTANCE_WEAPON = itemid(SETTINGS.DISTANCE_WEAPON)
        local player_lhand = lhand()
        if player_lhand.id == SETTINGS.DISTANCE_WEAPON then
            moveitems(SETTINGS.DISTANCE_WEAPON, SETTINGS.CONTAINER_WEAPONS, 'lhand', 100)
            wait(800, 1200)
            player_lhand = lhand()
        end

        local player_rhand = rhand()
        if player_rhand.id == 0 then
            moveitems(SETTINGS.SHIELD, 'rhand', SETTINGS.CONTAINER_WEAPONS, 100)
            wait(800, 1200)
        end

        if player_lhand.id == 0 then
            moveitems(SETTINGS.DISTANCE_WEAPON, 'lhand', SETTINGS.CONTAINER_WEAPONS, 100)
            wait(800, 1200)
        end
    end
end
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016