Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_sets()
- ------------------- JA Sets ----------------------
- -- Any JA you want a specific set for, enter it in here.
- -- For example, if there was, for some reason, a specific set of equipment
- -- you wanted to wear for activating Divine Seal, you would add a set named
- -- sets.JA['Divine Seal']
- -- If the JA is a single word, like Benediction, the [' '] is not needed
- -- and you can simply do sets.JA.Benediction
- sets.JA = {}
- ------------------ Idle Sets ---------------------
- -- Your idle set is the set which you will wear at all times when you are not engaged in combat
- -- and by engaged I mean weapon out and attacking.
- -- The Resting set is a secondary set of gear which will be applied over your Idle set
- -- when you rest, so you can swap in +MP/HP regained while healing gear, or the like, there
- -- The Idle Set is where you'd also want to add stuff like Sheltered Ring, Wiglen Torque,
- -- or any other +refresh/regen piece.
- sets.Idle = {main="Tamaxchi", sub="Sors Shield", ammo="Impatiens",
- head="Gendewitha Caubeen +1", neck="Nuna Gorget +1", ear1="Roundel Earring",ear2="Brachyura Earring",
- body="Gendewitha Bliaut +1",hands="Yaoyotl gloves",ring1="Sirona's Ring",ring2="Defending Ring",
- back="Swith Cape",waist="Witful Belt",legs="Gendewitha Spats +1",feet="Gendewitha Galoshes +1"}
- sets.Resting = {}
- ------------------- TP Sets ----------------------
- -- TP sets are various sets of gear you want to wear in combat.
- -- I have no idea if you have a specific set of 'combat WHM' gear you'd like to use
- -- and am merely leaving these in here as they are part of my template.
- -- the "Normal" set is the base set. The other ones (ACC, EVA, etc) are applied over it
- sets.TP = {}
- sets.TP.index = {'Normal','Accuracy','Evasion','PDT','MDT','DT'}
- TP_ind = 1
- sets.TP.Normal = {}
- sets.TP.Accuracy = {}
- sets.TP.Evasion = {}
- sets.TP.PDT = {}
- sets.TP.MDT = {}
- sets.TP.DT = {}
- ------------------- WS Sets ----------------------
- -- Any WS-specific gear goes here. You'd need to make a set for each WS
- -- sets.WS.Dagan, sets.WS.Hexastrike, etc
- sets.WS = {}
- ------------------- MA Sets ----------------------
- -- Sets for spells go here. Precast is gear that will be swapped in before ANY spellcasting
- -- The Cure set will be swapped in before Cure/Curaga/Cura spells are cast, and ON TOP
- -- of the generalized Precast set.
- -- The Enhancing set would be where you'd want to stick any +enhancing gear for spells that are
- -- affected by it.
- -- The Regen set is special in that it will be activated whenever you cast any regen spell.
- -- Other than that, you can specify specific gear sets for specific spells, such as Cursna has below
- sets.MA = {}
- sets.MA.Precast = {}
- sets.MA.Precast.Cure = {}
- sets.MA.Enhancing = {}
- sets.MA.Cursna = {ring2="Haoma's Ring",neck="Malison Medallion"}
- sets.MA.Regen = {}
- sets.MA.Cure = {main="Tamaxchi", sub="Sors Shield"}
- sets.MA.Enfeebling = {main="Twebuliij", sub="Achaq Grip", neck="Nuna Gorget +1", head="Kaabnax Hat",
- body="Artsieq Jubbah", ear1="Lifestorm Earring",ear2="Psystorm Earring", ring1="Strendu Ring",
- legs="Hagondes pants +1", feet="Uk'uxkaj boots"}
- sets.MA.Elemental = {head="Hagondes Hat +1", neck="Quanpur necklace", ear1="Friomisi Earring", ear2="Hecate's Earring",
- body="Artsieq Jubbah", ring1="Strendu Ring", legs="Hagondes pants +1"}
- ----------------- Vanity Sets --------------------
- --If you have some costume set you want equipped whenever you zone before stylelock is
- --automatically applied, put it here.
- sets.Vanity = {}
- --This tells windower to call the 'equip_vanity' function whenever a zone change is detected.
- --This does not fire on logging in, as that is not a 'zone change'.
- windower.register_event('Zone change', equip_vanity)
- end
- function equip_vanity()
- equip(sets.Idle, sets.Vanity)
- send_command('@wait 5; input /lockstyle on;')
- send_command('@wait 7; gs c equip Idle set')
- end
- -- Gearswap considers everything, from JAs to WSes to actuall spells, to be 'spells' for the purposes of
- -- the precast, midcast, and aftercast functions. There are a couple of ways to determine what is actually being
- -- 'cast'. One of them is to check the prefix. Below, to catch magic and curing magic, and to apply the appropriate
- -- set of precast fastcast gear, we check to see if the 'spell' is of the kind that uses the /magic prefix
- -- and then we check to see if 'Cur' is part of the spell name, which catches Cure, Curaga, Cura, and their higher tier versions.
- -- Note you don't actually have to use /magic to cast the spells. /ma works just fine. The '/magic' used below
- -- is because the resource files for Windower define non-ninjutsu, non-song magic as using the '/magic' prefix, even if cast as
- -- /ma cure 4 p1
- function precast(spell)
- if spell.prefix=='/magic' then
- if string.find(spell.name,'Cur') then
- equip(sets.MA.Precast, sets.MA.Precast.Cure)
- else
- equip(sets.MA.Precast)
- end
- end
- end
- -- I don't know what this does but I'm not taking it out.
- function filtered_action(spell)
- cancel_spell()
- end
- -- This function checks, one by one, to see if there is a JA or WS set for the 'spell' being cast,
- -- if it's enhancing magic, which gets the generic enhancing set, if it's a regen spell of any tier,
- -- which will get the generic regen set, or if there is a specific set for that specific spell,
- -- and equips it if there is. So if you eventually got a set of stoneskin gear, you could add a
- -- sets.MA.Stoneskin up above, list the gear, and then that gear would automatically be equipped
- -- when casting Stoneskin without having to edit anything else. Same for any other spell.
- function midcast(spell)
- if sets.JA[spell.name] then
- equip(sets.Idle, sets.JA[spell.name])
- elseif sets.WS[spell.name] then
- equip(sets.Idle, sets.WS[spell.name])
- elseif spell.skill=='Enhancing Magic' then
- equip(sets.Idle, sets.MA.Enhancing)
- elseif spell.skill=='Enfeebling Magic' then
- equip(sets.Idle, sets.MA.Enhancing)
- elseif spell.skill=='Elemental Magic' then
- equip(sets.Idle, sets.MA.Enhancing)
- elseif string.find(spell.name,'Regen') then
- equip(sets.Idle, sets.MA.Regen)
- elseif sets.MA[spell.name] then
- equip(sets.Idle, sets.MA[spell.name])
- elseif string.find(spell.name,'Cur') then
- equip(sets.Idle, sets.MA.Cure)
- end
- end
- --function toggle_vanity()
- -- send_command('input /lockstyle off')
- -- vanity_ind = vanity_ind + 1
- -- if vanity_ind > #sets.Vanity.index then vanity_ind = 1 end
- -- send_command('@input /echo ----- Vanity '..sets.Vanity.index[vanity_ind]..' Set equipped -----')
- -- equip(sets.Idle, sets.Vanity[sets.Vanity.index[vanity_ind]])
- -- send_command('wait 2;input /lockstyle on;wait 2;gs c equip TP set')
- --end
- -- After you have finished your spell casting, returns you to whatever 'proper' set you should
- -- be wearing between actions. If you're a tank in your -DT set, you don't want it not reapplied after you
- -- swap half of it out for +enmity gear for provoke, etc.
- function aftercast(spell)
- if player.status=='Engaged' then
- equip_TP_set()
- else
- equip(sets.Idle)
- end
- end
- -- This fires whenever your status changes, such as when you sit, stand, die, get on a chocobo, fish, craft, etc.
- -- It's useful for seeing if you've attacked something to equip your TP set, or to automatically equip a resting set
- -- when you rest, and remove it when you stand.
- function status_change(new,old)
- if new == 'Engaged' then
- equip_TP_set()
- elseif new == 'Resting' then
- equip(sets.Idle, sets.Resting)
- else
- equip(sets.Idle)
- end
- end
- -- Here one could add things to automatically change gear on acquiring certain statuses
- -- For example, in my RUN and DNC and COR sets, if I recieve the status effect Doom, my Saida ring is swapped in
- -- and that slot in which it goes is 'disabled' by gearswap so that it won't be removed.
- -- When I lose the Doom 'buff', the slot is unlocked again so normal gear can go back in place.
- function buff_change(buff,gain)
- end
- -- This equips your TP set.
- function equip_TP_set()
- sets.TP.index = {'Normal','Accuracy','Evasion','PDT','MDT','DT'}
- if TP_ind == 7 then TP_ind = 1 end
- if TP_ind == 1 then
- equip(sets.TP.Normal)
- else
- equip(sets.TP.Normal,sets.TP[sets.TP.index[TP_ind]])
- end
- end
- -- This function is where you can define specific things you want carried out when you supply
- -- a command to gearswap via //gs c CommandGoesHere (/console gs c CommandGoesHere also works)
- -- For example, if you had multiple TP sets, as I do for DNC and RUN, you could set up a macro button
- -- which was called "ToggleTP" and contained the line /console gs c toggle TP set
- -- And then whenever you pressed that button, it would cycle to the next set in your list of TP sets.
- -- This set would then not only be applied, but also reapplied after actions were taken, as after
- -- every action you take, if enganged, the 'equip_TP_set()' function is called.
- --
- -- This is a useful place to add commands for troubleshooting, such as to make sure a set is equipping properly.
- -- An example of that is added below for cursna. Typing in /console gs c equip Cursna set
- -- or //gs c equip Cursna set
- -- will cause the set to be equipped. You can keep your equipment window open and type this from the chat line,
- -- and, as gearswap uses packets, your equipment will change while you watch to verify it works.
- function self_command(command)
- if command == 'toggle TP set' then
- TP_ind = TP_ind +1
- if TP_ind > #sets.TP.index then TP_ind = 1 end
- send_command('@input /echo ----- TP Set changed to '..sets.TP.index[TP_ind]..' -----')
- equip_TP_set()
- elseif command == 'equip TP set' then
- equip_TP_set()
- elseif command == 'equip Idle set' then
- equip(sets.Idle)
- elseif command == 'equip Cursna set' then
- equip(sets.MA.Cursna)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement