Gearswap Support Thread

Language: JP EN DE FR
New Items
2023-11-19
users online
Forum » Windower » Support » Gearswap Support Thread
Gearswap Support Thread
First Page 2 3 ... 113 114 115 ... 180 181 182
 Lakshmi.Rumorian
Offline
Server: Lakshmi
Game: FFXI
user: Rumo
Posts: 10
By Lakshmi.Rumorian 2016-11-16 20:36:06
Link | Quote | Reply
 
I'm trying to incorporate these functions (copied from Krystela of Asura's lua) into my geo.lua:

function pretarget(spell,action)
-- Auto-Echo drop :D --
if spell.action_type == 'Magic' and buffactive['Silence'] then
cancel_spell()
send_command('input /item "Echo Drops" <me>')
-- Auto Blaze of Glory for lazies :p --
elseif string.find(spell.english, 'Geo-') then
if not buffactive['Bolster'] and not buffactive['Amnesia'] and not pet.isvalid and windower.ffxi.get_ability_recasts()[247] < 1 then
cancel_spell()
send_command('input /ja "Blaze of Glory" <me>;wait 2;input /ma "'..spell.english..'" '..spell.target.name)
end
end
end


But the auto-BoG part doesn't work. Is there anything else I need to add?
 Odin.Lygre
Offline
Server: Odin
Game: FFXI
user: Dylaudid
Posts: 89
By Odin.Lygre 2016-11-16 20:56:56
Link | Quote | Reply
 
Code
function pretarget(spell,action)
	-- Auto-Echo drop :D --
	if spell.action_type == 'Magic' and buffactive['Silence'] then
		cancel_spell()
		send_command('input /item "Echo Drops" <me>')
	-- Auto Blaze of Glory for lazies :p -- 
	elseif string.find(spell.english, 'Geo-') then
		if not (buffactive['Bolster'] or  buffactive['Amnesia'] or pet.isvalid) and windower.ffxi.get_ability_recasts()[247] == 0 then
			cancel_spell()
			send_command('input /ja "Blaze of Glory" <me>;wait 2;input /ma "'..spell.english..'" '..spell.target.name)
		end
	end
end

Can try this
 Lakshmi.Rumorian
Offline
Server: Lakshmi
Game: FFXI
user: Rumo
Posts: 10
By Lakshmi.Rumorian 2016-11-17 16:36:34
Link | Quote | Reply
 
Odin.Lygre said: »
Can try this

Thanks, but that didn't work either. I just used Krystela's geo.lua with no changes on my character and it still didn't work. I'm starting to think it's something outside that lua that makes it work and that's missing for me.
 Leviathan.Vow
Offline
Server: Leviathan
Game: FFXI
user: woVow
Posts: 125
By Leviathan.Vow 2016-11-17 16:55:45
Link | Quote | Reply
 
Aren't Geo spells cast on mobs? You'd need to use '<t>' instead of spell.target.name.
Offline
Posts: 319
By aisukage 2016-11-19 05:05:22
Link | Quote | Reply
 
I am looking for help with my DRK lua.
Basically I want it to swap my gear depending what weapon I have equiped.

I have it set up so when the lua runs, depending which weapon I have equipped when it loads the lua it will select the appropriate gear for that weapon. but if I swap without unloading and reloading the lua it will not swap.

for example:
I have my GS equipped and then load my LUA up when I engage it equips my Enaged set for GS. When I swap to my Apoc it doesn't change even if I disengage and re-engage it will still put my GS gear on. Now at this point if I were to unload and load my LUA and engage with my Apoc it will equip my scythe TP gear and if I swap to GS it will do the same thing as before but with my Scythe gear allways being put on.

Not sure what would cause it to lock depending on when the lua loads like this. I would of thought maybe I would of just needed to cast a spell or Weaponskill or disengage/re-engage again for it to correct the gear but this didn't help.

I'm not great at Gearswap but I believe these to be the important pieces from my LUA
Code
function user_setup()
   update_combat_form()
end
Code
function user_setup()
   Apoc_weapons = S{'Apocalypse'}
   GS_weapons = S{'Ragnarok'}
   Anguta_weapons = S{'Anguta'}
end
Code
function adjust_engaged_sets()
   state.CombatWeapon = player.equipment.main
   adjust_melee_groups()
end
Code
function update_combat_form()
   if  
      Apoc_weapons:contains(player.equipment.main) then
      state.CombatForm:set('Apocalypse')
   elseif
      Anguta_weapons:contains(player.equipment.main) then
      state.CombatForm:set('Anguta')
   elseif
      GS_weapons:contains(player.equipment.main) then
      state.CombatForm:set('GreatSword')
   else
      state.CombatForm:reset()
 end
end
Code
function job_update(cmdParams, eventArgs)
   update_combat_form()
end

There's obviously more in some of these functions but I just took what I feel like would be effecting my situation. I might have missed something and if need be will upload to pastebin if this isn't enough to help.

Oh and for example of what my Gearset lines look like
Code
sets.engaged.GreatSword = {Gear is here ect}
sets.engaged.Apocalypse = {Gear is here ect}

would really appreciate any help with this.
Offline
Posts: 319
By aisukage 2016-11-19 17:17:54
Link | Quote | Reply
 
Or if I can' get help with the previous question is it possible that someone could help me put a new mode into my lua so I can swap with a custom bind. something like

state.weaponmode:option {'rag, apoc'}

so I can do

sets.engaged.rag
main='ragnarok',
ect.

or

sets.engaged.Apoc
main='apocalypse',
ect.

and able to do
sets.engaged.Apoc.Acc
ect
 Odin.Lygre
Offline
Server: Odin
Game: FFXI
user: Dylaudid
Posts: 89
By Odin.Lygre 2016-11-19 19:09:13
Link | Quote | Reply
 
All you should need is this:
Code
function job_setup()
	update_combat_form()
end
function job_update(cmdParams, eventArgs)
    update_combat_form()
end
function update_combat_form()
    state.CombatWeapon:set(player.equipment.main)
end

If you're using Montenten's include.
You'll just need to hit F12 (job update) after changing weapons sometimes.
 Asura.Azagarth
Offline
Server: Asura
Game: FFXI
user: Azagarth
Posts: 1325
By Asura.Azagarth 2016-11-22 04:59:48
Link | Quote | Reply
 
How do you get around GS not equipping rings with the same name? This is causing me tons of issues as of late. I have tried moving rings to different wardrobes, placing the rings separated by the rest of the gear in the sets. I am at a loss... It really sucs when you only end up equipping one or the 2 Chirich rings and get 99tp on a 2h job.... Or noticing your ws is only going off with one Ifrit+1 or nuke with one shiva+1, etc etc.
 Sylph.Subadai
Offline
Server: Sylph
Game: FFXI
user: Subadai
Posts: 184
By Sylph.Subadai 2016-11-24 05:23:56
Link | Quote | Reply
 
Asura.Azagarth said: »
How do you get around GS not equipping rings with the same name? This is causing me tons of issues as of late. I have tried moving rings to different wardrobes, placing the rings separated by the rest of the gear in the sets. I am at a loss... It really sucs when you only end up equipping one or the 2 Chirich rings and get 99tp on a 2h job.... Or noticing your ws is only going off with one Ifrit+1 or nuke with one shiva+1, etc etc.
Saw this question somewhere else, the solution I can't personally vouch for, but looks like it will work... Put your rings in different bags and try something like:
Code
sets.midcast['Elemental Magic'] = {
         ring1={name="Shiva Ring", bag="wardrobe2"},
         ring2={name="Shiva Ring", bag="wardrobe3"} }
 Phoenix.Keido
Offline
Server: Phoenix
Game: FFXI
user: Keido
Posts: 122
By Phoenix.Keido 2016-11-27 11:08:23
Link | Quote | Reply
 
Figured it out.
Offline
Posts: 42
By inkydo 2016-11-30 18:18:01
Link | Quote | Reply
 
I have used this in many Gear swaps and for some reason it is not working In the new BLU one I have Mod from Kinematics/GearSwap-Jobs
Code
-- Called any time we attempt to handle automatic gear equips (ie: engaged or idle gear).
function job_handle_equipping_gear(playerStatus, eventArgs)    	
    if player.equipment.back == 'Mecisto. Mantle' or player.equipment.back == 'Aptitude Mantle' or player.equipment.back == 'Aptitude Mantle +1' or player.equipment.back == 'Nexus Cape' then
        disable('back')
    else
        enable('back')
    end
        if player.equipment.ring1 == 'Warp Ring' or player.equipment.ring1 == 'Vocation Ring' or player.equipment.ring1 == 'Capacity Ring' then
        disable('ring1')
    else
        enable('ring1')
    end
    if player.equipment.ring2 == 'Warp Ring' or player.equipment.ring2 == 'Vocation Ring' or player.equipment.ring2 == 'Capacity Ring' then
        disable('ring2')
    else
        enable('ring2')
    end
	    if player.equipment.range == 'Soultrapper' then
        disable('range')
    else
        enable('range')
    end
		if player.equipment.ammo == 'Blank Soulplate' then
        disable('ammo')
    else
        enable('ammo')
    end
end


This is the Lua it self
Code
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job.  Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------

-- Initialization function for this job file.
function get_sets()
    mote_include_version = 2
    
    -- Load and initialize the include file.
    include('Mote-Include.lua')
end


-- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
function job_setup()
    state.Buff['Burst Affinity'] = buffactive['Burst Affinity'] or false
    state.Buff['Chain Affinity'] = buffactive['Chain Affinity'] or false
    state.Buff.Convergence = buffactive.Convergence or false
    state.Buff.Diffusion = buffactive.Diffusion or false
    state.Buff.Efflux = buffactive.Efflux or false
    
    state.Buff['Unbridled Learning'] = buffactive['Unbridled Learning'] or false


    blue_magic_maps = {}
    
    -- Mappings for gear sets to use for various blue magic spells.
    -- While Str isn't listed for each, it's generally assumed as being at least
    -- moderately signficant, even for spells with other mods.
    
    -- Physical Spells --
    
    -- Physical spells with no particular (or known) stat mods
    blue_magic_maps.Physical = S{
        'Bilgestorm'
    }

    -- Spells with heavy accuracy penalties, that need to prioritize accuracy first.
    blue_magic_maps.PhysicalAcc = S{
        'Heavy Strike',
    }

    -- Physical spells with Str stat mod
    blue_magic_maps.PhysicalStr = S{
        'Battle Dance','Bloodrake','Death Scissors','Dimensional Death',
        'Empty Thrash','Quadrastrike','Sinker Drill','Spinal Cleave',
        'Uppercut','Vertical Cleave'
    }
        
    -- Physical spells with Dex stat mod
    blue_magic_maps.PhysicalDex = S{
        'Amorphic Spikes','Asuran Claws','Barbed Crescent','Claw Cyclone','Disseverment',
        'Foot Kick','Frenetic Rip','Goblin Rush','Hysteric Barrage','Paralyzing Triad',
        'Seedspray','Sickle Slash','Smite of Rage','Terror Touch','Thrashing Assault',
        'Vanity Dive'
    }
        
    -- Physical spells with Vit stat mod
    blue_magic_maps.PhysicalVit = S{
        'Body Slam','Cannonball','Delta Thrust','Glutinous Dart','Grand Slam',
        'Power Attack','Quad. Continuum','Sprout Smack','Sub-zero Smash'
    }
        
    -- Physical spells with Agi stat mod
    blue_magic_maps.PhysicalAgi = S{
        'Benthic Typhoon','Feather Storm','Helldive','Hydro Shot','Jet Stream',
        'Pinecone Bomb','Spiral Spin','Wild Oats'
    }

    -- Physical spells with Int stat mod
    blue_magic_maps.PhysicalInt = S{
        'Mandibular Bite','Queasyshroom'
    }

    -- Physical spells with Mnd stat mod
    blue_magic_maps.PhysicalMnd = S{
        'Ram Charge','Screwdriver','Tourbillion'
    }

    -- Physical spells with Chr stat mod
    blue_magic_maps.PhysicalChr = S{
        'Bludgeon'
    }

    -- Physical spells with HP stat mod
    blue_magic_maps.PhysicalHP = S{
        'Final Sting'
    }

    -- Magical Spells --

    -- Magical spells with the typical Int mod
    blue_magic_maps.Magical = S{
        'Blastbomb','Blazing Bound','Bomb Toss','Cursed Sphere','Dark Orb','Death Ray',
        'Diffusion Ray','Droning Whirlwind','Embalming Earth','Firespit','Foul Waters',
        'Ice Break','Leafstorm','Maelstrom','Rail Cannon','Regurgitation','Rending Deluge',
        'Retinal Glare','Subduction','Tem. Upheaval','Water Bomb'
    }

    -- Magical spells with a primary Mnd mod
    blue_magic_maps.MagicalMnd = S{
        'Acrid Stream','Evryone. Grudge','Magic Hammer','Mind Blast'
    }

    -- Magical spells with a primary Chr mod
    blue_magic_maps.MagicalChr = S{
        'Eyes On Me','Mysterious Light'
    }

    -- Magical spells with a Vit stat mod (on top of Int)
    blue_magic_maps.MagicalVit = S{
        'Thermal Pulse'
    }

    -- Magical spells with a Dex stat mod (on top of Int)
    blue_magic_maps.MagicalDex = S{
        'Charged Whisker','Gates of Hades'
    }
            
    -- Magical spells (generally debuffs) that we want to focus on magic accuracy over damage.
    -- Add Int for damage where available, though.
    blue_magic_maps.MagicAccuracy = S{
        '1000 Needles','Absolute Terror','Actinic Burst','Auroral Drape','Awful Eye',
        'Blank Gaze','Blistering Roar','Blood Drain','Blood Saber','Chaotic Eye',
        'Cimicine Discharge','Cold Wave','Corrosive Ooze','Demoralizing Roar','Digest',
        'Dream Flower','Enervation','Feather Tickle','Filamented Hold','Frightful Roar',
        'Geist Wall','Hecatomb Wave','Infrasonics','Jettatura','Light of Penance',
        'Lowing','Mind Blast','Mortal Ray','MP Drainkiss','Osmosis','Reaving Wind',
        'Sandspin','Sandspray','Sheep Song','Soporific','Sound Blast','Stinking Gas',
        'Sub-zero Smash','Venom Shell','Voracious Trunk','Yawn'
    }
        
    -- Breath-based spells
    blue_magic_maps.Breath = S{
        'Bad Breath','Flying Hip Press','Frost Breath','Heat Breath',
        'Hecatomb Wave','Magnetite Cloud','Poison Breath','Radiant Breath','Self-Destruct',
        'Thunder Breath','Vapor Spray','Wind Breath'
    }

    -- Stun spells
    blue_magic_maps.Stun = S{
        'Blitzstrahl','Frypan','Head Butt','Sudden Lunge','Tail slap','Temporal Shift',
        'Thunderbolt','Whirl of Rage'
    }
	
    -- Dark spells
    blue_magic_maps.Dark = S{
        'Tenebral Crush','Palling Salvo'
    }        
    -- Healing spells
    blue_magic_maps.Healing = S{
        'Healing Breeze','Magic Fruit','Plenilune Embrace','Pollen','Restoral','White Wind',
        'Wild Carrot'
    }
    
    -- Buffs that depend on blue magic skill
    blue_magic_maps.SkillBasedBuff = S{
        'Barrier Tusk','Diamondhide','Magic Barrier','Metallic Body','Plasma Charge',
        'Pyric Bulwark','Reactor Cool',
    }

    -- Other general buffs
    blue_magic_maps.Buff = S{
        'Amplification','Animating Wail','Battery Charge','Carcharian Verve','Cocoon',
        'Erratic Flutter','Exuviation','Fantod','Feather Barrier','Harden Shell',
        'Memento Mori','Nat. Meditation','Occultation','Orcish Counterstance','Refueling',
        'Regeneration','Saline Coat','Triumphant Roar','Warm-Up','Winds of Promyvion',
        'Zephyr Mantle'
    }
    
    
    -- Spells that require Unbridled Learning to cast.
    unbridled_spells = S{
        'Absolute Terror','Bilgestorm','Blistering Roar','Bloodrake','Carcharian Verve',
        'Crashing Thunder','Droning Whirlwind','Gates of Hades','Harden Shell','Polar Roar',
        'Pyric Bulwark','Thunderbolt','Tourbillion','Uproot'
    }
end

-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job.  Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------

-- Setup vars that are user-dependent.  Can override this function in a sidecar file.
function user_setup()
    state.OffenseMode:options('Normal', 'Acc', 'Refresh', 'Learning')
    state.WeaponskillMode:options('Normal', 'Acc')
    state.CastingMode:options('Normal', 'Resistant')
    state.IdleMode:options('Normal', 'PDT', 'Learning')

    gear.macc_hagondes = {name="Hagondes Cuffs", augments={'Phys. dmg. taken -3%','Mag. Acc.+29'}}

    -- Additional local binds
    send_command('bind ^` input /ja "Chain Affinity" <me>')
    send_command('bind !` input /ja "Efflux" <me>')
    send_command('bind @` input /ja "Burst Affinity" <me>')

    update_combat_form()
    select_default_macro_book()
end


-- Called when this job file is unloaded (eg: job change)
function user_unload()
    send_command('unbind ^`')
    send_command('unbind !`')
    send_command('unbind @`')
end


-- Set up gear sets.
function init_gear_sets()
    --------------------------------------
    -- Start defining the sets
    --------------------------------------

    sets.buff['Burst Affinity'] = {feet="Hashi. Basmak +1"}
    sets.buff['Chain Affinity'] = {head="Hashishin Kavuk +1", feet="Assimilator's Charuqs +1"}
    sets.buff.Convergence = {head="Luhlaza Keffiyeh +1"}
    sets.buff.Diffusion = {feet="Luhlaza Charuqs"}
    sets.buff.Enchainment = {body="Luhlaza Jubbah +1"}
    sets.buff.Efflux = {legs="Hashishin Tayt +1"}

    
    -- Precast Sets
    
    -- Precast sets to enhance JAs
    sets.precast.JA['Azure Lore'] = {hands="Luh. Bazubands +1"}


    -- Waltz set (chr and vit)
    sets.precast.Waltz = {
		--ammo="Sonia's Plectrum",
        --head="Uk'uxkaj Cap",
        --body="Vanir Cotehardie",
		--hands="Buremte Gloves",
		--legs="Hagondes Pants",
		--feet="Iuitl Gaiters +1",
		--waist="Caudata Belt",
		--left_ring="Spiral Ring",
		--back="Iximulew Cape"
	}
        
    -- Don't need any special gear for Healing Waltz.
    sets.precast.Waltz['Healing Waltz'] = {}

    -- Fast cast sets for spells
    
    sets.precast.FC = {
		ammo="Impatiens",
		head={ name="Amalric Coif", augments={'MP+60','Mag. Acc.+15','"Mag.Atk.Bns."+15',}},
		body={ name="Taeon Tabard", augments={'Accuracy+14 Attack+14','"Triple Atk."+2','STR+5 DEX+5',}},
		hands={ name="Leyline Gloves", augments={'Accuracy+6','"Mag.Atk.Bns."+9',}},
		legs="Orvail Pants +1",
		feet="Chelona Boots +1",
		waist="Witful Belt",
		left_ear="Cessance Earring",
		right_ear="Loquac. Earring",
		left_ring="Prolix Ring",
		right_ring="Veneficium Ring",
		back="Swith Cape"}
        
    sets.precast.FC['Blue Magic'] = set_combine(sets.precast.FC, {body="Hashishin Mintan +1"})

       
    -- Weaponskill sets
    -- Default set for any weaponskill that isn't any more specifically defined
    sets.precast.WS = {
		ammo="Jukukik Feather",
		head={ name="Adhemar Bonnet", augments={'STR+10','DEX+10','Attack+15',}},
		body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
		hands={ name="Adhemar Wristbands", augments={'DEX+10','AGI+10','Accuracy+15',}},
		legs={ name="Herculean Trousers", augments={'Accuracy+23 Attack+23','"Store TP"+1','DEX+6','Accuracy+15',}},
		feet={ name="Adhemar Gamashes", augments={'STR+10','DEX+10','Attack+15',}},
		neck="Fotia Gorget",
		waist="Caudata Belt",
		left_ear="Mache Earring",
		right_ear="Brutal Earring",
		left_ring="Ramuh Ring +1",
		right_ring="Epona's Ring",
		back={ name="Mecisto. Mantle", augments={'Cap. Point+32%','Rng.Atk.+3','DEF+11',}}}
		--back="Vespid Mantle"}
    
    sets.precast.WS.acc = set_combine(sets.precast.WS, {hands="Buremte Gloves"})

    -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
    sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS, {left_ring="Aquasoul Ring",feet="Luhlaza Charuqs"})

    sets.precast.WS['Sanguine Blade'] = {
		ammo="Ghastly Tathlum +1",
		head="Assim. Keffiyeh +1",
		body="Hashishin Mintan +1",
		hands={ name="Helios Gloves", augments={'"Mag.Atk.Bns."+11','Magic crit. hit rate +8',}},
		legs={ name="Luhlaza Shalwar +1", augments={'Enhances "Assimilation" effect',}},
		feet="Hashi. Basmak +1",
		neck="Sanctity Necklace",
		waist="Anguinus Belt",
		left_ear="Sortiarius Earring",
		right_ear="Friomisi Earring",
		left_ring="Fenrir Ring",
		right_ring="Acumen Ring",
		back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+3','"Store TP"+10',}}}
    
    
    -- Midcast Sets
    sets.midcast.FastRecast = {
		waist="Witful Belt",
		right_ear="Loquacious Earring",
		left_ring="Prolix Ring",
        back="Swith Cape"}
        
    sets.midcast['Blue Magic'] = set_combine(sets.midcast.FastRecast, {body="Hashishin Mintan +1"})
    
    -- Physical Spells --
    
    sets.midcast['Blue Magic'].Physical = {
		ammo="Hasty Pinion +1",
		head={ name="Lilitu Headpiece", augments={'STR+8','DEX+8','Attack+14','Weapon skill damage +1%',}},
		body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
		hands={ name="Adhemar Wristbands", augments={'DEX+10','AGI+10','Accuracy+15',}},
		legs={ name="Herculean Trousers", augments={'Accuracy+23 Attack+23','"Store TP"+1','DEX+6','Accuracy+15',}},
		feet={ name="Adhemar Gamashes", augments={'STR+10','DEX+10','Attack+15',}},
		neck="Ocachi Gorget",
		waist="Prosilio Belt",
		left_ear="Tati Earring",
		right_ear="Tati Earring",
		left_ring="Ramuh Ring +1",
		right_ring="Epona's Ring",
		back="Vespid Mantle"}

    sets.midcast['Blue Magic'].PhysicalAcc = {
		ammo="Hasty Pinion +1",
		head={ name="Lilitu Headpiece", augments={'STR+8','DEX+8','Attack+14','Weapon skill damage +1%',}},
		body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
		hands={ name="Adhemar Wristbands", augments={'DEX+10','AGI+10','Accuracy+15',}},
		legs={ name="Herculean Trousers", augments={'Accuracy+23 Attack+23','"Store TP"+1','DEX+6','Accuracy+15',}},
		feet={ name="Adhemar Gamashes", augments={'STR+10','DEX+10','Attack+15',}},
		neck="Ocachi Gorget",
		waist="Prosilio Belt",
		left_ear="Tati Earring",
		right_ear="Tati Earring",
		left_ring="Ramuh Ring +1",
		right_ring="Epona's Ring",
		back="Vespid Mantle"}

    sets.midcast['Blue Magic'].PhysicalStr = set_combine(sets.midcast['Blue Magic'].Physical,
        {})

    sets.midcast['Blue Magic'].PhysicalDex = set_combine(sets.midcast['Blue Magic'].Physical,
        {ammo="Hasty Pinion +1"})

    sets.midcast['Blue Magic'].PhysicalVit = set_combine(sets.midcast['Blue Magic'].Physical,
        {})
		--{body="Vanir Cotehardie",hands="Assimilator's Bazubands +1",back="Iximulew Cape"})

    sets.midcast['Blue Magic'].PhysicalAgi = set_combine(sets.midcast['Blue Magic'].Physical,
        {})
		--{body="Vanir Cotehardie",hands="Iuitl Wristbands",right_ring="Stormsoul Ring",
         --waist="Chaac Belt",feet="Iuitl Gaiters +1"})

    sets.midcast['Blue Magic'].PhysicalInt = set_combine(sets.midcast['Blue Magic'].Physical,
        {back="Cornflower Cape"})
        --{left_ear="Psystorm Earring",body="Vanir Cotehardie",hands="Assimilator's Bazubands +1",
         --right_ring="Icesoul Ring",back="Toro Cape",feet="Hagondes Sabots"})

    sets.midcast['Blue Magic'].PhysicalMnd = set_combine(sets.midcast['Blue Magic'].Physical,
        {right_ring="Leviathan Ring +1",back="Cornflower Cape"})
        --{left_ear="Lifestorm Earring",body="Vanir Cotehardie",hands="Assimilator's Bazubands +1",
         --right_ring="Aquasoul Ring",back="Refraction Cape"})

    sets.midcast['Blue Magic'].PhysicalChr = set_combine(sets.midcast['Blue Magic'].Physical,
        {right_ring="Leviathan Ring +1",back="Cornflower Cape"})
        --{body="Vanir Cotehardie",hands="Assimilator's Bazubands +1",back="Refraction Cape",
         --waist="Chaac Belt"})

    sets.midcast['Blue Magic'].PhysicalHP = set_combine(sets.midcast['Blue Magic'].Physical)


    -- Magical Spells --
    
    sets.midcast['Blue Magic'].Magical = {
		ammo="Ghastly Tathlum +1",
		head={ name="Amalric Coif", augments={'MP+60','Mag. Acc.+15','"Mag.Atk.Bns."+15',}},
		body={ name="Samnuha Coat", augments={'Mag. Acc.+10','"Mag.Atk.Bns."+9','"Fast Cast"+2',}},
		hands={ name="Amalric Gages", augments={'INT+10','Mag. Acc.+15','"Mag.Atk.Bns."+15',}},
		legs={ name="Amalric Slops", augments={'MP+60','"Mag.Atk.Bns."+20','Enmity-5',}},
		feet={ name="Amalric Nails", augments={'Mag. Acc.+15','"Mag.Atk.Bns."+15','"Conserve MP"+6',}},
		neck="Deviant Necklace",
		waist="Salire Belt",
		left_ear="Hecate's Earring",
		right_ear="Friomisi Earring",
		left_ring="Shiva Ring",
		right_ring="Acumen Ring",
		back={ name="Cornflower Cape", augments={'MP+30','DEX+5','Accuracy+1','Blue Magic skill +10',}}}
		

    sets.midcast['Blue Magic'].Magical.Resistant = set_combine(sets.midcast['Blue Magic'].Magical)--,
        --{})
    
    sets.midcast['Blue Magic'].MagicalMnd = set_combine(sets.midcast['Blue Magic'].Magical)--,
        --{left_ring="Aquasoul Ring"})

    sets.midcast['Blue Magic'].MagicalChr = set_combine(sets.midcast['Blue Magic'].Magical)

    sets.midcast['Blue Magic'].MagicalVit = set_combine(sets.midcast['Blue Magic'].Magical)--,
        --{left_ring="Spiral Ring"})

    sets.midcast['Blue Magic'].MagicalDex = set_combine(sets.midcast['Blue Magic'].Magical)

    sets.midcast['Blue Magic'].MagicAccuracy = {
		ammo="Ghastly Tathlum +1",
		head={ name="Amalric Coif", augments={'MP+60','Mag. Acc.+15','"Mag.Atk.Bns."+15',}},
		body={ name="Samnuha Coat", augments={'Mag. Acc.+10','"Mag.Atk.Bns."+9','"Fast Cast"+2',}},
		hands={ name="Amalric Gages", augments={'INT+10','Mag. Acc.+15','"Mag.Atk.Bns."+15',}},
		legs={ name="Amalric Slops", augments={'MP+60','"Mag.Atk.Bns."+20','Enmity-5',}},
		feet={ name="Amalric Nails", augments={'Mag. Acc.+15','"Mag.Atk.Bns."+15','"Conserve MP"+6',}},
		neck="Deviant Necklace",
		waist="Salire Belt",
		left_ear="Hecate's Earring",
		right_ear="Friomisi Earring",
		left_ring="Shiva Ring",
		right_ring="Acumen Ring",
		back={ name="Cornflower Cape", augments={'MP+30','DEX+5','Accuracy+1','Blue Magic skill +10',}}}

    -- Breath Spells --
    
    sets.midcast['Blue Magic'].Breath = {
		ammo="Mavi Tathlum",
		head={ name="Amalric Coif", augments={'MP+60','Mag. Acc.+15','"Mag.Atk.Bns."+15',}},
		body={ name="Samnuha Coat", augments={'Mag. Acc.+10','"Mag.Atk.Bns."+9','"Fast Cast"+2',}},
		hands={ name="Amalric Gages", augments={'INT+10','Mag. Acc.+15','"Mag.Atk.Bns."+15',}},
		legs={ name="Amalric Slops", augments={'MP+60','"Mag.Atk.Bns."+20','Enmity-5',}},
		feet={ name="Amalric Nails", augments={'Mag. Acc.+15','"Mag.Atk.Bns."+15','"Conserve MP"+6',}},
		neck="Deviant Necklace",
		waist="Salire Belt",
		left_ear="Hecate's Earring",
		right_ear="Friomisi Earring",
		left_ring="Shiva Ring",
		right_ring="Acumen Ring",
		back={ name="Cornflower Cape", augments={'MP+30','DEX+5','Accuracy+1','Blue Magic skill +10',}}}

    -- Other Types --
    
    sets.midcast['Blue Magic'].Stun = set_combine(sets.midcast['Blue Magic'].MagicAccuracy,
        {waist="Chaac Belt"})
	
	sets.midcast['Blue Magic'].Dark = set_combine(sets.midcast['Blue Magic'].MagicAccuracy,{
		head="Pixie Hairpin +1",
		waist="Chaac Belt"
		--left_ring="Archon Ring"
	})
        
    sets.midcast['Blue Magic']['White Wind'] = {}

    sets.midcast['Blue Magic'].Healing = {
		ammo="Mavi Tathlum",
		head={ name="Luh. Keffiyeh +1", augments={'Enhances "Convergence" effect',}},
		body="Hashishin Mintan +1",
		hands="Hegira Wristbands",
		legs={ name="Luhlaza Shalwar +1", augments={'Enhances "Assimilation" effect',}},
		feet="Hashi. Basmak +1",
		neck="Sanctity Necklace",
		left_ear="Lifestorm Earring",
		right_ear="Loquac. Earring",
		left_ring="Levia. Ring +1",
		right_ring="Sirona's Ring",
		back="Pahtli Cape"}

    sets.midcast['Blue Magic'].SkillBasedBuff = {
		ammo="Mavi Tathlum",
        head="Luh. Keffiyeh +1",
        body="Assimilator's Jubbah",
		legs="Hashishin Tayt +1",
		feet="Luhlaza Charuqs",
        back="Cornflower Cape"}

    sets.midcast['Blue Magic'].Buff = {}
    
    sets.midcast.Protect = {left_ring="Sheltered Ring"}
    sets.midcast.Protectra = {left_ring="Sheltered Ring"}
    sets.midcast.Shell = {left_ring="Sheltered Ring"}
    sets.midcast.Shellra = {left_ring="Sheltered Ring"}
    

    
    
    -- Sets to return to when not performing an action.

    -- Gear for learning spells: +skill and AF hands.
    sets.Learning = {ammo="Mavi Tathlum",hands="Assimilator's Bazubands"}
        --head="Luhlaza Keffiyeh",  
        --body="Assimilator's Jubbah",hands="Assimilator's Bazubands +1",
        --back="Cornflower Cape",legs="Mavi Tayt +2",feet="Luhlaza Charuqs"}


    sets.latent_refresh = {waist="Fucho-no-obi"}

    -- Resting sets
    sets.resting = {
        --head="Ocelomeh Headpiece +1",
		--neck="Wiglen Gorget",
        body="Assimilator's Jubbah +1",
		hands="Serpentes Cuffs",
		feet="Chelona Boots +1",
		--waist="Austerity Belt",
		left_ring="Sheltered Ring",
		right_ring="Paguroidea Ring"}
    
    -- Idle sets
    sets.idle = {
		ammo="Jukukik Feather",
		head={ name="Adhemar Bonnet", augments={'STR+10','DEX+10','Attack+15',}},
		body="Assimilator's Jubbah +1",
		hands={ name="Adhemar Wristbands", augments={'DEX+10','AGI+10','Accuracy+15',}},
		legs={ name="Herculean Trousers", augments={'Accuracy+23 Attack+23','"Store TP"+1','DEX+6','Accuracy+15',}},
		feet={ name="Adhemar Gamashes", augments={'STR+10','DEX+10','Attack+15',}},
		neck="Asperity Necklace",
		waist="Windbuffet Belt +1",
		left_ear="Cessance Earring",
		right_ear="Brutal Earring",
		left_ring="Epona's Ring",
		right_ring="Petrov Ring",
		back="Buquwik Cape"}
		
		
		--ammo="Impatiens",
        --head="Whirlpool Mask",
        --body="Hagondes Coat",
		--hands="Serpentes Cuffs",
		--legs="Crimson Cuisses",
		--feet="Serpentes Sabots",
		--neck="Wiglen Gorget",
		--waist="Flume Belt",
		--left_ear="Bloodgem Earring",
		--right_ear="Loquacious Earring",
		--left_ring="Defending Ring",
		--right_ring="Paguroidea Ring",
        --back="Shadow Mantle"}

    --[[sets.idle.PDT = {
		ammo="Impatiens",
        head="Whirlpool Mask",neck="Wiglen Gorget",left_ear="Bloodgem Earring",right_ear="Loquacious Earring",
        body="Hagondes Coat",hands="Iuitl Wristbands",left_ring="Defending Ring",right_ring="Paguroidea Ring",
        back="Shadow Mantle",waist="Flume Belt",legs="Crimson Cuisses",feet="Iuitl Gaiters +1"}

    sets.idle.Town = {
		ammo="Impatiens",
        head="Mavi Kavuk +2",neck="Wiglen Gorget",left_ear="Bloodgem Earring",right_ear="Loquacious Earring",
        body="Luhlaza Jubbah",hands="Assimilator's Bazubands +1",left_ring="Sheltered Ring",right_ring="Paguroidea Ring",
        back="Atheling Mantle",waist="Flume Belt",legs="Crimson Cuisses",feet="Luhlaza Charuqs"}]]

    sets.idle.Learning = set_combine(sets.idle, sets.Learning)

    
    -- Defense sets
    sets.defense.PDT = {	
		ammo="Iron Gobbet",
        head="Whirlpool Mask",
		body="Iuitl Vest",
		hands="Iuitl Wristbands",
		legs="Nahtirah Trousers",
		feet="Iuitl Gaiters +1",
		neck="Wiglen Gorget",
		waist="Flume Belt",
		--left_ear="Bloodgem Earring",
		--left_ring="Defending Ring",
		--right_ring=gear.DarkRing.physical,
        back="Shadow Mantle"}

    sets.defense.MDT = {
		ammo="Demonry Stone",
        head="Whirlpool Mask",
        body="Hagondes Coat",
		hands="Iuitl Wristbands",
		legs="Nahtirah Trousers",
		feet="Iuitl Gaiters +1",
		neck="Twilight Torque",
		waist="Flume Belt",
		left_ear="Bloodgem Earring",
		left_ring="Defending Ring",
		right_ring="Shadow Ring",
        back="Engulfer Cape"}

    sets.Kiting = {	back={ name="Mecisto. Mantle", augments={'Cap. Point+32%','Rng.Atk.+3','DEF+11',}}}

    -- Engaged sets

    -- Variations for TP weapon and (optional) offense/defense modes.  Code will fall back on previous
    -- sets if more refined versions aren't defined.
    -- If you create a set with both offense and defense modes, the offense mode should be first.
    -- EG: sets.engaged.Dagger.Accuracy.Evasion
    
    -- Normal melee group
    sets.engaged = {
		ammo="Jukukik Feather",
		head={ name="Adhemar Bonnet", augments={'STR+10','DEX+10','Attack+15',}},
		body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
		hands={ name="Adhemar Wristbands", augments={'DEX+10','AGI+10','Accuracy+15',}},
		legs={ name="Herculean Trousers", augments={'Accuracy+23 Attack+23','"Store TP"+1','DEX+6','Accuracy+15',}},
		feet={ name="Adhemar Gamashes", augments={'STR+10','DEX+10','Attack+15',}},
		neck="Asperity Necklace",
		waist="Windbuffet Belt +1",
		left_ear="Cessance Earring",
		right_ear="Brutal Earring",
		left_ring="Epona's Ring",
		right_ring="Petrov Ring",
		back="Buquwik Cape"}

    sets.engaged.Acc = {
		ammo="Jukukik Feather",
		head={ name="Adhemar Bonnet", augments={'STR+10','DEX+10','Attack+15',}},
		body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
		hands={ name="Adhemar Wristbands", augments={'DEX+10','AGI+10','Accuracy+15',}},
		legs={ name="Herculean Trousers", augments={'Accuracy+23 Attack+23','"Store TP"+1','DEX+6','Accuracy+15',}},
		feet={ name="Adhemar Gamashes", augments={'STR+10','DEX+10','Attack+15',}},
		neck="Asperity Necklace",
		waist="Windbuffet Belt +1",
		left_ear="Cessance Earring",
		right_ear="Zennaroi Earring",
		left_ring="Epona's Ring",
		right_ring="Petrov Ring",
		back="Buquwik Cape"}

    sets.engaged.Refresh = {
		ammo="Jukukik Feather",
		head={ name="Adhemar Bonnet", augments={'STR+10','DEX+10','Attack+15',}},
		body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
		hands={ name="Adhemar Wristbands", augments={'DEX+10','AGI+10','Accuracy+15',}},
		legs={ name="Amalric Slops", augments={'MP+60','"Mag.Atk.Bns."+20','Enmity-5',}},
		feet={ name="Adhemar Gamashes", augments={'STR+10','DEX+10','Attack+15',}},
		neck="Asperity Necklace",
		waist="Windbuffet Belt +1",
		left_ear="Cessance Earring",
		right_ear="Brutal Earring",
		left_ring="Epona's Ring",
		right_ring="Petrov Ring",
		back="Buquwik Cape"}

    sets.engaged.DW = {
		ammo="Jukukik Feather",
		head={ name="Adhemar Bonnet", augments={'STR+10','DEX+10','Attack+15',}},
		body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
		hands={ name="Adhemar Wristbands", augments={'DEX+10','AGI+10','Accuracy+15',}},
		legs={ name="Herculean Trousers", augments={'Accuracy+23 Attack+23','"Store TP"+1','DEX+6','Accuracy+15',}},
		feet={ name="Adhemar Gamashes", augments={'STR+10','DEX+10','Attack+15',}},
		neck="Asperity Necklace",
		waist="Windbuffet Belt +1",
		left_ear="Cessance Earring",
		right_ear="Brutal Earring",
		left_ring="Epona's Ring",
		right_ring="Petrov Ring",
		back="Buquwik Cape"}

    sets.engaged.DW.Acc = {
		ammo="Jukukik Feather",
		head={ name="Adhemar Bonnet", augments={'STR+10','DEX+10','Attack+15',}},
		body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
		hands={ name="Adhemar Wristbands", augments={'DEX+10','AGI+10','Accuracy+15',}},
		legs={ name="Herculean Trousers", augments={'Accuracy+23 Attack+23','"Store TP"+1','DEX+6','Accuracy+15',}},
		feet={ name="Adhemar Gamashes", augments={'STR+10','DEX+10','Attack+15',}},
		neck="Asperity Necklace",
		waist="Windbuffet Belt +1",
		left_ear="Cessance Earring",
		right_ear="Zennaroi Earring",
		left_ring="Epona's Ring",
		right_ring="Petrov Ring",
		back="Buquwik Cape"}

    sets.engaged.DW.Refresh = {
		ammo="Jukukik Feather",
		head={ name="Adhemar Bonnet", augments={'STR+10','DEX+10','Attack+15',}},
		body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
		hands={ name="Adhemar Wristbands", augments={'DEX+10','AGI+10','Accuracy+15',}},
		legs={ name="Herculean Trousers", augments={'Accuracy+23 Attack+23','"Store TP"+1','DEX+6','Accuracy+15',}},
		feet={ name="Adhemar Gamashes", augments={'STR+10','DEX+10','Attack+15',}},
		neck="Asperity Necklace",
		waist="Windbuffet Belt +1",
		left_ear="Cessance Earring",
		right_ear="Brutal Earring",
		left_ring="Epona's Ring",
		right_ring="Petrov Ring",
		back="Buquwik Cape"}

    sets.engaged.Learning = set_combine(sets.engaged, sets.Learning)
    sets.engaged.DW.Learning = set_combine(sets.engaged.DW, sets.Learning)


    sets.self_healing = {left_ring="Kunaji Ring",right_ring="Asklepian Ring"}
end

-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------

-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
    if unbridled_spells:contains(spell.english) and not state.Buff['Unbridled Learning'] then
        eventArgs.cancel = true
        windower.send_command('@input /ja "Unbridled Learning" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
    end
end

-- Run after the default midcast() is done.
-- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
function job_post_midcast(spell, action, spellMap, eventArgs)
    -- Add enhancement gear for Chain Affinity, etc.
    if spell.skill == 'Blue Magic' then
        for buff,active in pairs(state.Buff) do
            if active and sets.buff[buff] then
                equip(sets.buff[buff])
            end
        end
        if spellMap == 'Healing' and spell.target.type == 'SELF' and sets.self_healing then
            equip(sets.self_healing)
        end
    end

    -- If in learning mode, keep on gear intended to help with that, regardless of action.
    if state.OffenseMode.value == 'Learning' then
        equip(sets.Learning)
    end
end


-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------

-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)
    if state.Buff[buff] ~= nil then
        state.Buff[buff] = gain
    end
end

-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------

-- Custom spell mapping.
-- Return custom spellMap value that can override the default spell mapping.
-- Don't return anything to allow default spell mapping to be used.
function job_get_spell_map(spell, default_spell_map)
    if spell.skill == 'Blue Magic' then
        for category,spell_list in pairs(blue_magic_maps) do
            if spell_list:contains(spell.english) then
                return category
            end
        end
    end
end

-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
    if player.mpp < 51 then
        set_combine(idleSet, sets.latent_refresh)
    end
    return idleSet
end

-- Called by the 'update' self-command, for common needs.
-- Set eventArgs.handled to true if we don't want automatic equipping of gear.
function job_update(cmdParams, eventArgs)
    update_combat_form()
end


-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Called any time we attempt to handle automatic gear equips (ie: engaged or idle gear).
function job_handle_equipping_gear(playerStatus, eventArgs)    	
    if player.equipment.back == 'Mecisto. Mantle' or player.equipment.back == 'Aptitude Mantle' or player.equipment.back == 'Aptitude Mantle +1' or player.equipment.back == 'Nexus Cape' then
        disable('back')
    else
        enable('back')
    end
        if player.equipment.ring1 == 'Warp Ring' or player.equipment.ring1 == 'Vocation Ring' or player.equipment.ring1 == 'Capacity Ring' then
        disable('ring1')
    else
        enable('ring1')
    end
    if player.equipment.ring2 == 'Warp Ring' or player.equipment.ring2 == 'Vocation Ring' or player.equipment.ring2 == 'Capacity Ring' then
        disable('ring2')
    else
        enable('ring2')
    end
	    if player.equipment.range == 'Soultrapper' then
        disable('range')
    else
        enable('range')
    end
		if player.equipment.ammo == 'Blank Soulplate' then
        disable('ammo')
    else
        enable('ammo')
    end
end


function update_combat_form()
    -- Check for H2H or single-wielding
    if player.equipment.sub == "Genbu's Shield" or player.equipment.sub == 'empty' then
        state.CombatForm:reset()
    else
        state.CombatForm:set('DW')
    end
end


-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
    -- Default macro set/book
    if player.sub_job == 'WAR' then
        set_macro_page(1, 9)
	elseif player.sub_job == 'RDM' then
        set_macro_page(1, 9)
    else
        set_macro_page(1, 9)
    end
end



Offline
Posts: 256
By Brynach 2016-12-04 23:15:28
Link | Quote | Reply
 
Hey all

Ive been working on creating a lua for WAR, and i've run into a small issue where Mighty Strikes is concerned. I am attempting to set my lua up so that certain crit dmg gear is equipped for weaponskill while MS is active. As of yet, I haven't been able to figure it out. Any help would be appreciated.

Its apparent that the buffactive portion of my rule is totally missing the mark, but im not sure what else to use to fix.

Thanks for any help
 Odin.Lygre
Offline
Server: Odin
Game: FFXI
user: Dylaudid
Posts: 89
By Odin.Lygre 2016-12-05 05:49:58
Link | Quote | Reply
 
Code
-- Mighty Strikes WS Set --
    sets.MS_WS = {ammo="Yetshila", feet="Boii Calligae +1"}
 
function job_post_precast(spell, action, spellMap, eventArgs)
    if spell.type == 'WeaponSkill' then
        if world.time >= (17*60) or world.time <= (7*60) then
            equip({ear1="Lugra Earring +1",ear2="Lugra Earring"})
        end
        if moonshade_WS:contains(spell.english) and player.tp<2950 then  
            equip({ear2="Moonshade Earring"})
        end
        if buffactive['Mighty Strikes'] then 
            if sets.precast.WS[spell] then
                equipSet = sets.precast.WS[spell]
                equipSet = set_combine(equipSet,sets.MS_WS)
                equip(equipSet)
            else
                equipSet = sets.precast.WS
                equipSet = set_combine(equipSet,sets.MS_WS)
                equip(equipSet)
            end
        end
    end
end


This should work. Sorry, have a lot going on and don't have time to test right now.
Offline
Posts: 256
By Brynach 2016-12-05 08:43:30
Link | Quote | Reply
 
Nah man, no need for apologies. Thanks for checking this out.

I tested ws with MS up and this pulled in the gear as designed.

Thanks again
 Asura.Taruranto
Offline
Server: Asura
Game: FFXI
user: Tarlant
Posts: 34
By Asura.Taruranto 2016-12-05 13:31:50
Link | Quote | Reply
 
I figured I'll ask here:
Code
if spell.element == world.day_element then
            equip(sets.midcast['Elemental Magic'], {right_ring="Zodiac ring"})
end

if spell.element == 'Earth' then
            equip(sets.midcast['Elemental Magic'], {neck="Quanpur Necklace"})
end


This is fine and dandy, and it works, but the problem is that I end up casting in these all the time, even for the MB and Accuracy sets. How the heck do I make so that it only works with the default nuke set and not the acc and mb one?

Basically I need to tell GS to only use these in sets.midcast['Elemental Magic'] but not in sets.midcast['Elemental Magic'].Resistant and sets.midcast['Elemental Magic'].MB. How do I accomplish that? :(
 Asura.Pintseyes
Offline
Server: Asura
Game: FFXI
user: yurmy123
Posts: 115
By Asura.Pintseyes 2016-12-05 14:42:13
Link | Quote | Reply
 
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' and spell.element == world.day_element or spell.element == world.weather_element then
equip(sets.Obi)
end

Sets.obi defines my day/weather items. Obi,Zodiac,Cape

As far as sets.MB go. I use a toggle mode to turn on MB set, four items make up my mb set, rest is stored in midcast.Elemagic. If I'm not mistaking, Resistant is also a toggled mode. GS doesn't swap to MB or resistant based off events happening ingame, those are toggled on/off, gotta tell gs youre fighting something resistant or youre about to mb, turn those modes on.
 Asura.Taruranto
Offline
Server: Asura
Game: FFXI
user: Tarlant
Posts: 34
By Asura.Taruranto 2016-12-05 15:58:36
Link | Quote | Reply
 
Asura.Pintseyes said: »
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' and spell.element == world.day_element or spell.element == world.weather_element then
equip(sets.Obi)
end

Sets.obi defines my day/weather items. Obi,Zodiac,Cape

As far as sets.MB go. I use a toggle mode to turn on MB set, four items make up my mb set, rest is stored in midcast.Elemagic. If I'm not mistaking, Resistant is also a toggled mode. GS doesn't swap to MB or resistant based off events happening ingame, those are toggled on/off, gotta tell gs youre fighting something resistant or youre about to mb, turn those modes on.

I do have "modes", but they are like this:
Code
state.CastingMode:options('Normal','Accuracy','MB')


and
Code
 -- Elemental Magic sets are default for handling low-tier nukes.
    sets.midcast['Elemental Magic'] = {
    main="Akademos",
    sub="Thrace strap",
    ammo="ghastly tathlum +1",
    head="Merlinic hood",
    body="Amalric doublet",
    hands="Jhakri cuffs +1",
    legs="Merlinic shalwar",
    feet="Amalric nails",
    neck="Eddy necklace",
    waist="Refoccilation stone",
    left_ear="Friomisi earring",
    right_ear="Barkarole earring",
    left_ring="Fenrir ring +1",
    right_ring="Weatherspoon Ring",
    back="Bookworm's cape",
    ammo="ghastly tathlum +1",

}

    sets.midcast['Elemental Magic'].Resistant = set_combine(sets.midcast['Elemental Magic'], {
    left_ear="Gwati earring",
    sub="Niobid strap",
    body="Amalric doublet",
    hands="Psycloth manillas",
    left_ring="Resonance ring",
    legs="Merlinic shalwar",
    feet="Arbatel Loafers +1",
    neck="Incanter's torque",
    ammo="Kalboron stone",
 
  })

sets.midcast['Elemental Magic'].MB = set_combine(sets.midcast['Elemental Magic'], {
    body="Amalric doublet",
    feet="Jhakri pigaches +1",
    legs="Merlinic shalwar",
    neck="Mizukage-no-Kubikazari",
    left_ear="Friomisi earring",
    right_ear="Barkarole earring",
    left_ring="Locus Ring",
    right_ring="Mujin band",
})

    -- Custom refinements for certain nuke tiers
    sets.midcast['Elemental Magic'].HighTierNuke = sets.midcast['Elemental Magic'] 

    sets.midcast['Elemental Magic'].HighTierNuke.Resistant = set_combine(sets.midcast['Elemental Magic'], {
    left_ear="Gwati earring",
    body="Amalric doublet",
    legs="Merlinic shalwar",
    feet="Jhakri pigaches +1",
    neck="Incanter's torque",
    left_ring="Resonance ring",
    ammo="Kalboron stone",
})



    sets.midcast['Elemental Magic'].HighTierNuke.MB = set_combine(sets.midcast['Elemental Magic'], {
    body="Amalric doublet",
    feet="Jhakri pigaches +1",
    legs="Merlinic shalwar",
    neck="Mizukage-no-Kubikazari",
    right_ear="Barkarole earring",
    left_ear="Friomisi earring",
    left_ring="Locus Ring",
    right_ring="Mujin band",
})



So no on/off button. I switch them with ctrl+ff11. There is just no way to refer
Code
function job_post_midcast(spell, action, spellMap, eventArgs)
	if spell.skill == 'Elemental Magic' and spell.element == world.day_element or spell.element == world.weather_element then
		equip(sets.Obi)
	end


specifically to "normal"

with my current setup?
 Odin.Lygre
Offline
Server: Odin
Game: FFXI
user: Dylaudid
Posts: 89
By Odin.Lygre 2016-12-06 14:02:22
Link | Quote | Reply
 
Code
if state.CastingMode.value == 'Normal' then
	if spell.element == world.day_element then
		equip(sets.midcast['Elemental Magic'], {right_ring="Zodiac ring"})
	end
	if spell.element == 'Earth' then
		equip(sets.midcast['Elemental Magic'], {neck="Quanpur Necklace"})
	end
end

I think this is what you're looking for.
 Asura.Taruranto
Offline
Server: Asura
Game: FFXI
user: Tarlant
Posts: 34
By Asura.Taruranto 2016-12-08 16:02:43
Link | Quote | Reply
 
Odin.Lygre said: »
Code
if state.CastingMode.value == 'Normal' then
	if spell.element == world.day_element then
		equip(sets.midcast['Elemental Magic'], {right_ring="Zodiac ring"})
	end
	if spell.element == 'Earth' then
		equip(sets.midcast['Elemental Magic'], {neck="Quanpur Necklace"})
	end
end

I think this is what you're looking for.

Perfect, thanks a lot!
 Odin.Psycooo
Offline
Server: Odin
Game: FFXI
user: Psycooo
Posts: 42
By Odin.Psycooo 2016-12-10 17:15:21
Link | Quote | Reply
 
I just realized my cancel buff copy image isn't working. I was hoping to make shadows cancel each other and place utsusemi and stoneskin in a toggle for +enmity in the event I am tanking on rdm. (surprisingly more often than I thought would be possible up to tanking maju on rdm now, only 145 or higher nm I have tried so far) This way I can spam shadows and stoneskin, build hate and take minimal dmg.
Code
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job.  Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
  
-- Initialization function for this job file.
function get_sets()
    mote_include_version = 2
  
    -- Load and initialize the include file.
    include('Mote-Include.lua')
end
  
-- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
function job_setup()
    determine_haste_group()
    update_combat_form()
    LowNukes = S{'Stone' , 'Aero' , 'Blizzard' , 'Fire' , 'Water' , 'Thunder' , 
                'Stone II' , 'Aero II' , 'Blizzard II' , 'Fire II' , 'Water II' , 'Thunder II',
                'Stonega' , 'Aeroga' , 'Blizzaga' , 'Firaga' , 'Waterga' , 'Thundaga',
                'Stonega II' , 'Aeroga II' , 'Blizzaga II' , 'Firaga II' , 'Waterga II' , 'Thundaga II'}
    MndEnfeebles = S{'Slow' , 'Silence' , 'Paralyze' , 'Addle' , 'Slow II' , 'Paralyze II' , 'Addle II'}
    IntEnfeebles = S{'Bind' , 'Break' , 'Gravity' , 'Poison' , 'Sleep' , 'Gravity II' , 'Poison II' , 'Sleep II'}
 
    state.Buff.Saboteur = buffactive.saboteur or false
end
  
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job.  Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
  
-- Setup vars that are user-dependent.  Can override this function in a sidecar file.
function user_setup()
    state.OffenseMode:options('Normal', 'Mid', 'Acc')
    state.HybridMode:options('Normal', 'PDT', 'Evasion')
    state.CastingMode:options('Normal', 'Resistant')
    state.IdleMode:options('Normal', 'PDT', 'MDT')
  
    select_default_macro_book()
    gear.CureStaff = {name=""}
    gear.CureFeet = {name=""}
      
    state.MagicBurst = M(false, 'Magic Burst')
    state.CureHate = M(false, 'Cure Hate')
  
 
   
    send_command('bind !` gs c toggle MagicBurst')
    send_command('bind ^` gs c toggle CureHate')
   
end
  
  
-- Define sets and vars used by this job file.
function init_gear_sets()
    --------------------------------------
    -- Start defining the sets
    --------------------------------------
 
    -- Precast Sets
    -- Precast sets to enhance JAs
    sets.precast.JA['Chainspell'] = {body="Vitivation Tabard +1"}
      
  
    -- Waltz set (chr and vit)
    sets.precast.Waltz = {}
  
    -- Don't need any special gear for Healing Waltz.
    sets.precast.Waltz['Healing Waltz'] = {}
  
    -- Fast cast sets for spells
  
    -- 80% Fast Cast (including trait) for all spells, plus 5% quick cast
    -- No other FC sets necessary.
    sets.precast.FC = {}
  
    sets.precast.FC.Impact = set_combine(sets.precast.FC, {head=empty,body="Twilight Cloak"})
  
    -- Weaponskill sets
    -- Default set for any weaponskill that isn't any more specifically defined
    sets.precast.WS = {}
  
    sets.precast.WS['Circle Blade'] = set_combine(sets.precast.WS, {})
  
    sets.precast.WS['Sanguine Blade'] = set_combine(sets.precast.WS, {})
  
    sets.precast.WS['Requiescat'] = {}
  
    sets.precast.WS['Aeolian Edge'] = set_combine(sets.precast.WS, {})
  
    sets.precast.WS['Savage Blade'] = {}
  
    sets.precast.WS['Chant du Cygne'] = {}
  
    sets.precast.WS['True Strike'] = {}
  
    sets.precast.WS['Exenterator'] = {}
  
    sets.precast.WS['Evisceration'] = {}
  
    sets.precast.WS['Death Blossom'] = {}
    
    -- Midcast Sets
    sets.midcast.Cure = {}
    
    sets.midcast.Curaga = sets.midcast.Cure
   
    sets.midcast.CureWeather = {}
   
    sets.midcast.CureSelf = {}
    
    sets.midcast.CureMelee = {}
    
    sets.midcast['Enhancing Magic'] = {} 
    
    sets.midcast['Enhancing Magic'].Temper = {}
      
    sets.midcast['Enhancing Magic'].RegenSelf = {}
    
    sets.midcast['Enhancing Magic'].RefreshSelf = {}
    
    sets.midcast['Enhancing Magic'].HasteSelf = {}
      
    sets.midcast['Enhancing Magic'].EnSpells = set_combine(sets.midcast['Enhancing Magic'],{})
    
    sets.midcast['Enhancing Magic'].GainSpells = set_combine(sets.midcast['Enhancing Magic'],{})
      
    sets.midcast['Enhancing Magic'].BarSpells = set_combine(sets.midcast['Enhancing Magic'],{})
       
    sets.buff.ComposureOther = {head="Lethargy Chappel +1",body="Lethargy Sayon +1",
        legs="Lethargy Fuseau +1",feet="Lethargy Houseaux +1"}
    
    sets.midcast.Protect = {}
      
    sets.midcast.Shell = sets.midcast.Protect
    
    sets.midcast['Enhancing Magic'].Phalanx = {}
    
    sets.midcast.Cursna = {}
    
    sets.midcast.Stoneskin = {}
    
    sets.midcast['Enfeebling Magic'] = {}
      
    sets.midcast.MndEnfeebles = {}
  
    sets.midcast.IntEnfeebles = {}
  
      
    sets.midcast.Blind = {}
      
    sets.midcast.ElementalEnfeeble = sets.midcast.IntEnfeebles
      
    sets.midcast.Distract = {}
  
    sets.midcast.Frazzle = {}
    
    sets.midcast['Distract II'] = sets.midcast.Distract
    sets.midcast['Distract III'] = sets.midcast.Distract
  
    sets.midcast['Frazzle II'] = {}
    sets.midcast['Frazzle III'] = sets.midcast.Frazzle
  
    
    sets.midcast['Dia III'] = set_combine(sets.midcast['Enfeebling Magic'], {head="Vitivation Chapeau +1"})
    sets.midcast['Slow II'] = set_combine(sets.midcast['Enfeebling Magic'], {head="Vitivation Chapeau +1"})
      
    sets.Lunge = {}
  
    sets.Convert = {main="Murgleis"}
      
    sets.midcast['Elemental Magic'] ={}
        
      
    sets.midcast['Elemental Magic']['Low'] = {}
        
    sets.midcast.Impact = set_combine(sets.midcast['Elemental Magic'], {head=empty,body="Twilight Cloak"})
    
    sets.midcast['Stun'] = {}
    
    sets.midcast.Drain = {}
            
    sets.midcast.Aspir = sets.midcast.Drain
              
    -- Sets to return to when not performing an action.
    
    -- Resting sets
    sets.resting = {}
    
    -- Idle sets
    sets.idle = {}
    
    sets.idle.Town = {}
    
    sets.idle.Weak = {}
    
    -- Defense sets
    sets.defense.PDT = {}
    
    sets.defense.MDT = {}
    
    sets.Kiting = {}
    
    sets.latent_refresh = {}
    
    -- Engaged sets
    
    -- Variations for TP weapon and (optional) offense/defense modes.  Code will fall back on previous
    -- sets if more refined versions aren't defined.
    -- If you create a set with both offense and defense modes, the offense mode should be first.
    -- EG: sets.engaged.Dagger.Accuracy.Evasion
    
    -- Normal melee group
    sets.engaged = {}
      
    sets.engaged.Mid = {}
  
    sets.engaged.Acc = {}   
               
    sets.engaged.Evasion = sets.engaged
    sets.engaged.Mid.Evasion = sets.engaged.Mid
    sets.engaged.Acc.Evasion = sets.engaged.Acc
      
    sets.engaged.PDT = sets.defense.PDT
    sets.engaged.Mid.PDT = sets.defense.MDT
    sets.engaged.Acc.PDT = sets.defense.PDT
  
          
    -- Haste 43%
    sets.engaged.Haste_43 = set_combine(sets.engaged, {})
    sets.engaged.Mid.Haste_43 = sets.engaged.Mid
    sets.engaged.Acc.Haste_43 = sets.engaged.Acc
    sets.engaged.Evasion.Haste_43 = sets.engaged.Haste_43
    sets.engaged.PDT.Haste_43 = sets.defense.PDT
  
    -- 40
    sets.engaged.Haste_40 = set_combine(sets.engaged.Haste_43, {})
    sets.engaged.Mid.Haste_40 = sets.engaged.Mid
    sets.engaged.Acc.Haste_40 = sets.engaged.Acc
    sets.engaged.Evasion.Haste_40 = sets.engaged.Haste_40
    sets.engaged.PDT.Haste_40 = sets.defense.PDT
  
    -- 30
    sets.engaged.Haste_30 = sets.engaged
    sets.engaged.Mid.Haste_30 = sets.engaged.Mid
    sets.engaged.Acc.Haste_30 = sets.engaged.Acc
    sets.engaged.Evasion.Haste_30 = sets.engaged
    sets.engaged.PDT.Haste_30 = sets.defense.PDT
  
        -- 25
    sets.engaged.Haste_25 = set_combine(sets.engaged.Haste_30, {})
    sets.engaged.Acc.Haste_25 = sets.engaged.Acc
    sets.engaged.Mid.Haste_25 = sets.engaged.Mid
    sets.engaged.Evasion.Haste_25 = sets.engaged
    sets.engaged.PDT.Haste_25 = sets.defense.PDT
  
     -- DW nin sub melee group
    sets.engaged.DW_nin = {}
      
    sets.engaged.DW_nin.Mid = {}
  
    sets.engaged.DW_nin.Acc = {}   
               
    sets.engaged.DW_nin.Evasion = sets.engaged.DW_nin
    sets.engaged.DW_nin.Mid.Evasion = sets.engaged.DW_nin.Mid
    sets.engaged.DW_nin.Acc.Evasion = sets.engaged.DW_nin.Acc
      
    sets.engaged.DW_nin.PDT = sets.defense.PDT
    sets.engaged.DW_nin.Mid.PDT = sets.defense.MDT
    sets.engaged.DW_nin.Acc.PDT = sets.defense.PDT
  
          
    -- Haste 43%
    sets.engaged.DW_nin.Haste_43 = set_combine(sets.engaged.DW_nin, {})
    sets.engaged.DW_nin.Mid.Haste_43 = sets.engaged.DW_nin.Mid
    sets.engaged.DW_nin.Acc.Haste_43 = sets.engaged.DW_nin.Acc
    sets.engaged.DW_nin.Evasion.Haste_43 = sets.engaged.DW_nin.Haste_43
    sets.engaged.DW_nin.PDT.Haste_43 = sets.defense.PDT
  
    -- 40
    sets.engaged.DW_nin.Haste_40 = set_combine(sets.engaged.DW_nin.Haste_43, {})
    sets.engaged.DW_nin.Mid.Haste_40 = sets.engaged.DW_nin.Mid
    sets.engaged.DW_nin.Acc.Haste_40 = sets.engaged.DW_nin.Acc
    sets.engaged.DW_nin.Evasion.Haste_40 = sets.engaged.DW_nin.Haste_40
    sets.engaged.DW_nin.PDT.Haste_40 = sets.defense.PDT
  
    -- 30
    sets.engaged.DW_nin.Haste_30 = {}
    sets.engaged.DW_nin.Mid.Haste_30 = sets.engaged.DW_nin.Mid
    sets.engaged.DW_nin.Acc.Haste_30 = sets.engaged.DW_nin.Acc
    sets.engaged.DW_nin.Evasion.Haste_30 = sets.engaged.DW_nin
    sets.engaged.DW_nin.PDT.Haste_30 = sets.defense.PDT
  
        -- 25
    sets.engaged.DW_nin.Haste_25 = set_combine(sets.engaged.DW_nin.Haste_30, {})
    sets.engaged.DW_nin.Acc.Haste_25 = sets.engaged.DW_nin.Acc
    sets.engaged.DW_nin.Mid.Haste_25 = sets.engaged.DW_nin.Mid
    sets.engaged.DW_nin.Evasion.Haste_25 = sets.engaged.DW_nin
    sets.engaged.DW_nin.PDT.Haste_25 = sets.defense.PDT
 
     -- DW dnc sub melee group
    sets.engaged.DW_dnc = {}
      
    sets.engaged.DW_dnc.Mid = {}
  
    sets.engaged.DW_dnc.Acc = {}   
               
    sets.engaged.DW_dnc.Evasion = sets.engaged.DW_dnc
    sets.engaged.DW_dnc.Mid.Evasion = sets.engaged.DW_dnc.Mid
    sets.engaged.DW_dnc.Acc.Evasion = sets.engaged.DW_dnc.Acc
      
    sets.engaged.DW_dnc.PDT = sets.defense.PDT
    sets.engaged.DW_dnc.Mid.PDT = sets.defense.MDT
    sets.engaged.DW_dnc.Acc.PDT = sets.defense.PDT
  
          
    -- Haste 43%
    sets.engaged.DW_dnc.Haste_43 = set_combine(sets.engaged.DW_dnc, {})
    sets.engaged.DW_dnc.Mid.Haste_43 = sets.engaged.DW_dnc.Mid
    sets.engaged.DW_dnc.Acc.Haste_43 = sets.engaged.DW_dnc.Acc
    sets.engaged.DW_dnc.Evasion.Haste_43 = sets.engaged.DW_dnc.Haste_43
    sets.engaged.DW_dnc.PDT.Haste_43 = sets.defense.PDT
  
    -- 40
    sets.engaged.DW_dnc.Haste_40 = set_combine(sets.engaged.DW_dnc.Haste_43, {})
    sets.engaged.DW_dnc.Mid.Haste_40 = sets.engaged.DW_dnc.Mid
    sets.engaged.DW_dnc.Acc.Haste_40 = sets.engaged.DW_dnc.Acc
    sets.engaged.DW_dnc.Evasion.Haste_40 = sets.engaged.DW_dnc.Haste_40
    sets.engaged.DW_dnc.PDT.Haste_40 = sets.defense.PDT
  
    -- 30
    sets.engaged.DW_dnc.Haste_30 = sets.engaged.DW_dnc
    sets.engaged.DW_dnc.Mid.Haste_30 = sets.engaged.DW_dnc.Mid
    sets.engaged.DW_dnc.Acc.Haste_30 = sets.engaged.DW_dnc.Acc
    sets.engaged.DW_dnc.Evasion.Haste_30 = sets.engaged.DW_dnc
    sets.engaged.DW_dnc.PDT.Haste_30 = sets.defense.PDT
  
        -- 25
    sets.engaged.DW_dnc.Haste_25 = set_combine(sets.engaged.DW_dnc.Haste_30, {})
    sets.engaged.DW_dnc.Acc.Haste_25 = sets.engaged.DW_dnc.Acc
    sets.engaged.DW_dnc.Mid.Haste_25 = sets.engaged.DW_dnc.Mid
    sets.engaged.DW_dnc.Evasion.Haste_25 = sets.engaged.DW_dnc
    sets.engaged.DW_dnc.PDT.Haste_25 = sets.defense.PDT
  
  
     
    sets.magic_burst = {}
      
    sets.cure_hate = {}
          
    sets.Enmity = {}
          
    -- Sets for special buff conditions on spells.
    sets.buff.Saboteur = {hands="Lethargy Gantherots +1"}
end
  
  
              
              
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
   
function job_precast(spell, action, spellMap, eventArgs)
    if spell.skill == 'Healing Magic' and spellMap ~= 'StatusRemoval' then
        gear.CureFeet.name = "Vanya Clogs"
        if player.status == 'Engaged' then
            gear.default.obi_back = { name="Sucellos's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Cure" potency +10%',}}
            if spell.target.type == 'SELF' then
                gear.CureFeet.name = "Medium's Sabots"
            else
                gear.CureFeet.name = "Vanya Clogs"
            end
        else
            gear.default.obi_back = { name="Sucellos's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Cure" potency +10%',}}
        end
        if spell.target.type == 'SELF' then
            gear.default.obi_waist = "Chuq'aba Belt"
        else
            gear.default.obi_waist = "Salire belt"
        end
        if world.weather_element == 'Light' then
            gear.CureStaff.name = "Chatoyant Staff"
        else
            gear.CureStaff.name = "Serenity"
        end
        else
        gear.default.obi_waist = "Salire belt"
        gear.default.obi_back = { name="Sucellos's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Cure" potency +10%',}}
    end
        if spell.name == 'Lunge' or spell.name == 'Swipe' then
            equip(sets.Lunge)
            end
        if spell.name == 'Vallation' then
            equip(sets.Enmity)
        end  
        if spell.name == 'Pflug' then
            equip(sets.Enmity)
        end
        if spell.name == 'Warcry' 
        or spell.name == 'Swordplay' or spell.name == 'Rayke' or spell.name == 'Meditate' or spell.name == 'Provoke' then   
            equip(sets.Enmity)
        end
        --prevents casting Utsusemi if you already have 3 or more shadows
        if spell.name == 'Utsusemi: Ichi' and ShadowType == 'Ni' and (buffactive['Copy Image (3)'] or buffactive['Copy Image (4+)']) then
            cancel_spell()
        end
        if buffactive['terror'] or buffactive['petrification'] or buffactive['stun'] or buffactive['sleep'] then
            if TP_ind == 4 then
                equip(sets.defense.MDT) else
                equip(sets.defense.PDT)
            end
        end
        if spell.name == 'Convert' then
            equip(sets.Convert)
        end
    if (spell.type:endswith('Magic') or spell.type == "Ninjutsu") and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
        cancel_spell()
        send_command('input /item "Echo Drops" <me>')
    end 
end      
  
  
   
-- Run after the default midcast() is done.
-- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
function job_post_midcast(spell, action, spellMap, eventArgs)
    if spell.skill == 'Enfeebling Magic' and state.Buff.Saboteur then
        equip(sets.buff.Saboteur)
    elseif spell.skill == 'Enhancing Magic' and not spell.english == 'Stoneskin' then
        equip(sets.midcast.EnhancingDuration)
        if buffactive.composure and spell.target.type == 'PLAYER' then
            equip(sets.buff.ComposureOther)
        end
    elseif spellMap == 'Cure' then
        if spell.target.type == 'SELF' then
            equip(sets.midcast.CureSelf)
        end
        if state.CureHate.value then
            equip(sets.cure_hate)
        end
        if world.weather_element == 'Light' then
            equip(sets.midcast.CureWeather)
        end
    elseif spell.skill == 'Elemental Magic' then
        if state.MagicBurst.value then
            equip(sets.magic_burst)
        end
        if spell.element == world.day_element or spell.element == world.weather_element then
            equip({waist="Hachirin-no-Obi"})
        end
    elseif spell.skill == "Ninjutsu" then
            equip(sets.midcast.Recast)
            if spell.name == 'Utsusemi: Ichi' and ShadowType == 'Ni' then
                if buffactive['Copy Image'] then
                    windower.ffxi.cancel_buff(66)
                elseif buffactive['Copy Image (2)'] then
                    windower.ffxi.cancel_buff(444)
                elseif buffactive['Copy Image (3)'] then
                    windower.ffxi.cancel_buff(445)
                elseif buffactive['Copy Image (4+)'] then
                    windower.ffxi.cancel_buff(446)
            end
        elseif spell.name == 'Monomi: Ichi' and buffactive.Sneak and spell.target.type == 'SELF' then
            windower.ffxi.cancel_buff(71)
        end
    end
    if spell.name == 'Foil' or spell.name == 'Flash' or spell.name == 'Blank Gaze'
        or spell.name == 'Geist Wall' or spell.name == 'Poison Breath' or spell.name == 'Jettatura'
        or spell.name == 'Cocoon' or spell.name == 'Soporific' or spell.name == 'Sheep Song' 
        or spell.name == 'Refueling' then 
        equip(sets.Enmity)
    end
end
      
      
  
function job_get_spell_map(spell, default_spell_map)
    if spell.action_type == 'Magic' then
        if spell.skill == 'Enhancing Magic' then
            if spell.english:startswith('En') then
                return 'EnSpells'
            elseif spell.english:startswith('Gain') then
                return 'GainSpells'
            elseif spell.english:startswith('Phalanx') then
                return 'Phalanx'
            elseif spell.english:startswith('Bar') then
                return 'Bar'
            elseif spell.english:startswith('Temper') then
                return 'Temper'
            elseif spell.english:startswith('Haste') then
                if spell.target.type == 'SELF' then
                return 'HasteSelf'
                end
            elseif spell.english:startswith('Refresh') then
                if spell.target.type == 'SELF' then
                return 'RefreshSelf'
                end
            end
        elseif default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
            if player.status == 'Engaged' then
                return "CureMelee"
            end
        end
        if spell.action_type == 'Magic' then
            if spell.skill == 'Enfeebling Magic' then
                if spell.type == 'WhiteMagic' then
                    return 'MndEnfeebles'
                else
                    return 'IntEnfeebles'
                end
            elseif spell.skill == 'Elemental Magic' then
                if LowNukes:contains(spell.name) then
                    return 'Low'
                else
                    return
                end
                  
            end
        end
    end
end
  
    
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
    
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
    determine_haste_group()
    handle_equipping_gear(player.status)
end
    
    -------------------------------------------------------------------------------------------------------------------
    -- General hooks for change events.
    -------------------------------------------------------------------------------------------------------------------
  
    -- Called when a player gains or loses a buff.
    -- buff == buff gained or lost
    -- gain == true if the buff was gained, false if it was lost.
    function job_buff_change(buff, gain)
        -- If we gain or lose any haste buffs, adjust which gear set we target.
        if S{'haste','march', 'madrigal','embrava','haste samba','mighty guard'}:contains(buff:lower()) then
            determine_haste_group()
            handle_equipping_gear(player.status)
        end
        if state.Buff[buff] ~= nil then
            state.Buff[buff] = gain
            -- if not midaction() then
                handle_equipping_gear(player.status)
            -- end
        end
    end
  
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
    
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
    if player.mpp < 51 then
        idleSet = set_combine(idleSet, sets.latent_refresh)
    end
    return idleSet
end
    
-- function customize_melee_set(meleeSet)
--     if player.sub_job == 'DNC' or player.sub_job == 'NIN' then
--         meleeSet = set_combine(meleeSet, sets.engaged.DW)
--     end
--     return meleeSet
-- end 
 
 
function update_combat_form()
    -- Check for H2H or single-wielding
    if player.equipment.sub == 'empty' then
        state.CombatForm:reset()
    end
    if S{'Culminus','Genmei Shield'}:contains(player.equipment.sub) then
        state.CombatForm:reset()
    elseif player.sub_job == 'NIN' then
        state.CombatForm:set('DW_nin')
    elseif player.sub_job == 'DNC' then
        state.CombatForm:set('DW_dnc')
    end     
end
 
function job_update(cmdParams, eventArgs)
    update_combat_form()
    determine_haste_group()
end
 
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
    display_current_caster_state()
    eventArgs.handled = true
end
    
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
    function determine_haste_group()
  
        classes.CustomMeleeGroups:clear()
        -- assuming +4 for marches (ghorn has +5)
        -- Haste (white magic) 15%
        -- Haste Samba (Sub) 5%
        -- Haste (Merited DNC) 10% (never account for this)
        -- Victory March +0/+3/+4/+5    9.4/14%/15.6%/17.1% +0
        -- Advancing March +0/+3/+4/+5  6.3/10.9%/12.5%/14%  +0
        -- Embrava 30% with 500 enhancing skill
        -- Mighty Guard - 15%
        -- buffactive[580] = geo haste
        -- buffactive[33] = regular haste
        -- buffactive[604] = mighty guard
        -- state.HasteMode = toggle for when you know Haste II is being cast on you
        -- Hi = Haste II is being cast. This is clunky to use when both haste II and haste I are being cast
       if ( ( (buffactive[33] or buffactive[580] or buffactive.embrava) and (buffactive.march or buffactive[604]) ) or
             ( buffactive[33] and (buffactive[580] or buffactive.embrava) ) or
             ( buffactive.march == 2 and buffactive[604] ) ) then
            add_to_chat(8, '-------------Haste 43%-------------')
            classes.CustomMeleeGroups:append('Haste_43')
        elseif buffactive.embrava and buffactive.haste then
            add_to_chat(8, '-------------Haste 40%-------------')
            classes.CustomMeleeGroups:append('Haste_40')
        elseif ( (buffactive[33] or buffactive.march == 2 or buffactive[580]) and buffactive['haste samba'] ) then
            add_to_chat(8, '-------------Haste 35%-------------')
            classes.CustomMeleeGroups:append('Haste_35')
        elseif ( ( buffactive[580] or buffactive[33] or buffactive.march == 2 ) or
                 ( buffactive.march == 1 and buffactive[604] ) ) then
            add_to_chat(8, '-------------Haste 30%-------------')
            classes.CustomMeleeGroups:append('Haste_30')
        elseif ( buffactive.march == 1 or buffactive[604] ) then
            add_to_chat(8, '-------------Haste 15%-------------')
            classes.CustomMeleeGroups:append('Haste_15')
        elseif ( buffactive[580] and ( buffactive.march or buffactive[33] or buffactive.embrava or buffactive[604]) ) or  -- geo haste + anything
           ( buffactive.embrava and (buffactive.march or buffactive[33] or buffactive[604]) ) or  -- embrava + anything
           ( buffactive.march == 2 and (buffactive[33] or buffactive[604]) ) or  -- two marches + anything
           ( buffactive[33] and buffactive[604] and buffactive.march ) then -- haste + mighty guard + any marches
            add_to_chat(8, '-------------Max Haste Mode Enabled--------------')
            classes.CustomMeleeGroups:append('Haste_43')
        elseif ( (buffactive[604] or buffactive[33]) and buffactive['haste samba'] and buffactive.march == 1) or -- MG or haste + samba with 1 march
               ( buffactive.march == 2 and buffactive['haste samba'] ) or
               ( buffactive[580] and buffactive['haste samba'] ) then 
            add_to_chat(8, '-------------Haste 35%-------------')
            classes.CustomMeleeGroups:append('Haste_35')
        elseif ( buffactive.march == 2 ) or -- two marches from ghorn
               ( (buffactive[33] or buffactive[604]) and buffactive.march == 1 ) or  -- MG or haste + 1 march
               ( buffactive[580] ) or  -- geo haste
               ( buffactive[33] and buffactive[604] ) then  -- haste with MG
            add_to_chat(8, '-------------Haste 30%-------------')
            classes.CustomMeleeGroups:append('Haste_30')
        elseif buffactive[33] or buffactive[604] or buffactive.march == 1 then
            add_to_chat(8, '-------------Haste 15%-------------')
            classes.CustomMeleeGroups:append('Haste_15')
        end
end
  
      
  
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
    -- Default macro set/book
    if player.sub_job == 'DNC' then
        set_macro_page(2, 4)
    elseif player.sub_job == 'WHM' then
        set_macro_page(3, 4)
    elseif player.sub_job == 'NIN' then
        set_macro_page(10, 4)
    elseif player.sub_job == 'THF' then
        set_macro_page(4, 4)
    elseif player.sub_job == 'BLM' then
        set_macro_page(5, 4)
    else
        set_macro_page(1, 4)
    end
end
 Asura.Patb
Offline
Server: Asura
Game: FFXI
user: Patbee
Posts: 86
By Asura.Patb 2016-12-13 22:32:45
Link | Quote | Reply
 
Wondering if anyone can help me change my pup lua from setting petmode based on frame head, and turn it into a toggle on alt+f9.

http://pastebin.com/RBw1wc84
Code
-------------------------------------------------------------------------------------------------------------------
-- Initialization function that defines sets and variables to be used.
-------------------------------------------------------------------------------------------------------------------

-- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.

-- Initialization function for this job file.
function get_sets()
  mote_include_version = 2
  -- Load and initialize the include file.
  include('Mote-Include.lua')
end

include('organizer-lib')
-- Setup vars that are user-independent.
function job_setup()
  -- List of pet weaponskills to check for
  petWeaponskills = S{"Slapstick", "Knockout", "Magic Mortar",
    "Chimera Ripper", "String Clipper",  "Cannibal Blade", "Bone Crusher", "String Shredder",
    "Arcuballista", "Daze", "Armor Piercer", "Armor Shatterer"}

  -- Map automaton heads to combat roles
  petModes = {
    ['Harlequin Head'] = 'Melee',
    ['Sharpshot Head'] = 'Ranged',
    ['Valoredge Head'] = 'Tank',
    ['Stormwaker Head'] = 'Magic',
    ['Soulsoother Head'] = 'Tank',
    ['Spiritreaver Head'] = 'Nuke'
    }

  -- Subset of modes that use magic
  magicPetModes = S{'Nuke','Heal','Magic'}

  -- Var to track the current pet mode.
  state.PetMode = M{['description']='Pet Mode', 'None', 'Melee', 'Ranged', 'Tank', 'Magic', 'Heal', 'Nuke'}

  include('Mote-TreasureHunter')
end


-- Setup vars that are user-dependent.  Can override this function in a sidecar file.
function user_setup()
  -- Options: Override default values
  state.OffenseMode:options('Normal', 'Acc', 'Fodder')
  state.WeaponskillMode:options('Normal', 'Acc', 'Fodder')
  state.PhysicalDefenseMode:options('PDT', 'Evasion', "Pulling")
  state.MagicalDefenseMode:options('MDT')

  send_command('bind ^= gs c cycle treasuremode')

  update_pet_mode()
  select_default_macro_book()
end


-- Define sets used by this job file.
function init_gear_sets()

sets.Organizer = {
        main="Animator P",
        sub="Eminent Animator II",
        neck="Midnights",
		body="Ohtas",

    }


  sets.TreasureHunter = {waist="Chaac Belt"}
  -- Precast Sets

  -- Fast cast sets for spells
  sets.precast.FC = {
    head="Rawhide Mask",neck="Orunmila's Torque",ear1="Loquacious Earring",
    body="Anhur Robe",ring1="Veneficium Ring",ring2="Prolix Ring",
    back="Swith Cape",waist="Hurch'lan Sash",feet="Regal Pumps +1"
  }

  sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {neck="Magoraga Beads"})


  -- Precast sets to enhance JAs
  sets.precast.JA['Tactical Switch'] = {feet="Karagoz Scarpe +1"}

  sets.precast.JA['Repair'] = {
    ammo="Automaton Oil +3",
    ear1="Guignol Earring",ear2="Pratik Earring",
    legs="Desultor Tassets",feet="Foire Bab. +1"
  }

  sets.precast.JA['Maintenance'] = {ammo="Automaton Oil"}

  sets.precast.JA.Maneuver = {neck="Buffoon's Collar",ear2="Burana Earring",body="Karagoz Farsetto",hands="Puppetry Dastanas",back="Visucius's Mantle"}

  -- Waltz set (chr and vit)
  sets.precast.Waltz = {
    ear1="Roundel Earring",
    body="Pitre Tobe +1",hands="Regimen Mittens",ring1="Spiral Ring",
    back="Refraction Cape",legs="Naga Hakama",feet="Dance Shoes"}

  -- Don't need any special gear for Healing Waltz.
  sets.precast.Waltz['Healing Waltz'] = {}


  -- Weaponskill sets
  -- Default set for any weaponskill that isn't any more specifically defined
  sets.precast.WS = {
    neck="Fotia Gorget",ear1="Bladeborn Earring",ear2="Steelflash Earring",
    ring1="Rajas Ring",ring2="Epona's Ring",
    back="Dispersal Mantle",waist="Fotia Belt",legs="Samnuha Tights",}

  -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
  sets.precast.WS['Stringing Pummel'] = set_combine(sets.precast.WS, {
    ear1="Brutal Earring",ear2="Moonshade Earring",
    ring1="Spiral Ring"})

  sets.precast.WS['Victory Smite'] = set_combine(sets.precast.WS, {
    ear1="Brutal Earring",ear2="Moonshade Earring",
    ring1="Pyrosoul Ring"})

  -- Midcast Sets

  -- Midcast sets for pet actions
  sets.midcast.Pet.Cure = {
    head="Naga Somen",
    body="Naga Samue",hands="Regimen Mittens",ring1="Kunaji Ring",ring2="Thurandaut Ring",
    back="Refraction Cape",waist="Ukko Sash",legs="Naga Hakama",feet="Foire Bab. +1"}

  sets.midcast.Pet['Elemental Magic'] = {
    head="Rawhide Mask",
	neck="Deino Collar",
	ear1="Charivari Earring",
	ear2="Burana Earring",
    hands="Naga Tekko",
	ring1="",
	ring2="Thurandaut Ring",
    back="Argochampsa Mantle",
	waist="Ukko Sash",
	legs={ name="Herculean Trousers", augments={'Pet: "Mag.Atk.Bns."+29','Pet: "Store TP"+5','Pet: INT+10','Pet: Attack+9 Pet: Rng.Atk.+9',}},
    feet={ name="Herculean Boots", augments={'Pet: "Mag.Atk.Bns."+23','Pet: "Dbl.Atk."+1 Pet: Crit.hit rate +1','Pet: INT+7','Pet: Attack+12 Pet: Rng.Atk.+12',}},}

  sets.midcast.Pet.WeaponSkill = {
    head="Karagoz Capello +1",neck="Empath Necklace",ear1="Charivari Earring",ear2="Burana Earring",
    body="Pitre Tobe +1",hands="Karagoz Guanti +1",ring1="Overbearing Ring",ring2="Thurandaut Ring",
    back="Dispersal Mantle",waist="Ukko Sash",legs="Karaggoz Pantaloni +1",feet="Naga Kyahan"}


  -- Sets to return to when not performing an action.

  -- Resting sets
  sets.resting = {
    head="Pitre Taj +1",neck="Wiglen Gorget",ear1="Infused Earring",ear2="Burana Earring",
    ring1="Sheltered Ring",ring2="Paguroidea Ring",
    back="Contriver's Cape"}

  -- Idle sets
  sets.idle = {
    ammo="Automat. Oil +3",
    head="Rao Kabuto",neck="Wiglen Gorget",ear1="Infused Earring",ear2="Burana Earring",
    body="Rao Togi", hands="Rao Kote",ring1="Sheltered Ring",ring2="Paguroidea Ring",
    back="Mecistopins Mantle",waist="Lycopodium Sash",legs="Rao Haidate",feet="Hermes' Sandals"}

	sets.idle.PDT = {
	main="Earth Staff",
    head="Rao Kabuto",neck="Twilight Torque",ear1="Heartseeker Earring",
    body="Qaaxo Harness",hands="Rao Kote", ring1="Defending Ring",ring2="Dark Ring",
    back="Cheviot Cape",waist="Flume Belt",legs=="Rao Haidate", feet="Hermes' Sandals",
  }

  -- Set for idle while pet is out (eg: pet regen gear)
  sets.idle.Pet = set_combine(sets.idle, {neck="Empath Necklace",ring2="Thurandaut Ring",back="Mecistopins Mantle",waist="Isa Belt"})
  sets.idle.PDT.Pet = sets.idle.PDT
  -- Idle sets to wear while pet is engaged
  sets.idle.Pet.Engaged = {
    range="Animator P",
    ammo="Automat. Oil +3",
    head="Tali'ah Turban +1",
    body="Tali'ah Manteel +1",
    hands="Tali'ah Gages +1",
    legs="Tali'ah Seraweels +1",
    feet="Tali'ah Crackows +1",
    neck="Empath Necklace",
    waist="Hurch'lan Sash",
    left_ear="Zennaroi Earring",
    right_ear="Steelflash Earring",
    left_ring="Overbearing Ring",
    right_ring="Paguroidea Ring",
    back={ name="Visucius's Mantle", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Accuracy+20 Attack+20','Pet: Haste+10',}}
	}

  sets.idle.Pet.Engaged.Ranged = {
      main={ name="Ohtas", augments={'Accuracy+70','Pet: Accuracy+70','Pet: Haste+10%',}},
      range="Animator P",
      ammo="Automat. Oil +3",
      head="Tali'ah Turban +1",
      body="Tali'ah Manteel +1",
      hands="Tali'ah Gages +1",
      legs="Tali'ah Seraweels +1",
      feet="Tali'ah Crackows +1",
      neck="Empath Necklace",
      waist="Incarnation Sash",
      left_ear="Domesticator's Earring",
      right_ear="Rimeice Earring",
      left_ring="Varar Ring",
      right_ring="Varar Ring",
      back={ name="Visucius's Mantle", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Accuracy+20 Attack+20','Pet: Haste+10',}},
    }
  sets.idle.Pet.Engaged.Nuke = set_combine(sets.idle.Pet.Engaged, {legs="Karaggoz Pantaloni +1",feet="Pitre Babouches +1"})
  sets.idle.Pet.Engaged.Magic = sets.idle.Pet.Engaged

 	sets.idle.Pet.Engaged.Tank = {
	  ammo="Automat. Oil +3",
    head="Rao Kabuto",
    body="Rao Togi",
    hands="Rao Kote",
    legs="Rao Haidate",
    feet="Rao Sune-Ate",
    neck="Empath Necklace",
    waist="Isa Belt",
    left_ear="Domesticator's Earring",
    right_ear="Handler's Earring +1",
    left_ring="Varar Ring",
    right_ring="Varar Ring",
    back="Visucius's Mantle",}


  -- Engaged sets

  -- Variations for TP weapon and (optional) offense/defense modes.  Code will fall back on previous
  -- sets if more refined versions aren't defined.
  -- If you create a set with both offense and defense modes, the offense mode should be first.
  -- EG: sets.engaged.Dagger.Accuracy.Evasion
sets.inwkr = {
		neck="Ygnas's Resolve +1"}
  -- Normal melee group
  sets.engaged = {
    head="Tali'ah Turban +1",
    body="Tali'ah Manteel +1",
    hands="Tali'ah gages +1",
    legs="Samnuha Tights",
    feet={ name="Herculean Boots", augments={'Accuracy+28','"Triple Atk."+3','Attack+15',}},
    neck="Clotharius Torque",
    waist="Grunfeld Rope",
    left_ear="Bladeborn Earring",
    right_ear="Steelflash Earring",
    left_ring="Apate Ring",
    right_ring="Cacoethic Ring",
    back={ name="Visucius's Mantle", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Accuracy+20 Attack+20','Pet: Haste+10',}},
	}

  sets.engaged.Acc = set_combine(sets.engaged, {
  })

end


-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks that are called to process player actions at specific points in time.
-------------------------------------------------------------------------------------------------------------------

-- Called when player is about to perform an action
function job_precast(spell, action, spellMap, eventArgs)
  custom_aftermath_timers_precast(spell)
end

function job_aftercast(spell, action, spellMap, eventArgs)
  custom_aftermath_timers_aftercast(spell)
end

-- Called when pet is about to perform an action
function job_pet_midcast(spell, action, spellMap, eventArgs)
  if petWeaponskills:contains(spell.english) then
    classes.CustomClass = "Weaponskill"
  end
end


-------------------------------------------------------------------------------------------------------------------
-- General hooks for other game events.
-------------------------------------------------------------------------------------------------------------------

-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)
  if buff == 'Wind Maneuver' then
    handle_equipping_gear(player.status)
  end
end

-- Called when a player gains or loses a pet.
-- pet == pet gained or lost
-- gain == true if the pet was gained, false if it was lost.
function job_pet_change(pet, gain)
  update_pet_mode()
end

-- Called when the pet's status changes.
function job_pet_status_change(newStatus, oldStatus)
  if newStatus == 'Engaged' then
    display_pet_status()
  end
end
if buffactive["reive mark"] then
        equip(sets.inwkr)
end

-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------

-- Called for custom player commands.
function job_self_command(cmdParams, eventArgs)
  if cmdParams[1] == 'maneuver' then
    if pet.isvalid then
      local man = defaultManeuvers[state.PetMode]
      if man and tonumber(cmdParams[2]) then
        man = man[tonumber(cmdParams[2])]
      end

      if man then
        send_command('input /pet "'..man..'" <me>')
      end
    else
      add_to_chat(123,'No valid pet.')
    end
  end
end


-- Called by the 'update' self-command, for common needs.
-- Set eventArgs.handled to true if we don't want automatic equipping of gear.
function job_update(cmdParams, eventArgs)
  update_pet_mode()
end


-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
  local defenseString = ''
  if state.Defense.Active then
    local defMode = state.Defense.PhysicalMode
    if state.Defense.Type == 'Magical' then
      defMode = state.Defense.MagicalMode
    end

    defenseString = 'Defense: '..state.Defense.Type..' '..defMode..', '
  end

  add_to_chat(122,'Melee: '..state.OffenseMode..'/'..state.DefenseMode..', WS: '..state.WeaponskillMode..', '..defenseString..
    'Kiting: '..on_off_names[state.Kiting])

  display_pet_status()

  eventArgs.handled = true
end


-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------

-- Get the pet mode value based on the equipped head of the automaton.
-- Returns nil if pet is not valid.
function get_pet_mode()
  if pet.isvalid then
    return petModes[pet.head] or 'None'
  else
    return 'None'
  end
end

-- Update state.PetMode, as well as functions that use it for set determination.
function update_pet_mode()
  state.PetMode:set(get_pet_mode())
  update_custom_groups()
end

-- Update custom groups based on the current pet.
function update_custom_groups()
  classes.CustomIdleGroups:clear()
  if pet.isvalid then
    classes.CustomIdleGroups:append(state.PetMode.value)
  end
end

-- Display current pet status.
function display_pet_status()
  if pet.isvalid then
    local petInfoString = pet.name..' ['..pet.head..']: '..tostring(pet.status)..'  TP='..tostring(pet.tp)..'  HP%='..tostring(pet.hpp)

    if magicPetModes:contains(state.PetMode) then
      petInfoString = petInfoString..'  MP%='..tostring(pet.mpp)
    end

    add_to_chat(122,petInfoString)
  end
end

-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
  -- Default macro set/book
  if player.sub_job == 'DNC' then
    set_macro_page(1, 13)
  elseif player.sub_job == 'NIN' then
    set_macro_page(1, 13)
  elseif player.sub_job == 'THF' then
    set_macro_page(1, 13)
  else
    set_macro_page(1, 13)
  end
end
Offline
Posts: 428
By Selindrile 2016-12-14 08:10:46
Link | Quote | Reply
 
As always, make a backup but I think this should be pretty easy.

Delete lines: 52 and 295 and 334 and 375. (Where the functions update_pet_mode() and get_pet_mode() are called because these are what automatically changes the modes.)

Delete lines: 23-30 and replace with:
Code
petModes = {'Melee','Ranged','Tank','Magic','Heal','Nuke'}


Also add this in user_setup() :

send_command('bind !f9 gs c cycle petMode')

See if that does the trick for you.
Offline
Posts: 428
By Selindrile 2016-12-14 08:27:13
Link | Quote | Reply
 
@Psycooo Do you have the addon cancel active? Where the buff cancelling is done in Motetenten's gearswaps is actually in the libs, not in your job file.
 Odin.Psycooo
Offline
Server: Odin
Game: FFXI
user: Psycooo
Posts: 42
By Odin.Psycooo 2016-12-14 13:10:59
Link | Quote | Reply
 
Selindrile said: »
@Psycooo Do you have the addon cancel active? Where the buff cancelling is done in Motetenten's gearswaps is actually in the libs, not in your job file.

I didn't for a while, but then I finally added it both with and without the cancel buff code and it still didn't remove shadows, removed sneak though(spell didn't try ninjustu sneak)

I can cast ichi and ni over ichi, but not have ichi cast over Ni, which is the point that I would like as well. (I know that sounds kinda stupid, but my recast on shadows is so low I can keep shadows/stoneskin up full time that way.)

Keeps showing up as Utsusemi: Ichi has no effect.
 Cerberus.Kvazz
Offline
Server: Cerberus
Game: FFXI
user: kvazz
Posts: 5345
By Cerberus.Kvazz 2016-12-14 13:19:06
Link | Quote | Reply
 
Hi!

This might not be the right place to ask at all.

Buuut I have'nt played since the spellcast days, this "gearswap" seems to be the new plugin all the cool kids are using?

Is there any database with good... .xmls? .gearswaps? (what kinda files are these? .lua?)

I want to know what I'm up against before I reinstall the game O.O
 Bismarck.Mitchel
Offline
Server: Bismarck
Game: FFXI
Posts: 153
By Bismarck.Mitchel 2016-12-14 16:16:07
Link | Quote | Reply
 
Could anyone figure out why my gun keeps getting unequipped since the update? Thanks.

Edit - Disregard, I am dumb, had Sapience Orb in FC set
 Asura.Pintseyes
Offline
Server: Asura
Game: FFXI
user: yurmy123
Posts: 115
By Asura.Pintseyes 2016-12-14 16:30:13
Link | Quote | Reply
 
Cerberus.Kvazz said: »
Hi!

This might not be the right place to ask at all.

Buuut I have'nt played since the spellcast days, this "gearswap" seems to be the new plugin all the cool kids are using?

Is there any database with good... .xmls? .gearswaps? (what kinda files are these? .lua?)

I want to know what I'm up against before I reinstall the game O.O

I don't know about cool kids as I'm not one. But gearswap is the "new" spellcast. The files used are LUA. You can find some lua's in the beta_examples_and_information folder inside the gearswap folder.

A lot of people use something called "Motes". Here is the website for that.

https://github.com/Kinematics/GearSwap-Jobs

welcome back and best of luck with your endeavors.
[+]
 Asura.Patb
Offline
Server: Asura
Game: FFXI
user: Patbee
Posts: 86
By Asura.Patb 2016-12-15 00:48:17
Link | Quote | Reply
 
Selindrile said: »
As always, make a backup but I think this should be pretty easy.
Delete lines: 52 and 295 and 334 and 375. (Where the functions update_pet_mode() and get_pet_mode() are called because these are what automatically changes the modes.)
Delete lines: 23-30 and replace with:
Code
petModes = {'Melee','Ranged','Tank','Magic','Heal','Nuke'}

Also add this in user_setup() :
send_command('bind !f9 gs c cycle petMode')
See if that does the trick for you.

Yes this worked amazingly thank you very much!
[+]
First Page 2 3 ... 113 114 115 ... 180 181 182
Log in to post.