Well here's my version of an advanced shooter for mages.
It incorporates strike spells, area spells, area runes and target runes.
Again, this Leonardo guy gets credits for checking if it's safe to cast area spells and runes, he's somewhat good isn't he.
If you hate the comments in the scripts, feel free to delete them, just for reference and education.
-- Advanced Shooter for Mages
-- Version 1.0.1 - By Heronas
-- Credits for playercheck go to Leonardo
init start
-- Set monsters to consider when using spells/area runes
local creatureNames = {
'Crystal Spider',
'Frost Dragon'
}
-- Spells such as beams/waves/UEs and even knight/paladin spells can be set here
-- Example: {name = "exevo vis hur", amount = 3, monsters = {'Hydra'}},
-- name = spell name or words, amount = monster amount, monsters = monsters to consider
local spells = {
{name = "exevo gran mas vis", amount = 4},
{name = "exevo vis hur", amount = 3},
{name = "exevo vis hur", amount = 2, monsters = {'Frost Dragon'}},
{name = "exevo gran vis lux", amount = 2},
}
-- Area runes such as thunderstorms can be set here
-- Example: {name = "thunderstorm rune", amount = 3, monsters = {'Crystal Spider'}},
-- name = rune name, amount = monster amount, monsters = monsters to consider
local areaRunes = {
{name = "avalanche rune", amount = 3}
}
-- Target runes such as SDs can be set here, for now only supports 1 targetrune
-- Example: {name = "sudden death rune", amount = 3, monsters = {'Demon'}},
-- name = rune name, amount = monster amount, monsters = monsters to consider
local targetRunes = {
{name = "sudden death rune", amount = 3, monsters = {'Frost Dragon'}},
}
-- Check for players, taken from Leonardo's scripts
local players = {
consider = true,
distance = 20,
safeList = {"Bubble", "Eternal Oblivion"},
floorDifference = 1
}
-- Set to true to use strong strikes
local strongStrike = true
-- DON'T EDIT BELOW THIS LINE IF YOU DON'T KNOW WHAT YOU'RE DOING --
--------------------------------------------------------------------
-- Directions to check
local shootDir = {'n', 'w', 's', 'e'}
-- Initial values for loop iteration
local quitLoop = 0
local exhaustTime = 0
local strongExhaustTime = 0
local countTries = 0
local areaCountLow = 10
local spellCountLow = 10
for i,j in pairs(spells) do
if spellCountLow > spells[i].amount then
spellCountLow = spells[i].amount
end
spells[i].monsters = spells[i].monsters or creatureNames
end
for i,j in pairs(areaRunes) do
if areaCountLow > areaRunes[i].amount then
areaCountLow = areaRunes[i].amount
end
areaRunes[i].monsters = areaRunes[i].monsters or creatureNames
end
for i,j in pairs(targetRunes) do
targetRunes[i].monsters = targetRunes[i].monsters or creatureNames
end
-- Prints
print('Started advanced mage shooter.')
init end
auto(50, 100)
quitLoop = 0
-- Reset exhaust time if a new projectile is fired from your position to your target's position
if $lastprojectile.tox == $attacked.posx and $lastprojectile.toy == $attacked.posy and $lastprojectile.fromx == $posx and $lastprojectile.fromy == $posy then
exhaustTime = $timems
end
if $timems >= exhaustTime then
if not players.consider or paroundfloorignore(players.distance, players.floorDifference, unpack(players.safeList)) == 0 then
-- Spells
if maround(8) >= spellCountLow and spells[1] ~= nil then
for i,_ in pairs(spells) do
if cancast(spells[i].name) then
for j,_ in pairs(shootDir) do
if maroundspell(spells[i].name, shootDir[j], unpack(spells[i].monsters)) >= spells[i].amount then
pausewalking(100)
turn(shootDir[j])
cast(spells[i].name)
quitLoop = 1
end
end
end
end
end
-- Area Runes
if maround(8) >= areaCountLow and areaRunes[1] ~= nil and quitLoop ~= 1 then
for i,_ in pairs(areaRunes) do
runeArea = getarearunetile(false, unpack(areaRunes[i].monsters))
if runeArea.amount >= areaRunes[i].amount and itemcount(areaRunes[i].name) ~= 0 then
countTries = 0
pausewalking(500)
useitemon(areaRunes[i].name, 0, runeArea.tile)
wait(500)
countTries = 1
if $lastprojectile.time <= exhaustTime then
countTries = 2
end
quitLoop = 1
end
end
end
end
-- Targetrunes and strikes
if $attacked.id ~=0 and quitLoop == 0 then
if maround(7, unpack(targetRunes[1].monsters)) >= targetRunes[1].amount then
useoncreature(targetRunes[1].name, $target)
elseif $timems >= strongExhaustTime and strongStrike then
caststrongstrike(1000)
strongExhaustTime = $timems + 5000
else
caststrike(1000)
end
end
-- Add exhaust time, takes into account if you missfire an area rune
exhaustTime = $timems + 1000 - countTries*500
end
Because a few people requested it in this thread, here is a paladin version:
-- Advanced Shooter for Paladins
-- Version 1.0.0 - By Heronas
-- Credits for playercheck go to Leonardo
init start
-- Set monsters to consider when using spells/area runes
local creatureNames = {
'Skeleton',
'Ghoul',
}
-- Spells such as beams/waves/UEs and even knight/paladin spells can be set here
-- Example: {name = "exevo vis hur", amount = 3, monsters = {'Hydra'}},
-- name = spell name or words, amount = monster amount, monsters = monsters to consider
local spells = {
{name = "exevo mas san", amount = 4, monsters = {'Ghoul'}},
{name = "exevo mas san", amount = 3},
}
-- Area runes such as thunderstorms can be set here
-- Example: {name = "thunderstorm rune", amount = 3, monsters = {'Crystal Spider'}},
-- name = rune name, amount = monster amount, monsters = monsters to consider
local areaRunes = {
{name = "avalanche rune", amount = 5}
}
-- Target runes such as SDs can be set here, for now only supports 1 targetrune
-- Example: {name = "sudden death rune", amount = 3, monsters = {'Demon'}},
-- name = rune name, amount = monster amount, monsters = monsters to consider
-- NOTE: FOR NOW ONLY WORKS FOR 1 TARGETRUNE AND IT NEEDS A MONSTERS PARAMETER!!!!
local targetRunes = {
{name = "holy missile rune", amount = 2, monsters = {'Ghoul'}}
}
-- Check for players, taken from Leonardo's scripts
local players = {
consider = true,
distance = 20,
safeList = {"Bubble", "Eternal Oblivion"},
floorDifference = 1
}
-- Set to true to use strong strikes
local strongStrike = true
-- DON'T EDIT BELOW THIS LINE IF YOU DON'T KNOW WHAT YOU'RE DOING --
--------------------------------------------------------------------
-- Directions to check
local shootDir = {'n', 'w', 's', 'e'}
-- Initial values for loop iteration
local quitLoop = 0
local exhaustTime = 0
local strongExhaustTime = 0
local countTries = 0
local areaCountLow = 10
local spellCountLow = 10
for i,j in pairs(spells) do
if spellCountLow > spells[i].amount then
spellCountLow = spells[i].amount
end
spells[i].monsters = spells[i].monsters or creatureNames
end
for i,j in pairs(areaRunes) do
if areaCountLow > areaRunes[i].amount then
areaCountLow = areaRunes[i].amount
end
areaRunes[i].monsters = areaRunes[i].monsters or creatureNames
end
for i,j in pairs(targetRunes) do
targetRunes[i].monsters = targetRunes[i].monsters or creatureNames
end
-- Prints
print('Started advanced paladin shooter.')
init end
auto(50, 100)
quitLoop = 0
-- Reset exhaust time if a new projectile is fired from your position to your target's position
if $lastprojectile.tox == $attacked.posx and $lastprojectile.toy == $attacked.posy and $lastprojectile.fromx == $posx and $lastprojectile.fromy == $posy then
exhaustTime = $timems
end
if $timems >= exhaustTime then
if not players.consider or paroundfloorignore(players.distance, players.floorDifference, unpack(players.safeList)) == 0 then
-- Spells
if maround(8) >= spellCountLow and spells[1] ~= nil then
for i,_ in pairs(spells) do
if cancastspell(spells[i].name) then
for j,_ in pairs(shootDir) do
if maroundspell(spells[i].name, shootDir[j], unpack(spells[i].monsters)) >= spells[i].amount then
pausewalking(100)
turn(shootDir[j])
cast(spells[i].name)
quitLoop = 1
end
end
end
end
end
-- Area Runes
if maround(8) >= areaCountLow and areaRunes[1] ~= nil and quitLoop ~= 1 then
for i,_ in pairs(areaRunes) do
runeArea = getarearunetile(false, unpack(areaRunes[i].monsters))
if runeArea.amount >= areaRunes[i].amount and itemcount(areaRunes[i].name) ~= 0 then
countTries = 0
pausewalking(500)
useitemon(areaRunes[i].name, 0, runeArea.tile)
wait(500)
countTries = 1
if $lastprojectile.time <= exhaustTime then
countTries = 2
end
quitLoop = 1
end
end
end
end
-- Targetrunes and strikes
if $attacked.id ~=0 and quitLoop == 0 then
if maround(7, unpack(targetRunes[1].monsters)) >= targetRunes[1].amount and itemcount(targetRunes[1].name) > 0 then
useoncreature(targetRunes[1].name, $target)
else
holyMod = tonumber(creatureinfo($attacked.name).holymod)
physicalMod = tonumber(creatureinfo($attacked.name).physicalmod)
if holyMod > physicalMod and holyMod > 90 then
if cancastspell('exori san') then
cast('exori san')
end
elseif physicalMod > 90 then
if strongStrike and cancastspell('exori gran con') then
cast('exori gran con')
strongExhaustTime = $timems + 5000
elseif cancastspell('exori con') then
cast('exori con')
end
end
end
end
-- Add exhaust time, takes into account if you missfire an area rune
exhaustTime = $timems + 1000 - countTries*500
end
PHP Code:
Versionlog:
1.0.0 - First release
1.0.1 - Counts runes now + paladin version added