Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_sets()
- -- Including this gives an easy way of defining cyclic/trigger/etc variables, makes handling self_commands easier.
- -- Motes also uses this, but this is completely independent from Motes
- include('Modes.lua')
- --[[ Every set has a comment that says how it's built up.
- Common terms:
- - (pot) means potency of the magic.
- - (macc) means magic accuracy of the magic.
- - OATM - on anything that matters (e.g. evasion is worth it on BLM for anything below your level, but not on anything that matters, like Dyna mobs or HNM)
- -
- Incomplete mage sets are filled up with:
- - Fast Caste and Haste gear, to reduce recast time.
- - Conserve MP gear, to conserve MP.
- - MP gear, so that you wouldn't lose max MP when casting this spell at max MP.
- ]]--
- -- Idle sets
- sets.idle={ -- REMAKE AS WELL THIS NEEDS NO MORE EVASION
- main = "Terra's Staff",
- sub = "Reign Grip",
- ammo = "Phtm. Tathlum",
- head = "Genie Tiara",
- body = "Dalmatica +1",
- hands = "River Gauntlets",
- legs = "Goliard Trews",
- feet = "Herald's Gaiters",
- neck = "Evasion Torque",
- waist = "Hierarch Belt",
- left_ear = "Triton Earring",
- right_ear = "Novia Earring",
- left_ring = "Shadow Ring",
- right_ring = "Defending Ring",
- back = "Umbra Cape",
- }
- -- Nuking sets
- -- Other magic sets
- sets.dark_magic = { -- Skill (pot/macc) > INT (macc)
- main = "Claustrum",
- sub = "Dark Grip",
- ammo = "Phtm. Tathlum",
- head = "Maat's Cap",
- body = "Nashira Manteel",
- hands = "Src. Gloves +1",
- legs = "Wizard's Tonban",
- feet = "Genie Huaraches",
- neck = "Dark Torque",
- waist = "Witch Sash",
- left_ear = "Incubus Earring +1",
- right_ear = "Incubus Earring +1",
- left_ring = "Galdr Ring",
- right_ring = "Omniscient Ring",
- back = "Merciful Cape",
- }
- sets.dark_magic.stun = set_combine(sets.dark_magic,{ -- Fast Cast = Haste
- sub ="Vivid Strap +1",
- head ="Walahra Turban",
- feet ="Rostrum Pumps",
- waist ="Headlong Belt",
- right_ear ="Loquac. Earring",
- back ="Veela Cape",
- })
- sets.healing_magic = { -- Cure Potency > 1MND = 3VIT = 5skill
- main ="Chatoyant Staff",
- sub ="Reign Grip",
- ammo ="Phtm. Tathlum",
- head ="Maat's Cap",
- body ="Mahatma Hpl.",
- hands ="Dvt. Mitts +1",
- legs ="Mahatma Slops",
- feet ="Mahatma Pigaches",
- neck ="Fylgja Torque +1",
- waist ="Pythia Sash +1",
- left_ear ="Roundel Earring",
- right_ear ="Celestial Earring",
- left_ring ="Celestial Ring",
- right_ring ="Celestial Ring",
- back ="Dew Silk Cape +1",
- }
- sets.enfeebling_magic = {}
- sets.enfeebling_magic.int = { -- Skill (macc) > INT (pot)
- main ="Claustrum",
- sub ="Reign Grip",
- ammo ="Phtm. Tathlum",
- head ="Genie Tiara",
- body ="Wzd. Coat +1",
- hands ="Bricta's Cuffs",
- legs ="Genie Lappas",
- feet ="Goliard Clogs",
- neck ="Enfeebling Torque",
- waist ="Witch Sash",
- left_ear ="Incubus Earring +1",
- right_ear ="Incubus Earring +1",
- left_ring ="Galdr Ring",
- right_ring ="Omniscient Ring",
- back ="Hecate's Cape",
- }
- sets.enfeebling_magic.mnd = { -- Skill (macc) > MND (pot)
- main ="Claustrum",
- sub ="Reign Grip",
- ammo ="Phtm. Tathlum",
- head ="Genie Tiara",
- body ="Wzd. Coat +1",
- hands ="Bricta's Cuffs",
- legs ="Genie Lappas",
- feet ="Goliard Clogs",
- neck ="Enfeebling Torque",
- waist ="Pythia Sash +1",
- left_ear ="Incubus Earring +1",
- right_ear ="Incubus Earring +1",
- left_ring ="Celestial Ring",
- right_ring ="Celestial Ring",
- back ="Hecate's Cape",
- }
- sets.enhancing_magic = { -- Skill (pot)
- main ="Claustrum",
- sub ="Vivid Strap +1",
- ammo ="Phtm. Tathlum",
- head ="Walahra Turban",
- body ="Goliard Saio",
- hands ="Zenith Mitts +1",
- legs ="Zenith Slacks +1",
- feet ="Genie Huaraches",
- neck ="Enhancing Torque",
- waist ="Pythia Sash +1",
- left_ear ="Augment. Earring",
- right_ear ="Loquac. Earring",
- left_ring ="Serket Ring",
- right_ring ="Defending Ring",
- back ="Merciful Cape",
- }
- sets.enhancing_magic.stoneskin = { -- MND (pot)
- main ="Alkalurops",
- sub ="Reign Grip",
- ammo ="Phtm. Tathlum",
- head ="Zenith Crown +1",
- body ="Mahatma Hpl.",
- hands ="Dvt. Mitts +1",
- legs ="Mahatma Slops",
- feet ="Mahatma Pigaches",
- neck ="Gnole Torque",
- waist ="Pythia Sash +1",
- left_ear ="Celestial Earring",
- right_ear ="Celestial Earring",
- left_ring ="Celestial Ring",
- right_ring ="Celestial Ring",
- back ="Dew Silk Cape +1",
- }
- -- No potency magic set
- sets.fastcasthaste = { -- Fast Caste = Haste (recast time)
- main ="Claustrum",
- sub ="Vivid Strap +1",
- ammo ="Phtm. Tathlum",
- head ="Walahra Turban",
- body ="Goliard Saio",
- hands ="Zenith Mitts +1",
- legs ="Zenith Slacks +1",
- feet ="Rostrum Pumps",
- neck ="Bloodbead Gorget",
- waist ="Headlong Belt",
- left_ear ="Merman's Earring",
- right_ear ="Loquac. Earring",
- left_ring ="Shadow Ring",
- right_ring ="Defending Ring",
- back ="Veela Cape",
- }
- -- Other
- sets.yellowHP = {
- head = "Zenith Crown +1",
- body = "Dalmatica +1",
- hands = "Zenith Mitts +1",
- legs = "Zenith Slacks +1",
- feet = "Zenith Pumps +1",
- back = "Ixion Cape",
- left_ring = "Serket Ring",
- right_ring = "Ether Ring"
- }
- sets.nukeDmg = {
- main = "Claustrum",
- sub = "Wise Strap",
- ammo = "Phtm. Tathlum",
- head = "Maat's Cap",
- body = "Genie Weskit",
- hands = "Zenith Mitts +1",
- legs = "Mahatma Slops",
- feet = "Shrewd Pumps",
- neck = "Lmg. Medallion +1",
- waist = "Witch Sash",
- left_ear = "Novio Earring",
- right_ear = "Moldavite Earring",
- left_ring = "Galdr Ring",
- right_ring = "Omniscient Ring",
- back = "Ixion Cape",
- }
- sets.nukeSkill = { -- only changes from nukeDmg
- head = "Src. Petasos +1",
- hands = "Wizard's Gloves",
- }
- sets.matching_day = {
- waist = "Hachirin-no-Obi",
- legs = "Src. Tonban +1"
- }
- sets.matching_dayweather = {
- waist = "Hachirin-no-Obi",
- }
- sets.fcast={ -- just fast caste for precast
- sub = "Vivid Strap +1",
- right_ear = "Loquac. Earring",
- feet = "Rostrum Pumps",
- back = "Veela Cape"
- }
- sets.fcasthaste={ -- fast cast and haste
- sub = "Vivid Strap +1",
- head = "Walahra Turban",
- waist = "Headlong Belt",
- body = "Goliard Saio",
- right_ear = "Loquac. Earring",
- feet = "Rostrum Pumps",
- back = "Veela Cape"
- }
- sets.int={
- main = "Claustrum",
- sub = "Bugard Strap +1",
- ammo = "Phtm. Tathlum",
- head = "Maat's Cap",
- body = "Mahatma Hpl.",
- hands = "Mahatma Cuffs",
- legs = "Mahatma Slops",
- feet = "River Gaiters",
- neck = "Lmg. Medallion +1",
- waist = "Witch Sash",
- left_ear = "Omn. Earring",
- right_ear = "Omn. Earring",
- left_ring = "Galdr Ring",
- right_ring = "Omniscient Ring",
- back = "Ixion Cape",
- }
- sets.mnd={
- main = "Claustrum",
- sub = "Reign Grip",
- ammo = "Phtm. Tathlum",
- head = "Zenith Crown +1",
- body = "Mahatma Hpl.",
- hands = "Dvt. Mitts +1",
- legs = "Mahatma Slops",
- feet = "Mahatma Pigaches",
- neck = "Gnole Torque",
- waist = "Pythia Sash +1",
- left_ear = "Celestial Earring",
- right_ear = "Celestial Earring",
- left_ring = "Celestial Ring",
- right_ring = "Celestial Ring",
- back = "Dew Silk Cape +1",
- }
- sets.rest={
- main = "Claustrum",
- sub = "Reign Grip",
- ammo = "Phtm. Tathlum",
- head = "Oracle's Cap",
- body = "Mahatma Hpl.",
- hands = "Oracle's Gloves",
- legs = "Oracle's Braconi",
- feet = "Goliard Clogs",
- neck = "Gnole Torque",
- waist = "Qiqirn Sash +1",
- left_ear = "Relaxing Earring",
- right_ear = "Antivenom Earring",
- left_ring = "Celestial Ring",
- right_ring = "Celestial Ring",
- back = "Invigorating Cape"
- }
- sets.melee = {
- head = "Optical Hat",
- body = "Hydra Doublet",
- hands = "Hydra Gloves",
- legs = "Hydra Brais",
- feet = "Hydra Gaiters",
- neck = "Ancient Torque",
- waist = "Virtuoso Belt",
- left_ear = "Pixie Earring",
- right_ear = "Brutal Earring",
- left_ring = "Toreador's Ring",
- right_ring = "Defending Ring",
- back = "Umbra Cape",
- }
- sets.weapons = {}
- sets.weapons.club = {
- main = "Kraken Club",
- sub = "Genbu's Shield",
- ammo = "White Tathlum",
- }
- sets.weapons.staff = {
- main = "Claustrum",
- sub = "Pole Grip",
- ammo = "White Tathlum",
- }
- sets.ws = {}
- sets.ws.gateoftartarus = {} -- full acc here, you only do it for the MP
- sets.ws.blackhalo = {}
- -- elemental grips
- sets.darkgrip = {sub='Dark Grip'}
- -- Variables
- clippingPlane = M{'1', '0.75', '0.5', '10', '5'} -- config ClippingPlane value
- end
- --[[********************************************************
- functions go here
- ********************************************************--]]
- -- equip our idle set
- function equip_idle()
- if melee then
- equip(sets.idle,sets.melee_weapons)
- else
- equip(sets.idle)
- end
- end
- -- equip our engaged set
- function equip_engaged()
- equip(sets.melee)
- end
- -- equip our ws set
- function equip_ws(name)
- if name == "Gate of Tartarus" then
- equip(sets.melee)
- end
- end
- -- equip our resting hMP set
- function equip_rest()
- equip(sets.rest)
- end
- function equip_heal(spell)
- -- Cures
- if spell.name:contains('Cure')
- or spell.name:contains('Cura') then
- equip(sets.healing_magic)
- -- Matching day
- if spell.element == world.day_element then
- addedmagicinfo = "on matching day"
- equip(sets.matching_dayweather) -- obi
- -- Matching day and weather
- if spell.element == world.weather_element then
- addedmagicinfo = "on matching day and weather"
- end
- -- Matching weather
- elseif spell.element == world.weather_element then
- addedmagicinfo = "in matching weather"
- equip(sets.matching_dayweather) -- obi
- end
- -- Other spells
- else
- equip(sets.fastcasthaste)
- end
- end
- function equip_enfeebling(spell)
- -- INT-based enfeebles
- if spell.name:contains('Poison')
- or spell.name:contains('Dia')
- or spell.name:contains('Sleep')
- or spell.name:contains('Blind')
- or spell.name == 'Dispel'
- or spell.name == 'Bind'
- or spell.name == 'Gravity' then
- equip(sets.enfeebling_magic.int)
- -- MND-based enfeebles
- else
- equip(sets.enfeebling_magic.mnd)
- end
- -- Dark grip for Sleep, Dispel and Blind
- if spell.name:contains('Sleep')
- or spell.name:contains('Blind')
- or spell.name == 'Dispel' then
- equip(sets.darkgrip)
- end
- end
- function equip_enhancing(spell)
- -- Stoneskin
- if spell.name == 'Stoneskin' then
- equip(sets.enhancing_magic.stoneskin) -- With 216 (200+16) skill and 450 being SN cap, you need 141 MND on BLM to get cap
- -- Barspells/enspells/phalanx
- elseif spell.name:contains('Bar')
- or spell.name:startswith('En')
- or spell.name:contains('Phalanx') then
- equip(sets.enhancing_magic)
- -- Other spells
- else
- equip(sets.fastcasthaste)
- end
- end
- function equip_nuke(spell)
- -- INT only for ele dots
- if spell.name == 'Burn'
- or spell.name == 'Frost'
- or spell.name == 'Choke'
- or spell.name == 'Rasp'
- or spell.name == 'Shock'
- or spell.name == 'Drown' then
- equip(sets.int)
- else
- -- informative variables
- local skill, obi, ugg, sorc, mpspent
- -- if nuke, potency or skill?
- if nukeDmg then
- equip(sets.nukeDmg)
- skill = "potency"
- else
- equip(sets.nukeDmg,sets.nukeSkill)
- skill = "skill"
- end
- -- check obi/tonban for matching day/weather
- if spell.element == world.day_element then
- equip(sets.matching_day)
- if spell.element == world.weather_element then
- obi = ", day, weather"
- else
- obi = ", day"
- end
- elseif spell.element == world.weather_element then
- obi = ", weather"
- equip(sets.matching_dayweather)
- else
- obi = ""
- end
- -- check MP for ugg. pendant
- if (player.sub_job == 'RDM' and player.mp < 426) or
- (player.sub_job == 'WHM' and player.mp < 435) or
- ((player.sub_job ~= 'RDM' and player.sub_job ~= 'WHM') and player.mp < 395) then
- -- you cannot use percentage of MP gear since it uses idle gear (or precast, idk) as current MP amount
- -- so just use your nuking set's total MP divided by 2
- equip({neck="Uggalepih Pendant"})
- ugg = ", ugg"
- else
- ugg = ""
- end
- -- sorc. ring
- if player.hpp < 76 then
- equip({ring2 = "Sorcerer's Ring"})
- yellowHP = false
- sorc = ", sorc"
- else
- sorc = ""
- end
- -- informative text
- addedmagicinfo = skill .. obi .. ugg .. sorc
- end
- end
- function equip_dark(spell)
- -- Stun
- if spell.name == 'Stun' then
- equip(sets.dark_magic.stun)
- -- Other spells
- else
- equip(sets.dark_magic)
- -- Obi/legs/ring for Drain/Aspir
- if spell.name == 'Aspir' or spell.name == 'Drain' then
- -- Matching day
- if spell.element == world.day_element then
- addedmagicinfo = "on matching day"
- equip(sets.matching_day) -- legs and obi
- equip({right_ring="Diabolos's Ring"}) -- ring
- -- Matching day and weather
- if spell.element == world.weather_element then
- addedmagicinfo = "on matching day and weather"
- end
- -- Matching weather
- elseif spell.element == world.weather_element then
- addedmagicinfo = "in matching weather"
- equip(sets.matching_dayweather) -- obi
- end
- end
- end
- end
- -- equip yellow HP set for a split second, then go back to idle set to trigger yellow
- function equip_yellow()
- equip(sets.yellowHP)
- send_command('wait .1;gs equip idle')
- end
- -- the choose_set function figures out whether we're engaged with a
- -- mob or not, and passes control to the relevant function above.
- function choose_set()
- if player.status == "Engaged" then
- equip_engaged()
- else
- equip_idle()
- end
- end
- --[[ ******************************************************
- Casting functions - these functions run automatically when
- we cast a spell, use a job ability, rest for MP, and so on
- ****************************************************** --]]
- -- prior to using our ability
- function precast(spell)
- if spell.type == 'WeaponSkill' then
- equip_ws(spell.name)
- elseif spell.action_type == 'Magic' then
- equip(sets.fcast)
- end
- -- cancellations for your pleasure
- if spell.name == "Sneak" or spell.name == "Spectral Jig" then send_command("cancel sneak"); end
- if spell.name == "Stoneskin" then send_command("wait 4;cancel stoneskin"); end
- if spell.name == "Reraise" then send_command("cancel reraise"); end
- if spell.name == "Blink" then send_command("wait 4;cancel blink"); end
- if spell.name == "Aquaveil" then send_command("wait 4;cancel aquaveil"); end
- if spell.name == "Ice Spikes" then send_command("cancel Ice spikes"); end
- if spell.name == "Shock Spikes" then send_command("cancel shock spikes"); end
- if spell.name == "Phalanx" then send_command("cancel phalanx"); end
- end
- -- the midcast function swaps in a new set of gear during
- -- the cast, which will make the spell effect more potent.
- function midcast(spell)
- mpcost = tostring(spell.mp_cost)
- addedmagicinfo = ""
- showmagicinfo = true
- if spell.skill == 'Healing Magic' then
- equip_heal(spell)
- magicinfocolor = 50
- elseif spell.skill == 'Enfeebling Magic' then
- equip_enfeebling(spell)
- magicinfocolor = 7
- elseif spell.skill == 'Enhancing Magic' then
- equip_enhancing(spell)
- showmagicinfo = false
- magicinfocolor = 0
- elseif spell.skill == 'Elemental Magic' then
- equip_nuke(spell)
- magicinfocolor = 3 -- 166
- elseif spell.skill == 'Dark Magic' then
- equip_dark(spell)
- magicinfocolor = 207
- else
- showmagicinfo = false
- end
- if showmagicinfo then
- -- align text
- if string.len(mpcost) == 1 then
- mpcost = ' *** ' .. mpcost
- elseif string.len(mpcost) == 2 then
- mpcost = ' ** ' .. mpcost
- elseif string.len(mpcost) == 3 then
- mpcost = ' * ' .. mpcost
- end
- -- display text
- if addedmagicinfo == "" then
- windower.add_to_chat(magicinfocolor,mpcost .. " MP \t" .. spell.name)
- else
- windower.add_to_chat(magicinfocolor,mpcost .. " MP \t" .. spell.name .. ": " .. addedmagicinfo)
- end
- end
- end
- -- after we use an ability, put on either our engaged or
- -- idle sets.
- function aftercast(spell)
- choose_set()
- end
- -- when we engage or disengage, sit or stand, put on the
- -- correct set of gear.
- -- the status_change function runs automatically whenever we
- -- engage, disengage, kneel, or stand. As a RDM we use this
- -- to equip our +hMP gear when we /heal, and return to our
- -- idle gear when we stand up.
- function status_change(new,old)
- if new == 'Resting' then
- equip_rest()
- else
- choose_set()
- end
- end
- -- this posts into chatlog what buffs are added to and removed from you
- --[[
- function buff_change(name,gain)
- if gain == true then
- windower.add_to_chat(050, '['.. name ..' Applied!]')
- elseif gain == false then
- windower.add_to_chat(050, '['.. name ..' Has Fallen!]')
- end
- end ]]--
- function self_command(command)
- if command == "melee" then
- if melee == false then
- melee = true
- choose_set()
- equip(sets.idle,sets.weapons.staff)
- if player.status == "Engaged" then
- equip(sets.melee)
- end
- disable('main')
- disable('sub')
- disable('range')
- disable('ammo')
- windower.add_to_chat(005,'[>> Melee stance]')
- else
- melee = false
- enable('main')
- enable('sub')
- enable('range')
- enable('ammo')
- choose_set()
- equip(sets.idle)
- windower.add_to_chat(005,'[>> Mage stance]')
- end
- elseif command == "nukeDmg" then
- if nukeDmg == false then
- nukeDmg = true
- windower.add_to_chat(005,'[>> Potency nukes]')
- else
- nukeDmg = false
- windower.add_to_chat(005,'[>> Skill nukes]')
- end
- elseif command == "toyellowHP" then
- equip_yellow()
- elseif command == "clippingPlane" then
- clippingPlane:cycle()
- send_command('input //config ClippingPlane ' .. clippingPlane.value)
- windower.add_to_chat(122,"ClippingPlane: " .. clippingPlane.current)
- end
- end
- --[[ ******************************************************
- Code that runs once, when we first swap to our blm job
- ****************************************************** --]]
- melee = false
- nukeDmg = true
- -- puts on our fashion set, lockstyle it, then switch to our idle set.
- send_command('wait 1;gs equip idle;wait 1;input /macro book 2;wait 2;input /lockstyleset 3;wait 3; input /cm u')
- -- !setplayermodel 337 4 Monka -- Chelona Hat
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement