Log in

View Full Version : Attack/Spell sync



684761
11-18-2014, 01:50 AM
Please add this to xeno.
It'll increave overall dps AND profit too. ive ran mages that casts exori frigo/flam 3 times until the wand attack goes off.
Same goes for paladins but not as bad as i have seen though.

Snurq
08-29-2016, 02:38 PM
anoyn made a Smart script for palladins for sync exori cons with arrows.



-- Paladin single target spell shooter
-- THIS ONLY WORKS WITH ARROWS AND BOLTS
--Version 1.1
--[[ 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 = 0 -- 30ms
delayToCastMax = 0 -- 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 ammo.count > lastAmmoCount then
lastAmmoCount = ammo.count
elseif targetID ~= 0 and ammo.id ~= 0 and ammo.count < lastAmmoCount then
checkIfCanCastSpell(targetID)
end
end)


Oh there is new version even with the wands
check in his thread
http://forums.xenobot.net/showthread.php?39731-Anoyn-s-Scripts&p=461236&viewfull=1#post461236