Gearswap Support Thread

Langues: JP EN DE FR
users online
Forum » Windower » Support » Gearswap Support Thread
Gearswap Support Thread
First Page 2 3 ... 129 130 131 ... 183 184 185
 Asura.Sechs
Offline
Serveur: Asura
Game: FFXI
user: Akumasama
Posts: 10131
By Asura.Sechs 2018-02-13 01:45:22
Link | Citer | R
 
In some of my Luas I make use of the disable/enable commands to avoid swapping my mainhand/offhand when I'm engaged.
It works perfectly but under some circumstances I remain with my MH/OH "disabled".
The "disable" part happens in the function status_change(new,old), with a simple "if new == 'Engaged' then", works flawlessly.
The "enable" part happens in the same function, in a consequent "else" within the if described above, and this is where things work a bit less flawlessly.

For instance if I die while engaged there won't be a "disengage" status_change, so I will remain locked.
Likewise sometimes if the monster I'm engaged gets... I dunno, killed too quickly in a laggy zone? Packetloss? Whatever, I don't know what happens and it's very rare, but sometimes when ***dies too fast it's like the game doesn't "see" I've been disengaged for whatever reason and hence the "enable" part of my status_change function doesn't get processed.

Can anybody think of a very simple and straightforward way to avoid this? Or do I just have to eat it because the cause is a packet-loss and nothing we can do about it?
 Ragnarok.Lockfort
Offline
Serveur: Ragnarok
Game: FFXI
user: Terazuma
Posts: 252
By Ragnarok.Lockfort 2018-02-13 16:18:36
Link | Citer | R
 
quickest workaround is you make a macro '/con gs enable all' if the issue is due to latency/zone lag or whatever.

Or just try to work that command into your lua file
 Asura.Arico
Offline
Serveur: Asura
Game: FFXI
user: Tename
Posts: 535
By Asura.Arico 2018-02-19 18:52:32
Link | Citer | R
 
So I'm trying to get my gearswap to have a doubleshot set. It's; not working and I can't figure out why.

I've added

function job_setup()
state.Buff.Barrage = buffactive.Barrage or false
state.Buff.DoubleShot = buffactive['Double Shot'] or false
state.Buff.Camouflage = buffactive.Camouflage or false
state.Buff['Unlimited Shot'] = buffactive['Unlimited Shot'] or false
end

sets.buff.DoubleShot = set_combine(sets.midcast.RA, {body="Oshosi Vest +1", hands="Oshosi Gloves +1",legs="Oshosi Trousers +1"})

and

function job_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Ranged Attack' and state.Buff.Barrage then
equip(sets.buff.Barrage)
eventArgs.handled = true
elseif spell.action_type == 'Ranged Attack' and state.Buff.DoubleShot then
equip(sets.buff.DoubleShot)
eventArgs.handled = true
end

end

Any idea why it's not working?
 Cerberus.Shadowmeld
Offline
Serveur: Cerberus
Game: FFXI
Posts: 1809
By Cerberus.Shadowmeld 2018-02-28 19:04:59
Link | Citer | R
 
Lets say I wanted to get the contents of the items.lua file that is in the Windower/res directory in gearswap. How would I do that.

Specifically I want to reference the category field on items of my equipped items.

I've tried windower.res.items[player.equipment.sub].category but it says items is a null field.
 Bismarck.Dunigs
Offline
Serveur: Bismarck
Game: FFXI
user: Dunigs
Posts: 83
By Bismarck.Dunigs 2018-02-28 19:34:26
Link | Citer | R
 
Cerberus.Shadowmeld said: »
Lets say I wanted to get the contents of the items.lua file that is in the Windower/res directory in gearswap. How would I do that.

Specifically I want to reference the category field on items of my equipped items.

I've tried windower.res.items[player.equipment.sub].category but it says items is a null field.

Include resources in your file as a table:
Code
local res = require('resources')

However, typically (and is true for the items table), these tables are indexed in numerical order...so res.items[item_name] will never be valid, you will either need to iterate through all of res.items and compare the item name to each "en" field, or find a way to pass the appropriate ID number rather than the item name. In case you're not too lua savvy, this is a good way to loop through the tables:
Code
for i,v in ipairs(res.items) do
    if v.en == player.equipment.sub then
        You found it. v.category will have the category of the 
        item of interest
    end
end


I am not sure if there are built in methods to easily convert item names to their IDs so this may be overkill, just how I would do it without knowing if something simpler exists.
 Odin.Archaide
Offline
Serveur: Odin
Game: FFXI
user: Archaide
Posts: 124
By Odin.Archaide 2018-03-02 09:22:48
Link | Citer | R
 
I'm having an issue with my Cor lua, after I WS (any WS) it will not swap back to Melee set, it just stays in the WS set. When disengaged it will swap to idle set however. I'm constant having to hit the Gearset Update toggle. Any ideas?
Code
function get_sets()
	StartLockStyle = '78'
    AccIndex = 1
    AccArray = {"LowACC","MidACC","HighACC","Aftermath"}
	IdleIndex = 1
	IdleArray = {'Movement', 'Regen','Town','Magic'}				-- Default Idle Set Is Movement --
	PreshotIndex = 1
	PreshotArray = {'Any','RDM'}
	Armor = 'None'
    autoRAmode = 0
    target_distance = 5 -- Set Default Distance Here --
    send_command('input /macro book 16;wait .1;input /macro set 6') -- Change Default Macro Book Here --
	send_command('bind F9 gs c flur') --flurry toggle--
	send_command('bind F10 gs c pdt') --PDT toggle--
	send_command('bind F11 gs c acc') --accuracy toggle--
	send_command('bind F12 gs c auto') --Gearset update toggle--
	send_command('bind !F12 gs c C6') --Idle Toggle--
	send_command('bind != gs c mdt') --MDT toggle--
			
    ranged_ws = S{
		"Hot Shot","Split Shot","Sniper Shot","Slug Shot","Blast Shot","Heavy Shot","Detonator",
		"Numbing Shot","Last Stand","Leaden Salute","Wildfire","Flaming Arrow"}
								
         
    -- Idle/Town Sets --
    sets.Idle = {}
    sets.Idle.Regen = {
		head="Meghanada Visor +2",
		neck="Sanctity Necklace",
		body="Meg. Cuirie +2",
		hands="Meg. Gloves +2",
		ring1="Meghanada Ring",
		ring2="Defending Ring",
		ear1="Telos Earring",
		ear2="Etiolation earring",
		back="Moonbeam Cape",
		waist="Flume Belt +1",
		legs="Carmine Cuisses +1",
		feet="Meg. Jam. +2"}
                
	sets.Idle.Movement = set_combine(sets.Idle.Regen,{legs="Carmine Cuisses +1"})
				
	sets.Idle.Town = {
		head="Pixie Hairpin +1",
		body={ name="Herculean Vest", augments={'"Mag.Atk.Bns."+28','Pet: Attack+24 Pet: Rng.Atk.+24','Weapon skill damage +3%','Accuracy+19 Attack+19','Mag. Acc.+10 "Mag.Atk.Bns."+10',}},
		hands={ name="Carmine Fin. Ga. +1", augments={'Rng.Atk.+20','"Mag.Atk.Bns."+12','"Store TP"+6',}},
		legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
		feet={ name="Lanun Bottes +3", augments={'Enhances "Wild Card" effect',}},
		neck="Sanctity Necklace",
		waist="Hachirin-no-Obi",
		left_ear="Friomisi Earring",
		right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +25',}},
		left_ring="Archon Ring",
		right_ring="Dingir Ring",
		back={ name="Camulus's Mantle", augments={'AGI+20','Mag. Acc+20 /Mag. Dmg.+20','AGI+10','Weapon skill damage +10%',}},}
	
	sets.Idle.Magic = {
		head={ name="Dampening Tam", augments={'DEX+10','Accuracy+15','Mag. Acc.+15','Quadruple Attack +3',}},
		body="Laksa. Frac +2",
		hands={ name="Floral Gauntlets", augments={'Rng.Acc.+15','Accuracy+15','"Triple Atk."+3','Magic dmg. taken -4%',}},
		legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
		feet={ name="Carmine Greaves", augments={'HP+80','MP+80','Phys. dmg. taken -4',}},
		neck="Loricate Torque +1",
		waist="Flax Sash",
		left_ear="Etiolation Earring",
		right_ear="Static Earring",
		left_ring="Defending Ring",
		right_ring="Purity Ring",
		back="Moonbeam Cape"}
         				
		sets.Fomalhaut = {main="Hep. Sapara +1",sub="Nusku Shield",range="Fomalhaut",ammo="Chrono Bullet"}
				
		sets.Holliday = {main="Hep. Sapara +1",sub="Nusku Shield",range="Holliday",ammo="Decimating Bullet"}
				
		sets.DeathPenalty = {main="Hep. Sapara +1",sub="Nusku Shield",range="Death Penalty",ammo="Chrono Bullet"}
				
		sets.Dualwield = {sub="Fettering Blade"}
				
	-- Preshot --
	sets.Preshot = {
		head={ name="Taeon Chapeau", augments={'"Snapshot"+5','"Snapshot"+5',}}, -- 10/0
		body="Oshosi Vest", -- 12/0
		hands="Carmine Fin. Ga. +1", -- 8/11
		waist="Yemaya Belt", -- 0/5
		legs={ name="Adhemar Kecks", augments={'AGI+10','"Rapid Shot"+10','Enmity-5',}}, -- 9/10
		feet="Meg. Jam. +2", --10/0
		back={ name="Camulus's Mantle", augments={'"Snapshot"+10',}},} -- 10/0
		-- 59/26
				
	sets.Preshot.Fomalhaut = {		
		head={ name="Taeon Chapeau", augments={'"Snapshot"+5','"Snapshot"+5',}}, -- 10/0
		body="Oshosi Vest", -- 12/0
		hands="Carmine Fin. Ga. +1", -- 8/11
		waist="Yemaya Belt", -- 0/5
		legs={ name="Adhemar Kecks", augments={'AGI+10','"Rapid Shot"+10','Enmity-5',}}, -- 9/10
		feet="Meg. Jam. +2", --10/0
		back={ name="Camulus's Mantle", augments={'"Snapshot"+10',}},} -- 10/0
		-- 59/26
				
	sets.Preshot.Fomalhaut.Any = set_combine(sets.Preshot,{		
		body="Laksa. Frac +2"}) -- 0/18
		-- 47/44
				
	sets.Preshot.Fomalhaut.RDM = set_combine(sets.Preshot.Fomalhaut.Any,{
		head="Chass. Tricorne +1", -- 0/12
		waist="Impulse Belt", -- 3/0
		feet={ name="Pursuer's Gaiters", augments={'Rng.Acc.+10','"Rapid Shot"+10','"Recycle"+15',}},}) -- 0/10
		-- 30/61
				
				
	sets.Preshot.Holliday = {		
		head={ name="Taeon Chapeau", augments={'"Snapshot"+5','"Snapshot"+5',}}, -- 10/0
		body="Oshosi Vest", -- 12/0
		hands="Carmine Fin. Ga. +1", -- 8/11
		waist="Yemaya Belt", -- 0/5
		legs={ name="Adhemar Kecks", augments={'AGI+10','"Rapid Shot"+10','Enmity-5',}}, -- 9/10
		feet="Meg. Jam. +2", --10/0
		back={ name="Camulus's Mantle", augments={'"Snapshot"+10',}},} -- 10/0
		-- 59/26
							
	sets.Preshot.Holliday.Any = set_combine(sets.Preshot,{
		body="Laksa. Frac +2"}) -- 0/18
		-- 47/44
				
	sets.Preshot.Holliday.RDM = set_combine(sets.Preshot.Holliday.Any,{
		head="Chass. Tricorne +1", -- 0/12
		waist="Impulse Belt", -- 3/0
		feet={ name="Pursuer's Gaiters", augments={'Rng.Acc.+10','"Rapid Shot"+10','"Recycle"+15',}},}) -- 0/10
		-- 30/61
				
	sets.Preshot['Death Penalty'] = {		
		head={ name="Taeon Chapeau", augments={'"Snapshot"+5','"Snapshot"+5',}}, -- 10/0
		body="Oshosi Vest", -- 12/0
		hands="Carmine Fin. Ga. +1", -- 8/11
		waist="Yemaya Belt", -- 0/5
		legs={ name="Adhemar Kecks", augments={'AGI+10','"Rapid Shot"+10','Enmity-5',}}, -- 9/10
		feet="Meg. Jam. +2", --10/0
		back={ name="Camulus's Mantle", augments={'"Snapshot"+10',}},} -- 10/0
		-- 59/26
				
				
	sets.Preshot['Death Penalty'].Any = set_combine(sets.Preshot,{
		body="Laksa. Frac +2"}) -- 0/18
		-- 47/44
				
	sets.Preshot['Death Penalty'].RDM = set_combine(sets.Preshot['Death Penalty'].Any,{
		head="Chass. Tricorne +1", -- 0/12
		waist="Impulse Belt", -- 3/0
		feet={ name="Pursuer's Gaiters", augments={'Rng.Acc.+10','"Rapid Shot"+10','"Recycle"+15',}},}) -- 0/10
		-- 30/61
				
						
	-- Shooting Base Set --
	sets.Midshot = {
		head="Meghanada Visor +2",
		body="Laksa. Frac +2",
		hands={ name="Adhemar Wrist. +1", augments={'AGI+12','Rng.Acc.+20','Rng.Atk.+20',}},
		legs={ name="Adhemar Kecks +1", augments={'AGI+12','Rng.Acc.+20','Rng.Atk.+20',}},
		feet="Meg. Jam. +2",
		neck="Iskur Gorget",
		waist="Yemaya Belt",
		left_ear="Telos Earring",
		right_ear="Enervating Earring",
		left_ring="Regal Ring",
		right_ring="Hajduk Ring +1",
		back={ name="Camulus's Mantle", augments={'AGI+20','Rng.Acc.+20 Rng.Atk.+20','"Store TP"+10',}},}
				
	sets.Midshot.MidACC = set_combine(sets.Midshot,{})
				
	sets.Midshot.HighACC = set_combine(sets.Midshot.MidACC,{})
	
	sets.Midshot.Aftermath = sets.Midshot
         
                			
	-- Fomalhaut Sets --
    sets.Midshot.Fomalhaut = {
		head="Meghanada Visor +2",
		body="Laksa. Frac +2",
		hands={ name="Adhemar Wrist. +1", augments={'AGI+12','Rng.Acc.+20','Rng.Atk.+20',}},
		legs={ name="Adhemar Kecks +1", augments={'AGI+12','Rng.Acc.+20','Rng.Atk.+20',}},
		feet="Meg. Jam. +2",
		neck="Iskur Gorget",
		waist="Yemaya Belt",
		left_ear="Telos Earring",
		right_ear="Enervating Earring",
		left_ring="Regal Ring",
		right_ring="Hajduk Ring +1",
		back={ name="Camulus's Mantle", augments={'AGI+20','Rng.Acc.+20 Rng.Atk.+20','"Store TP"+10',}},}
               
	sets.Midshot.Fomalhaut.MidACC = set_combine(sets.Midshot.Fomalhaut,{})
               
    sets.Midshot.Fomalhaut.HighACC = set_combine(sets.Midshot.Fomalhaut.MidACC,{})
		
	sets.Midshot.Fomalhaut.Aftermath = sets.Midshot.Fomalhaut

				
	-- Holliday Sets --
    sets.Midshot.Holliday = {
		head="Meghanada Visor +2",
		body="Laksa. Frac +2",
		hands={ name="Adhemar Wrist. +1", augments={'AGI+12','Rng.Acc.+20','Rng.Atk.+20',}},
		legs={ name="Adhemar Kecks +1", augments={'AGI+12','Rng.Acc.+20','Rng.Atk.+20',}},
		feet="Meg. Jam. +2",
		neck="Iskur Gorget",
		waist="Yemaya Belt",
		left_ear="Telos Earring",
		right_ear="Enervating Earring",
		left_ring="Regal Ring",
		right_ring="Hajduk Ring +1",
		back={ name="Camulus's Mantle", augments={'AGI+20','Rng.Acc.+20 Rng.Atk.+20','"Store TP"+10',}},}
               
    sets.Midshot.Holliday.MidACC =  set_combine(sets.Midshot.Holliday,{})
               
    sets.Midshot.Holliday.HighACC = set_combine(sets.Midshot.Holliday.MidACC,{})
								
	sets.Midshot.Holliday.Aftermath = {}	

					
	-- Death Penalty Sets --
	sets.Midshot['Death Penalty'] = {
		head="Meghanada Visor +2",
		body="Laksa. Frac +2",
		hands={ name="Adhemar Wrist. +1", augments={'AGI+12','Rng.Acc.+20','Rng.Atk.+20',}},
		legs={ name="Adhemar Kecks +1", augments={'AGI+12','Rng.Acc.+20','Rng.Atk.+20',}},
		feet="Meg. Jam. +2",
		neck="Iskur Gorget",
		waist="Yemaya Belt",
		left_ear="Telos Earring",
		right_ear="Enervating Earring",
		left_ring="Regal Ring",
		right_ring="Hajduk Ring +1",
		back={ name="Camulus's Mantle", augments={'AGI+20','Rng.Acc.+20 Rng.Atk.+20','"Store TP"+10',}},}
               
    sets.Midshot['Death Penalty'].MidACC = set_combine(sets.Midshot['Death Penalty'],{})
               
    sets.Midshot['Death Penalty'].HighACC = set_combine(sets.Midshot['Death Penalty'].MidACC,{})
	
	sets.Midshot['Death Penalty'].Aftermath = sets.Midshot['Death Penalty']
				
				
				
	-- Barrage Base Set --
		Barrage = {}
     
	sets.Midshot.Barrage = {
		head="Meghanada Visor +2",
		body="Laksa. Frac +2",
		hands={ name="Adhemar Wrist. +1", augments={'AGI+12','Rng.Acc.+20','Rng.Atk.+20',}},
		legs={ name="Adhemar Kecks +1", augments={'AGI+12','Rng.Acc.+20','Rng.Atk.+20',}},
		feet="Meg. Jam. +2",
		neck="Iskur Gorget",
		waist="Yemaya Belt",
		left_ear="Telos Earring",
		right_ear="Enervating Earring",
		left_ring="Regal Ring",
		right_ring="Hajduk Ring +1",
		back={ name="Camulus's Mantle", augments={'AGI+20','Rng.Acc.+20 Rng.Atk.+20','"Store TP"+10',}},}

	sets.Midshot.MidACC.Barrage = set_combine(sets.Midshot.Barrage,{})
				
	sets.Midshot.HighACC.Barrage = set_combine(sets.Midshot.Barrage.MidACC,{})
				
	-- Triple Shot Sets --
				
	sets.Midshot.Fomalhaut.Tripleshot = set_combine(sets.Midshot,{
		head="Oshosi Mask",
		body="Chasseur's Frac +1",
		right_ear="Enervating Earring",
		right_ring="Hajduk Ring +1",
		legs="Oshosi Trousers",
		feet="Oshosi Leggings"})
				
	sets.Midshot.Fomalhaut.MidACC.Tripleshot = sets.Midshot.Fomalhaut.Tripleshot
				
	sets.Midshot.Fomalhaut.HighACC.Tripleshot = sets.Midshot.Fomalhaut.Tripleshot
				
	sets.Midshot.Fomalhaut.Aftermath.Tripleshot = sets.Midshot.Fomalhaut.Tripleshot
				
	sets.Midshot.Holliday.Tripleshot = set_combine(sets.Midshot,{
		head="Oshosi Mask",
		body="Chasseur's Frac +1",
		right_ear="Enervating Earring",
		right_ring="Hajduk Ring +1",
		legs="Oshosi Trousers",
		feet="Oshosi Leggings"})
				
	sets.Midshot.Holliday.MidACC.Tripleshot = sets.Midshot.Holliday.Tripleshot
				
	sets.Midshot.Holliday.HighACC.Tripleshot = sets.Midshot.Holliday.Tripleshot
				
	sets.Midshot.Holliday.Aftermath.Tripleshot = set_combine(sets.Midshot.Holliday.Aftermath,{})
				
	sets.Midshot['Death Penalty'].Tripleshot = set_combine(sets.Midshot,{
		head="Oshosi Mask",
		body="Chasseur's Frac +1",
		right_ear="Enervating Earring",
		right_ring="Hajduk Ring +1",
		legs="Oshosi Trousers",
		feet="Oshosi Leggings"})
			
	sets.Midshot['Death Penalty'].MidACC.Tripleshot = sets.Midshot['Death Penalty'].Tripleshot
				
	sets.Midshot['Death Penalty'].HighACC.Tripleshot = sets.Midshot['Death Penalty'].Tripleshot
				
	sets.Midshot['Death Penalty'].Aftermath.Tripleshot = sets.Midshot['Death Penalty'].Tripleshot
			   
				
	-- PDT/MDT Sets --
    sets.PDT = {
		head="Meghanada Visor +2",
		body="Meg. Cuirie +2",
		hands="Meg. Gloves +2",
		ring1="Dark Ring",
		ring2="Defending Ring",
		back="Moonbeam Cape",
		legs="Carmine Cuisses +1",
		waist="Flume Belt +1",
		feet="Meg. Jam. +2",
		neck="Loricate Torque +1"}
         
    sets.MDT = {
		head="Dampening Tam",
		neck="Loricate Torque +1",
		body="Laksa. Frac +2",
		hands="Floral Gauntlets",
		ring1="Purity Ring",
		ring2="Defending Ring",
		legs="Gyve trousers",
		feet="Oshosi Leggings",
		waist="Flume Belt +1",
		back="Moonbeam Cape",
		ear2="Etiolation Earring",}
         
	-- Melee Sets --
    sets.Melee =  {    
		head={ name="Dampening Tam", augments={'DEX+10','Accuracy+15','Mag. Acc.+15','Quadruple Attack +3',}},
		body={ name="Adhemar Jacket +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
		hands={ name="Adhemar Wrist. +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
		legs={ name="Samnuha Tights", augments={'STR+10','DEX+10','"Dbl.Atk."+3','"Triple Atk."+3',}},
		feet={ name="Herculean Boots", augments={'Accuracy+16','"Triple Atk."+4','Attack+6',}},
		neck="Lissome Necklace",
		waist="Kentarch Belt +1",
		left_ear="Telos Earring",
		right_ear="Dedition Earring",
		left_ring="Petrov Ring",
		right_ring="Epona's Ring",
		back={ name="Camulus's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},}
                               
    sets.Melee.MidACC = set_combine(sets.Melee,{
		right_ear="Suppanomimi"})
                 
	sets.Melee.HighACC = set_combine(sets.Melee.MidACC,{
		legs="Meg. Chausses +2",
		feet="Meg. Jam. +2",					
		right_ear="Cessance Earring",
		left_ring="Chirich Ring",})
				
	sets.Melee.Aftermath = set_combine(sets.Melee,{})
         
    -- WS Base Set --
    sets.WS = {}
				
         
    -- WS Sets --
                
     
    -- Last Stand --
    sets.WS['Last Stand'] = {     
		head="Meghanada Visor +2",
		body="Laksa. Frac +2",
		hands="Meg. Gloves +2",
		legs={ name="Herculean Trousers", augments={'Rng.Acc.+24 Rng.Atk.+24','Weapon skill damage +4%','VIT+6','Rng.Atk.+6',}},
		feet="Meg. Jam. +2",
		neck="Fotia Gorget",
		waist="Fotia Belt",
		left_ear="Telos Earring",
		right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +25',}},
		left_ring="Regal Ring",
		right_ring="Dingir Ring",
		back={ name="Camulus's Mantle", augments={'AGI+20','Mag. Acc+20 /Mag. Dmg.+20','AGI+10','Weapon skill damage +10%',}},}
				
	sets.WS['Last Stand'].MidACC = set_combine(sets.WS["Last Stand"],{left_ring="Cacoethic Ring +1"})
               
    sets.WS['Last Stand'].HighACC = set_combine(sets.WS["Last Stand"].MidACC,{left_ear="Telos Earring",waist="Yemaya Belt"})
								
	sets.WS['Last Stand'].Aftermath = sets.WS['Last Stand']
				
	-- Detonator --
				
	sets.WS.Detonator = sets.WS['Last Stand']
				
	sets.WS.Detonator.MidACC = sets.WS['Last Stand'].MidACC
				
	sets.WS.Detonator.HighACC = sets.WS['Last Stand'].HighACC
				
	sets.WS.Detonator.Aftermath = sets.WS.Detonator
				
	-- Slug Shot --
				
	sets.WS['Slug Shot'] = sets.WS['Last Stand']
				
	sets.WS['Slug Shot'].MidACC = sets.WS['Last Stand'].MidACC
				
	sets.WS['Slug Shot'].HighACC = sets.WS['Last Stand'].HighACC
				
	sets.WS['Slug Shot'].Aftermath = sets.WS['Slug Shot']
				
	-- Wildfire --
	sets.WS['Wildfire'] = {    
		head={ name="Herculean Helm", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','"Fast Cast"+4','Mag. Acc.+15','"Mag.Atk.Bns."+12',}},
		body={ name="Herculean Vest", augments={'"Mag.Atk.Bns."+28','Pet: Attack+24 Pet: Rng.Atk.+24','Weapon skill damage +3%','Accuracy+19 Attack+19','Mag. Acc.+10 "Mag.Atk.Bns."+10',}},
		hands={ name="Carmine Fin. Ga. +1", augments={'Rng.Atk.+20','"Mag.Atk.Bns."+12','"Store TP"+6',}},
		legs={ name="Herculean Trousers", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','Enmity-5','MND+2','"Mag.Atk.Bns."+14',}},
		feet={ name="Lanun Bottes +3", augments={'Enhances "Wild Card" effect',}},
		neck="Sanctity Necklace",
		waist="Eschan Stone",
		left_ear="Friomisi Earring",
		right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +25',}},
		left_ring="Arvina Ringlet +1",
		right_ring="Dingir Ring",
		back={ name="Camulus's Mantle", augments={'AGI+20','Mag. Acc+20 /Mag. Dmg.+20','AGI+10','Weapon skill damage +10%',}},}
				
	sets.WS['Wildfire'].MidACC = set_combine(sets.WS['Wildfire'],{})
				
	sets.WS['Wildfire'].HighACC = set_combine(sets.WS['Wildfire'].MidACC,{})
				
	sets.WS['Wildfire'].Aftermath = sets.WS['Wildfire']
				
	-- Hot Shot --
	sets.WS['Hot Shot'] = {
		head={ name="Herculean Helm", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','"Fast Cast"+4','Mag. Acc.+15','"Mag.Atk.Bns."+12',}},
		body={ name="Herculean Vest", augments={'"Mag.Atk.Bns."+28','Pet: Attack+24 Pet: Rng.Atk.+24','Weapon skill damage +3%','Accuracy+19 Attack+19','Mag. Acc.+10 "Mag.Atk.Bns."+10',}},
		hands={ name="Carmine Fin. Ga. +1", augments={'Rng.Atk.+20','"Mag.Atk.Bns."+12','"Store TP"+6',}},
		legs={ name="Herculean Trousers", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','Enmity-5','MND+2','"Mag.Atk.Bns."+14',}},
		feet={ name="Lanun Bottes +3", augments={'Enhances "Wild Card" effect',}},
		neck="Fotia Gorget",
		waist="Fotia Belt",
		left_ear="Friomisi Earring",
		right_ear="Sortiarius Earring",
		left_ring="Arvina Ringlet +1",
		right_ring="Dingir Ring",
		back={ name="Camulus's Mantle", augments={'AGI+20','Mag. Acc+20 /Mag. Dmg.+20','AGI+10','Weapon skill damage +10%',}},}
				
	sets.WS['Hot Shot'].MidACC = set_combine(sets.WS['Hot Shot'],{})
				
	sets.WS['Hot Shot'].HighACC = set_combine(sets.WS['Hot Shot'].MidACC,{})
				
	sets.WS['Hot Shot'].Aftermath = sets.WS['Hot Shot']
				
	-- Leaden Salute --
	sets.WS['Leaden Salute'] = {    
		head="Pixie Hairpin +1",
		body={ name="Herculean Vest", augments={'"Mag.Atk.Bns."+28','Pet: Attack+24 Pet: Rng.Atk.+24','Weapon skill damage +3%','Accuracy+19 Attack+19','Mag. Acc.+10 "Mag.Atk.Bns."+10',}},
		hands={ name="Carmine Fin. Ga. +1", augments={'Rng.Atk.+20','"Mag.Atk.Bns."+12','"Store TP"+6',}},
		legs={ name="Herculean Trousers", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','Enmity-5','MND+2','"Mag.Atk.Bns."+14',}},
		feet={ name="Lanun Bottes +3", augments={'Enhances "Wild Card" effect',}},
		neck="Sanctity Necklace",
		waist="Eschan Stone",
		left_ear="Friomisi Earring",
		right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +25',}},
		left_ring="Archon Ring",
		right_ring="Dingir Ring",
		back={ name="Camulus's Mantle", augments={-'AGI+20','Mag. Acc+20 /Mag. Dmg.+20','AGI+10','Weapon skill damage +10%',}},}
				
	sets.WS['Leaden Salute'].MidACC = set_combine(sets.WS['Leaden Salute'],{})
				
	sets.WS['Leaden Salute'].HighACC = set_combine(sets.WS['Leaden Salute'].MidACC,{})
				
	sets.WS['Leaden Salute'].Aftermath = sets.WS['Leaden Salute']
				
	-- Dagger Weapon Skills --
				
	sets.WS['Exenterator'] = {
		head="Adhemar Bonnet",
		neck="Fotia Gorget",
		left_ear="Infused Earring",
		ear2="Digni. Earring",
		body="Meg. Cuirie +2",
		hands="Mummu Wrists +2",
		ring1="Ilabrat Ring",
		ring2="Regal Ring",
		back={ name="Belenus's Cape", augments={'AGI+20','Rng.Acc.+20 Rng.Atk.+20','AGI+10','Weapon skill damage +10%',}},
		waist="Fotia Belt",
		legs="Jokushu Haidate",
		feet="Thereoid Greaves"}
				
	sets.WS['Evisceration'] = sets.WS['Exenterator']
				
	sets.WS['Aeolian Edge'] = sets.WS['Wildfire']
				
	-- Sword Weapon Skills --
				
	sets.WS['Savage Blade'] = {
		head="Meghanada Visor +2",
		body="Meg. Cuirie +2",
		hands="Meg. Gloves +2",
		legs="Meg. Chausses +2",
		feet="Meg. Jam. +2",
		neck="Fotia Gorget",
		waist="Fotia Belt",
		left_ear="Telos Earring",
		right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +25',}},
		left_ring="Regal Ring",
		right_ring="Ifrit Ring +1",
		back={ name="Camulus's Mantle", augments={'AGI+20','Mag. Acc+20 /Mag. Dmg.+20','AGI+10','Weapon skill damage +10%',}},}
		
	sets.WS['Circle Blade'] = sets.WS['Savage Blade']
					
	sets.WS['Swift Blade'] = {
		head="Meghanada Visor +2",
		body="Meg. Cuirie +2",
		hands="Meg. Gloves +2",
		legs="Meg. Chausses +2",
		feet="Meg. Jam. +2",
		neck="Fotia Gorget",
		waist="Fotia Belt",
		left_ear="Telos Earring",
		right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +25',}},
		left_ring="Regal Ring",
		right_ring="Ifrit Ring +1",
		back={ name="Camulus's Mantle", augments={'AGI+20','Mag. Acc+20 /Mag. Dmg.+20','AGI+10','Weapon skill damage +10%',}},}
					
	sets.WS.Requiescat = sets.WS['Swift Blade']
				
         
    -- JA Sets --
    sets.JA = {}
                
    -- Waltz Set --
    sets.Waltz = {head="Mummu Bonnet +1",body="Passion Jacket",}
         
    sets.Precast = {}
	
    -- Fastcast Set --
    sets.Precast.FastCast = {
        head="Carmine Mask",
		neck="Baetyl Pendant",
		ear1="Loquac. Earring",
		ear2="Etiolation earring",
		body="Dread Jupon",
		hands="Leyline Gloves",
		ring1="Weather. Ring",
		ring2="Kishar Ring",
		waist="Rumination Sash",
		legs="Carmine Cuisses +1",
		feet="Carmine Greaves"}
               
	-- Utsusemi Precast Set --
    sets.Precast.Utsusemi = set_combine(sets.Precast.FastCast,{body="Passion Jacket",neck="Magoraga Beads"})
         
    sets.Midcast = {}
               
    -- Magic Haste Set --
    sets.Midcast.Haste = set_combine(sets.PDT,{})
				
	--Quick Draw--
 
	sets.JA['Quick Draw'] = {    
		head={ name="Herculean Helm", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','"Fast Cast"+4','Mag. Acc.+15','"Mag.Atk.Bns."+12',}},
		body={ name="Herculean Vest", augments={'"Mag.Atk.Bns."+28','Pet: Attack+24 Pet: Rng.Atk.+24','Weapon skill damage +3%','Accuracy+19 Attack+19','Mag. Acc.+10 "Mag.Atk.Bns."+10',}},
		hands={ name="Carmine Fin. Ga. +1", augments={'Rng.Atk.+20','"Mag.Atk.Bns."+12','"Store TP"+6',}},
		legs={ name="Herculean Trousers", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','Enmity-5','MND+2','"Mag.Atk.Bns."+14',}},
		feet="Chass. Bottes +1",
		neck="Sanctity Necklace",
		waist="Eschan Stone",
		left_ear="Friomisi Earring",
		right_ear="Sortiarius Earring",
		left_ring="Arvina Ringlet +1",
		right_ring="Dingir Ring",
		back={ name="Camulus's Mantle", augments={'AGI+20','Mag. Acc+20 /Mag. Dmg.+20','AGI+10','Weapon skill damage +10%',}},}
				
	sets.JA['Quick Draw'].MidACC = set_combine(sets.JA['Quick Draw'],{
		body={ name="Samnuha Coat", augments={'Mag. Acc.+14','"Mag.Atk.Bns."+13','"Fast Cast"+4','"Dual Wield"+3',}},
		hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},})
				
	sets.JA['Quick Draw'].HighACC = set_combine(sets.JA['Quick Draw'].MidACC,{
		head={ name="Carmine Mask", augments={'Accuracy+15','Mag. Acc.+10','"Fast Cast"+3',}},
		feet="Laksa. Boots +3",
		legs="Oshosi Trousers",
		ear2="Enchntr. Earring +1",
		ring2="Stikini Ring"})
				
	sets.JA['Light Shot'] = sets.JA['Quick Draw'].HighACC
				
	sets.JA['Dark Shot'] = sets.JA['Quick Draw'].HighACC
				
	--Rolls/etc --
				
	sets.JA['Random Deal'] = {body="Lanun Frac +1"}
				
	sets.JA['Wild Card'] = {feet="Lanun Bottes +3"}
				
	sets.JA['Snake Eye'] = {legs="Lanun Culottes +1"}
				
	sets.JA['Fold'] = {hands="Lanun Gants +1"}
				
	sets.JA['Triple Shot'] = {body="Chasseur's Frac +1"}
				
	sets.JA['Phantom Roll'] = {
		head="Lanun Tricorne +1",
		body="Lanun Frac +1",
		hands="Chasseur's Gants +1",
		neck="Regal Necklace", 
		back="Camulus's Mantle"}
				
	sets.JA['Double-Up'] = {
		head="Lanun Tricorne +1",
		body="Lanun Frac +1",
		hands="Chasseur's Gants +1",
		neck="Regal Necklace", 
		back="Camulus's Mantle"}
				
	sets.JA["Tactician's Roll"] ={
		head="Lanun Tricorne +1",
		body="Chasseur's Frac +1",
		hands="Chasseur's Gants +1",
		neck="Regal Necklace",
		back="Camulus's Mantle"}
				
	sets.JA["Courser's Roll"] = {
		head="Lanun Tricorne +1",
		body="Lanun Frac +1",
		hands="Chasseur's Gants +1",
		feet="Chasseur's Bottes +1",
		neck="Regal Necklace",
		back="Camulus's Mantle"}
				
	sets.JA["Blitzer's Roll"] = {
		head="Chasseur's Tricorne",
		body="Lanun Frac +1",
		hands="Chasseur's Gants +1",
		neck="Regal Necklace",
		back="Camulus's Mantle"}
				
	sets.JA["Caster's Roll"] = {
		head="Lanun Tricorne +1",
		body="Lanun Frac +1",
		hands="Chasseur's Gants +1",
		legs="Chasseur's Culottes +1",
		neck="Regal Necklace",
		back="Camulus's Mantle"}
		
		        if pet.isvalid then
	else
		send_command('wait 3;input /lockstyleset '..StartLockStyle)
	end
        end
         
        function pretarget(spell,action)
                if (spell.type:endswith('Magic') or spell.type == "Ninjutsu") and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
                        cancel_spell()
                        send_command('input /item "Echo Drops" <me>')
                elseif spell.english == "Berserk" and buffactive.Berserk then -- Change Berserk To Aggressor If Berserk Is On --
                        cancel_spell()
                        send_command('Aggressor')
                elseif spell.english == "Seigan" and buffactive.Seigan then -- Change Seigan To Third Eye If Seigan Is On --
                        cancel_spell()
                        send_command('ThirdEye')
                elseif spell.english == "Meditate" and player.tp > 290 then -- Cancel Meditate If TP Is Above 290 --
                        cancel_spell()
                        add_to_chat(123, spell.name .. ' Canceled: ['..player.tp..' TP]')
                elseif (spell.english == 'Ranged' and spell.target.distance > 24.9) or (player.status == 'Engaged' and ((ranged_ws:contains(spell.english) and spell.target.distance > 16+target_distance))) then -- Cancel Ranged Attack or WS If You Are Out Of Range --
                        cancel_spell()
                        add_to_chat(123, spell.name..' Canceled: [Out of Range]')
                        return
                end
        end
         
        function precast(spell,action)
                if spell.english == 'Ranged' then
					equipSet = sets.Preshot
					add_to_chat(57,"Flurry Level "..PreshotArray[PreshotIndex])
				if buffactive['Flurry'] then
					add_to_chat(122,"Flurry found")
				if PreshotArray[PreshotIndex] == 'RDM' then
				if  equipSet[player.equipment.range].RDM then 
					equipSet =  equipSet[player.equipment.range].RDM
				end
		else
				if  equipSet[player.equipment.range].Any then 
					equipSet =  equipSet[player.equipment.range].Any
		end
		end
		else
				if  equipSet[player.equipment.range] then 
					equipSet =  equipSet[player.equipment.range]
		end
					add_to_chat(122,"No flurry")
		end
   
					equip(equipSet)
			
			
                elseif spell.type == "WeaponSkill" then
									equipSet = sets.WS
                                if equipSet[spell.english] then
                                        equipSet = equipSet[spell.english]
                                end
                                if equipSet[AccArray[AccIndex]] then
                                        equipSet = equipSet[AccArray[AccIndex]]
                                end
                                if player.tp > 2749	 or buffactive.Sekkanoki then
                                        if spell.english == "Last Stand" then -- Equip Telos Earring When You Have 3000 TP or Sekkanoki For Last Stand --
                                                equipSet = set_combine(equipSet,{ear2="Telos Earring"})
                                        elseif spell.english == "Leaden Salute" then --Equip Ishvara Earring When you have 3000 TP or Sekkanoki for Leaden Salute --
												equipSet = set_combine(equipSet,{ear2="Ishvara Earring"})
										end
                                end
                                equip(equipSet)
                        
						
                elseif spell.type=="JobAbility" then
                        if sets.JA[spell.english] then
                                equip(sets.JA[spell.english])
                        end
                elseif spell.type:endswith('Magic') or spell.type == "Ninjutsu" then
                        if string.find(spell.english,'Utsusemi') then
                                if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
                                        cancel_spell()
                                        add_to_chat(123, spell.name .. ' Canceled: [3+ Images]')
                                        return
                                else
                                        equip(sets.Precast.Utsusemi)
                                end
                        else	
                                equip(sets.Precast.FastCast)
                        end
                elseif spell.type == "Waltz" then
                        equip(sets.Waltz)
                elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
                        cast_delay(0.2)
                        send_command('cancel Sneak')
                end
	
	if spell.type == 'CorsairRoll' or spell.english == "Double-Up" then
		
			sets.JA['Phantom Roll'] = sets.JA['Phantom Roll']
			equip(sets.JA['Phantom Roll'])

	end
	
	if spell.english == "Blitzer's Roll" then
		equip(sets.JA["Blitzer's Roll"])
	end
	if spell.english == "Tactician's Roll" then
		equip(sets.JA["Tactician's Roll"])
	end
	if spell.english == "Courser's Roll" then
		equip(sets.JA["Courser's Roll"])
	end
	if spell.english == "Castor's Roll" then
		equip(sets.JA["Caster's Roll"])
	end
	
	if spell.type == 'CorsairShot' then
		equip(sets.JA['Quick Draw'])
	end
	 
	if spell.english == "Random Deal" then
		equip(sets.JA['Random Deal'])
	end
	
	if spell.english == "Double-Up" then
		equip(sets.JA['Phantom Roll'])
	end
	if spell.english == "Wild Card" then
		equip(sets.JA['Wild Card'])
	end
	if spell.english == "Fold" then
		equip(sets.JA['Fold'])
	end
	if spell.english == "Snake Eye" then
		equip(sets.JA['Snake Eye'])
	end
	if spell.english == "Triple Shot" then
		equip(sets.JA['Triple Shot'])
	end
        end
		


		
        function midcast(spell,action)
                if spell.english == 'Ranged' then
                        equipSet = sets.Midshot
                        if equipSet[player.equipment.range] then
                                equipSet = equipSet[player.equipment.range]
                        end
                        if equipSet[AccArray[AccIndex]] then
                                equipSet = equipSet[AccArray[AccIndex]]
                        end
						
						
                        if buffactive.Barrage and equipSet["Barrage"] then
                                equipSet = equipSet["Barrage"]
                        end
						if buffactive['Triple Shot'] and equipSet["Tripleshot"] then
								equipSet = equipSet["Tripleshot"]
						end
					
                        equip(equipSet)
						
                elseif spell.type:endswith('Magic') or spell.type == "Ninjutsu" then
                        if string.find(spell.english,'Utsusemi') then
                                if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)']) then
                                        send_command('@wait 1.7;cancel Copy Image*')
                                end
                                equip(sets.Midcast.Haste)
                        elseif spell.english == 'Monomi: Ichi' then
                                if buffactive['Sneak'] then
                                        send_command('@wait 1.7;cancel sneak')
                                end
                                equip(sets.Midcast.Haste)
                        else
                                equip(sets.Midcast.Haste)
                        end
                end
						if spell.english == "Leaden Salute" and (buffactive['Voidtorm']) then
						add_to_chat(125,'weather mode') 
						equip({waist="Hachirin-no-Obi"})
					
				end
						if spell.english == "Wildfire" and (buffactive['Firestorm']) then
						add_to_chat(125,'weather mode')
						equip({waist="Hachirin-no-Obi"})
				end
				
		
    end
 
        
         
        function aftercast(spell,action)
                if spell.english == 'Ranged' and autoRAmode==1 then
                        autoRA()
                elseif spell.type == "WeaponSkill" and not spell.interrupted then
                        send_command('wait 0.2;gs c TP')
                else
                        status_change(player.status)
                end
        end
         
        function status_change(new,old)
                if Armor == 'PDT' then
                        equip(sets.PDT)
                elseif Armor == 'MDT' then
                        equip(sets.MDT)
                elseif new == 'Engaged' then
                        equipSet = sets.Melee
                        if equipSet[AccArray[AccIndex]] then
                                equipSet = equipSet[AccArray[AccIndex]]
                        end
                        equip(equipSet)
                else
                        equip(sets.Idle[IdleArray[IdleIndex]])
                end
        end


         
        -- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
        function self_command(command)
                if command == 'acc' then -- Accuracy Level Toggle --
                        AccIndex = (AccIndex % #AccArray) + 1
                        add_to_chat(158,'Accuracy Level: ' .. AccArray[AccIndex])
                        status_change(player.status)
				elseif command == 'flur' then -- Flurry Level Toggle --
						PreshotIndex = (PreshotIndex % #PreshotArray) + 1
						add_to_chat(158,'Flurry Level: ' ..PreshotArray[PreshotIndex])
						status_change(player.status)
                elseif command == 'auto' then -- Auto Update Gear Toggle --
                        status_change(player.status)
                        add_to_chat(158,'Auto Update Gear')
                elseif command == 'pdt' then -- PDT Toggle --
                        if Armor == 'PDT' then
                                Armor = 'None'
                                add_to_chat(123,'PDT Set: [Unlocked]')
                        else
                                Armor = 'PDT'
                                add_to_chat(158,'PDT Set: [Locked]')
                        end
                        status_change(player.status)
                elseif command == 'mdt' then -- MDT Toggle --
                        if Armor == 'MDT' then
                                Armor = 'None'
                                add_to_chat(123,'MDT Set: [Unlocked]')
                        else
                                Armor = 'MDT'
                                add_to_chat(158,'MDT Set: [Locked]')
                        end
                        status_change(player.status)
                elseif command == 'C8' then -- Distance Toggle --
                        if player.target.distance then
                                target_distance = math.floor(player.target.distance*10)/10
                                add_to_chat(158,'Distance: '..target_distance)
                        else
                                add_to_chat(123,'No Target Selected')
                        end
                elseif command == 'C6' then -- Idle Toggle --
                        IdleIndex = (IdleIndex % #IdleArray) + 1
                        add_to_chat(158,'Idle Set: ' .. IdleArray[IdleIndex])
                        status_change(player.status)
                elseif command == 'AutoRA' then -- Auto Ranged Attack Toggle. *Don't Rely On This. It Isn't As Fast As Shooting Manually. It Is Mainly For AFK or When You Dualbox* --
                        if autoRAmode == 0 then
                                autoRAmode = 1
                                add_to_chat(158,'AutoRA Mode: [ON]')
                        else
                                autoRAmode = 0
                                add_to_chat(123,'AutoRA Mode: [OFF]')
                        end
                elseif command == 'TP' then
                        add_to_chat(158,'TP Return: ['..tostring(player.tp)..']')
                elseif command:match('^SC%d$') then
                        send_command('//' .. sc_map[command])
                end
        end
         
        function autoRA()
                send_command('@wait 2.5; input /ra <t>')
        end
	
	
function sub_job_change(newSubjob, oldSubjob)
	select_default_macro_book()
end

function set_macro_page(set,book)
	if not tonumber(set) then
		add_to_chat(123,'Error setting macro page: Set is not a valid number ('..tostring(set)..').')
		return
	end
	if set < 1 or set > 10 then
		add_to_chat(123,'Error setting macro page: Macro set ('..tostring(set)..') must be between 1 and 10.')
		return
	end

	if book then
		if not tonumber(book) then
			add_to_chat(123,'Error setting macro page: book is not a valid number ('..tostring(book)..').')
			return
		end
		if book < 1 or book > 20 then
			add_to_chat(123,'Error setting macro page: Macro book ('..tostring(book)..') must be between 1 and 20.')
			return
		end
		send_command('@input /macro book '..tostring(book)..';wait .1;input /macro set '..tostring(set))
	else
		send_command('@input /macro set '..tostring(set))
	end
end	
 Valefor.Seranos
Offline
Serveur: Valefor
Game: FFXI
user: Seranos
Posts: 193
By Valefor.Seranos 2018-03-08 21:44:37
Link | Citer | R
 
So, I've modified a SCH lua I found so I can use Alt+` to scroll through elements, then have a single pallet for macros. That part is working perfectly. But, in doing that, the commands to use strategems are not working (the "function handle_stratagems" section is where it starts).

Any guidance would be greatly appreciated!
Code
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job.  Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------

--[[
        Custom commands:

        Shorthand versions for each strategem type that uses the version appropriate for
        the current Arts.

												 Light Arts              Dark Arts

        /console gs c scholar light              Light Arts/Addendum
        /console gs c scholar dark                                       Dark Arts/Addendum
        /console gs c scholar cost               Penury                  Parsimony
        /console gs c scholar speed              Celerity                Alacrity
        /console gs c scholar aoe                Accession               Manifestation
        /console gs c scholar power              Rapture                 Ebullience
        /console gs c scholar duration           Perpetuance
        /console gs c scholar accuracy           Altruism                Focalization
        /console gs c scholar enmity             Tranquility             Equanimity
        /console gs c scholar skillchain                                 Immanence
        /console gs c scholar addendum           Addendum: White         Addendum: Black
--]]

-------------------------------------------------------------------------------------------------------------------

-- Macros	
-- Single I		/console gs c castspell eleone
-- Single II	/console gs c castspell eletwo
-- Single III	/console gs c castspell elethree
-- Single IV	/console gs c castspell elefour
-- Single V		/console gs c castspell elefive
-- Single VI	/console gs c castspell elesix
-- AoE I		/console gs c castspell eleagaone
-- AoE II		/console gs c castspell eleagatwo
-- AoE III		/console gs c castspell eleagathree
-- Aja			/console gs c castspell eleaja
-- AM			/console gs c castspell eleam
-- AM II		/console gs c castspell eleam2
-- Element DoT	/console gs c castspell eledot
-- Helix		/console gs c castspell elehelix
-- Weather		/console gs c castspell eleweather
-- Skillchain	/console gs c castspell schchain

-------------------------------------------------------------------------------------------------------------------



-- Initialization function for this job file.
function get_sets()
    mote_include_version = 2

    -- Load and initialize the include file.
    include('Mote-Include.lua')
end

-- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
function job_setup()
    info.addendumNukes = S{"Stone IV", "Water IV", "Aero IV", "Fire IV", "Blizzard IV", "Thunder IV",
        "Stone V", "Water V", "Aero V", "Fire V", "Blizzard V", "Thunder V"}

    state.Buff['Sublimation: Activated'] = buffactive['Sublimation: Activated'] or false
    update_active_strategems()
end

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

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


    info.low_nukes = S{"Stone", "Water", "Aero", "Fire", "Blizzard", "Thunder"}
    info.mid_nukes = S{"Stone II", "Water II", "Aero II", "Fire II", "Blizzard II", "Thunder II",
                       "Stone III", "Water III", "Aero III", "Fire III", "Blizzard III", "Thunder III",
                       "Stone IV", "Water IV", "Aero IV", "Fire IV", "Blizzard IV", "Thunder IV",}
    info.high_nukes = S{"Stone V", "Water V", "Aero V", "Fire V", "Blizzard V", "Thunder V"}

		state.eletype = M{['description']='Element Type', 'Stone', 'Water', 'Aero', 'Fire', 'Blizzard', 'Thunder', 'Light', 'Dark'}

--	stat.eletype:options('Stone', 'Water', 'Aero', 'Fire', 'Blizzard', 'Thunder', 'Light', 'Dark')
	send_command('bind !` gs c cycle eletype')

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

    send_command('bind ^` input /ma Stun <t>')

    select_default_macro_book()
end

function user_unload()
    send_command('unbind ^`')
	send_command('unbind !`')
end


-- Define sets and vars used by this job file.
function init_gear_sets()
    --------------------------------------
    -- Start defining the sets
    --------------------------------------

    -- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
    sets.buff['Ebullience'] = {head="Savant's Bonnet +2"}
    sets.buff['Rapture'] = {head="Savant's Bonnet +2"}
    sets.buff['Perpetuance'] = {hands="Savant's Bracers +2"}
    sets.buff['Immanence'] = {hands="Savant's Bracers +2"}
    sets.buff['Penury'] = {legs="Savant's Pants +2"}
    sets.buff['Parsimony'] = {legs="Savant's Pants +2"}
    sets.buff['Celerity'] = {feet="Pedagogy Loafers"}
    sets.buff['Alacrity'] = {feet="Pedagogy Loafers"}

    sets.buff['Klimaform'] = {feet="Savant's Loafers +2"}

    sets.buff.FullSublimation = {head="Scholar's Mortarboard",ear1="Savant's Earring",body="Argute Gown"}
    sets.buff.PDTSublimation = {head="Scholar's Mortarboard",ear1="Savant's Earring"}

    --sets.buff['Sandstorm'] = {feet="Desert Boots"}
end

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

-- Run after the general midcast() is done.
function job_post_midcast(spell, action, spellMap, eventArgs)
    if spell.action_type == 'Magic' then
        apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
    end
end

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

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

-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
    if stateField == 'Offense Mode' then
        if newValue == 'Normal' then
            disable('main','sub','range')
        else
            enable('main','sub','range')
        end
    end
end

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

-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
    if spell.action_type == 'Magic' then
        if default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
            if world.weather_element == 'Light' then
                return 'CureWithLightWeather'
            end
        elseif spell.skill == 'Enfeebling Magic' then
            if spell.type == 'WhiteMagic' then
                return 'MndEnfeebles'
            else
                return 'IntEnfeebles'
            end
        elseif spell.skill == 'Elemental Magic' then
            if info.low_nukes:contains(spell.english) then
                return 'LowTierNuke'
            elseif info.mid_nukes:contains(spell.english) then
                return 'MidTierNuke'
            elseif info.high_nukes:contains(spell.english) then
                return 'HighTierNuke'
            end
        end
    end
end

function customize_idle_set(idleSet)
    if state.Buff['Sublimation: Activated'] then
        if state.IdleMode.value == 'Normal' then
            idleSet = set_combine(idleSet, sets.buff.FullSublimation)
        elseif state.IdleMode.value == 'PDT' then
            idleSet = set_combine(idleSet, sets.buff.PDTSublimation)
        end
    end

    if player.mpp < 51 then
        idleSet = set_combine(idleSet, sets.latent_refresh)
    end

    return idleSet
end

-- Called by the 'update' self-command.
function job_update(cmdParams, eventArgs)
    if cmdParams[1] == 'user' and not (buffactive['light arts']      or buffactive['dark arts'] or
                       buffactive['addendum: white'] or buffactive['addendum: black']) then
        if state.IdleMode.value == 'Stun' then
            send_command('@input /ja "Dark Arts" <me>')
        else
            send_command('@input /ja "Light Arts" <me>')
        end
    end

    update_active_strategems()
    update_sublimation()
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)
    display_current_caster_state()
    eventArgs.handled = true
end

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

-- Called for direct player commands.
function job_self_command(cmdParams, eventArgs)
    if cmdParams[1]:lower() == 'scholar' then
        handle_strategems(cmdParams)
        eventArgs.handled = true
    end
end

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

-- Reset the state vars tracking strategems.
function update_active_strategems()
    state.Buff['Ebullience'] = buffactive['Ebullience'] or false
    state.Buff['Rapture'] = buffactive['Rapture'] or false
    state.Buff['Perpetuance'] = buffactive['Perpetuance'] or false
    state.Buff['Immanence'] = buffactive['Immanence'] or false
    state.Buff['Penury'] = buffactive['Penury'] or false
    state.Buff['Parsimony'] = buffactive['Parsimony'] or false
    state.Buff['Celerity'] = buffactive['Celerity'] or false
    state.Buff['Alacrity'] = buffactive['Alacrity'] or false

    state.Buff['Klimaform'] = buffactive['Klimaform'] or false
end

function update_sublimation()
    state.Buff['Sublimation: Activated'] = buffactive['Sublimation: Activated'] or false
end

-- Equip sets appropriate to the active buffs, relative to the spell being cast.
function apply_grimoire_bonuses(spell, action, spellMap)
    if state.Buff.Perpetuance and spell.type =='WhiteMagic' and spell.skill == 'Enhancing Magic' then
        equip(sets.buff['Perpetuance'])
    end
    if state.Buff.Rapture and (spellMap == 'Cure' or spellMap == 'Curaga') then
        equip(sets.buff['Rapture'])
    end
    if spell.skill == 'Elemental Magic' and spellMap ~= 'ElementalEnfeeble' then
        if state.Buff.Ebullience and spell.english ~= 'Impact' then
            equip(sets.buff['Ebullience'])
        end
        if state.Buff.Immanence then
            equip(sets.buff['Immanence'])
        end
        if state.Buff.Klimaform and spell.element == world.weather_element then
            equip(sets.buff['Klimaform'])
        end
    end

    if state.Buff.Penury then equip(sets.buff['Penury']) end
    if state.Buff.Parsimony then equip(sets.buff['Parsimony']) end
    if state.Buff.Celerity then equip(sets.buff['Celerity']) end
    if state.Buff.Alacrity then equip(sets.buff['Alacrity']) end
end


-- General handling of strategems in an Arts-agnostic way.
-- Format: gs c scholar <strategem>
function handle_strategems(cmdParams)
    -- cmdParams[1] == 'scholar'
    -- cmdParams[2] == strategem to use

    if not cmdParams[2] then
        add_to_chat(123,'Error: No strategem command given.')
        return
    end
    local strategem = cmdParams[2]:lower()

    if strategem == 'light' then
        if buffactive['light arts'] then
            send_command('input /ja "Addendum: White" <me>')
        elseif buffactive['addendum: white'] then
            add_to_chat(122,'Error: Addendum: White is already active.')
        else
            send_command('input /ja "Light Arts" <me>')
        end
    elseif strategem == 'dark' then
        if buffactive['dark arts'] then
            send_command('input /ja "Addendum: Black" <me>')
        elseif buffactive['addendum: black'] then
            add_to_chat(122,'Error: Addendum: Black is already active.')
        else
            send_command('input /ja "Dark Arts" <me>')
        end
    elseif buffactive['light arts'] or buffactive['addendum: white'] then
        if strategem == 'cost' then
            send_command('input /ja Penury <me>')
        elseif strategem == 'speed' then
            send_command('input /ja Celerity <me>')
        elseif strategem == 'aoe' then
            send_command('input /ja Accession <me>')
        elseif strategem == 'power' then
            send_command('input /ja Rapture <me>')
        elseif strategem == 'duration' then
            send_command('input /ja Perpetuance <me>')
        elseif strategem == 'accuracy' then
            send_command('input /ja Altruism <me>')
        elseif strategem == 'enmity' then
            send_command('input /ja Tranquility <me>')
        elseif strategem == 'skillchain' then
            add_to_chat(122,'Error: Light Arts does not have a skillchain strategem.')
        elseif strategem == 'addendum' then
            send_command('input /ja "Addendum: White" <me>')
        else
            add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
        end
    elseif buffactive['dark arts']  or buffactive['addendum: black'] then
        if strategem == 'cost' then
            send_command('input /ja Parsimony <me>')
        elseif strategem == 'speed' then
            send_command('input /ja Alacrity <me>')
        elseif strategem == 'aoe' then
            send_command('input /ja Manifestation <me>')
        elseif strategem == 'power' then
            send_command('input /ja Ebullience <me>')
        elseif strategem == 'duration' then
            add_to_chat(122,'Error: Dark Arts does not have a duration strategem.')
        elseif strategem == 'accuracy' then
            send_command('input /ja Focalization <me>')
        elseif strategem == 'enmity' then
            send_command('input /ja Equanimity <me>')
        elseif strategem == 'skillchain' then
            send_command('input /ja Immanence <me>')
        elseif strategem == 'addendum' then
            send_command('input /ja "Addendum: Black" <me>')
        else
            add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
        end
    else
        add_to_chat(123,'No arts has been activated yet.')
    end
end

--Set up spells by element.

-- 

function job_update(cmdParams, eventArgs)

	if state.eletype.value == 'Stone' then 
		eleone='Stone'
		eletwo='Stone II'
		elethree='Stone III' 
		elefour='Stone IV'
		elefive='Stone V'
		elesix='Stone VI'
		eleagaone='Stonega'
		eleagatwo='Stonega II'
		eleagathree='Stonega III'
		eleaja='Stoneja'
		eleam='Quake'
		eleamtwo='Quake II'
		eledot='Rasp'
		elehelix='Geohelix'
		eleweather='Sandstorm'
	elseif state.eletype.value == 'Water' then 
		eleone='Water'
		eletwo='Water II'
		elethree='Water III'
		elefour='Water IV'
		elefive='Water V'
		elesix='Water VI'
		eleagaone='Waterga'
		eleagatwo='Waterga II'
		eleagathree='Waterga III'
		eleaja='Waterja'
		eleam='Flood'
		eleamtwo='Flood II'
		eledot='Drown'
		elehelix='Hydrohelix'
		eleweather='Rainstorm'
	elseif state.eletype.value == 'Aero' then 
		eleone='Aero'
		eletwo='Aero II'
		elethree='Aero III'
		elefour='Aero IV'
		elefive='Aero V'
		elesix='Aero VI'
		eleagaone='Aeroga'
		eleagatwo='Aeroga II'
		eleagathree='Aeroga III'
		eleaja='Aeroja'
		eleam='Tornado'
		eleamtwo='Tornado II'
		eledot='Choke'
		elehelix='Anemohelix'
		eleweather='Windstorm'
	elseif state.eletype.value == 'Fire' then 
		eleone='Fire'
		eletwo='Fire II'
		elethree='Fire III'
		elefour='Fire IV'
		elefive='Fire V'
		elesix='Fire VI'
		eleagaone='Firaga'
		eleagatwo='Firaga II'
		eleagathree='Firaga III'
		eleaja='Firaja'
		eleam='Flare'
		eleamtwo='Flare II'
		eledot='Burn'
		elehelix='Pyrohelix'
		eleweather='Firestorm'
	elseif state.eletype.value == 'Blizzard' then 
		eleone='Blizzard'
		eletwo='Blizzard II'
		elethree='Blizzard III'
		elefour='Blizzard IV'
		elefive='Blizzard V'
		elesix='Blizzard VI'
		eleagaone='Blizzaga'
		eleagatwo='Blizzaga II'
		eleagathree='Blizzaga III'
		eleaja='Blizzaja'
		eleam='Freeze'
		eleamtwo='Freeze II'
		eledot='Frost'
		elehelix='Cryohelix'
		eleweather='Hailstorm'
	elseif state.eletype.value == 'Thunder' then 
		eleone='Thunder'
		eletwo='Thunder II'
		elethree='Thunder III'
		elefour='Thunder IV'
		elefive='Thunder V'
		elesix='Thunder VI'
		eleagaone='Thundaga'
		eleagatwo='Thundaga II'
		eleagathree='Thundaga III'
		eleaja='Thundaja'
		eleam='Burst'
		eleamtwo='Burst II'
		eledot='Shock'
		elehelix='Ionohelix'
		eleweather='Thunderstorm'
	elseif state.eletype.value == 'Light' then 
		eleone='Banish'
		eletwo='Banish II'
		eleagaone='Banishga'
		eleagatwo='Banishga II'
		elehelix='Luminohelix'
		eleweather='Aurorastorm'
	elseif state.eletype.value == 'Dark' then 
		eleam='Comet'
		eleamtwo='Meteor'
		elehelix='Noctohelix'
		eleweather='Voidstorm'
	end
end

function job_self_command(cmdParams, eventArgs)
    if cmdParams[1]:lower() == 'castspell' then
        castspell_elemag(cmdParams)
        eventArgs.handled = true
    end
end
 
function castspell_elemag(cmdParams)
	local elemag = cmdParams[2]:lower()

	
	local elespell = ''
	if elemag == 'eleone' then 
		elespell = eleone
	elseif elemag == 'eletwo' then 
		elespell = eletwo
	elseif elemag == 'elethree' then 
		elespell = elethree
	elseif elemag == 'elefour' then 
		elespell = elefour
	elseif elemag == 'elefive' then 
		elespell = elefive
	elseif elemag == 'elesix' then 
		elespell = elesix
	elseif elemag == 'eleagaone' then 
		elespell = eleagaone
	elseif elemag == 'eleagatwo' then 
		elespell = eleagatwo
	elseif elemag == 'eleagathree' then 
		elespell = eleagathree
	elseif elemag == 'eleaja' then 
		elespell = eleaja
	elseif elemag == 'eleam' then 
		elespell = eleam
	elseif elemag == 'eleamtwo' then 
		elespell = eleamtwo
	elseif elemag == 'eledot' then 
		elespell = eledot
	elseif elemag == 'elehelix' then 
		elespell = elehelix
	elseif elemag == 'eleweather' then 
		elespell = eleweather
	end
	
	local eletarg = ''
	if elemag == 'eleweather' then
		eletarg = '<me>'
	else eletarg = "<t>"
	end
	
send_command('input /ma "'.. elespell ..'" '.. eletarg ..'')


end

--send_command('input /ja "Immanence" <t>; /wait 1.5; /ma "'..sc1a..'" <t>; /wait 2; /ja "Immanence" <t>; /wait 1.5; /ma "'..sc1b..'" <t>')

-- Gets the current number of available strategems based on the recast remaining
-- and the level of the sch.
function get_current_strategem_count()
    -- returns recast in seconds.
    local allRecasts = windower.ffxi.get_ability_recasts()
    local stratsRecast = allRecasts[231]

    local maxStrategems = (player.main_job_level + 10) / 20

    local fullRechargeTime = 4*60

    local currentCharges = math.floor(maxStrategems - maxStrategems * stratsRecast / fullRechargeTime)

    return currentCharges
end


-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
    set_macro_page(1, 2)
end

Offline
Posts: 142
By Sockfoot 2018-03-08 22:19:44
Link | Citer | R
 
Valefor.Seranos said: »
So, I've modified a SCH lua I found so I can use Alt+` to scroll through elements, then have a single pallet for macros. That part is working perfectly. But, in doing that, the commands to use strategems are not working (the "function handle_stratagems" section is where it starts).

Any guidance would be greatly appreciated!
Is it giving you an error?
 Valefor.Seranos
Offline
Serveur: Valefor
Game: FFXI
user: Seranos
Posts: 193
By Valefor.Seranos 2018-03-09 06:42:36
Link | Citer | R
 
Sockfoot said: »
Is it giving you an error?

No error. The commands for stratagems just aren’t responding.
 Shiva.Spynx
Offline
Serveur: Shiva
Game: FFXI
user: auron86
Posts: 371
By Shiva.Spynx 2018-03-09 12:25:59
Link | Citer | R
 
You re-defined job_self_command again in the file so only the second one works (i.e. spell casting but no stratagem handling). Merge them and it should work.
Offline
Posts: 365
By Squabble 2018-03-09 14:41:22
Link | Citer | R
 
I'm running into an issue with trying to equip 2 Stikini Ring +1's - they both don't seem to equip some of the time. I have 2 Shiva Ring +1's and Varar Ring +1's and don't ever run into this problem, just the Stikini's. I have each one in a different wardrobe but that does't seem to resolve the issue. Is there a way to force gearswap to recognize that the two rings are not the same item to get them to both equip everytime?
 Sylph.Subadai
Offline
Serveur: Sylph
Game: FFXI
user: Subadai
Posts: 184
By Sylph.Subadai 2018-03-09 16:48:38
Link | Citer | R
 
Squabble said: »
I'm running into an issue with trying to equip 2 Stikini Ring +1's - they both don't seem to equip some of the time. I have 2 Shiva Ring +1's and Varar Ring +1's and don't ever run into this problem, just the Stikini's. I have each one in a different wardrobe but that does't seem to resolve the issue. Is there a way to force gearswap to recognize that the two rings are not the same item to get them to both equip everytime?
Have you tried something like:
Code
sets.midcast['Elemental Magic'] = {
     ring1={name="Shiva Ring +1", bag="wardrobe2"}, 
     ring2={name="Shiva Ring +1", bag="wardrobe3"} }
Offline
Posts: 365
By Squabble 2018-03-09 19:28:29
Link | Citer | R
 
Sylph.Subadai said: »
Squabble said: »
I'm running into an issue with trying to equip 2 Stikini Ring +1's - they both don't seem to equip some of the time. I have 2 Shiva Ring +1's and Varar Ring +1's and don't ever run into this problem, just the Stikini's. I have each one in a different wardrobe but that does't seem to resolve the issue. Is there a way to force gearswap to recognize that the two rings are not the same item to get them to both equip everytime?
Have you tried something like:
Code
sets.midcast['Elemental Magic'] = {
     ring1={name="Shiva Ring +1", bag="wardrobe2"}, 
     ring2={name="Shiva Ring +1", bag="wardrobe3"} }

This guy - most helpful dude on the internet.
 Valefor.Seranos
Offline
Serveur: Valefor
Game: FFXI
user: Seranos
Posts: 193
By Valefor.Seranos 2018-03-09 21:46:34
Link | Citer | R
 
Shiva.Spynx said: »
You re-defined job_self_command again in the file so only the second one works (i.e. spell casting but no stratagem handling). Merge them and it should work.

That worked, thank you!!!
Offline
Posts: 88
By Tomlaps 2018-03-13 16:11:04
Link | Citer | R
 
Hello. I'm trying to figure out an easy way for this :
gearswap doesn't trigger aftercast if the action doesn't complete (e.g. invalid target, petrified, slept etc.)
so i would like to avoid midcast gear staying on

it's a pretty easy problem,but many many variables

main issue is when tanking shits, and stuck into midcast gears if
stunned or, slept/petri, or any JAs, WS, etc...

It stays in WS set if stunned/slept etc while trying to use ws

Trying to figure out an easy way to fix this.
Thank you.
 Ragnarok.Martel
Offline
Serveur: Ragnarok
Game: FFXI
Posts: 2961
By Ragnarok.Martel 2018-03-13 16:38:31
Link | Citer | R
 
Hmmm. I was fairly sure that gearswap still trigger an aftercast on interrupted spells, etc. I do know that if you try to use an offensive action on an NPC then aftercast doesn't trigger. But out of range, interrupted spells, etc should all trigger. Can't test to confirm since I'm not subscribed atm.

In any case, it seems like most of the causes of the issues here are buffs. Could just set it up so that whenever you gain a buff on the "can't act" list, you snap into defensive gear. The "can't act" list being a custom list of buffs that make you unable to act. Stun, petrify, terror, and sleep come to mind. You can also setup JA/WS rule to prevent them from swapping gear in when amnesia'd, or just canceling the attempted action entirely when it's not currently possibly to activate it.
Offline
Posts: 88
By Tomlaps 2018-03-13 17:21:44
Link | Citer | R
 
function not_possible_to_use(spell) you mean ?
 Ragnarok.Martel
Offline
Serveur: Ragnarok
Game: FFXI
Posts: 2961
By Ragnarok.Martel 2018-03-13 17:43:09
Link | Citer | R
 
Never heard of it. Is that a motenten lua thing?
 Shiva.Arislan
Offline
Serveur: Shiva
Game: FFXI
user: Arislan
Posts: 1052
By Shiva.Arislan 2018-03-13 18:28:29
Link | Citer | R
 
Maybe something like this?
Code
function job_precast(spell, action, spellMap, eventArgs)
    if buffactive['terror'] or buffactive['petrified'] or buffactive['sleep'] or buffactive['stun'] then
        cancel_spell()
    elseif buffactive['amnesia'] and spell.type == "WeaponSkill" then
        cancel_spell{}
    end
end
Offline
Posts: 88
By Tomlaps 2018-03-13 18:36:13
Link | Citer | R
 
Hmm yeah maybe...

No Martel, it's not but can check it out :

https://github.com/lorand-ffxi/gearswap/blob/master/spell_utilities.lua

Thx for ansers.
 Ragnarok.Martel
Offline
Serveur: Ragnarok
Game: FFXI
Posts: 2961
By Ragnarok.Martel 2018-03-13 19:23:04
Link | Citer | R
 
Looking over that functions, that would do it for canceling an action(and thus the gearswaps) when you try to do something you can't under your current buffs. Or rather I should say it determines a true/false for that. The function itself doesn't actually cancel the action. The rule you have calling the function would need to do that part. You just need to make sure that lua is included in your main lua, and that you have a rule call that function in precast or pretarget.

However, it wouldn't address actions being interrupted by statuses midcast. You'd need to setup something in buff_change to react to the buffs in question and equip defensive gear.
 Bismarck.Speedyjim
Offline
Serveur: Bismarck
Game: FFXI
user: speedyjim
Posts: 516
By Bismarck.Speedyjim 2018-03-15 03:22:43
Link | Citer | R
 
I've searched high and low but have not been able to find an answer, whether it be here, BG forums, or Google.

I'm looking to add subjob-specific engaged sets for my RUN, namely SAM and DRK. I thought I found my answer with this, but it didn't work. Using a Mote lua.
Any help is appreciated.
 Asura.Inuyushi
Offline
Serveur: Asura
Game: FFXI
user: Inuyushi
Posts: 196
By Asura.Inuyushi 2018-03-15 06:51:16
Link | Citer | R
 
Did you put adjust_melee_groups() in your function user_setup()? Like below.
Code
function user_setup()
	adjust_melee_groups()
end
[+]
 Bismarck.Speedyjim
Offline
Serveur: Bismarck
Game: FFXI
user: speedyjim
Posts: 516
By Bismarck.Speedyjim 2018-03-15 15:57:31
Link | Citer | R
 
Thanks, Inuyushi. That was the missing piece of the puzzle, much obliged.
 Hades.Dade
Offline
Serveur: Hades
Game: FFXI
user: Dade
Posts: 230
By Hades.Dade 2018-03-15 19:39:49
Link | Citer | R
 
Hey, I'm trying to automate checking which version of haste is active on my char and finding the Spells haste1/2 from parsing incoming packet was fairly easy. Does anyone know how to track down the addition effect of Blurred+1 weapon haste? He is what I got working so far.

edit: also need to track down smn hastaga2
Offline
By Xithrowaway 2018-03-15 22:24:53
Link | Citer | R
 
Hi, I saw a really cool feature in the RUN lua I've been using and was attempting to mimic the same concept for my WHM lua, but it's clear there's something about the code I'm not understanding. Anyway, what I attempted is below, gearswap seems to recognize the states well enough but when it comes to the commands, nothing occurs. If anyone has any insight, it would be appreciated.
Code
function user_setup()

state.Barelement = M{['description']='Barelement', 'Barstonra', 'Barwatera', 'Bareara', 'Barfira', 'Barblizzara', 'Barthundra'}

state.Barstatus = M{['description']='Barstatus', 'Baramnesra', 'Barvira', 'Barparalyzra', 'Barsilencera', 'Barpetra', 'Barpoisonra', 'Barblindra', 'Barsleepra'}

state.Boost = M{['description']='Boost', Boost-DEX', 'Boost-STR', 'Boost-INT', 'Boost-AGI', 'Boost-VIT', 'Boost-MND', 'Boost-CHR'}

send_command('bind !q input //gs c Barelement')
send_command('bind !w gs c cycle Barelement')
send_command('bind !a input //gs c Barstatus')
send_command('bind !s gs c cycle Barstatus')
send_command('bind !z input //gs c Boost')
send_command('bind !x gs c cycle Boost')


function job_self_command(cmdParams, eventArgs)

    if cmdParams[1]:lower() == 'Barelement' then

        send_command('@input /ma '..state.Barelement.value..' <me>')

    end
	if cmdParams[1]:lower() == 'Barstatus' then

        send_command('@input /ma '..state.Barstatus.value..' <me>')

    end
	if cmdParams[1]:lower() == 'Boost' then

        send_command('@input /ma '..state.Boost.value..' <me>')

    end
end
 Asura.Cair
VIP
Offline
Serveur: Asura
Game: FFXI
user: Minjo
Posts: 246
By Asura.Cair 2018-03-15 23:28:05
Link | Citer | R
 
cmdParams[1]:lower() means that it will contain all lowercase

You should also you elseif, and consider storing the value of cmdParams[1]:lower() in a local variable
Offline
By Xithrowaway 2018-03-15 23:45:43
Link | Citer | R
 
Thanks Cair,

I'm not too proud to admit that everything in your second sentence went over my level of understanding, but pointing on the syntax inconsistencies allowed me to get the features I wanted working.
 Asura.Shosei
Offline
Serveur: Asura
Game: FFXI
user: Shosei
Posts: 10
By Asura.Shosei 2018-03-16 16:24:43
Link | Citer | R
 
Within a gearswap lua, is there a way to check if an addon is loaded or not?
 Carbuncle.Kigensuro
Offline
Serveur: Carbuncle
Game: FFXI
user: dlsmd
Posts: 93
By Carbuncle.Kigensuro 2018-03-17 09:54:35
Link | Citer | R
 
no because addons (as far as i know) can not see if other addons are in memory
only windower its self can do that
First Page 2 3 ... 129 130 131 ... 183 184 185
Log in to post.