| 
    
    
 | 
    
    
        
 
    Gearswap Support Thread
 
    
        
        
        
            
                
                      Phoenix.Yocuz 
                    
                    
                                                            
                                                    
                                                                            
                                Server: Phoenix 
                                Game: FFXI 
                                
                                                                    Posts: 40 
                                                             
                                             
                    
                                        
                    
                    
                 
             
            
                
			
			By Phoenix.Yocuz 2014-07-12 19:24:25			
			
						
                     
                 
                is what i want even possible?                                     
                
             
                        
         
        
        
        
            
                
                    
                    VIP 
                    
                                                            
                                                    
                                                                            
                                Server: Fenrir 
                                Game: FFXI 
                                
                                                                    Posts: 764 
                                                             
                                             
                    
                                        
                    
                    
                 
             
            
                
			
			By Fenrir.Motenten 2014-07-12 19:36:58			
			
						
                     
                 
                http://pastebin.com/KBRzF8yB
the rule is on line 8 for my cure set
 
its defined at 514 
 
like i stated i would love to be able to turn off fast cast in the same manner   
is what i want even possible? 
Possible, but largely pointless.  Precast gear is on for an infinitesimal amount of time, until midcast gear is put on.  There is absolutely no downside to equipping fast cast.
 
I can only imagine that you want to disable fast cast so that you aren't casting in fast cast gear during the midcast portion.  If that's the case, your question and approach to the problem is wrong.  What you should instead be doing is ensuring that your midcast sets always replace any pieces used in your precast/fast cast set.  That's an issue with your set construction, not specialty rules.                                      
                
             
                        
         
        
        
        
            
            
                
			
			By Crazy6868 2014-07-12 19:39:01			
			
						
                     
                 
                Need help with my Gearswap i am trying to us obis but i dont know code at all and need help  
I need some weather rules
 http://pastebin.com/RJD0w9yz                                     
                
             
                        
         
        
        
        
            
                
                      Phoenix.Yocuz 
                    
                    
                                                            
                                                    
                                                                            
                                Server: Phoenix 
                                Game: FFXI 
                                
                                                                    Posts: 40 
                                                             
                                             
                    
                                        
                    
                    
                 
             
            
                
			
			By Phoenix.Yocuz 2014-07-12 19:40:57			
			
						
                     
                 
                the problem is i wanted to disable my cure set for tough fights due to the lack of def on the gear now when i disable it it lets the fast cast gear on till the spells done casting which again is low def gear                                     
                
             
                        
         
        
        
        
            
                
                      Phoenix.Yocuz 
                    
                    
                                                            
                                                    
                                                                            
                                Server: Phoenix 
                                Game: FFXI 
                                
                                                                    Posts: 40 
                                                             
                                             
                    
                                        
                    
                    
                 
             
            
                
			
			By Phoenix.Yocuz 2014-07-12 19:45:19			
			
						
                     
                 
                and as a pld there is a point because in hard mode battles u want to swap sets minimally i just dont want to tank something and get one shotted because of a gear change at the wrong time its the logic that went into thinking i needed a way to disable it                                     
                
             
                        
         
        
        
        
            
                
                      Asura.Nanabi 
                    
                    
                                                            
                                                    
                                                                            
                                Server: Asura 
                                Game: FFXI 
                                
                                                                    Posts: 340 
                                                             
                                             
                    
                                        
                    
                    
                 
             
            
                
			
			By Asura.Nanabi 2014-07-12 20:00:48			
			
						
                     
                 
                Trying to clean my WHM gearswap files and after I did everything it just isn't working, right now it keeps on saying it detected an error in the user function get sets but I can't see anything wrong with it! >< 
I defined the set idle though.... Code  
function get_sets()
 
        --Idle Sets--
	set.Idle = {} 		
		
	sets.Idle.Default = {		main="Bolelabunga",
								sub="Genbu's shield",
								ammo="mana ampulla",
								head="Gendewitha caubeen +1",
								neck="twilight torque",
								ear1="Hearty Earring",
								ear2="Ethereal Earring",
								body="Gendewitha Bilaut +1",
								hands="Serpentes Cuffs",
								ring1="Dark Ring",
								ring2="Defending Ring",
								back="Umbra Cape",
								waist="Slipor Sash",
								legs="Nares Trews",
								feet="Serpentes Sabots"}
                                                       
    --Precast Sets--  
	set.Precast = {}       
       
	sets.Precast.FCCure = {		sub="Genbu's Shield",
								ammo ="Incantor Stone",
								head="Nahtirah Hat",
								neck="Orison Locket",
								ear1="Loquacious Earring",
								body="Heka's Kalasiris",
								hands="Gendewitha Gages",
								ring1="Prolix Ring",
								back="Pahtli cape",
								waist="Witful Belt",
								legs="Artsieq Hose",
								feet="Cure Clogs"}
                           
    sets.Precast.FC = {			sub="Thuellaic Ecu",
								ammo="Incantor Stone",
								head="Nahtirah Hat",
								neck="Orison locket",
								ear1="Loquacious Earring",
								body="Anhur robe",
								hands="Gendewitha Gages",
								ring2="Prolix Ring",
								back="Swith Cape +1",
								waist="Witful Belt",
								legs="Artsieq Hose",
								feet="chelona boots"}
    --Midcast Sets--  
 
        set.Midcast = {} 
	sets.Midcast.Cure = {		main="Tamaxchi",
								sub="genbu's shield",
								ammo="mana ampulla",
								head="Gendewitha caubeen +1",
								neck="Colossus's torque",
								ear1="Beatific Earring",
								ear2="Novia Earring",
								body="Orison bliaud +2",
								hands="Bokwus Gloves",
								ring1="Sirona's Ring",
								ring2="Haoma's Ring",
								back="Tempered cape",
								waist="Pythia Sash +1",
								legs="Orison Pantaloons +2",
								feet="Rubeus boots"}
                                                               
	sets.Midcast.PS = {			main="Beneficus",
								sub="genbu's shield",
								ammo="Mana ampulla",
								head="Orison cap +2",
								neck="colossus's torque",
								ear1="Brachyura earring",
								ear2="Novia Earring",
								body="Anhur robe",
								hands="Dynasty Mitts",
								ring1="Sheltered Ring",
								ring2="Haoma's Ring",
								back="Merciful cape",
								waist="Olympus sash",
								legs="Cleric's pantaloons +2",
								feet="Orison Duckbills +2"}
																
	sets.Midcast.status = {		main="Beneficus",
								sub="Thuellaic Ecu",
								ammo="Incantor stone",
								head="Orison cap +2",
								neck="Orison locket",
								ear1="Loquacious Earring",
								ear2="Novia Earring",
								body="Anhur robe",
								hands="Orison Mitts +2",
								ring1="prolix Ring",
								ring2="Defending Ring",
								back="Swith Cape +1",
								waist="Witful belt",
								legs="Artsieq Hose",
								feet="Chelona boots"}                                                          
 
	sets.Midcast.RecastFC = {	sub="Thuellaic Ecu",
								ammo="Impatiens",
								head="Nahtirah Hat",
								neck="Orison locket",
								ear1="Loquacious Earring",
								body="Anhur robe",
								hands="Gendewitha Gages",
								ring2="Prolix Ring",
								back="Swith Cape +1",
								waist="Witful Belt",
								legs="Artsieq Hose",
								feet="chelona boots"}
																
	sets.Midcast.Curse = {		main="Beneficus",
								sub="Thuellaic Ecu",
								ammo="Incantor Stone",
								head="Zelus Tiara",
								neck="Malison Medallion",
								ear1="Loquacious Earring",
								ear2="Beatific Earring",
								body="Orison Bliaud +2",
								hands="Orison Mitts +2",
								ring1="Haoma's Ring",
								ring2="Haoma's Ring",
								back="Mending Cape",
								waist="Bishop's Sash",
								legs="Orison Pantaloons +2",
								feet="Gendewitha galoshes +1"}  																
                                                               
end
  
        --Define Actions--
       
function precast(spell)
        if spell.name:startswith('Cure') or spell.name:startswith('Cura') then
                        equip(sets.Precast.FCCure)
			elseif spell.type == 'Magic' then
                equip(sets.Precast.FC)
        end
end                                                    
function midcast(spell)
		if S{'Protect','Shell','Boost'}:contains(spell.name) or string.find(spell.english,'Bar') then
					equip(sets.Midcast.PS)
			elseif	string.find(spell.english,'Cursna')	then
				equip(sets.Midcast.Curse)
			elseif S{'Poisona','Viruna','Paralyna','Blindna','Silena','Stona'}:contains(spell.name) then 
				equip(sets.Midcast.status)
			elseif string.find(spell.english,'Cure') or string.find(spell.english,'Cura') then
				equip(sets.Midcast.Cure)	
			elseif spell.type == 'Magic' then
                equip(sets.Midcast.RecastFC)
		end
end
				
function aftercast(spell)
    if spell.action_type == 'Magic' then
        equip(sets.Idle.Default)
    end
end
 
EDIT: fixed everything and actually working now, but the finding an error in gearswap is such a pain D: 
also here's a working easy and clean WHM file I think...
 
EDITV2: for small update Code  
function get_sets()
    sets.FC = {					sub="Thuellaic Ecu",
								ammo="Incantor Stone",
								head="Nahtirah Hat",
								neck="Orison locket",
								ear1="Loquacious Earring",
								body="Anhur robe",
								hands="Gendewitha Gages",
								ring1="Defending Ring",
								ring2="Prolix Ring",
								back="Swith Cape +1",
								waist="Witful Belt",
								legs="Artsieq Hose",
								feet="chelona boots"}
	sets.RecastFC = set_combine(sets.FC,{ammo="Impatiens"})
								
	sets.PS = {					main="Beneficus",
								sub="genbu's shield",
								ammo="Mana ampulla",
								head="Orison cap +2",
								neck="colossus's torque",
								ear1="Brachyura earring",
								ear2="Novia Earring",
								body="Anhur robe",
								hands="Dynasty Mitts",
								ring1="Sheltered Ring",
								ring2="Haoma's Ring",
								back="Merciful cape",
								waist="Olympus sash",
								legs="Cleric's pantaloons +2",
								feet="Orison Duckbills +2"}
						
 
        --Idle Sets--
	sets.idle = {}
	sets.idle_default = {		main="Bolelabunga",
								sub="Genbu's shield",
								ammo="mana ampulla",
								head="Gendewitha caubeen +1",
								neck="twilight torque",
								ear1="Hearty Earring",
								ear2="Ethereal Earring",
								body="Gendewitha Bilaut +1",
								hands="Serpentes Cuffs",
								ring1="Dark Ring",
								ring2="Defending Ring",
								back="Umbra Cape",
								waist="Slipor Sash",
								legs="Nares Trews",
								feet="Serpentes Sabots"}
								
	sets.idle.MP = set_combine(sets.idle_default,{
								head="Nefer Khat",
								body="Heka's Kalasiris",
								waist="Fucho-no-obi"})
                                                       
    --Precast Sets--  
	sets.precast = {}       
	sets.precast.FCCure = set_combine(sets.FC,{
								ammo="Impatiens",
								body="Heka's Kalasiris",
								back="Pahtli cape",
								waist="Witful Belt",
								feet="Cure Clogs"})
							
	sets.precast.PS = set_combine(sets.FC,{waist="Siegel sash"})
                           
    --Midcast Sets--  
 
	sets.midcast = {}
	sets.midcast.stoneskin = set_combine(sets.RecastFC,{waist="Siegel sash"})
	sets.midcast.Cure = {		main="Tamaxchi",
								sub="genbu's shield",
								ammo="mana ampulla",
								head="Gendewitha caubeen +1",
								neck="Colossus's torque",
								ear1="Beatific Earring",
								ear2="Novia Earring",
								body="Orison bliaud +2",
								hands="Bokwus Gloves",
								ring1="Sirona's Ring",
								ring2="Haoma's Ring",
								back="Tempered cape",
								waist="Pythia Sash +1",
								legs="Orison Pantaloons +2",
								feet="Rubeus boots"}
                                                               
																
	sets.midcast.Status = {		main="Beneficus",
								sub="Thuellaic Ecu",
								ammo="Incantor stone",
								head="Orison cap +2",
								neck="Orison locket",
								ear1="Loquacious Earring",
								ear2="Novia Earring",
								body="Anhur robe",
								hands="Orison Mitts +2",
								ring1="prolix Ring",
								ring2="Defending Ring",
								back="Swith Cape +1",
								waist="Witful belt",
								legs="Artsieq Hose",
								feet="Chelona boots"}                                                          
 
	sets.midcast.RecastFC = {	sub="Thuellaic Ecu",
								ammo="Impatiens",
								head="Nahtirah Hat",
								neck="Orison locket",
								ear1="Loquacious Earring",
								body="Anhur robe",
								hands="Gendewitha Gages",
								ring1="Defending Ring",
								ring2="Prolix Ring",
								back="Swith Cape +1",
								waist="Witful Belt",
								legs="Artsieq Hose",
								feet="chelona boots"}
																
	sets.midcast.Curse = {		main="Beneficus",
								sub="Thuellaic Ecu",
								ammo="Incantor Stone",
								head="Orison cap +2",
								neck="Malison Medallion",
								ear1="Loquacious Earring",
								ear2="Beatific Earring",
								body="Orison Bliaud +2",
								hands="Orison Mitts +2",
								ring1="Haoma's Ring",
								ring2="Haoma's Ring",
								back="Mending Cape",
								waist="Bishop's Sash",
								legs="Orison Pantaloons +2",
								feet="Gendewitha galoshes +1"}  																
                                                               
end
  
        --Define Actions--
       
function precast(spell)
	if spell.action_type == 'Magic' then
        if spell.name:startswith('Cure') or spell.name:startswith('Cura') then
                        equip(sets.precast.FCCure)
			elseif	S{'Stoneskin','Protect','Protect II','Protect III','Protect IV','Protect V','Protectra','Protectra II','Protectra III','Protectra IV','Protectra V','Shell','Shell II','Shell III','Shell IV','Shell V','Shellra','Shellra II','Shellra III','Shellra IV','Shellra V','Boost-STR','Boost-DEX','Boost-INT','Boost-VIT','Boost-CHR','Boost-MND','Boost-AGI','Baramnesra','Barsleepra','Barpoisonra','Barparalyzra','Barblindra','Barsilencera','Barpetra','Barvira','Barfira','Barblizzara','Baraera','Barstonra','Barthundra','Barwatera'}:contains(spell.name) then
				equip(sets.precast.PS)
			else
                equip(sets.FC)
        end
	end
end                                                    
function midcast(spell)
	if	spell.action_type == 'Magic' then
			if	S{'Protect','Protect II','Protect III','Protect IV','Protect V','Protectra','Protectra II','Protectra III','Protectra IV','Protectra V','Shell','Shell II','Shell III','Shell IV','Shell V','Shellra','Shellra II','Shellra III','Shellra IV','Shellra V','Boost-STR','Boost-DEX','Boost-INT','Boost-VIT','Boost-CHR','Boost-MND','Boost-AGI','Baramnesra','Barsleepra','Barpoisonra','Barparalyzra','Barblindra','Barsilencera','Barpetra','Barvira','Barfira','Barblizzara','Baraera','Barstonra','Barthundra','Barwatera'}:contains(spell.name) then
					equip(sets.PS)
			elseif	string.find(spell.english,'Cursna')	then
				equip(sets.midcast.Curse)
			elseif	string.find(spell.english,'Stoneskin')	then
				equip(sets.midcast.stoneskin)
			elseif S{'Poisona','Viruna','Paralyna','Blindna','Silena','Stona'}:contains(spell.name) then 
				equip(sets.midcast.status)
			elseif string.find(spell.english,'Cure') or string.find(spell.english,'Cura') then
				equip(sets.midcast.Cure)	
			else
                equip(sets.RecastFC)
		end
	end
end
function aftercast(spell)
    if spell.action_type == 'Magic' then
		if player.mpp < 51 then
				equip(sets.idle.MP)
			else
				equip(sets.idle_default)
		end
    end
end
 
                                      
                
             
                        
         
        
        
        
            
                
                      Phoenix.Yocuz 
                    
                    
                                                            
                                                    
                                                                            
                                Server: Phoenix 
                                Game: FFXI 
                                
                                                                    Posts: 40 
                                                             
                                             
                    
                                        
                    
                    
                 
             
            
                
			
			By Phoenix.Yocuz 2014-07-12 20:07:01			
			
						
                     
                 
                i kind of see what your saying mote but i am not sure how to rig the rule so that if i disable it to cast in a pdt set just worried that if i also define a set to use for it and i fight a mob like AA MR during 25% and less i need to stay in mdt gear not pdt 
 
its why i wanted it just disabled so i would stay in current gear set again for the high lvl mob fights                                     
                
             
                        
         
        
        
        
            
                
                    
                    VIP 
                    
                                                            
                                                    
                                                                            
                                Server: Fenrir 
                                Game: FFXI 
                                
                                                                    Posts: 764 
                                                             
                                             
                    
                                        
                    
                    
                 
             
            
                
			
			By Fenrir.Motenten 2014-07-12 21:32:39			
			
						
                     
                 
                Yocuz said:  the problem is i wanted to disable my cure set for tough fights due to the lack of def on the gear now when i disable it it lets the fast cast gear on till the spells done casting which again is low def gear  
 
and as a pld there is a point because in hard mode battles u want to swap sets minimally i just dont want to tank something and get one shotted because of a gear change at the wrong time its the logic that went into thinking i needed a way to disable it  
 
i kind of see what your saying mote but i am not sure how to rig the rule so that if i disable it to cast in a pdt set just worried that if i also define a set to use for it and i fight a mob like AA MR during 25% and less i need to stay in mdt gear not pdt 
 
its why i wanted it just disabled so i would stay in current gear set again for the high lvl mob fights  
Change: Code  
function midcast(spell,action)
    if string.find(spell.english,'Cure') and curepos then
        equip(sets.midcast.Cure)
    elseif string.find(spell.english,'Flash') then
        equip(sets.precast.Enmity)
    elseif string.find(spell.english,'Holy') then
        equip(sets.midcast.Nuke)
    end
end
 
To: Code  
function midcast(spell,action)
    if spell.english:startswith('Cure') then
        if curepos then
            equip(sets.midcast.Cure)
        else
            equip(sets.aftercast.TP)
        end
    elseif spell.english == 'Flash' then
        equip(sets.precast.Enmity)
    elseif spell.english:startswith('Holy') then
        equip(sets.midcast.Nuke)
    end
end
 
Note: changed string functions as well, to more efficient designs.
 
Anyway, it's a trivial change to make it work.                                      
                
             
                        
         
        
        
        
            
                
                      Asura.Nanabi 
                    
                    
                                                            
                                                    
                                                                            
                                Server: Asura 
                                Game: FFXI 
                                
                                                                    Posts: 340 
                                                             
                                             
                    
                                        
                    
                    
                 
             
            
                
			
			By Asura.Nanabi 2014-07-12 21:54:40			
			
						
                     
                 
                I got another noobish question D: 
For gears like Fucho-no-obi, what would it look like in the aftercast function?
 Code  
function aftercast(spell)
    if spell.action_type == 'Magic' then
        if ??????????????????????? then 
            equip(sets.idle.MP)
        else
            equip(sets.idle.default)
    end
end
                                      
                
             
                        
         
        
        
        
            
            
                
			
			By fractalvoid 2014-07-12 22:11:54			
			
						
                     
                 
                I got another noobish question D: 
For gears like Fucho-no-obi, what would it look like in the aftercast function?
 Code  
function aftercast(spell)
    if spell.action_type == 'Magic' then
        if ??????????????????????? then 
            equip(sets.idle.MP)
        else
            equip(sets.idle.default)
    end
endCode  function customize_idle_set(idleSet)
    if player.mpp < 51 then
        idleSet = set_combine(idleSet, sets.latent_refresh)
    end
return idleSet
end 
is what i use.
 Code  	-- Latent Idle Set --
	sets.latent_refresh = {waist="Fucho-no-obi"} is the gearset obviously.                                             
                                     
                
             
                            
                    [+]
                                             
                                        
                 
                        
         
        
        
        
            
                
                      Phoenix.Yocuz 
                    
                    
                                                            
                                                    
                                                                            
                                Server: Phoenix 
                                Game: FFXI 
                                
                                                                    Posts: 40 
                                                             
                                             
                    
                                        
                    
                    
                 
             
            
                
			
			By Phoenix.Yocuz 2014-07-12 22:15:24			
			
						
                     
                 
                thanks i guess i will have to edit which set to put myself in, given the specific battle back to normal wont work but its a good start thanks mote 
 
if anyone else has another cleaver way id appriciate anyones help in the matter                                     
                
             
                        
         
        
        
        
            
            
                
			
			By beaumb 2014-07-12 23:16:00			
			
						
                     
                 
                So i have a weird problem that just started after the recent update. While on Thf/dnc everytime i use a dnc ability (waltz, samba, step, etc.) the console red words appear with the error "Shortcuts: Lua error (runtime) - ...iles(x86)/windower4//addons/shortcuts/shortcuts.lua:377: attempt to index local 'r_line' (a nil valu-" it cuts off screen after that. nothing is affected in game. all sets still equip at right times and all abilities go off correctly but for some reason everytime i use one the whole screen fills up with the red words. Sorry if this is a dumb question but i just want to know what that means and possibly how to get rid of it. Im new to gearswap and rather derpy at coding in general lol.                                     
                
             
                        
         
        
        
        
            
                
                      Pandemonium.Silentmagi 
                    
                    
                                                            
                                                    
                                                                            
                                Server: Pandemonium 
                                Game: FFXI 
                                
                                                                    Posts: 2 
                                                             
                                             
                    
                                        
                    
                    
                 
             
            
                
			
			By Pandemonium.Silentmagi 2014-07-12 23:25:45			
			
						
                     
                 
                I'm looking for a little help. I'm setting up my first .lua now that spellcast has finally crashed for me my hand has been forced. 
I followed the instructions here:  http://www.ffxiah.com/forum/topic/41992/gearswap-for-dummies
And added the 5 global to the specified locations.
 
I'm getting the following error (prefaced with a succcesful sounding message): Code  GearSwap: Loaded your Koomy_MNK.lua lua file!
GearSwap:Lua error (runtime) - ...gram Files (x86)/Windower//addons/gearswap/flow.lua:288:
GearSwap has detected an error in the user function get_set:
... (x86)Windower4/addons/gearswap/data/Koomy_MNK.lua:13: attempt to call global 'get_command_form' (a nil value)  
Here's my MNK .lua file
 -------------------------------------- 
    -- Start defining the sets 
    -------------------------------------- 
-- Initialization function for this job file. 
function get_sets() 
	-- Load and initialize the include file. 
	include('Mote-Include.lua') 
end 
 
 
-- Setup vars that are user-independent. 
function job_setup() 
	state.CombatForm = get_combat_form() 
	update_melee_groups() 
end 
 
 
-- Setup vars that are user-dependent.  Can override this function in a sidecar file. 
function user_setup() 
	-- Options: Override default values 
	options.OffenseModes = {'Normal', 'SomeAcc', 'Acc', 'Mod'} 
	options.DefenseModes = {'Normal', 'PDT', 'Counter'} 
	options.WeaponskillModes = {'Normal', 'Acc', 'Mod'} 
	options.IdleModes = {'Normal'} 
	options.RestingModes = {'Normal'} 
	options.PhysicalDefenseModes = {'PDT', 'HP'} 
	options.MagicalDefenseModes = {'MDT'} 
 
	state.Defense.PhysicalMode = 'PDT' 
 
	state.FootworkWS = false 
	state.Buff.Footwork = buffactive.Footwork or false 
 
	select_default_macro_book(6, 1) 
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 on use 
	sets.precast.JA['Hundred Fists'] = {legs="Hesychast's Hose +1"} 
	sets.precast.JA['Boost'] = {hands="Anchorite's Gloves +1"} 
	sets.precast.JA['Dodge'] = {feet="Anchorite's Gaiters"} 
	sets.precast.JA['Focus'] = {head="Anchorite's Crown +1"} 
	sets.precast.JA['Counterstance'] = {feet="Hesychast's Gaiters +1"} 
	sets.precast.JA['Footwork'] = {feet="Tantra Gaiters +2"} 
	sets.precast.JA['Formless Strikes'] = {body="Hesychast's Cyclas"} 
	sets.precast.JA['Mantra'] = {feet="Hesychast's Gaiters +1"} 
	 
	sets.precast.JA['Chakra'] = {ammo="Iron Gobbet", 
		head="Felistris Mask", 
		body="Anchorite's Cyclas",hands="Hesychast's Gloves +1", 
		back="Anchoret's Mantle",legs="Nahtirah Trousers",feet="Qaaxo Leggings"} 
 
 
		-- Weaponskill sets 
	-- Default set for any weaponskill that isn't any more specifically defined 
	sets.precast.WS = {ammo="Potestas Bomblet", 
		head="Felistris Mask",neck="Breeze Gorget",ear1="Steelflash Earring",ear2="Bladeborn Earring", 
		body="Qaaxo Harness",hands="Hesychast's Gloves +1",ring1="Rajas Ring",ring2="Epona's Ring", 
		back="Atheling Mantle",waist="Breeze Belt",legs="Nahtirah Trousers",feet="Qaaxo Leggings"} 
	sets.precast.WSAcc = {ammo="Honed Tathlum",body="Manibozho Jerkin",back="Anchoret's Mantle",feet="Qaaxo Leggings"} 
 
		-- Specific weaponskill sets. 
	sets.precast.WS['Raging Fists']    = set_combine(sets.precast.WS, {}) 
	sets.precast.WS['Howling Fist']    = set_combine(sets.precast.WS, {legs="Manibozho Brais",feet="Daihanshi Habaki"}) 
	sets.precast.WS['Asuran Fists']    = set_combine(sets.precast.WS, { 
		ear1="Bladeborn Earring",ear2="Moonshade Earring",ring2="Spiral Ring",back="Buquwik Cape"}) 
	sets.precast.WS["Ascetic's Fury"]  = set_combine(sets.precast.WS, { 
		ammo="Tantra Tathlum",ring1="Spiral Ring",back="Buquwik Cape",feet="Qaaxo Leggings"}) 
	sets.precast.WS["Victory Smite"]   = set_combine(sets.precast.WS, {neck="Rancor Collar",back="Buquwik Cape",feet="Qaaxo Leggings"}) 
	sets.precast.WS['Shijin Spiral']   = set_combine(sets.precast.WS, {ear1="Bladeborn Earring",ear2="Steelflash Earring", 
		legs="Manibozho Brais",feet="Daihanshi Habaki"}) 
	sets.precast.WS['Dragon Kick']     = set_combine(sets.precast.WS, {feet="Daihanshi Habaki"}) 
	sets.precast.WS['Tornado Kick']    = set_combine(sets.precast.WS, {ammo="Tantra Tathlum",ring1="Spiral Ring"}) 
	sets.precast.WS['Spinning Attack'] = set_combine(sets.precast.WS, { 
		head="Felistris Mask",ear1="Bladeborn Earring",ear2="Steelflash Earring"}) 
 
	---- ACC WS set --- 
	sets.precast.WS["Raging Fists"].Acc = set_combine(sets.precast.WS["Victory Smite"], sets.precast.WSAcc) 
	sets.precast.WS["Howling Fist"].Acc = set_combine(sets.precast.WS["Victory Smite"], sets.precast.WSAcc) 
	sets.precast.WS["Asuran Fists"].Acc = set_combine(sets.precast.WS["Victory Smite"], sets.precast.WSAcc) 
	sets.precast.WS["Ascetic's Fury"].Acc = set_combine(sets.precast.WS["Victory Smite"], sets.precast.WSAcc) 
	sets.precast.WS["Victory Smite"].Acc = set_combine(sets.precast.WS["Victory Smite"], sets.precast.WSAcc) 
	sets.precast.WS["Shijin Spiral"].Acc = set_combine(sets.precast.WS["Victory Smite"], sets.precast.WSAcc) 
	sets.precast.WS["Dragon Kick"].Acc = set_combine(sets.precast.WS["Victory Smite"], sets.precast.WSAcc) 
	sets.precast.WS["Tornado Kick"].Acc = set_combine(sets.precast.WS["Victory Smite"], sets.precast.WSAcc) 
 
	 
		-- Idle sets 
	sets.idle = {ammo="Potestas Bomblet", 
		head="Felistris Mask",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring", 
		body="Hesychast's Cyclas",hands="Hesychast's Gloves +1",ring1="Paguroidea Ring",ring2="Defending Ring", 
		back="Anchoret's Mantle",waist="Black Belt",legs="Nahtirah Trousers",feet="Herald's Gaiters"} 
 
		 
		-- Defense sets 
	sets.defense.PDT = {ammo="Potestas Bomblet", 
		head="Felistris Mask",neck="Twilight Torque", 
		body="Qaaxo Harness",hands="Qaaxo Mitaines",ring1="Paguroidea Ring",ring2="Defending Ring", 
		back="Anchoret's Mantle",waist="Black Belt",legs="Nahtirah Trousers",feet="Qaaxo Leggings"} 
 
	sets.defense.HP = {ammo="Potestas Bomblet", 
		head="Felistris Mask",neck="Lavalier +1",ear1="Steelflash Earring",ear2="Bladeborn Earring", 
		body="Hesychast's Cyclas",hands="Qaaxo Mitaines",ring1="Paguroidea Ring",ring2="Defending Ring", 
		back="Anchoret's Mantle",waist="Black Belt",legs="Nahtirah Trousers",feet="Qaaxo Leggings"} 
 
	sets.defense.MDT = {ammo="Potestas Bomblet", 
		head="Wayfarer Circlet",neck="Twilight Torque", 
		body="Wayfarer Robe",hands="Wayfarer Cuffs",ring1="Paguroidea Ring",ring2="Defending Ring", 
		back="Anchoret's Mantle",waist="Black Belt",legs="Wayfarer Slops",feet="Wayfarer Clogs"} 
	 
	-- Engaged sets 
	 
	-- Normal melee sets 
	sets.engaged = {ammo="Potestas Bomblet", 
		head="Felistris Mask",neck="Asperity Necklace",ear1="Steelflash Earring",ear2="Bladeborn Earring", 
		body="Qaaxo Harness",hands="Hesychast's Gloves +1",ring1="Rajas Ring",ring2="Epona's Ring", 
		back="Atheling Mantle",waist="Windbuffet Belt",legs="Manibozho Brais",feet="Qaaxo Leggings"} 
 
	sets.engaged.Acc = {ammo="Honed Tathlum", 
		head="Felistris Mask",neck="Iqabi Necklace",ear1="Steelflash Earring",ear2="Bladeborn Earring", 
		body="Manibozho Jerkin",hands="Hesychast's Gloves +1",ring1="Rajas Ring",ring2="Epona's Ring", 
		back="Anchoret's Mantle",waist="Windbuffet Belt",legs="Manibozho Brais",feet="Qaaxo Leggings"} 
 
		 
	-- Defensive melee hybrid sets 
	sets.engaged.PDT = {ammo="Potestas Bomblet", 
		head="Felistris Mask",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring", 
		body="Qaaxo Harness",hands="Hesychast's Gloves +1",ring1="Rajas Ring",ring2="Defending Ring", 
		back="Anchoret's Mantle",waist="Black Belt",legs="Nahtirah Trousers",feet="Qaaxo Leggings"} 
 
	-- Hundred Fists/Impetus melee set mods 
	sets.engaged.HF.Impetus = set_combine(sets.engaged, {body="Tantra Cyclas +1"}) 
			 
end 
 
------------------------------------------------------------------------------------------------------------------- 
-- Job-specific hooks that are called to process player actions at specific points in time. 
------------------------------------------------------------------------------------------------------------------- 
 
-- 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 state.Buff[spell.english] ~= nil then 
		state.Buff[spell.english] = true 
	end 
 
	-- Don't gearswap for weaponskills when Defense is on. 
	if spell.type == 'WeaponSkill' and state.Defense.Active then 
		eventArgs.handled = true 
	end 
end 
 
-- Run after the general precast() is done. 
function job_post_precast(spell, action, spellMap, eventArgs) 
	if spell.type == 'WeaponSkill' and not state.Defense.Active then 
		if buffactive.impetus and (spell.english == "Ascetic's Fury" or spell.english == "Victory Smite") then 
			equip(sets.impetus_body) 
		elseif buffactive.footwork and (spell.english == "Dragon's Kick" or spell.english == "Tornado Kick") then 
			equip(sets.footwork_kick_feet) 
		end 
	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 state.Buff[buff] ~= nil then 
		state.Buff[buff] = gain 
	end 
 
	-- Set Footwork as combat form any time it's active and Hundred Fists is not. 
	if buff == 'Footwork' and gain and not buffactive['hundred fists'] then 
		state.CombatForm = 'Footwork' 
	elseif buff == "Hundred Fists" and not gain and buffactive.footwork then 
		state.CombatForm = 'Footwork' 
	else 
		state.CombatForm = nil 
	end 
 
	-- Hundred Fists and Impetus modify the custom melee groups 
	if buff == "Hundred Fists" or buff == "Impetus" then 
		classes.CustomMeleeGroups:clear() 
 
		if (buff == "Hundred Fists" and gain) or buffactive['hundred fists'] then 
			classes.CustomMeleeGroups:append('HF') 
		end 
 
		if (buff == "Impetus" and gain) or buffactive.impetus then 
			classes.CustomMeleeGroups:append('Impetus') 
		end 
	end 
 
	-- Update gear if any of the above changed 
	if buff == "Hundred Fists" or buff == "Impetus" or buff == "Footwork" then 
		handle_equipping_gear(player.status) 
	end 
end 
 
------------------------------------------------------------------------------------------------------------------- 
-- User code that supplements self-commands. 
------------------------------------------------------------------------------------------------------------------- 
 
-- Called by the 'update' self-command. 
function job_update(cmdParams, eventArgs) 
	state.CombatForm = get_combat_form() 
	update_melee_groups() 
end 
Here's my flow.lua file (though I've never touched it): --Copyright (c) 2013, Byrthnoth 
--All rights reserved. 
 
--Redistribution and use in source and binary forms, with or without 
--modification, are permitted provided that the following conditions are met: 
 
--    * Redistributions of source code must retain the above copyright 
--      notice, this list of conditions and the following disclaimer. 
--    * Redistributions in binary form must reproduce the above copyright 
--      notice, this list of conditions and the following disclaimer in the 
--      documentation and/or other materials provided with the distribution. 
--    * Neither the name of <addon name> nor the 
--      names of its contributors may be used to endorse or promote products 
--      derived from this software without specific prior written permission. 
 
