XenoBot Forums - Powered by vBulletin

User Tag List

Results 1 to 10 of 32

Thread: Anoyn's Scripts

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3

    Join Date
    Sep 2015
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by anoyn View Post
    Paladin Bow/X-Bow Spell Caster
    This script replaces the built in magic shooter.
    It casts spells after a Bow/Crossbow hit to avoid exhaust.
    It only works with bow and XBow.
    It does not support area spells.
    It supports range limited spells.

    lua code:

    -- Paladin single target spell shooter
    -- THIS ONLY WORKS WITH ARROWS AND BOLTS
    --Version 1.0
    --[[ Made by
    ___ .__ __. ______ ____ ____ .__ __.
    / \ | \ | | / __ \ \ \ / / | \ | |
    / ^ \ | \| | | | | | \ \/ / | \| |
    / /_\ \ | . ` | | | | | \_ _/ | . ` |
    / _____ \ | |\ | | `--' | | | | |\ |
    /__/ \__\ |__| \__| \______/ |__| |__| \__|

    ]]

    --------------------------------------------
    --[[ ------------ CONFIG -------------- ]]--
    --------------------------------------------
    --if the spell does not have a range, dont give the spell a range
    --spells you want to cast first should be at the top
    spells = {
    --{ words = "exori san", range = 4 },
    { words = "exori gran con" },
    { words = "exori con" }
    }

    --How long do you want to wait between your arrow and casting spell? (If OT, set to 0)
    delayToCastMin = 30 -- 30ms
    delayToCastMax = 300 -- 300ms


    --------------------------------------------
    --[[ ----- Script -- No need to edit ---- ]]
    --------------------------------------------
    lastAmmoCount = Self.Ammo().count
    function checkIfCanCastSpell(targetID)
    --Check if spell has limited range
    for i = 1, #spells do
    if spells[i]['range'] ~= nil then
    local creature = Creature.New(targetID)
    if( creature ~= nil and Self.DistanceFromPosition(creature:Position().x, creature:Position().y, creature:Position().z) <= spells[i]['range'] ) then
    if Self.CanCastSpell(spells[i]['words']) then
    castSpell(spells[i]['words'])
    break
    end
    end
    else
    if Self.CanCastSpell(spells[i].words) then
    castSpell(spells[i]['words'])
    break
    end
    end
    end
    end

    function castSpell(words)
    lastAmmoCount = ammo.count
    wait(delayToCastMin,delayToCastMax)
    Self.Cast(words)
    end

    Module.New('boltChecker', function(boltChecker)
    ammo = Self.Ammo()
    local targetID = Self.TargetID()
    if targetID ~= 0 and ammo.id ~= 0 and ammo.count < lastAmmoCount then
    checkIfCanCastSpell(targetID)
    end
    end)
    SERIOUSLY! THIS IS THE BEST THING THAT COULD HAVE HAPPEN! It works like a charm, really you are a lifesaver, BIG CREDS to you! Would have payed for this to happen lol.

    Update: Ive tried it now and it worked flawlessly for some time, then it just stopped working at all and i had to reload the script to make it work again (no error message) It could be at the time my bot autorefill to 100 arrows from 25-35 but not sure
    Update 2: Yes it is when the bot reloads the arrows confirmed
    Last edited by garre93; 12-07-2015 at 01:35 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •