--[[
Skills2 0.4.2 - Original Author: Blasty
Maintained for RedGuides by Blasty 2022-07-08
Purpose: The Lua script will help you level up almost all your skills (Active, Passive and spell)
Feature: Will auto increase most of your skills, meditate when needed and stop when finished
]]
local mq = require('mq')
local SPA = false
local SAA = false
local SBEG = false
local SS = false
local SSAFE = false
-- UseMerc: If you want to use a Merc set to "true" (recommended)
local UseMerc = false
local castingskills = {'Abjuration','Alteration','Conjuration','Divination','Evocation'}
local memspells = function (skills) end
mq.delay(1000)
mq.cmd('/mqclear')
mq.cmd.echo('Running Lua Skills2 0.4.2 by Blasty')
mq.cmd.echo('If you like the script make sure to give some RedCent to the author: Blasty')
local PrePACheck = function ()
if mq.TLO.Me.Skill('sneak')() and not mq.TLO.Me.AbilityReady('sneak')() then mq.cmd('/doability "sneak"') end
if mq.TLO.Me.Skill('hide')() and not mq.TLO.Me.AbilityReady('hide')() then mq.cmd('/doability "hide"') end
end
local PassiveAbility = function ()
if not mq.TLO.Me.Standing() then mq.cmd('/stand') end
if mq.TLO.Me.Skill('forage')() and mq.TLO.Me.AbilityReady('forage')() and mq.TLO.Me.Skill('forage')() < mq.TLO.Skill('forage').SkillCap() then mq.cmd('/doability "forage"') end
if mq.TLO.Me.Skill('mend')() and mq.TLO.Me.AbilityReady('mend')() and mq.TLO.Me.Skill('mend')() < mq.TLO.Skill('mend').SkillCap() then mq.cmd('/doability "mend"') end
if mq.TLO.Me.Skill('sneak')() and mq.TLO.Me.AbilityReady('sneak')() and mq.TLO.Me.Skill('sneak')() < mq.TLO.Skill('sneak').SkillCap() then
mq.cmd('/doability "sneak"')
mq.delay(1000)
mq.cmd('/doability "sneak"')
end
if mq.TLO.Me.Skill('hide')() and mq.TLO.Me.AbilityReady('hide')() and mq.TLO.Me.Skill('hide')() < mq.TLO.Skill('hide').SkillCap() then
mq.cmd('/doability "hide"')
mq.delay(1000)
mq.cmd('/doability "hide"')
end
if mq.TLO.Me.Skill('feign death')() and mq.TLO.Me.AbilityReady('feign death')() and mq.TLO.Me.Skill('feign death')() < mq.TLO.Skill('feign death').SkillCap() then
mq.cmd('/doability "feign death"')
mq.delay(500)
mq.cmd('/stand')
end
if mq.TLO.Me.Skill('tracking')() and mq.TLO.Me.AbilityReady('tracking')() and mq.TLO.Me.Skill('tracking')() < mq.TLO.Skill('tracking').SkillCap() then
mq.cmd('/doability "tracking"')
mq.delay(500)
if mq.TLO.Window('TrackingWnd').Child('TRW_DoneButton')() then mq.cmd('/notify TrackingWnd TRW_DoneButton leftmouseup') end
end
while mq.TLO.Cursor.ID() do
--mq.cmd('/destroy')
mq.cmd('/autoinv')
mq.delay(100)
end
if mq.TLO.Me.Skill('tracking')() >= mq.TLO.Skill('tracking').SkillCap() and mq.TLO.Me.Skill('feign death')() >= mq.TLO.Skill('feign death').SkillCap() and mq.TLO.Me.Skill('hide')() >= mq.TLO.Skill('hide').SkillCap() and mq.TLO.Me.Skill('sneak')() >= mq.TLO.Skill('sneak').SkillCap() and mq.TLO.Me.Skill('mend')() >= mq.TLO.Skill('mend').SkillCap() and mq.TLO.Me.Skill('forage')() >= mq.TLO.Skill('forage').SkillCap() then
mq.cmd.echo('All passive skills are maxed!')
SPA = false
end
end
local CheckMerc = function ()
if mq.TLO.Me.Mercenary() ~= 'ACTIVE' then
mq.cmd('/multiline ; /beep ; /beep ; /beep ;')
mq.cmd.echo('\ar You do not have a Merc up! \ax Unsuspend your Merc and try again ')
SAA = false
return false
end
if mq.TLO.Target.Type() ~= 'Mercenary' and mq.TLO.Group.Members() then
for i=1,mq.TLO.Group.Members() do
if (mq.TLO.Group.Member(i).Mercenary()) then
local MercID = mq.TLO.Group.Member(i).ID()
mq.cmd('/target id '..MercID)
mq.cmd('/nav target')
mq.delay(1000)
end
end
end
mq.cmd('/face')
return true
end
local ActiveAbility = function ()
if UseMerc then
if not CheckMerc() then do return end end
end
if mq.TLO.Target.ID() and mq.TLO.Target.Distance() >= 12 then mq.cmd('/nav target') end
if mq.TLO.Me.Skill('kick')() and mq.TLO.Me.AbilityReady('kick')() and mq.TLO.Me.Skill('kick')() < mq.TLO.Skill('kick').SkillCap() then mq.cmd('/doability "kick"') end
if mq.TLO.Me.Skill('flying kick')() and mq.TLO.Me.AbilityReady('flying kick')() and mq.TLO.Me.Skill('flying kick')() < mq.TLO.Skill('flying kick').SkillCap() then mq.cmd('/doability "flying kick"') end
if mq.TLO.Me.Skill('frenzy')() and mq.TLO.Me.AbilityReady('frenzy')() and mq.TLO.Me.Skill('frenzy')() < mq.TLO.Skill('frenzy').SkillCap() then mq.cmd('/doability "frenzy"') end
if mq.TLO.Me.Skill('slam')() and mq.TLO.Me.AbilityReady('slam')() and mq.TLO.Me.Skill('bash')() < mq.TLO.Skill('bash').SkillCap() then mq.cmd('/doability "slam"') end
if mq.TLO.Me.Skill('round kick')() and mq.TLO.Me.AbilityReady('round kick')() and mq.TLO.Me.Skill('round kick')() < mq.TLO.Skill('round kick').SkillCap() then mq.cmd('/doability "round kick"') end
if mq.TLO.Me.Skill('tiger claw')() and mq.TLO.Me.AbilityReady('tiger claw')() and mq.TLO.Me.Skill('tiger claw')() < mq.TLO.Skill('tiger claw').SkillCap() then mq.cmd('/doability "tiger claw"') end
if mq.TLO.Me.Skill('Taunt')() and mq.TLO.Me.AbilityReady('Taunt')() and mq.TLO.Me.Skill('Taunt')() < mq.TLO.Skill('Taunt').SkillCap() then mq.cmd('/doability "Taunt"') end
if mq.TLO.Me.Skill('Disarm')() and mq.TLO.Me.AbilityReady('Disarm')() and mq.TLO.Me.Skill('Disarm')() < mq.TLO.Skill('Disarm').SkillCap() then mq.cmd('/doability "Disarm"') end
if mq.TLO.Me.Skill('Backstab')() and mq.TLO.Me.AbilityReady('Backstab')() and mq.TLO.Me.Skill('Backstab')() < mq.TLO.Skill('Backstab').SkillCap() then mq.cmd('/doability "Backstab"') end
if mq.TLO.Me.Skill('bash')() and mq.TLO.Me.AbilityReady('bash')() and mq.TLO.Me.Skill('bash')() < mq.TLO.Skill('bash').SkillCap() and mq.TLO.InvSlot('offhand').Item.Type.Find('shield') then mq.cmd('/doability "bash"') end
if mq.TLO.Me.Skill('bash')() >= mq.TLO.Skill('bash').SkillCap() and mq.TLO.Me.Skill('Backstab')() >= mq.TLO.Skill('Backstab').SkillCap() and mq.TLO.Me.Skill('Disarm')() >= mq.TLO.Skill('Disarm').SkillCap() and mq.TLO.Me.Skill('Taunt')() >= mq.TLO.Skill('Taunt').SkillCap() and mq.TLO.Me.Skill('tiger claw')() >= mq.TLO.Skill('tiger claw').SkillCap() and mq.TLO.Me.Skill('round kick')() >= mq.TLO.Skill('round kick').SkillCap() and mq.TLO.Me.Skill('frenzy')() >= mq.TLO.Skill('frenzy').SkillCap() and mq.TLO.Me.Skill('flying kick')() >= mq.TLO.Skill('flying kick').SkillCap() and mq.TLO.Me.Skill('kick')() >= mq.TLO.Skill('kick').SkillCap() then
mq.cmd.echo('All active skills are maxed!')
SAA = false
end
end
local Begging = function ()
if mq.TLO.Me.Skill('Begging')() >= mq.TLO.Skill('Begging').SkillCap() then
if mq.TLO.Zone.ID() == 383 then
mq.cmd.echo('Begging is maxed out! returning to POK')
mq.cmd('/travelto "The Plane of Knowledge"')
else
mq.cmd.echo('Begging is maxed out!')
end
SBEG = false
do return end
end
if mq.TLO.Zone.ID() and mq.TLO.Zone.ID() ~= 383 then
mq.cmd('/travelto "Freeportwest"')
end
while mq.TLO.Navigation.Active() or mq.TLO.Me.Zoning() do
mq.delay(3000)
end
if mq.TLO.Zone.ID() == 383 then
mq.cmd('/target Diggs')
if mq.TLO.Target.Distance() >= 12 then
mq.cmd('/nav locxy 132 -120')
while mq.TLO.Navigation.Active() do
mq.delay(1000)
end
mq.cmd('/nav target')
while mq.TLO.Navigation.Active() do
mq.delay(1000)
end
end
if mq.TLO.Me.Skill('Begging')() and mq.TLO.Me.AbilityReady('Begging')() and mq.TLO.Me.Skill('Begging')() < mq.TLO.Skill('Begging').SkillCap() then mq.cmd('/doability "Begging"') end
end
end
local CursorCheck = function()
while mq.TLO.Cursor.ID() do
--mq.cmd('/destroy')
mq.cmd('/autoinv')
mq.delay(100)
end
end
local InitIniFile = function ()
if not mq.TLO.Ini('Skills2.ini',mq.TLO.Me.Class(),'Abjuration')() or not mq.TLO.Ini('Skills2.ini',mq.TLO.Me.Class(),'Alteration')() or not mq.TLO.Ini('Skills2.ini',mq.TLO.Me.Class(),'Conjuration')() or not mq.TLO.Ini('Skills2.ini',mq.TLO.Me.Class(),'Divination')() or not mq.TLO.Ini('Skills2.ini',mq.TLO.Me.Class(),'Evocation')() then
mq.cmd.echo('Creating Ini file...')
if mq.TLO.Me.Class() == 'Beastlord' then
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Abjuration" "Endure Cold"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Alteration" "Salve"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Conjuration" "Summon Drink"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Divination" "Sense Animals"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Evocation" "Blast of Frost"')
end
if mq.TLO.Me.Class() == 'Cleric' then
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Abjuration" "Endure Poison"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Alteration" "Minor Healing"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Conjuration" "Halo of Light"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Divination" "True North"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Evocation" "Strike"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "PrimarySpecialisation" "Alteration"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "SecondarySpecialisation" "Abjuration"')
end
if mq.TLO.Me.Class() == 'Druid' then
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Abjuration" "Skin like Wood"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Alteration" "Minor Healing"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Conjuration" "Summon Food"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Divination" "Camouflage"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Evocation" "Burst of Fire"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "PrimarySpecialisation" "Alteration"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "SecondarySpecialisation" "Conjuration"')
end
if mq.TLO.Me.Class() == 'Enchanter' then
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Abjuration" "Minor Shielding"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Alteration" "Strengthen"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Conjuration" "Mesmerize"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Divination" "True North"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Evocation" "Chaotic Feedback"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "PrimarySpecialisation" "Alteration"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "SecondarySpecialisation" "Conjuration"')
end
if mq.TLO.Me.Class() == 'Necromancer' then
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Abjuration" "Minor Shielding"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Alteration" "Lifetap"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Conjuration" "Coldlight"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Divination" "True North"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Evocation" "Word of Shadow"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "PrimarySpecialisation" "Alteration"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "SecondarySpecialisation" "Conjuration"')
end
if mq.TLO.Me.Class() == 'Magician' then
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Abjuration" "Minor Shielding"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Alteration" "Renew Elements"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Conjuration" "Summon Brass Choker"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Divination" "True North"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Evocation" "Burst of Flame"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "PrimarySpecialisation" "Evocation"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "SecondarySpecialisation" "Conjuration"')
end
if mq.TLO.Me.Class() == 'Paladin' then
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Abjuration" "Courage"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Alteration" "Salve"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Conjuration" "Hammer of Wrath"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Divination" "True North"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Evocation" "Cease"')
end
if mq.TLO.Me.Class() == 'Ranger' then
mq.cmd.echo('Starting')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Abjuration" "Endure Fire"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Alteration" "Salve"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Conjuration" "Dance of the Fireflies"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Divination" "Glimpse"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Evocation" "Ignite"')
end
if mq.TLO.Me.Class() == 'Shadow Knight' then
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Abjuration" "Endure Cold"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Alteration" "Siphon Strength"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Conjuration" "Disease Cloud"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Divination" "Sense the Dead"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Evocation" "Ward Undead"')
end
if mq.TLO.Me.Class() == 'Shaman' then
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Abjuration" "Endure Cold"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Alteration" "Minor Healing"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Conjuration" "Summon Drink"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Divination" "True North"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Evocation" "Burst of Flame"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "PrimarySpecialisation" "Alteration"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "SecondarySpecialisation" "Conjuration"')
end
if mq.TLO.Me.Class() == 'Wizard' then
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Abjuration" "Minor Shielding"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Alteration" "Root"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Conjuration" "Halo of Light"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Divination" "True North"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "Evocation" "Blast of Cold"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "PrimarySpecialisation" "Evocation"')
mq.cmd('/ini "Skills2.ini" "'.. mq.TLO.Me.Class() .. '" "SecondarySpecialisation" "Abjuration"')
end
mq.cmd('/ini "Skills2.ini" "Focus Specialize skill" "Specialize"')
mq.cmd('/ini "Skills2.ini" "Focus Specialize skill" "Note" "Define:Abjuration,Alteration,Conjuration,Divination, Evocation (only one skill) or leave it empty to skip focus"')
mq.cmd.echo('Ini file created')
end
end
memspells = function (skills)
local ValidatesOk = true
local wait = function (i)
while not mq.TLO.Me.SpellReady(i)() do
mq.delay(100)
end
end
for i=1, #skills do
if mq.TLO.Me.Gem(i)() ~= mq.TLO.Ini('Skills2.ini',mq.TLO.Me.Class(),skills[i])() then
if mq.TLO.Me.Book(mq.TLO.Ini('Skills2.ini',mq.TLO.Me.Class(),skills[i])())() then
mq.cmd('/memspell '..i..' "'..mq.TLO.Ini('Skills2.ini',mq.TLO.Me.Class(),skills[i])())
wait(i)
else
print('\arMissing spell: '..mq.TLO.Ini('Skills2.ini',mq.TLO.Me.Class(),skills[i])())
mq.cmd('/beep')
ValidatesOk = false
end
end
end
if not ValidatesOk then mq.cmd('/lua stop Skills2') end
if not mq.TLO.Me.Standing() then mq.cmd('/stand') end
end
local CastSpells = function (skills)
local run = false
local CastSkill
if mq.TLO.Me.PctMana() < 10 then
mq.cmd.echo('Low on mana - medding to 100%')
mq.cmd('/sit')
while mq.TLO.Me.PctMana() < 99 do
mq.delay(10000)
end
end
if UseMerc then
if not CheckMerc() then
SS = false
return false
end
end
if mq.TLO.Target.ID()<=0 then
print('\arWarning! A target is needed for some spells')
mq.cmd('/beep')
end
for i=1, #skills do
if skills[i] == 'Abjuration' then
specName = 'Abjure'
else specName = skills[i]
end
-- print("School: ", skills[i], " ", mq.TLO.Me.Skill(skills[i])(), " / ", mq.TLO.Me.SkillCap(skills[i])(),
-- " Specialization ", mq.TLO.Me.Skill('Specialize '..specName)(), " / ", mq.TLO.Me.SkillCap('Specialize '..specName)())
if mq.TLO.Me.Skill(skills[i])() < mq.TLO.Skill(skills[i]).SkillCap() or
-- mq.TLO.Me.SkillCap('Specialize '..specName)() <= 0) or
mq.TLO.Me.Skill('Specialize '..specName)() < mq.TLO.Me.SkillCap('Specialize '..specName)() then
mq.cmd('/cast "'.. mq.TLO.Ini('Skills2.ini',mq.TLO.Me.Class(),skills[i])() ..'"')
while mq.TLO.Me.Casting() do
mq.delay(100)
end
mq.delay(1500)
CursorCheck()
run = true
end
end
if not run then
SS = false
mq.cmd.echo('\ayAll spell abilities and specialize abilities are \a-gmaxed \ayout...')
end
end
local TrainSpells = function()
local SkillsToTrain
InitIniFile()
local primarySpec = mq.TLO.Ini('Skills2.ini', mq.TLO.Me.Class(), 'PrimarySpecialisation')()
local secondSpec = mq.TLO.Ini("Skills2.ini", mq.TLO.Me.Class(), "SecondarySpecialisation")()
-- print("Character is a level ",mq.TLO.Me.Level(), " ", mq.TLO.Me.Class())
-- print("Primary spec in ini is ", mq.TLO.Ini('Skills2.ini', mq.TLO.Me.Class(), 'PrimarySpecialisation'))
-- print("Secondary spec in ini is ", mq.TLO.Ini("Skills2.ini", mq.TLO.Me.Class(), "SecondarySpecialisation"))
-- print("Char has points spent in Secondary Forte: ",mq.TLO.Me.AltAbility('Secondary Forte').PointsSpent())
local primarySpecName
-- for skillcaps on specializations, we use mq.TLO.Me.SkillCap() rather than mq.TLO.Skill().SkillCap
-- because the cap in general at a level is different to the cap for a particular character at a level
-- due to how EQ changes caps based on your specialization.
if primarySpec ~= nil then
primarySpecName = 'Specialize '..primarySpec
if primarySpec == 'Abjuration' then primarySpecName = 'Abjure' end
-- print("skillcap of primarySpec: ", primarySpecName, " : ", mq.TLO.Me.SkillCap(primarySpecName)())
if mq.TLO.Me.SkillCap(primarySpecName)() == 0 then
primarySpec = nil
primarySpecName = nil
-- print("char has no spec skill")
end
else
primarySpec = nil
primarySpecName = nil
end
-- print("Effective Primary spec name is ", primarySpecName)
local secondSpecName
if secondSpec then
secondSpecName= 'Specialize '..secondSpec
if secondSpec == 'Abjuration' then secondSpecName = 'Specialize Abjure' end
-- print('secondspecname = ', secondSpecName, '; ', mq.TLO.Me.Skill(secondSpecName)(), "/", mq.TLO.Me.SkillCap(secondSpecName)())
if mq.TLO.Me.SkillCap(secondSpecName)() <= 0 or
mq.TLO.Me.AltAbility('Secondary Forte').PointsSpent() <=0 then
secondSpec = nil
secondSpecName = nil
end
end
-- print("Effective Secondary spec name is ", secondSpecName)
if primarySpec ~= nil then
-- print('primaryspec not nil')
if mq.TLO.Me.Skill(primarySpecName)() < mq.TLO.Me.SkillCap(primarySpecName)() - 40 then
-- print('primary spec needs training - skillstotrain is primary: ',primarySpec)
SkillsToTrain = {primarySpec}
elseif secondSpecName ~= nil then
-- print('secondspec not nill')
if mq.TLO.Me.Skill(secondSpecName)() < mq.TLO.Me.SkillCap(secondSpecName)() - 40 then
-- print('Train primary and secondary skills - ', primarySpec, ' & ', secondarySpec)
SkillsToTrain= {primarySpec, secondSpec}
else
-- print("Let's train them all")
SkillsToTrain = castingskills
end
end
else
-- print("Let's train them all")
SkillsToTrain = castingskills
end
-- print('castingskills is length ',#castingskills)
-- print('SkillsToTrain is length ', #SkillsToTrain)
-- print('{PrimarySpec} is ',{primarySpec},' , length ', #{primarySpec})
-- for i = 1 , #SkillsToTrain do print("Training ", SkillsToTrain[i]) end
memspells(SkillsToTrain)
CastSpells(SkillsToTrain)
end
local safefall = function ()
if not mq.TLO.Me.Skill('Safe fall')() then
print('\ar You do not have Safefall as a skill- Ending safefall')
SSAFE = false
do return end
end
if mq.TLO.Me.Skill('Safe fall')() >= mq.TLO.Skill('Safe fall').SkillCap() then
print('Safefall is maxed out!')
SSAFE = false
do return end
end
if mq.TLO.Zone.ID() ~= 202 then
mq.cmd('/travel "POKnowledge"')
while mq.TLO.Navigation.Active() or mq.TLO.Me.Zoning() do
mq.delay(3000)
end
end
if mq.TLO.Zone.ID() == 202 then
mq.cmd('/nav locxyz 803 -376 -96')
while mq.TLO.Navigation.Active() do
mq.delay(100)
end
mq.cmd('/nomodkey /keypress forward hold')
mq.delay(1200)
mq.cmd('/nomodkey /keypress forward')
end
end
mq.bind('/SSAFE', function()
SSAFE = true
mq.cmd.echo('\ayDoing Safefall. Please note that this will take you to POK.')
end)
mq.bind('/SPA', function()
SPA = true
mq.cmd.echo('\ayDoing passive skills...')
end)
mq.bind('/SAA', function()
SAA = true
mq.cmd.echo('\ayDoing active skills...')
if not UseMerc then
mq.cmd.echo('Note: Make sure to have a target to skill up on (Damage etc)')
end
end)
mq.bind('/SBEG', function()
SBEG = true
mq.cmd.echo('\ayDoing begging. Please note that this will take you to West Freeport and return to POK once done!')
end)
mq.bind('/SS', function()
SS = true
mq.cmd.echo('\ayDoing skills for spells...')
if not UseMerc then
mq.cmd.echo('Note: Make sure to have a target to skill up on (Damage etc)')
end
end)
mq.bind('/SDA', function()
SPA = true
SAA = true
SS = true
mq.cmd.echo('\ayDoing all skills (Begging excluded')
end)
mq.bind('/StopS', function()
SPA = false
SAA = false
SS = false
SSAFE = false
mq.cmd.echo('\ayStopping after this round...')
end)
mq.cmd.echo('')
mq.cmd.echo('\a-gTo max out all passive skills like Forage, Mend...: \ay/SPA')
mq.cmd.echo('\a-gTo max out all active skills like Kick, Backstab...: \ay/SAA')
mq.cmd.echo('\a-gTo max out all spells abilities like Alteration, Conjuration...: \ay/SS')
mq.cmd.echo('\a-gTo max out begging: \ay/SBEG')
mq.cmd.echo('\a-gTo max out safefall: \ay/SSAFE')
mq.cmd.echo('\a-gTo max all skills: \ay/SDA \a-g (Begging and Safefall excluded)')
mq.cmd.echo('\a-gStopping everything.: \ay/StopS')
mq.cmd.echo('')
-- pre check for rouges
PrePACheck()
while true do
-- Waiting for inputs...
if SPA then PassiveAbility() end
if SAA then ActiveAbility() end
if SS then TrainSpells() end
if SBEG then Begging() end
if SSAFE then safefall() end
mq.delay(1000)
end