--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
--ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
--WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
--DISCLAIMED. IN NO EVENT SHALL <your name> BE LIABLE FOR ANY 
--DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
--(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
--LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 
--ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
--(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
--SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
 
 
 
----------------------------------------------------------------------------------- 
--Name: equip_sets(swap_type,ts,val1,val2) 
--Desc: General purpose equipment pipeline / user function caller.  
--Args: 
---- swap_type - Determines equip_sets' behavior in terms of which user function it 
--      attempts to call 
---- ts - index of command_registry or nil for pretarget/commands 
---- val1 - First argument to be passed to the user function 
---- val2 - Second argument to be passed to the user function 
----------------------------------------------------------------------------------- 
--Return (varies by swap type): 
---- pretarget : empty string to blank packet or full string 
---- Everything else : nil 
----------------------------------------------------------------------------------- 
function equip_sets(swap_type,ts,...) 
    local results 
    local var_inps = {...} 
    local val1 = var_inps[1] 
    local val2 = var_inps[2] 
    table.reassign(_global,command_registry[ts] or {cast_delay = 0,cancel_spell = false}) 
    _global.current_event = tostring(swap_type) 
     
    windower.debug(tostring(swap_type)..' enter') 
    if showphase or debugging.general then windower.add_to_chat(8,windower.to_shift_jis(tostring(swap_type))..' enter') end 
     
    local cur_equip = table.reassign({},items.equipment) 
         
    table.reassign(equip_list,{}) 
    table.reassign(player.equipment,to_names_set(cur_equip)) 
    for i,v in pairs(slot_map) do 
        if not player.equipment then 
            player.equipment = player.equipment[toslotname(v)] 
        end 
    end 
     
    logit('\n\n'..tostring(os.clock)..'(15) equip_sets: '..tostring(swap_type)) 
    if val1 then 
        if val1.english then 
            logit(' : '..val1.english) 
        end 
    else 
        logit(' : nil-or-false') 
    end 
    if val2 then 
        if val2.type then logit(' : '..val2.type)end 
    else 
        logit(' : nil-or-false') 
    end 
     
    if type(swap_type) == 'string' then 
        debug_mode_chat("Entering "..swap_type) 
    else 
        debug_mode_chat("Entering User Event "..tostring(swap_type)) 
    end 
     
    if not val1 then val1 = {} 
        if debugging.general then 
            windower.add_to_chat(8,'val1 error') 
        end 
    end 
 
     
    if type(swap_type) == 'function' then 
        results = { pcall(swap_type,...) } 
        if not table.remove(results,1) then error('\nUser Event Error: '..results[1]) end 
    elseif swap_type == 'equip_command' then 
        equip(val1) 
    else 
        user_pcall(swap_type,...) 
    end 
     
     
    if type(swap_type) == 'string' and (swap_type == 'pretarget' or swap_type == 'filtered_action') then -- Target may just have been changed, so make the ind now. 
        ts = mk_command_registry_entry(val1) 
    elseif type(swap_type) == 'string' and swap_type == 'precast' then 
        if not command_registry[ts] then if debugging.command_registry then print_set(spell,'precast nil error') end 
        else command_registry[ts].timestamp = os.time() end 
    end 
     
    if player.race ~= 'Precomposed NPC' then 
        -- Short circuits the routine and gets out  before equip processing 
        -- if there's no swapping to be done because the user is a monster. 
         
        for v,i in pairs(default_slot_map) do 
            if equip_list and encumbrance_table[v] then 
                not_sent_out_equip = equip_list 
                equip_list = nil 
                debug_mode_chat(i..' slot was not equipped because you are encumbered.') 
            end 
        end 
         
        -- Translates the equip_list from the player (i=slot name, v=item name) into a table with i=slot id and v={bag_id=0 or 8, slot=inventory slot}. 
        local equip_next,priorities = unpack_equip_list(equip_list) 
        equip_next = eliminate_redundant(cur_equip,equip_next) -- Eliminate the equip commands for items that are already equipped 
         
        if (_settings.show_swaps and table.length(equip_next) > 0) or _settings.demo_mode then --and table.length(equip_next)>0 then 
            local tempset = to_names_set(equip_next) 
            print_set(tempset,tostring(swap_type)) 
        end 
         
         
        if buffactive.charm or buffactive.KO then 
         
            local failure_reason 
            if buffactive.charm then 
                failure_reason = 'Charmed' 
            elseif buffactive.KO then 
                failure_reason = 'KOed' 
            end 
            debug_mode_chat("Cannot change gear right now: "..tostring(failure_reason)) 
            logit('\n\n'..tostring(os.clock)..'(69) failure_reason: '..tostring(failure_reason)) 
        else 
            for eq_slot_id,_ in priority_order(priorities) do 
                if equip_next[eq_slot_id] and not encumbrance_table[eq_slot_id] and not _settings.demo_mode then 
                    equip_piece(eq_slot_id,equip_next[eq_slot_id].bag_id,equip_next[eq_slot_id].slot) 
                end 
            end 
        end 
    end 
     
    windower.debug(tostring(swap_type)..' exit') 
     
    if type(swap_type) == 'function' then 
        return unpack(results) 
    end 
     
    return equip_sets_exit(swap_type,ts,val1) 
end 
 
 
----------------------------------------------------------------------------------- 
--Name: equip_sets_exit(swap_type,ind,val1) 
--Desc: Cleans up the global table and leaves equip_sets properly. 
--Args: 
---- swap_type - Current swap type for equip_sets 
---- ts - Current index of command_registry 
---- val1 - First argument of equip_sets 
----------------------------------------------------------------------------------- 
--Returns: 
---- none 
----------------------------------------------------------------------------------- 
function equip_sets_exit(swap_type,ts,val1) 
    if command_registry[ts] then 
        table.update(command_registry[ts],_global) 
    end 
    if type(swap_type) == 'string' then 
        if swap_type == 'pretarget' then 
             
            if command_registry[ts].cancel_spell then 
                debug_mode_chat("Action canceled ("..storedcommand..' '..spell.target.raw..")") 
                storedcommand = nil 
                command_registry[ts] = nil 
                return true 
            elseif not ts or not command_registry[ts] or not storedcommand then 
                debug_mode_chat('This case should not be hittable - 1') 
                return true 
            end 
             
             
            command_registry[ts].spell = val1 
            if val1.target and val1.target.id and val1.target.index and val1.prefix and unify_prefix[val1.prefix] then 
                if val1.prefix == '/item' then 
                    -- Item use packet handling here 
                    if val1.target.id == player.id then 
                        --0x37 packet 
                        command_registry[ts].proposed_packet = assemble_use_item_packet(val1.target.id,val1.target.index,val1.id) 
                    else 
                        --0x36 packet 
                        command_registry[ts].proposed_packet = assemble_menu_item_packet(val1.target.id,val1.target.index,val1.id) 
                    end 
                    if not command_registry[ts].proposed_packet then 
                        command_registry[ts] = nil 
                    end 
                elseif outgoing_action_category_table[unify_prefix[val1.prefix]] then 
                    if filter_precast(val1) then 
                        command_registry[ts].proposed_packet = assemble_action_packet(val1.target.id,val1.target.index,outgoing_action_category_table[unify_prefix[val1.prefix]],val1.id) 
                        if not command_registry[ts].proposed_packet then 
                            command_registry[ts] = nil 
                             
                            debug_mode_chat("Unable to create a packet for this command because the target is still invalid after pretarget ("..storedcommand..' '..val1.target.raw..")") 
                            storedcommand = nil 
                            return storedcommand..' '..val1.target.raw 
                        end 
                    end 
                else 
                    windower.add_to_chat(8,"GearSwap: Hark, what weird prefix through yonder window breaks? "..tostring(spell.prefix)) 
                end 
            end 
             
            if ts and command_registry[ts] and val1.target then 
                if st_targs[val1.target.raw] then 
                -- st targets 
                    st_flag = true 
                elseif not val1.target.name then 
                -- Spells with invalid pass_through_targs, like using <t> without a target 
                    command_registry[ts] = nil 
                    debug_mode_chat("Change target was used to pick an invalid target ("..storedcommand..' '..spell.target.raw..")") 
                    local ret = storedcommand..' '..spell.target.raw 
                    storedcommand = nil 
                    return ret 
                else 
                -- Spells with complete target information 
                -- command_registry[ts] is deleted for cancelled spells 
                    if command_registry[ts].cast_delay == 0 then 
                        equip_sets('precast',ts,val1) 
                    else 
                        windower.send_command('@wait '..command_registry[ts].cast_delay..';lua i '.._addon.name..' pretarget_delayed_cast '..ts) 
                        command_registry[ts].cast_delay = 0 
                    end 
                    return true 
                end 
            elseif not ts or not command_registry[ts] then 
                debug_mode_chat('This case should not be hittable - 2') 
                return true 
            end 
 
        elseif swap_type == 'precast' then 
            return precast_send_check(ts) 
        elseif swap_type == 'filtered_action' and command_registry[ts] and command_registry[ts].cancel_spell then 
            storedcommand = nil 
            command_registry[ts] = nil 
            return true 
        elseif swap_type == 'midcast' and _settings.demo_mode then 
            command_registry[ts].midaction = false 
            equip_sets('aftercast',ts,val1) 
        elseif swap_type == 'aftercast' then 
            if ts then 
                for i,v in pairs(command_registry) do 
                    if v.midaction then 
                        command_registry = nil 
                    end 
                end 
            end 
        elseif swap_type == 'pet_aftercast' then 
            if ts then 
                for i,v in pairs(command_registry) do 
                    if v.pet_midaction then 
                        command_registry = nil 
                    end 
                end 
            end 
        end 
    end 
end 
 
 
----------------------------------------------------------------------------------- 
--Name: user_pcall(str,val1,val2,exit_funct) 
--Desc: Calls a user function, if it exists. If not, throws an error. 
--Args: 
---- str - Function's key in user_env. 
----------------------------------------------------------------------------------- 
--Returns: 
---- none 
----------------------------------------------------------------------------------- 
function user_pcall(str,...) 
    if user_env then 
        if type(user_env[str]) == 'function' then 
            bool,err = pcall(user_env[str],...) 
            if not bool then error('\nGearSwap has detected an error in the user function '..str..':\n'..err) end 
        elseif user_env[str] then 
            windower.add_to_chat(123,'GearSwap: '..windower.to_shift_jis(tostring(str))..'() exists but is not a function') 
        end 
    end 
end 
 
 
----------------------------------------------------------------------------------- 
--Name: pretarget_delayed_cast(ts) 
--Desc: Triggers an outgoing action packet (if the passed key is valid). 
--Args: 
---- ts - Timestamp argument to precast_delayed_cast 
----------------------------------------------------------------------------------- 
--Returns: 
---- none 
----------------------------------------------------------------------------------- 
function pretarget_delayed_cast(ts) 
    ts = tonumber(ts) 
    if ts then 
        equip_sets('precast',ts,command_registry[ts].spell) 
    else 
        debug_mode_chat("Bad index passed to pretarget_delayed_cast") 
    end 
end 
 
 
 
----------------------------------------------------------------------------------- 
--Name: precast_send_check(ts) 
--Desc: Determines whether or not to send the current packet. 
--      Cancels if _global.cancel_spell is true 
--          If command_registry[ts].cast_delay is not 0, cues precast_delayed_cast with the proper 
--          delay instead of sending immediately. 
--Args: 
---- ts - key of command_registry 
----------------------------------------------------------------------------------- 
--Returns: 
---- true (to block) or the outgoing packet 
----------------------------------------------------------------------------------- 
function precast_send_check(ts) 
    if ts and command_registry[ts] then 
        if command_registry[ts].cancel_spell then 
            command_registry[ts] = nil 
        else 
            if command_registry[ts].cast_delay == 0 then 
                send_action(ts) 
                return 
            else 
                windower.send_command('@wait '..command_registry[ts].cast_delay..';lua i '.._addon.name..' precast_delayed_cast '..ts) 
            end 
        end 
    end 
    return true 
end 
 
 
----------------------------------------------------------------------------------- 
--Name: precast_delayed_cast(ts) 
--Desc: Triggers an outgoing action packet (if the passed key is valid). 
--Args: 
---- ts - Timestamp argument to precast_delayed_cast 
----------------------------------------------------------------------------------- 
--Returns: 
---- none 
----------------------------------------------------------------------------------- 
function precast_delayed_cast(ts) 
    ts = tonumber(ts) 
    if ts then 
        send_action(ts) 
    else 
        debug_mode_chat("Bad index passed to precast_delayed_cast") 
    end 
end 
 
 
----------------------------------------------------------------------------------- 
--Name: send_action(ts) 
--Desc: Sends the cued action packet, if it exists. 
--Args: 
---- ts - index for a command_registry entry that includes an action packet (hopefully) 
----------------------------------------------------------------------------------- 
--Returns: 
---- none 
----------------------------------------------------------------------------------- 
function send_action(ts) 
    if command_registry[ts].proposed_packet then 
        cued_packet = ts 
        if not _settings.demo_mode then windower.packets.inject_outgoing(command_registry[ts].proposed_packet:byte(1),command_registry[ts].proposed_packet) end 
        command_registry[ts].midaction = true 
        equip_sets('midcast',ts,command_registry[ts].spell) 
        windower.send_command('input /assist <me>') 
    end 
end 
 
 
----------------------------------------------------------------------------------- 
--Name: outgoing chunk(id,original,modified,injected,blocked) 
--Desc: Searches the outgoing chunks for a packet corresponding to /assist <me>. 
--      If found, blocks that packet. 
--Args: 
---- id - ID of the current outgoing chunk 
---- original - Original outgoing chunk from the buffer 
---- modified - Outgoing chunk from the buffer after modification 
----      by other addons/plugins 
---- injected - Boolean indicating whether or not the packet was injected 
---- blocked - Boolean indicating whether or not the packet is currently blocked 
----------------------------------------------------------------------------------- 
--Returns: 
---- true if blocking the packet (/assist <me>) 
----------------------------------------------------------------------------------- 
windower.register_event('outgoing chunk',function(id,original,modified,injected,blocked) 
    windower.debug('outgoing chunk '..id) 
    if id == 0x1A then 
        cued_packet = nil 
        if not injected then 
            if original:unpack('H',0xB) == 12 and cued_packet and original:unpack('H',0x9) == player.index then 
                return true 
            end 
        end 
    elseif id == 0x100 then 
    -- Scrub the equipment array if a valid outgoing job change packet is sent. 
        local newmain = modified:byte(5) 
        if res.jobs[newmain] and newmain ~= 0 and newmain ~= player.main_job_id then 
            windower.debug('job change') 
             
            table.clear(not_sent_out_equip) 
             
            for id,name in pairs(default_slot_map) do 
                if items.equipment[name].slot ~= empty then 
                    local bag = to_windower_api(res.bags[items.equipment[name].bag_id].english) 
                    items[bag][items.equipment[name].slot].status = 0 
                    items.equipment[name] = {slot=empty,bag_id=0} 
                end 
            end 
            player.main_job_id = newmain 
            update_job_names() 
             
            command_registry = {} 
            load_user_files(player.main_job_id) 
        end 
    end 
     
     
    if gearswap_disabled then return end 
     
    if id == 0x100 then 
        local newmain = modified:byte(5) 
        if res.jobs[newmain] and newmain ~= player.main_job_id then 
            command_enable('main','sub','range','ammo','head','neck','lear','rear','body','hands','lring','rring','back','waist','legs','feet') -- enable all slots 
        end 
    end 
end)                                       
                
             
                        
         
        
        
        
            
                
                    
                    VIP 
                    
                                                            
                                                    
                                                                            
                                Server: Fenrir 
                                Game: FFXI 
                                
                                                                    Posts: 764 
                                                             
                                             
                    
                                        
                    
                    
                 
             
            
                
			
			By Fenrir.Motenten 2014-07-13 01:35:31			
			
						
                     
                 
                @Silentrr: 
 
1) The GearSwap for Dummies thread is out of date.  You don't need to copy those include files anymore, they're automatically updated by Windower. 
 
2) I think you mis-copied the error message.  Most likely it actually said, attempt to call global 'get_combat_form' (a nil value).  That would be because that function is called at the bottom of your file (inside job_update), but is never defined anywhere. 
 
3) It seems you copied one of my files, but quite a few things were cut out of it.  I'd suggest going back to the original file, and then creating a sidecar file for your own gear.                                     
                
             
                        
         
        
        
        
            
                
                    
                    
                    
                                                            
                                                    
                                                                            
                                Server: Asura 
                                Game: FFXI 
                                
                                                                    Posts: 363 
                                                             
                                             
                    
                                        
                    
                    
                 
             
            
                
			
			By Asura.Vafruvant 2014-07-13 02:45:24			
			
						
                     
                 
                For some reason, after I afk'd for about 8hrs, when I came back, aftercast was switching back in before the spell cast. Here's the pic:  I have NO idea why. The only thing I changed was the addition of some additional binds, that was it. I unloaded the addon and had to use some old macros, but when I loaded it again after a couple Delves, it worked just fine again. Any idea why that might happen?                                      
                
             
                        
         
        
        
        
            
                
                      Bismarck.Inference 
                    
                    
                                                            
                                                    
                                                                            
                                Server: Bismarck 
                                Game: FFXI 
                                
                                                                    Posts: 417 
                                                             
                                             
                    
                                        
                    
                    
                 
             
            
                
			
			By Bismarck.Inference 2014-07-13 16:06:32			
			
						
                     
                 
                Isn't a Cure I for 93 consistent with the gear being cast in proper Healing gear? Or at least most of it/maybe it capped your HP early?                                     
                
             
                        
         
        
        
        
            
                
                    
                    VIP 
                    
                                                            
                                                    
                                                                            
                                Server: Fenrir 
                                Game: FFXI 
                                
                                                                    Posts: 764 
                                                             
                                             
                    
                                        
                    
                    
                 
             
            
                
			
			By Fenrir.Motenten 2014-07-13 17:10:44			
			
						
                     
                 
                Realize that the normal game chat text can lag behind the actual packet event by up to a couple seconds.  It's part of what makes battlemod useful for stunners, because battlemod prints to the chat log as soon as the packet comes in, while without it you can end up missing the mob's move because of waiting for the text to show up normally. 
 
As such, there's no indication of a problem in that image.  It still cured for the full amount, and you can see the timestamp showing all the chat messages occurring during the same second.  It's just an issue of what order the messages were pushed into the queue.                                     
                
             
                        
         
        
        
        
            
                
                    
                    
                    
                                                            
                                                    
                                                                            
                                Server: Asura 
                                Game: FFXI 
                                
                                                                    Posts: 363 
                                                             
                                             
                    
                                        
                    
                    
                 
             
            
                
			
			By Asura.Vafruvant 2014-07-13 20:45:09			
			
						
                     
                 
                Realize that the normal game chat text can lag behind the actual packet event by up to a couple seconds.  It's part of what makes battlemod useful for stunners, because battlemod prints to the chat log as soon as the packet comes in, while without it you can end up missing the mob's move because of waiting for the text to show up normally. 
 
As such, there's no indication of a problem in that image.  It still cured for the full amount, and you can see the timestamp showing all the chat messages occurring during the same second.  It's just an issue of what order the messages were pushed into the queue. That image was with Battlemod on. I had looked at the chat log many times before I took that image and the spell going off always preceded the "Aftercast called" message that Mote had suggested before. I know something was amiss otherwise because I was in a Delve and was casting Cure V for <800, where it's normally 1000<, I just don't have screenshots of that. It's not really a big issue, as the problem is resolved now, I was just wanted to mention it in case anyone brings it up in the future. Thank you for your help.                                      
                
             
                        
         
        
        
        
            
                
                      Pandemonium.Silentmagi 
                    
                    
                                                            
                                                    
                                                                            
                                Server: Pandemonium 
                                Game: FFXI 
                                
                                                                    Posts: 2 
                                                             
                                             
                    
                                        
                    
                    
                 
             
            
                
			
			By Pandemonium.Silentmagi 2014-07-14 00:32:56			
			
						
                     
                 
                Quote:  @Silentrr: 
 
1) The GearSwap for Dummies thread is out of date. You don't need to copy those include files anymore, they're automatically updated by Windower. 
 
2) I think you mis-copied the error message. Most likely it actually said, attempt to call global 'get_combat_form' (a nil value). That would be because that function is called at the bottom of your file (inside job_update), but is never defined anywhere. 
 
3) It seems you copied one of my files, but quite a few things were cut out of it. I'd suggest going back to the original file, and then creating a sidecar file for your own gear. 
1) By include files, you mean all 5 global Mote files? I don't need any of those anymore?
 
2) Yeah you might be right on that. I'm updating now to integrate your tips above to see if that works.
 
3) I've now copy/pasted your file fully and then swapped out a few gear pieces. --------------------------------------	 
    -- Start defining the sets 
    -------------------------------------- 
-- Initialization function for this job file. 
function get_sets() 
	-- Load and initialize the include file. 
	include('Mote-Include.lua') 
end 
 
 
-- Setup vars that are user-independent. 
function job_setup() 
	state.CombatForm = get_combat_form() 
	update_melee_groups() 
end 
 
 
-- Setup vars that are user-dependent.  Can override this function in a sidecar file. 
function user_setup() 
	-- Options: Override default values 
	options.OffenseModes = {'Normal', 'SomeAcc', 'Acc', 'Mod'} 
	options.DefenseModes = {'Normal', 'PDT', 'Counter'} 
	options.WeaponskillModes = {'Normal', 'Acc', 'Mod'} 
	options.IdleModes = {'Normal'} 
	options.RestingModes = {'Normal'} 
	options.PhysicalDefenseModes = {'PDT', 'HP'} 
	options.MagicalDefenseModes = {'MDT'} 
 
	state.Defense.PhysicalMode = 'PDT' 
 
	state.FootworkWS = false 
	state.Buff.Footwork = buffactive.Footwork or false 
 
	select_default_macro_book(6, 1) 
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 on use 
	sets.precast.JA['Hundred Fists'] = {legs="Hesychast's Hose +1"} 
	sets.precast.JA['Boost'] = {hands="Anchorite's Gloves +1"} 
	sets.precast.JA['Dodge'] = {feet="Anchorite's Gaiters"} 
	sets.precast.JA['Focus'] = {head="Anchorite's Crown +1"} 
	sets.precast.JA['Counterstance'] = {feet="Hesychast's Gaiters +1"} 
	sets.precast.JA['Footwork'] = {feet="Tantra Gaiters +2"} 
	sets.precast.JA['Formless Strikes'] = {body="Hesychast's Cyclas"} 
	sets.precast.JA['Mantra'] = {feet="Hesychast's Gaiters +1"} 
	 
	sets.precast.JA['Chakra'] = {head="Felistris Mask", 
		body="Anchorite's Cyclas",hands="Hesychast's Gloves +1", 
		back="Anchoret's Mantle",legs="Nahtirah Trousers",feet="Qaaxo Leggings"} 
 
 
		-- Weaponskill sets 
	-- Default set for any weaponskill that isn't any more specifically defined 
	sets.precast.WS = {ammo="Potestas Bomblet", 
		head="Felistris Mask",neck="Breeze Gorget",ear1="Steelflash Earring",ear2="Bladeborn Earring", 
		body="Qaaxo Harness",hands="Hesychast's Gloves +1",ring1="Rajas Ring",ring2="Epona's Ring", 
		back="Atheling Mantle",waist="Breeze Belt",legs="Nahtirah Trousers",feet="Qaaxo Leggings"} 
	sets.precast.WSAcc = {ammo="Honed Tathlum",body="Manibozho Jerkin",back="Anchoret's Mantle",feet="Qaaxo Leggings"} 
 
		-- Specific weaponskill sets. 
	sets.precast.WS['Raging Fists']    = set_combine(sets.precast.WS, {}) 
	sets.precast.WS['Howling Fist']    = set_combine(sets.precast.WS, {legs="Manibozho Brais",feet="Daihanshi Habaki"}) 
	sets.precast.WS['Asuran Fists']    = set_combine(sets.precast.WS, { 
		ear1="Bladeborn Earring",ear2="Moonshade Earring",ring2="Spiral Ring",back="Buquwik Cape"}) 
	sets.precast.WS["Ascetic's Fury"]  = set_combine(sets.precast.WS, { 
		ammo="Tantra Tathlum",ring1="Spiral Ring",back="Buquwik Cape",feet="Qaaxo Leggings"}) 
	sets.precast.WS["Victory Smite"]   = set_combine(sets.precast.WS, {neck="Rancor Collar",back="Buquwik Cape",feet="Qaaxo Leggings"}) 
	sets.precast.WS['Shijin Spiral']   = set_combine(sets.precast.WS, {ear1="Bladeborn Earring",ear2="Steelflash Earring", 
		legs="Manibozho Brais",feet="Daihanshi Habaki"}) 
	sets.precast.WS['Dragon Kick']     = set_combine(sets.precast.WS, {feet="Daihanshi Habaki"}) 
	sets.precast.WS['Tornado Kick']    = set_combine(sets.precast.WS, {ammo="Tantra Tathlum",ring1="Spiral Ring"}) 
	sets.precast.WS['Spinning Attack'] = set_combine(sets.precast.WS, { 
		head="Felistris Mask",ear1="Bladeborn Earring",ear2="Steelflash Earring"}) 
 
	---- ACC WS set --- 
	sets.precast.WS["Raging Fists"].Acc = set_combine(sets.precast.WS["Victory Smite"], sets.precast.WSAcc) 
	sets.precast.WS["Howling Fist"].Acc = set_combine(sets.precast.WS["Victory Smite"], sets.precast.WSAcc) 
	sets.precast.WS["Asuran Fists"].Acc = set_combine(sets.precast.WS["Victory Smite"], sets.precast.WSAcc) 
	sets.precast.WS["Ascetic's Fury"].Acc = set_combine(sets.precast.WS["Victory Smite"], sets.precast.WSAcc) 
	sets.precast.WS["Victory Smite"].Acc = set_combine(sets.precast.WS["Victory Smite"], sets.precast.WSAcc) 
	sets.precast.WS["Shijin Spiral"].Acc = set_combine(sets.precast.WS["Victory Smite"], sets.precast.WSAcc) 
	sets.precast.WS["Dragon Kick"].Acc = set_combine(sets.precast.WS["Victory Smite"], sets.precast.WSAcc) 
	sets.precast.WS["Tornado Kick"].Acc = set_combine(sets.precast.WS["Victory Smite"], sets.precast.WSAcc) 
 
	 
		-- Idle sets 
	sets.idle = {ammo="Potestas Bomblet", 
		head="Felistris Mask",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring", 
		body="Hesychast's Cyclas",hands="Hesychast's Gloves +1",ring1="Paguroidea Ring",ring2="Defending Ring", 
		back="Anchoret's Mantle",waist="Black Belt",legs="Nahtirah Trousers",feet="Herald's Gaiters"} 
 
		 
		-- Defense sets 
	sets.defense.PDT = {ammo="Potestas Bomblet", 
		head="Felistris Mask",neck="Twilight Torque", 
		body="Qaaxo Harness",hands="Qaaxo Mitaines",ring1="Paguroidea Ring",ring2="Defending Ring", 
		back="Anchoret's Mantle",waist="Black Belt",legs="Nahtirah Trousers",feet="Qaaxo Leggings"} 
 
	sets.defense.HP = {ammo="Potestas Bomblet", 
		head="Felistris Mask",neck="Lavalier +1",ear1="Steelflash Earring",ear2="Bladeborn Earring", 
		body="Hesychast's Cyclas",hands="Qaaxo Mitaines",ring1="Paguroidea Ring",ring2="Defending Ring", 
		back="Anchoret's Mantle",waist="Black Belt",legs="Nahtirah Trousers",feet="Qaaxo Leggings"} 
 
	sets.defense.MDT = {ammo="Potestas Bomblet", 
		head="Wayfarer Circlet",neck="Twilight Torque", 
		body="Wayfarer Robe",hands="Wayfarer Cuffs",ring1="Paguroidea Ring",ring2="Defending Ring", 
		back="Anchoret's Mantle",waist="Black Belt",legs="Wayfarer Slops",feet="Wayfarer Clogs"} 
	 
	-- Engaged sets 
	 
	-- Normal melee sets 
	sets.engaged = {ammo="Potestas Bomblet", 
		head="Felistris Mask",neck="Asperity Necklace",ear1="Steelflash Earring",ear2="Bladeborn Earring", 
		body="Qaaxo Harness",hands="Hesychast's Gloves +1",ring1="Rajas Ring",ring2="Epona's Ring", 
		back="Atheling Mantle",waist="Windbuffet Belt",legs="Manibozho Brais",feet="Qaaxo Leggings"} 
 
	sets.engaged.Acc = {ammo="Honed Tathlum", 
		head="Felistris Mask",neck="Iqabi Necklace",ear1="Steelflash Earring",ear2="Bladeborn Earring", 
		body="Manibozho Jerkin",hands="Hesychast's Gloves +1",ring1="Rajas Ring",ring2="Epona's Ring", 
		back="Anchoret's Mantle",waist="Windbuffet Belt",legs="Manibozho Brais",feet="Qaaxo Leggings"} 
 
		 
	-- Defensive melee hybrid sets 
	sets.engaged.PDT = {ammo="Potestas Bomblet", 
		head="Felistris Mask",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring", 
		body="Qaaxo Harness",hands="Hesychast's Gloves +1",ring1="Rajas Ring",ring2="Defending Ring", 
		back="Anchoret's Mantle",waist="Black Belt",legs="Nahtirah Trousers",feet="Qaaxo Leggings"} 
 
	-- Hundred Fists/Impetus melee set mods 
	sets.engaged.HF.Impetus = set_combine(sets.engaged, {body="Tantra Cyclas +1"}) 
			 
end 
 
------------------------------------------------------------------------------------------------------------------- 
-- Job-specific hooks that are called to process player actions at specific points in time. 
------------------------------------------------------------------------------------------------------------------- 
 
-- 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 state.Buff[spell.english] ~= nil then 
		state.Buff[spell.english] = true 
	end 
 
	-- Don't gearswap for weaponskills when Defense is on. 
	if spell.type == 'WeaponSkill' and state.Defense.Active then 
		eventArgs.handled = true 
	end 
end 
 
-- Run after the general precast() is done. 
function job_post_precast(spell, action, spellMap, eventArgs) 
	if spell.type == 'WeaponSkill' and not state.Defense.Active then 
		if buffactive.impetus and (spell.english == "Ascetic's Fury" or spell.english == "Victory Smite") then 
			equip(sets.impetus_body) 
		elseif buffactive.footwork and (spell.english == "Dragon's Kick" or spell.english == "Tornado Kick") then 
			equip(sets.footwork_kick_feet) 
		end 
	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 state.Buff[buff] ~= nil then 
		state.Buff[buff] = gain 
	end 
 
	-- Set Footwork as combat form any time it's active and Hundred Fists is not. 
	if buff == 'Footwork' and gain and not buffactive['hundred fists'] then 
		state.CombatForm = 'Footwork' 
	elseif buff == "Hundred Fists" and not gain and buffactive.footwork then 
		state.CombatForm = 'Footwork' 
	else 
		state.CombatForm = nil 
	end 
 
	-- Hundred Fists and Impetus modify the custom melee groups 
	if buff == "Hundred Fists" or buff == "Impetus" then 
		classes.CustomMeleeGroups:clear() 
 
		if (buff == "Hundred Fists" and gain) or buffactive['hundred fists'] then 
			classes.CustomMeleeGroups:append('HF') 
		end 
 
		if (buff == "Impetus" and gain) or buffactive.impetus then 
			classes.CustomMeleeGroups:append('Impetus') 
		end 
	end 
 
	-- Update gear if any of the above changed 
	if buff == "Hundred Fists" or buff == "Impetus" or buff == "Footwork" then 
		handle_equipping_gear(player.status) 
	end 
end 
 
------------------------------------------------------------------------------------------------------------------- 
-- User code that supplements self-commands. 
------------------------------------------------------------------------------------------------------------------- 
 
-- Called by the 'update' self-command. 
function job_update(cmdParams, eventArgs) 
	state.CombatForm = get_combat_form() 
	update_melee_groups() 
end 
Unfortunately, it hasn't worked as of yet. I think I might have misinterpreted what you're trying to teach me.                                      
                
             
                        
         
        
        
        
            
                
                      Bismarck.Inference 
                    
                    
                                                            
                                                    
                                                                            
                                Server: Bismarck 
                                Game: FFXI 
                                
                                                                    Posts: 417 
                                                             
                                             
                    
                                        
                    
                    
                 
             
            
                
			
			By Bismarck.Inference 2014-07-14 00:41:06			
			
						
                     
                 
                1) Your /Addon/GearSwap/Libs folder should already have the required Mote-Files in them, if you wish to delte them from /Addons/GearSwap/Data (Mote-Utilities,User Functions, etc). 
3) Your user file still doesn't have get_combat_form defined. If I go to Mote's current MNK.lua file at  https://github.com/Kinematics/GearSwap-Jobs/blob/master/MNK.lua
I see the following code snippet : Code  
function get_combat_form()
	if buffactive.footwork and not buffactive['hundred fists'] then
		return 'Footwork'
	end
end
 
Which is entirely missing from your file altogether, so you either cut it out unintentionally or downloaded the file from another source who had cut it out. Regardless, re-downloading from the above link and ONLY changing gear(or creating a sidecar as suggested) would fix your problems.                                      
                
             
                        
         
        
        
        
            
                
                      Quetzalcoatl.Jykia 
                    
                    
                                                            
                                                    
                                                                            
                                Server: Quetzalcoatl 
                                Game: FFXI 
                                
                                                                    Posts: 22 
                                                             
                                             
                    
                                        
                    
                    
                 
             
            
                
			
			By Quetzalcoatl.Jykia 2014-07-14 00:52:09			
			
						
                     
                 
                im having the problem of when it switches to my melee weapon/shield it wont switch back to cure staff afterwards when im unengaged 
Code  
-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
        if player.status =='Engaged' then disable('main','sub')	
		end
		if spell.action_type == 'Magic' then
				if (default_spell_map == 'Cure' or default_spell_map == 'Curaga') and player.status == 'Engaged' then
                        return "CureMelee"
                elseif default_spell_map == 'Cure' and state.Buff['Afflatus Solace'] then
                        return "CureSolace"
                elseif spell.skill == "Enfeebling Magic" then
                        if spell.type == "WhiteMagic" then
                                return "MndEnfeebles"
                        else
                                return "IntEnfeebles"
                        end
                end
        end
end
 
 
-------------------------------------------------------------------------------------------------------------------
-- General hooks for other 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 self-commands.
-------------------------------------------------------------------------------------------------------------------
 
-- Called by the 'update' self-command.
function job_update(cmdParams, eventArgs)
        if cmdParams[1] == 'user' and not areas.Cities:contains(world.area) then
                local needsArts =
                        player.sub_job:lower() == 'sch' and
                        not buffactive['Light Arts'] and
                        not buffactive['Addendum: White'] and
                        not buffactive['Dark Arts'] and
                        not buffactive['Addendum: Black']
 
                if not buffactive['Afflatus Solace'] and not buffactive['Afflatus Misery'] then
                        if needsArts then
                                send_command('@input /ja "Afflatus Solace" <me>;wait 1.2;input /ja "Light Arts" <me>')
                        else
                                send_command('@input /ja "Afflatus Solace" <me>')
                        end
                end
        end
end
 
 
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue)
        if stateField == 'OffenseMode' then
                if newValue == 'Normal' then
                        disable('main','sub')
                else
                        enable('main','sub')
                end
        elseif stateField == 'Reset' then
                if state.OffenseMode == 'None' then
                        enable('main','sub')
                end
        end
end
 
 
-- Function to display the current relevant user state when doing an update.
-- Return true if display was handled, and you don't want the default info shown.
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
 
        local meleeString = ''
        if state.OffenseMode == 'Normal' then
                meleeString = 'Melee: Weapons locked, '
        end
 
        eventArgs.handled = true
end
  
this is where i think the problem is, i do need a weapon/sub lock while engaged tho                                      
                
             
                        
         
        
        
        
            
                
                    
                    VIP 
                    
                                                            
                                                    
                                                                            
                                Server: Fenrir 
                                Game: FFXI 
                                
                                                                    Posts: 764 
                                                             
                                             
                    
                                        
                    
                    
                 
             
            
                
			
			By Fenrir.Motenten 2014-07-14 01:01:23			
			
						
                     
                 
                If you change Offense Mode to 'Normal' (rather than the default 'None'), it locks your weapons.  They remain locked until you change back to 'None' Offense Mode, whereupon they'll swap normally.  Hit F9 to change Offense Mode.                                     
                
             
                        
         
        
        
        
            
                
                      Quetzalcoatl.Jykia 
                    
                    
                                                            
                                                    
                                                                            
                                Server: Quetzalcoatl 
                                Game: FFXI 
                                
                                                                    Posts: 22 
                                                             
                                             
                    
                                        
                    
                    
                 
             
            
                
			
			By Quetzalcoatl.Jykia 2014-07-14 01:38:01			
			
						
                     
                 
                ahhh! neat, thank you much!                                     
                
             
                        
         
        
        
        
            
                
                      Asura.Tamoa 
                    
                    
                                                            
                                                    
                                                                            
                                Server: Asura 
                                Game: FFXI 
                                
                                                                    Posts: 1341 
                                                             
                                             
                    
                                        
                    
                    
                 
             
            
                
			
			By Asura.Tamoa 2014-07-14 05:24:15			
			
						
                     
                 
                First I want to apologize if this has been asked and answered before, I did try to search but came up with nothing. 
 
I use Mote's sam.lua and there are some things I would like to add: 
 
1. Make it so it equips Vulcan's Pearl instead of Moonshade at 3000tp. 
2. Make it equip a specific piece of gear if neither Hasso nor Seigan is active. 
3. Make it equip Dawn Earring in idle set when it's daytime. 
 
I'm also wondering if it's possible to make GS automatically change gearset when using ranged attack, instead of having to swap set by hitting F9. 
 
Gearswap's making me feel so stupid... :(                                     
                
             
                        
         
        
        
        
            
            
                
			
			By geekgirl101 2014-07-14 07:23:24			
			
						
                     
                 
                I'm having trouble getting this to work, if I remove the condition spell.target.type then it works but then it means it removes sneak from myself every time I cast the spell and I only want it to work when I cast it on me. 
Code  
	if spell.english == 'Sneak' and buffactive.Sneak and spell.target.type == 'PLAYER' then
		send_command('cancel 71')
	end
 
I tried rewriting this several ways:
 Code  
	if spell.english == 'Sneak' and (buffactive['Sneak']) and spell.target.type == 'PLAYER' then
		send_command('cancel 71')
	end
Code  
	if spell.english == 'Sneak' and (buffactive['Sneak']) and spell.target.type == 'PLAYER' then
		send_command('cancel sneak')
	end
 
None of them work.                                      
                
             
                        
         
        
        
        
            
                
                      Ragnarok.Sekundes 
                    
                    
                                                            
                                                    
                                                                            
                                Server: Ragnarok 
                                Game: FFXI 
                                
                                                                    Posts: 4214 
                                                             
                                             
                    
                                        
                    
                    
                 
             
            
                
			
			By Ragnarok.Sekundes 2014-07-14 07:37:32			
			
						
                     
                 
                I'm having trouble getting this to work, if I remove the condition spell.target.type then it works but then it means it removes sneak from myself every time I cast the spell and I only want it to work when I cast it on me. 
Code  
	if spell.english == 'Sneak' and buffactive.Sneak and spell.target.type == 'PLAYER' then
		send_command('cancel 71')
	end
 
I tried rewriting this several ways:
 Code  
	if spell.english == 'Sneak' and (buffactive['Sneak']) and spell.target.type == 'PLAYER' then
		send_command('cancel 71')
	end
Code  
	if spell.english == 'Sneak' and (buffactive['Sneak']) and spell.target.type == 'PLAYER' then
		send_command('cancel sneak')
	end
 
None of them work. 
I've always seen this:
 Code  if buffactive.sneak and spell.target.type == 'SELF'                                       
                
             
                        
         
        
        
        
            
            
                
			
			By geekgirl101 2014-07-14 07:50:11			
			
						
                     
                 
                Oh right, I'll give that a try. 
 
Awesome it worked, thank you!                                     
                
             
                        
         
        
        
        
            
            
                
			
			By Mozhat 2014-07-14 14:34:10			
			
						
                     
                 
                ook i deleted it and still not working :(, this is what changed it to: 
Code  function job_buff_change(buff, gain)
	if state.Buff[buff] ~= nil then
		state.Buff[buff] = gain
		handle_equipping_gear(player.status)
	elseif buff == 'Sleep' then
        if gain and pet.isvalid then
            equip({neck="Sacrifice Torque"})
        else
            send_command('gs c update')
        end
	elseif storms:contains(buff) then
		handle_equipping_gear(player.status)
	end
end
I had a similar problem with my sacrifice torque, the issue is that the buff is called 'sleep' (with a lower case 's') not 'Sleep'
 
This is my buff_change function: Code  
function buff_change(name, gain)
    if pet.isvalid and name == "Avatar's Favor" then
        if gain then
            equip(sets.perpetuation.favor)
        else
            equip(sets.perpetuation, sets.perpetuation[pet.name] or {})
        end
    elseif pet.isvalid and name == 'sleep' then
        if gain then
            equip({neck='Sacrifice Torque'})
        else
            equip({neck="Caller's Pendant"})
        end
    end
end
A friend of mine told me to try this. Its works great! 
Put this in the sets 
--Sleep 
	sets.buff.sleep = {neck="Sacrifice Torque"}
 
Put this in the function  
--Sleep 
if buff == 'sleep' then 
		if gain then 
            send_command('neck') 
			equip(sets.buff.sleep) 
			add_to_chat(123,'Sacrifice Torque on')	 
		elseif not gain then 
			enable('neck') 
            add_to_chat(123,'Sacrifice Torque IS OFF') 
			update_current_set() 
		end 
	end                                      
                
             
                        
         
        
        
        
            
                
                    
                    VIP 
                    
                                                            
                                                    
                                                                            
                                Server: Fenrir 
                                Game: FFXI 
                                
                                                                    Posts: 764 
                                                             
                                             
                    
                                        
                    
                    
                 
             
            
                
			
			By Fenrir.Motenten 2014-07-14 15:12:53			
			
						
                     
                 
                First I want to apologize if this has been asked and answered before, I did try to search but came up with nothing. 
 
I use Mote's sam.lua and there are some things I would like to add: 
 
1. Make it so it equips Vulcan's Pearl instead of Moonshade at 3000tp. 
2. Make it equip a specific piece of gear if neither Hasso nor Seigan is active. 
3. Make it equip Dawn Earring in idle set when it's daytime. 
 
I'm also wondering if it's possible to make GS automatically change gearset when using ranged attack, instead of having to swap set by hitting F9. 
 
Gearswap's making me feel so stupid... :(  
1) job_post_precast (override default gear set values) 
2) customize_melee_set (override default gear set values) 
3) customize_idle_set (override default gear set values) 
4) sets.precast.RA, sets.midcast.RA
 
If the functions aren't already in your file, you can get them from the template.lua file.                                      
                
             
                        
         
        
        
        
            
                
                      Phoenix.Urteil 
                    
                    
                                                            
                                                    
                                                                            
                                Server: Phoenix 
                                Game: FFXI 
                                
                                                             
                                             
                    
                                        
                    
                    
                 
             
            
                
			
			By Phoenix.Urteil 2014-07-15 03:04:28			
			
						
                     
                 
                How do I put Mes'Yohi Sword into gearswap? 
 
Is it something like,  
 
sets.TP.['Mes'Yohi Sword'] =  
 
or sets.TP.['Mes Yohi Sword'] =  
 
 
I was wondering if the apostrophe in the name would do something strange to the code.                                     
                
             
                        
         
             
    
    
        
        Just looking for someone to explain this addon a bit for me. It looks like it is an alternative to Spellcast.  
 
Is it going to be replacing Spellcast? In which ways is it better or worse. I don't know any programming but I've slowly learned more and more about spellcast and the 'language' used in gearswap is confusing to me. 
 
It says it uses packets so it potentially could be more detectable? but does that also eliminate any lag that spellcast may encounter? 
 
I plan on redoing my PUP xml to include pet casting sets thanks to the new addon petschool. I'm just not sure if it's worth it to just wait until gearswap gets more popular or to go ahead and do it in spellcast. 
 
If anyone could give me more info I'd greatly appreciate it. 
        
     
    
 
    
 | 
    
 |