Gearswap Support Thread

Language: JP EN DE FR
New Items
2023-11-19
users online
Forum » Windower » Support » Gearswap Support Thread
Gearswap Support Thread
First Page 2 3 ... 105 106 107 ... 181 182 183
Offline
Posts: 28
By Celther 2016-07-08 06:08:50
Link | Quote | Reply
 
I apologize if this has already been answered, but does Gearswap not yet recognize Wardrobe 3&4? It isn't pulling any gear from either.
Thanks!
 Ragnarok.Flippant
Offline
Server: Ragnarok
Game: FFXI
user: Enceladus
Posts: 658
By Ragnarok.Flippant 2016-07-08 12:04:24
Link | Quote | Reply
 
Fenrir.Reoko said: »
Well that's the thing, I was expecting to see Aymur, Charmers merlin, and my TP axe (kumbhakarna), to all be seen during the sequence. If you clicked the broken link from original post, it seems that TP axe isnt getting equipped.

I don't play BST, so I might need more context if I am understanding wrong. I assume you mean that you want Kumbhakarna equipped during the pet's midcast (if it gets equipped during your midcast, you will not get the recast time from Charmer's), although it looks like your GS is handling it in player's aftercast instead (which should be, tentatively, fine), but Kumbhakarna is not being equipped until it changes to your TP and/or idle gear (through pet's aftercast).

Are you sure Kumbhakarna is also listed in the same equip set as Nukumi hands/legs? It would appear that whatever that set is is the one intended to be used for the pet's attack.
 Fenrir.Reoko
Offline
Server: Fenrir
Game: FFXI
user: Reoko
Posts: 6
By Fenrir.Reoko 2016-07-08 16:41:01
Link | Quote | Reply
 
Thank you for taking the time to assist with this issue, firstly, am I wrong in thinking that I can equip more than 2 weapons per ready move?

Also, I should have stated a bit more clearly about the picture, the first pet_status_change is the pet attacking a mob, the precast is using a ready move, aftercast equipping various stuff, pet_aftercast equipping (standard) fighting gear (which includes my second kumbhakarna for PDT, and lastly the pet_status_change for the idle set.

Edit: There's gearswaps for everything in that lua, I did my best to plug my gear in accordingly.Your text to link here... The link is the actual lua, with what starts at 216 I belive is the bits that should equip the TP kumbhakarna.
 Ragnarok.Flippant
Offline
Server: Ragnarok
Game: FFXI
user: Enceladus
Posts: 658
By Ragnarok.Flippant 2016-07-08 22:54:56
Link | Quote | Reply
 
I'm not sure I understand. Precast/midcast are, functionally, the same thing for JA and WS, because they are instant abilities. You'll only use what you're in when midcast processes (essentially, anyway). So no, you cannot equip more than two weapons during your Ready.

Your pet uses a completely separate action, though. So you can equip two new weapons when it is actually using Razor Fang, or whatever. I'm going to continue assuming that what you want is for Kumbhakarna to equip in time for Razor Fang to go off, and it would appear that's what you want based on the variables I see.

The intention of that file is to equip your offensive pet gear during the player's aftercast. But to be frank, the job_aftercast function is a redundant mess and the way equip sets are being handled is unnecessarily convoluted. I will not try to solve this issue, because there is no fun in patching a bad file. I'll only take one shot in the dark and ask if you were in HighAcc or MaxAcc mode, in which case (I think) it should be trying to equip Ready_Acc_Axe3 (Digirbalag) in your sub.

If that doesn't answer the problem, then I recommend trying to find a different BST file. If you cannot, I will work with you personally to rewrite that one.
Offline
Posts: 428
By Selindrile 2016-07-09 01:18:38
Link | Quote | Reply
 
I linked mine a while back, have all the jobs modified from Motenten's versions - https://www.dropbox.com/sh/20vy32liub3glxz/AAAiIVHAasFdwCK1SZdZz7d_a?dl=0
 Lakshmi.Reddwarf
Offline
Server: Lakshmi
Game: FFXI
user: Reddwarf
Posts: 160
By Lakshmi.Reddwarf 2016-07-09 23:41:58
Link | Quote | Reply
 
Celther said: »
I apologize if this has already been answered, but does Gearswap not yet recognize Wardrobe 3&4? It isn't pulling any gear from either.
Thanks!

i seem to be having an issues interacting with NPCs while Gearswap is loaded (with MW3/4 active), i disable it and i can chat/attack normally. (disable gearswap that is)

with Gearswap Disabled, i can talk to, and attack monsters as normal, with it loaded, NPC wont respond unless i mash enter about 10 times on them, same for attacking monsters. am able to use JA/Magic on them w/o any issues.
 Carbuncle.Ricekid
Offline
Server: Carbuncle
Game: FFXI
Posts: 13
By Carbuncle.Ricekid 2016-07-12 06:05:34
Link | Quote | Reply
 
function self_command(command)
if command == 'toggle TP set' then
TP_Index = TP_Index +1
if TP_Index > #TP_Set_Names then TP_Index = 1 end
send_command('@input /echo ----- TP Set changed to '..TP_Set_Names[TP_Index]..' -----')
equip(sets.TP[TP_Set_Names[TP_Index]])
elseif command == 'toggle Idle set' then
Idle_Index = Idle_Index +1
if Idle_Index > #Idle_Set_Names then Idle_Index = 1 end
send_command('@input /echo ----- Idle Set changed to '..Idle_Set_Names[Idle_Index]..' -----')
equip(sets.Idle[Idle_Set_Names[Idle_Index]])
end

Ok guys need some help here how do I toggle between sets with this above thanks!
 Asura.Brennski
Offline
Server: Asura
Game: FFXI
user: Ogri
Posts: 127
By Asura.Brennski 2016-07-12 06:08:35
Link | Quote | Reply
 
You can either send the comamd: //gs toggle TP set

or have it bound to a key on the keyboard at the time of file load for example on my BLU this is mapped to F9.

Each time you send this it will increase the set +1 to the next one till you reach the end then loop back round to the start.
 Carbuncle.Ricekid
Offline
Server: Carbuncle
Game: FFXI
Posts: 13
By Carbuncle.Ricekid 2016-07-12 06:17:16
Link | Quote | Reply
 
It says Gearswap Command Not Found, do i just type this in the text bar?

Edit nvm found it
 Asura.Brennski
Offline
Server: Asura
Game: FFXI
user: Ogri
Posts: 127
By Asura.Brennski 2016-07-12 06:23:28
Link | Quote | Reply
 
Sorry the command is //gs c toggle TP set

I missed the c because I've mapped it at the top of my LUA

So like:
Code
   function get_gets()
     send_command('bind f9 gs c toggle TP set')

     function file_unlod ()
       send_command('unbind ^f9')
     end


this because I start defining any sets.
 Ragnarok.Zuhra
Offline
Server: Ragnarok
Game: FFXI
user: azura84
Posts: 16
By Ragnarok.Zuhra 2016-07-14 00:45:11
Link | Quote | Reply
 
A few questions and a few notes, first off; it's been over a year since I last played and obviously some things have changed, I'm refreshing my memory with a lot of Gearswap for Dummies thread but I'm certain it's a little dated by now and wondered if there was maybe a newer guide or at the very least someone has a more up to date list of job.lua's I could utilize (also will I need to redo my job_gear.lua's or not)?

Secondly I noticed after doing some perusing for the elemental.obi code that the trust function is still set as a maximum of 3 in the mote-utility.lua:
Code
    -- Can call a max of 3 Trust NPCs, so parties larger than that are out.
    if party.count > 4 then
        return false
    end


and wondered if just changing this maximum party count to 6 would fix it or just cause more issues? (not really sure where all this code is utilized these days)

Finally, I don't really remember what other addon/plugin gearswap uses to manipulate inventory for gear usage but now that we have basically 5 sets of 80 slot inventories (Inventory, Wardrobe1, Wardrobe2, Wardrobe3, Wardrobe4) I seek to never have to wait for gear changes in my moghouse again and wondered if this was reality yet? I noticed in the Organizer thread Rooks is working on getting the 3&4 setup, is that all it will require?

Thanks ahead of time, send me a PM or ingame /tell if you like even.
 Lakshmi.Reddwarf
Offline
Server: Lakshmi
Game: FFXI
user: Reddwarf
Posts: 160
By Lakshmi.Reddwarf 2016-07-15 21:30:13
Link | Quote | Reply
 
anyone know what this means? or whats causing it?

22:28:55GearSwap (Debug Mode): GearSwap (Debug Mode): Item Echo Drops does not have a jobs field in the resources.
22:28:55GearSwap (Debug Mode): GearSwap (Debug Mode): Item Porxie Pork does not have a jobs field in the resources.
22:28:55GearSwap (Debug Mode): GearSwap (Debug Mode): Item Shivite does not have a jobs field in the resources.
22:28:55GearSwap (Debug Mode): GearSwap (Debug Mode): Item Titanite does not have a jobs field in the resources.
22:28:55GearSwap (Debug Mode): GearSwap (Debug Mode): Item Garudite does not have a jobs field in the resources.
22:28:55GearSwap (Debug Mode): GearSwap (Debug Mode): Item Wind Bead does not have a jobs field in the resources.
22:28:55GearSwap (Debug Mode): GearSwap (Debug Mode): Item Ancient Lumber does not have a jobs field in the resources.
22:28:55GearSwap (Debug Mode): GearSwap (Debug Mode): Item Pear Crepe does not have a jobs field in the resources.
22:28:55GearSwap (Debug Mode): GearSwap (Debug Mode): Item Ifritite does not have a jobs field in the resources.
22:28:55GearSwap (Debug Mode): GearSwap (Debug Mode): Item Pear Crepe does not have a jobs field in the resources.
22:28:55GearSwap (Debug Mode): GearSwap (Debug Mode): Item Fern Stone does not have a jobs field in the resources.
22:28:55GearSwap (Debug Mode): GearSwap (Debug Mode): Item Glavoid Shell does not have a jobs field in the resources.
 Shiva.Hiep
Offline
Server: Shiva
Game: FFXI
user: Hiepo
Posts: 669
By Shiva.Hiep 2016-07-18 10:14:06
Link | Quote | Reply
 
Is there a way to have a specific body such as Merlinic Jubbah equipped during MB in the format of sets.magic_burst? As in I have 2 Jubbahs, both high MACC but one has MB augs while the other doesn't. I'd like my MACC/MB one to be equipped during sets.magic_burst.
 Asura.Brennski
Offline
Server: Asura
Game: FFXI
user: Ogri
Posts: 127
By Asura.Brennski 2016-07-18 10:25:40
Link | Quote | Reply
 
If you do //gs export while wearing each one you will get a file with the augments on.

Copy the line exactly into your GearSwap LUA so your MB one into the MB set and your none MB into free nuke set and GearSwap will equip the correct one based on Augs.

The line will look something like this:
{ name="Herculean Gloves", augments={'Magic burst mdg.+7%','Enmity-2','"Refresh"+1','Accuracy+13 Attack+13',}}
 Shiva.Hiep
Offline
Server: Shiva
Game: FFXI
user: Hiepo
Posts: 669
By Shiva.Hiep 2016-07-18 10:31:48
Link | Quote | Reply
 
Let me rephrase, I use Ctrl Q to toggle between my casting modes (Normal, ConserveMP, MACC), while I use Alt Q to go into MB mode (sets.magic_burst). I only want the MACC/MB Merlinic Jubbah while I'm in MACC Casting Mode and MB Mode. When I'm off my MACC/MB mode, I want the full MACC body that I mentioned in the other post.
 Asura.Brennski
Offline
Server: Asura
Game: FFXI
user: Ogri
Posts: 127
By Asura.Brennski 2016-07-18 10:35:08
Link | Quote | Reply
 
Do you have separate sets defined in your File for each?

So like sets.magic.MB ={head=""} and sets.magic.macc ={head=""}?

Or post your LUA?
 Odin.Lygre
Offline
Server: Odin
Game: FFXI
user: Dylaudid
Posts: 89
By Odin.Lygre 2016-07-18 14:07:22
Link | Quote | Reply
 
Code
function job_post_midcast(spell, action, spellMap, eventArgs)
	if spell.action_type == 'Magic' then
	apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
	   	if spell.skill == 'Elemental Magic' and spell.english ~= 'Impact' then
			if spell.element == world.day_element or spell.element == world.weather_element then
				equip(sets.Obi)
				if string.find(spell.english,'helix') then
					if state.MagicBurst.value then
						equip(set_combine(sets.magic_burst,{back=gear.HelixCape}))
					end
				end
			end
			if state.MagicBurst.value then
				equip(sets.magic_burst) 
				if state.CastingMode.value == 'MACC' then
					equip(sets.magic_burst.MACC)
				end
			end
	   	end
	   	if string.find(spell.english,'Cur') and spell.target.name == player.name then
			equip(sets.midcast.SelfCure)
	   	end
	end
end

Just make a separate mb set sets.magic_burst.MACC, and it should equip that set when your casting mode is MACC and MB toggle is on.
Hope this helps.
[+]
 Asura.Lior
Offline
Server: Asura
Game: FFXI
user: Lior
Posts: 23
By Asura.Lior 2016-07-18 16:33:38
Link | Quote | Reply
 
Since everyone in my shell told me that GearSwap would work with wardrobe 3/4 now I got those myself. Sadly, I get issues while everyone says "mine is working fine" ... could it be my .lua? It did work fine before I started to use wardrobe 3/4. I hope there is another solution than not to use 3/4 now...

This is my COR.lua:

And I am getting this error when I use a ranged attack. It doesn't swap any gear then:
Code
Gearswap: Lua runtime error: GearSwap/flow.lua:336:
Gearswap has deteced an error in the user function precast:
...areEnixWindower/addons/GearSwap/data/Lior/COR.lua:384 attempt to index field '?' (a nil value)


Please help :/
 Shiva.Hiep
Offline
Server: Shiva
Game: FFXI
user: Hiepo
Posts: 669
By Shiva.Hiep 2016-07-18 17:14:29
Link | Quote | Reply
 
How would I have my Chironic Slippers (MACC piece) swap in for my MACC/MB set? It's still swapping in my Arbatel Loafers during Klimaform Voidstorm. Also another question, but how would I make a MB Impact set using the format sets.magic_burst?
 Ragnarok.Flippant
Offline
Server: Ragnarok
Game: FFXI
user: Enceladus
Posts: 658
By Ragnarok.Flippant 2016-07-18 18:58:42
Link | Quote | Reply
 
Asura.Lior said: »
Since everyone in my shell told me that GearSwap would work with wardrobe 3/4 now I got those myself. Sadly, I get issues while everyone says "mine is working fine" ... could it be my .lua? It did work fine before I started to use wardrobe 3/4. I hope there is another solution than not to use 3/4 now...

The logic on line 384 might be a little broken if you moved your ammo to a wardrobe. You can tweak it a little so that will stop giving you an indexing error, but that particular condition will keep checking true if your ammo isn't in your inventory, and thus keep telling you you are low on ammo and cancel your action.

Either change lines 382-396 (there are other indexing holes), and move ammo into inventory (which seems logical since it's being consumed)
Code
if spell.action_type == 'Ranged Attack' then
                check_ammo = player.equipment.ammo
                if player.equipment.ammo == 'empty' or not player.inventory[check_ammo] or player.inventory[check_ammo].count <= check_ammo_count then
                    add_to_chat(123, spell.name..' Canceled: [Out of Ammo]')
                    cancel_spell()
                    return
                else
                    equip(sets.Preshot,(buffactive["Triple Shot"] and {body="Chasseur's Frac +1"} or {}))
                    if player.inventory[check_ammo] and player.inventory[check_ammo].count <= ammo_warning_limit and player.inventory[check_ammo].count > 1 and not warning then
                        add_to_chat(039, '***** [Low Ammo Warning!] *****')
                        warning = true
                    elseif player.inventory[check_ammo] and player.inventory[check_ammo].count > ammo_warning_limit and warning then
                        warning = false
                    end
                end

Or delete lines 380-388 and 390-396.

If your ammo is already in inventory, I'll try to test in game what the problem might be. If you want to keep those rules, but with your ammo in wardrobe, I'll look for a solution.

Shiva.Hiep said: »
How would I have my Chironic Slippers (MACC piece) swap in for my MACC/MB set? It's still swapping in my Arbatel Loafers during Klimaform Voidstorm. Also another question, but how would I make a MB Impact set using the format sets.magic_burst?

You should just be able to put them into the set, since what Lygre posted is handling it in post_midcast, and all the rules come after the apply_grimoire_bonuses. If it's not working, then you'll need to post your entire file.

Made a few changes to that code. Any MB set you want to specify would be sets.magic_burst[spell.english][spellMap][state.CastingMode.value], where each of these are optional. For example, sets.magic_burst.Impact, sets.magic_burst.Impact.MACC, or sets.magic_burst.Helix, etc.

Also moved the weather checks after MB sets because I figure you want those on during MBs as well.
Code
function job_post_midcast(spell, action, spellMap, eventArgs)
	if spell.action_type == 'Magic' then
		apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
		if spell.skill == 'Elemental Magic' then			
			if state.MagicBurst.value and sets.magic_burst then
				local equipSet = sets.magic_burst
				if equipSet[spell.english] then
					equipSet = equipSet[spell.english]
				end
				if equipSet[spellMap] then
					equipSet = equipSet[spellMap]
				end
				if equipSet[state.CastingMode.value] then
					equipSet = equipSet[state.CastingMode.value]
				end
				equip(equipSet)
			end
			if spell.element == world.day_element or spell.element == world.weather_element then
				equip(sets.Obi)
				if string.find(spell.english,'helix') and state.MagicBurst.value then
					equip({back=gear.HelixCape})
				end
			end
		end
		if string.find(spell.english,'Cur') and spell.english~="Cursna" and spell.target.name == player.name then
			equip(sets.midcast.SelfCure)
		end
	end
end

Is there a reason for HelixCape to only be equipped during a MB? (I don't know anything about SCH)
 Odin.Lygre
Offline
Server: Odin
Game: FFXI
user: Dylaudid
Posts: 89
By Odin.Lygre 2016-07-18 20:45:28
Link | Quote | Reply
 
Ragnarok.Flippant said: »
You should just be able to put them into the set, since what Lygre posted is handling it in post_midcast, and all the rules come after the apply_grimoire_bonuses. If it's not working, then you'll need to post your entire file.

Made a few changes to that code. Any MB set you want to specify would be sets.magic_burst[spell.english][spellMap][state.CastingMode.value], where each of these are optional. For example, sets.magic_burst.Impact, sets.magic_burst.Impact.MACC, or sets.magic_burst.Helix, etc.

Also moved the weather checks after MB sets because I figure you want those on during MBs as well.
Code
function job_post_midcast(spell, action, spellMap, eventArgs)
	if spell.action_type == 'Magic' then
		apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
		if spell.skill == 'Elemental Magic' then			
			if state.MagicBurst.value and sets.magic_burst then
				local equipSet = sets.magic_burst
				if equipSet[spell.english] then
					equipSet = equipSet[spell.english]
				end
				if equipSet[spellMap] then
					equipSet = equipSet[spellMap]
				end
				if equipSet[state.CastingMode.value] then
					equipSet = [state.CastingMode.value]
				end
				equip(equipSet)
			end
			if spell.element == world.day_element or spell.element == world.weather_element then
				equip(sets.Obi)
				if string.find(spell.english,'helix') and state.MagicBurst.value then
					equip({back=gear.HelixCape})
				end
			end
		end
		if string.find(spell.english,'Cur') and spell.english~="Cursna" and spell.target.name == player.name then
			equip(sets.midcast.SelfCure)
		end
	end
end

Is there a reason for HelixCape to only be equipped during a MB? (I don't know anything about SCH)

I have it there just for personal use soloing. That cape has max helix duration on it.
Code
function job_post_midcast(spell, action, spellMap, eventArgs)
	if spell.action_type == 'Magic' then
		if spell.skill == 'Elemental Magic' then			
			if state.MagicBurst.value and sets.magic_burst then
				local equipSet = sets.magic_burst
				if equipSet[spell.english] then
					equipSet = equipSet[spell.english]
				end
				if equipSet[spellMap] then
					equipSet = equipSet[spellMap]
				end
				if equipSet[state.CastingMode.value] then
					equipSet = equipSet[state.CastingMode.value]
				end
				equip(equipSet)
			end
			if spell.element == world.day_element or spell.element == world.weather_element then
				equip(sets.Obi)
				if string.find(spell.english,'helix') and state.MagicBurst.value then
					equip({back=gear.HelixCape})
				end
			end
		      apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
		end
		if string.find(spell.english,'Cur') and spell.english~="Cursna" and spell.target.name == player.name then
			equip(sets.midcast.SelfCure)
		end
	end
end

Moved the grimoire bonuses to after the other rules, like you said, in case the MB set overwrites your feet slot etc. Also added an 'equipSet' I think you forgot.

EDIT: Apparently you wanted it the other way, my bad.
Code
function job_post_midcast(spell, action, spellMap, eventArgs)
	if spell.action_type == 'Magic' then
		apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
		if spell.skill == 'Elemental Magic' then			
			if state.MagicBurst.value and sets.magic_burst then
				local equipSet = sets.magic_burst
				if equipSet[spell.english] then
					equipSet = equipSet[spell.english]
				end
				if equipSet[spellMap] then
					equipSet = equipSet[spellMap]
				end
				if equipSet[state.CastingMode.value] then
					equipSet = equipSet[state.CastingMode.value]
				end
				equip(equipSet)
			end
			if spell.element == world.day_element or spell.element == world.weather_element then
				equip(sets.Obi)
				if string.find(spell.english,'helix') and state.MagicBurst.value then
					equip({back=gear.HelixCape})
				end
			end
		end
		if string.find(spell.english,'Cur') and spell.english~="Cursna" and spell.target.name == player.name then
			equip(sets.midcast.SelfCure)
		end
	end
end
 Ragnarok.Flippant
Offline
Server: Ragnarok
Game: FFXI
user: Enceladus
Posts: 658
By Ragnarok.Flippant 2016-07-18 21:25:09
Link | Quote | Reply
 
Indeed, thanks; edited it.

And yeah, I was thinking he wanted the SCH feet overwritten in both the macc and normal MB set, but looking back, he could have meant just the "macc MB" set...which would require recalling that function afterwards based on the condition that it's not macc mode.
 Asura.Brennski
Offline
Server: Asura
Game: FFXI
user: Ogri
Posts: 127
By Asura.Brennski 2016-07-20 04:00:10
Link | Quote | Reply
 
Hi I'm still having trouble with my GearSwap equipping DT sets while stunned Terrored or asleep and my Cursana received gear when doomed. Can anyone look at my LUA and see if Im making a stupid mistake and how to fix it?

Thanks
 Odin.Lygre
Offline
Server: Odin
Game: FFXI
user: Dylaudid
Posts: 89
By Odin.Lygre 2016-07-20 06:50:39
Link | Quote | Reply
 
Code
function aftercast(spell)
  	if player.status == 'Engaged' then
		equip(sets.TP[sets.TP.index[TP_ind]])
	else
		equip(sets.Idle[sets.Idle.index[Idle_ind]])
	end
	-- if buffactive['doom'] then
	-- 	equip(sets.Utility.Doom)
	-- end
	-- if buffactive['terror'] or buffactive['stun'] or buffactive['sleep'] then 
	-- 	equip(sets.TP.DT)
	-- end
end
 
  

-- function status_change(new,old)
-- 	if player.status == 'Engaged' then
-- 		equip(sets.TP[sets.TP.index[TP_ind]])		 
-- 	else
-- 		equip(sets.Idle[sets.Idle.index[Idle_ind]]) 
-- 	elseif buffactive['doom'] then
-- 		equip(sets.Utility.Doom)
-- 	end
-- 	if buffactive['terror'] or buffactive['stun'] or buffactive['sleep']    then 
-- 		equip(sets.TP.DT)
-- 	end
-- end

function status_change(new,old)
	if new == 'Engaged' then
		equip(sets.TP[sets.TP.index[TP_ind]])
	elseif new == 'Idle' then
		equip(sets.Idle[sets.Idle.index[Idle_ind]])
		if buffactive['terror'] or buffactive['stun'] or (buffactive['sleep'] or buffactive['lullaby']) then
			equip(sets.TP.DT)
		end
	end
end

function buff_change(buff, gain)
	if (buff == "terror" or buff == "stun" or (buff == 'sleep' or buff == 'lullaby')) then
		if gain then
			if player.status == 'Engaged' then
				equip(sets.TP.DT)
			elseif player.status == 'Idle' then
				equip(sets.TP.DT)				
			end
		else 
			if player.status == 'Engaged' then
				equip(sets.TP[sets.TP.index[TP_ind]])
			elseif player.status == 'Idle' then
				equip(sets.Idle[sets.Idle.index[Idle_ind]])
			end
		end
	end
	if buff == "doom" then
		if gain then
			equip(sets.Utility.Doom)
		else 
			if player.status == 'Engaged' then
				equip(sets.TP[sets.TP.index[TP_ind]])
			elseif player.status == 'Idle' then
				equip(sets.Idle[sets.Idle.index[Idle_ind]])
			end
		end
	end
end

function self_command(command)
	if command == 'toggle TP set' then
		TP_ind = TP_ind +1
		if TP_ind > #sets.TP.index then TP_ind = 1 end
		send_command('@input /echo <----- TP Set changed to '..sets.TP.index[TP_ind]..' ----->')
		equip(sets.TP[sets.TP.index[TP_ind]])
	elseif command == 'toggle Idle set' then
		Idle_ind = Idle_ind +1
		if Idle_ind > #sets.Idle.index then Idle_ind = 1 end
		send_command('@input /echo <----- Idle Set changed to '..sets.Idle.index[Idle_ind]..' ----->')
		equip(sets.Idle[sets.Idle.index[Idle_ind]])
	elseif command == 'toggle Res set' then
		Resolution_ind = Resolution_ind +1
		if Resolution_ind > #sets.Resolution.index then Resolution_ind = 1 end
		send_command('@input /echo <----- Resolution set changed to '..sets.Resolution.index[Resolution_ind]..' ----->')
	elseif command == 'toggle Req set' then
		Requiescat_ind = Requiescat_ind +1
		if Requiescat_ind > #sets.Requiescat.index then Requiescat_ind = 1 end
		send_command('@input /echo <----- Requiescat Set changed to '..sets.Requiescat.index[Requiescat_ind]..' ----->')
	elseif command == 'equip TP set' then
		equip(sets.TP[sets.TP.index[TP_ind]])
	elseif command == 'equip Idle set' then
		equip(sets.Idle[sets.Idle.index[Idle_ind]])
	end
end

I only changed your rules, so that's what I'm posting. Deletions from your code are commented out. Hope this works. Let us know.
 Asura.Brennski
Offline
Server: Asura
Game: FFXI
user: Ogri
Posts: 127
By Asura.Brennski 2016-07-20 09:04:57
Link | Quote | Reply
 
Thanks that worked.
 Ragnarok.Flippant
Offline
Server: Ragnarok
Game: FFXI
user: Enceladus
Posts: 658
By Ragnarok.Flippant 2016-07-20 16:37:37
Link | Quote | Reply
 
The doom gear won't persist without also having such rules in status_change/aftercast. Also, the terror, etc. gear will not persist after an action (or any attempt of an action) without also having such rules in aftercast.

Lastly, buff is case sensitive.

But, by the time the buff_change function is called, the buffactive table has already been updated anyway. So you can just do:
Code
function aftercast(spell)
	status_gear(player.status)
end

function status_change(new,old)
	status_gear(new,old)   
end

status_gear(new,old)
	if new == 'Engaged' then
		equip(sets.TP[sets.TP.index[TP_ind]])
	elseif new == 'Idle' then
		equip(sets.Idle[sets.Idle.index[Idle_ind]])        
	end
	defensive_gear()	
end

function defensive_gear()
	if buffactive['terror'] or buffactive['stun'] or buffactive['sleep'] or buffactive['lullaby'] then
		equip(sets.TP.DT)
	end
	if buffactive.Doom then
		equip(sets.Utility.Doom)
	end
end

function buff_change(buff, gain)
	local buff = string.lower(buff)
	if S{"terror","doom","stun","sleep","lullaby"}:contains(buff) and gain then
		defensive_gear()
	end
	if not midaction() then
		status_gear(player.status)
	end
end

That way, doom is prioritized and buff_change won't put you into TP gear when you're in the middle of a WS or something.
 Fenrir.Idevlboy
Offline
Server: Fenrir
Game: FFXI
user: idevlboy
Posts: 62
By Fenrir.Idevlboy 2016-07-23 17:32:46
Link | Quote | Reply
 
I'm sure this has been posted somewhere but after an admittedly very short search I cant seem to find a complete brd lua.

Could someone please link or provide a current working version for 4 song brd? I have been working on GS for way too long today and brain is completely fried. Hoping to get a brd.lua (and sidecar if necessary) I can just pop gear into and go if possible.

Any help would be greatly appreciated. Thanks.
 Fenrir.Moldtech
Offline
Server: Fenrir
Game: FFXI
user: Moldtech
Posts: 574
By Fenrir.Moldtech 2016-07-23 17:35:04
Link | Quote | Reply
 
This what I've been using on Auto. Dunno of complete but it works...
Code
-------------------------------------------------------------------------------------------------------------------
-- Initialization function that defines sets and variables to be used.
-------------------------------------------------------------------------------------------------------------------


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


--[[
	Custom commands:
	
	Terpander has a set of modes: None, Dummy, Terpander
	
	You can set these via the standard 'set' and 'cycle' self-commands.  EG:
	gs c cycle Terpander
	gs c set Terpander Dummy
	
	The Dummy state will equip the Terpander and ensure non-duration gear is equipped.
	The Terpander state will simply equip the Terpander on top of standard gear.
	
	Use the Dummy version to put up dummy songs that can be overwritten by full-potency songs.
	
	Use the Terpander version to simply put up additional songs without worrying about dummy songs.
	
	
	Simple macro to cast a dummy Terpander song:
	/console gs c set Terpander Dummy
	/ma "Shining Fantasia" <me>
	
	
	There is also an auto-handling of Terpander songs, via the state.AutoTerpander flag:
	
	If state.TerpanderMode is None, and if currently tracked songs (via timers) is less
	than the max we could sing while using the Terpander, and if the song is cast on
	self (rather than Pianissimo on another player), then it will equip the Terpander on
	top of standard duration gear.


--]]


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




-- Setup vars that are user-independent.
function job_setup()
	state.Buff['Pianissimo'] = buffactive['pianissimo'] or false


	options.TerpanderModes = {'None','Dummy','Terpander'}
	state.TerpanderMode = 'None'


	-- For tracking current recast timers via the Timers plugin.
	timer_reg = {}
end




-- Setup vars that are user-dependent.  Can override this function in a sidecar file.
function user_setup()
	-- Options: Override default values
	options.CastingModes = {'Normal', 'Resistant'}
	options.OffenseModes = {'None', 'Normal'}
	options.DefenseModes = {'Normal'}
	options.WeaponskillModes = {'Normal'}
	options.IdleModes = {'Normal', 'PDT'}
	options.RestingModes = {'Normal'}
	options.PhysicalDefenseModes = {'PDT'}
	options.MagicalDefenseModes = {'MDT'}

	brd_daggers = S{}
	pick_tp_weapon()


	-- Adjust this if using the Terpander (new +song instrument)
	info.TerpanderInstrument = 'Terpander'
	-- How many extra songs we can keep from Terpander/Terpander
	info.TerpanderSongs = 1
	-- Whether to try to automatically use Terpander when an appropriate gap in current vs potential
	-- songs appears, and you haven't specifically changed state.TerpanderMode.
	state.AutoTerpander = false


	-- Additional local binds
	send_command('bind ^` input /ma "Chocobo Mazurka" <me>')
end

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



-- Called when this job file is unloaded (eg: job change)
function file_unload()
	if binds_on_unload then
		binds_on_unload()
	end


	send_command('unbind ^`')
end




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


	-- Precast Sets


	-- Fast cast sets for spells
	sets.precast.FC = {ear2="Loquac. Earring",
		body="Hedera Cotehardie",waist="Witful Belt",feet="Chelona Boots"}


	sets.precast.FC.Cure = set_combine(sets.precast.FC)


	sets.precast.FC.Stoneskin = set_combine(sets.precast.FC, {head="Siegel Sash"})


	sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})


	sets.precast.FC.BardSong = {main="Kali",sub="Genmei Shield",
		head="Fili Calot +1",neck="Aoidos' Matinee",hands="Schellenband",ear1="Aoidos' Earring",ear2="Loquac. Earring",
		body="Hedera Cotehardie",waist="Witful Belt",feet="Chelona Boots"}


	sets.precast.FC.Terpander = set_combine(sets.precast.FC.BardSong, {range=info.TerpanderInstrument})




	-- Precast sets to enhance JAs


	sets.precast.JA.Nightingale = {}
	sets.precast.JA.Troubadour = {}
	sets.precast.JA['Soul Voice'] = {}


	-- Waltz set (chr and vit)
	sets.precast.Waltz = {}


       
	-- Weaponskill sets
	-- Default set for any weaponskill that isn't any more specifically defined
	sets.precast.WS = {}


	-- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
	sets.precast.WS['Evisceration'] = {}


	sets.precast.WS['Exenterator'] = {}


	sets.precast.WS['Mordant Rime'] = {}




	-- Midcast Sets


	-- General set for recast times.
	sets.midcast.FastRecast = {ear2="Loquac. Earring",
		waist="Witful Belt",feet="Chelona Boots"}


	-- Gear to enhance certain classes of songs.  No instruments added here since Gjallarhorn is being used.
	sets.midcast.Ballad = set_combine(sets.midcast.SongEffect,{range="Gjallarhorn",legs="Fili Rhingrave +1"})
	sets.midcast.Lullaby = set_combine(sets.midcast.SongDebuff,{range="Gjallarhorn",hands="Brioso Cuffs"})
	sets.midcast.Madrigal = set_combine(sets.midcast.SongEffect,{range="Gjallarhorn",head="Fili Calot +1"})
	sets.midcast.March = set_combine(sets.midcast.SongEffect,{range="Gjallarhorn",hands="Fili Manchettes +1"})
	sets.midcast.Minuet = set_combine(sets.midcast.SongEffect,{range="Gjallarhorn",body="Fili Hongreline +1"})
	sets.midcast.Minne = set_combine(sets.midcast.SongEffect,{range="Gjallarhorn",})
	sets.midcast.Carol = set_combine(sets.midcast.SongEffect,{range="Gjallarhorn",head="Fili Calot +1",
		body="Fili Hongreline +1",hands="Fili Manchettes +1",
		legs="Fili Rhingrave +1",feet="Fili Cothurnes +1"})
	sets.midcast.Mazurka = set_combine(sets.midcast.SongEffect,{range="Gjallarhorn",legs="Fili Rhingrave +1"})
	sets.midcast.Prelude = set_combine(sets.midcast.SongEffect,{range="Gjallarhorn",legs="Fili Rhingrave +1"})
	sets.midcast["Sentinel's Scherzo"] = set_combine(sets.midcast.SongEffect,{range="Gjallarhorn",feet="Fili Cothurnes +1"})
	sets.midcast['Magic Finale'] = set_combine(sets.midcast.SongEffect,{range="Gjallarhorn",legs="Fili Rhingrave +1"})
	sets.midcast["Army's Paeon*"] = set_combine(sets.midcast.SongEffect,{range="Gjallarhorn",head="Brioso Roundlet"})
	
	
	sets.midcast["Puppet's Operetta"] = {range=info.TerpanderInstrument}




	-- For song buffs (duration and AF3 set bonus)
	sets.midcast.SongEffect = {main="Kali",
		head="Fili Calot +1",neck="Aoidos' Matinee",ear1="Musical Earring",ear2="Loquacious Earring",
		body="Fili Hongreline +1",hands="Fili Manchettes +1",ring1="Nereid Ring",ring2="Nereid Ring",
		back="Rhapsode's Cape",waist="Marching Belt",legs="Fili Rhingrave +1",feet="Brioso Slippers +1"}


	-- For song defbuffs (duration primary, accuracy secondary)
	sets.midcast.SongDebuff = {main="Kali",
		head="Kaabanax Hat",neck="Aoidos' Matinee",ear1="Psystorm Earring",ear2="Lifestorm Earring",
		body="Fili Hongreline +1",hands="Fili Manchettes +1",ring2="Sangoma Ring",
		back="Rhapsode's Cape",waist="Aristo Belt",legs="Fili Rhingrave +1",feet="Brioso Slippers +1"}


	-- For song defbuffs (accuracy primary, duration secondary)
	sets.midcast.ResistantSongDebuff = {}


	-- Song-specific recast reduction
	sets.midcast.SongRecast = {ear2="Loquacious Earring",
		}


	--sets.midcast.Terpander = set_combine(sets.midcast.FastRecast, sets.midcast.SongRecast, {range=info.TerpanderInstrument})


	-- Cast spell with normal gear, except using Terpander instead
	sets.midcast.Terpander = {range=info.TerpanderInstrument}


	-- Dummy song with Terpander; minimize duration to make it easy to overwrite.
	sets.midcast.TerpanderDummy = {range=info.TerpanderInstrument,
		head="Fili Calot +1",ear1="Aoidos' Earring",ear2="Loquac. Earring",
		body="Hedera Cotehardie",waist="Witful Belt",feet="Chelona Boots"
		}


	-- Other general spells and classes.
	sets.midcast.Cure = {main="Iridal Staff",
		ammo="Clarus Stone",head="Gendewitha Caubeen",neck="Phalaina Locket",
		ear1="Magnetic Earring",ear2="Loquacious Earring",
		body="Hedera Cotehardie",hands="Bokwus Gloves",ring1="Ephedra Ring",
		ring2="Ephedra Ring",feet="Chironic Slippers"}


	sets.midcast.Curaga = sets.midcast.Cure


	sets.midcast.Stoneskin = {head="Siegel Sash"
		}


	sets.midcast.Cursna = {
		neck="Malison Medallion",
		ring1="Ephedra Ring",ring2="Ephedra Ring",}




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


	-- Resting sets
	sets.resting = {main=gear.Staff.HMP, 
		main="Iridal Staff"}




	-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
	sets.idle = {main="Kali",sub="Genmei Shield",range="Oneiros Harp",
		head="Brioso Roundlet",neck="Twilight Torque",ear1="Hearty Earring",ear2="Loquacious Earring",
		body="Gendewitha Bliaut",hands="Serpentes Cuffs",ring1="Woltaris Ring",ring2="Paguroidea Ring",
		back="Shadow Mantle",waist="Fucho-no-obi",legs="Brioso cannions",feet="Fili Cothurnes +1"}


	sets.idle.Town = {main="Kali",sub="Genmei Shield",range="Oneiros Harp",
		head="Brioso Roundlet",neck="Twilight Torque",ear1="Hearty Earring",ear2="Loquacious Earring",
		body="Gendewitha Bliaut",hands="Serpentes Cuffs",ring1="Woltaris Ring",ring2="Paguroidea Ring",
		back="Shadow Mantle",waist="Fucho-no-obi",legs="Brioso cannions",feet="Fili Cothurnes +1"}


	sets.idle.Weak = {main="Kali",sub="Genmei Shield",range="Oneiros Harp",
		head="Brioso Roundlet",neck="Twilight Torque",ear1="Hearty Earring",ear2="Loquacious Earring",
		body="Gendewitha Bliaut",hands="Serpentes Cuffs",ring1="Woltaris Ring",ring2="Paguroidea Ring",
		back="Shadow Mantle",waist="Fucho-no-obi",legs="Brioso cannions",feet="Fili Cothurnes +1"}


	-- Defense sets


	sets.defense.PDT = {}


	sets.defense.MDT = {}


	sets.Kiting = {feet="Fili Cothurnes +1 "}


	-- Engaged sets


	-- Variations for TP weapon and (optional) offense/defense modes.  Code will fall back on previous
	-- sets if more refined versions aren't defined.
	-- If you create a set with both offense and defense modes, the offense mode should be first.
	-- EG: sets.engaged.Dagger.Accuracy.Evasion


	 -- Basic set for if no TP weapon is defined.
    sets.engaged = {main="Kali",sub="Genmei Shield",range="Oneiros Harp",
		head="Fili Calot +1",neck="Twilight Torque",ear1="Hearty Earring",ear2="Loquacious Earring",
		body="Hedera Cotehardie",hands="Fili Manchettes +1",ring1="Woltaris Ring",ring2="Paguroidea Ring",
		back="Kumbira Cape",waist="Witful Belt",legs="Fili Rhingrave +1",feet="Fili Cothurnes +1"}


	-- Sets with weapons defined.
	sets.engaged.Dagger = {main="Kali",sub="Genmei Shield",range="Oneiros Harp",
		head="Fili Calot +1",neck="Twilight Torque",ear1="Hearty Earring",ear2="Loquacious Earring",
		body="Hedera Cotehardie",hands="Fili Manchettes +1",ring1="Woltaris Ring",ring2="Paguroidea Ring",
		back="Kumbira Cape",waist="Witful Belt",legs="Fili Rhingrave +1",feet="Fili Cothurnes +1"}


	-- Set if dual-wielding
	sets.engaged.DualWield = {main="Kali",sub="Legato Dagger",range="Oneiros Harp",
		head="Fili Calot +1",neck="Twilight Torque",ear1="Hearty Earring",ear2="Loquacious Earring",
		body="Hedera Cotehardie",hands="Fili Manchettes +1",ring1="Woltaris Ring",ring2="Paguroidea Ring",
		back="Kumbira Cape",waist="Witful Belt",legs="Fili Rhingrave +1",feet="Fili Cothurnes +1"}
end




-------------------------------------------------------------------------------------------------------------------
-- Job- versions of event handlers, allowing overriding default handling.
-------------------------------------------------------------------------------------------------------------------


-- 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 spell.type == 'BardSong' then
		-- Auto-Pianissimo
		if spell.target.type == 'PLAYER' and not spell.target.charmed and not state.Buff['Pianissimo'] then
			send_command('@input /ja "Pianissimo" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
			eventArgs.cancel = true
			return
		end
	end
end




-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_midcast(spell, action, spellMap, eventArgs)
	if spell.action_type == 'Magic' then
		-- Default base equipment layer of fast recast.
		equip(sets.midcast.FastRecast)


		if spell.type == 'BardSong' then
			-- layer general gear on first, then let default handler add song-specific gear.
			local generalClass = get_song_class(spell)
			if generalClass and sets.midcast[generalClass] then
				equip(sets.midcast[generalClass])
			end
		end
	end
end

		if spell == "Puppet's Operetta" then
			equip(sets.midcast.TerpanderDummy)
		end

function job_post_midcast(spell, action, spellMap, eventArgs)
	if spell.type == 'BardSong' then
		if state.TerpanderMode == 'Terpander' then
			equip(sets.midcast.Terpander)
		elseif state.TerpanderMode == 'None' and spell.target.type == 'SELF' and state.AutoTerpander and daur_song_gap() then
			equip(sets.midcast.Terpander)
		end


		state.TerpanderMode = 'None'
	end
end




-- Set eventArgs.handled to true if we don't want automatic gear equipping to be done.
function job_aftercast(spell, action, spellMap, eventArgs)
	if not spell.interrupted then
		if state.Buff[spell.name] ~= nil then
			state.Buff[spell.name] = true
		end


		if spell.type == 'BardSong' then
			if spell.target then
				if spell.target.type and spell.target.type:upper() == 'SELF' then
					adjust_Timers(spell, action, spellMap)
				end
			end
		end
	end
end


-------------------------------------------------------------------------------------------------------------------
-- Hooks for other events that aren't handled by the include file.
-------------------------------------------------------------------------------------------------------------------


function job_buff_change(buff, gain)
	if state.Buff[buff] ~= nil then
		state.Buff[buff] = gain
	end
end


-------------------------------------------------------------------------------------------------------------------
-- Hooks for Terpander mode handling.
-------------------------------------------------------------------------------------------------------------------


-- Request job-specific mode tables.
-- Return true on the third returned value to indicate an error: that we didn't recognize the requested field.
function job_get_mode_list(field)
	if field == 'Terpander' then
		if player.inventory[info.TerpanderInstrument] or player.wardrobe[info.TerpanderInstrument] then
			return options.TerpanderModes, state.TerpanderMode
		else
			add_to_chat(123, info.TerpanderInstrument..' is not in player inventory.')
		end
	end
end


-- Set job-specific mode values.
-- Return true if we recognize and set the requested field.
function job_set_mode(field, val)
	if field == 'Terpander' then
		state.TerpanderMode = val
		return true
	end
end


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


-- Called by the 'update' self-command.
function job_update(cmdParams, eventArgs)
	pick_tp_weapon()
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
		if state.CombatForm then
			meleeString = 'Melee: Dual-wield, '
		else
			meleeString = 'Melee: Single-wield, '
		end
	end


	add_to_chat(122,'Casting ['..state.CastingMode..'], '..meleeString..'Idle ['..state.IdleMode..'], '..defenseString..
		'Kiting: '..on_off_names[state.Kiting])


	eventArgs.handled = true
end


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


-- Determine the custom class to use for the given song.
function get_song_class(spell)
	-- Can't use spell.targets:contains() because this is being pulled from resources
	if set.contains(spell.targets, 'Enemy') then
		if state.CastingMode == 'Resistant' then
			return 'ResistantSongDebuff'
		else
			return 'SongDebuff'
		end
	elseif state.TerpanderMode == 'Dummy' then
		return 'TerpanderDummy'
	else
		return 'SongEffect'
	end
end




-- Function to create custom buff-remaining timers with the Timers plugin,
-- keeping only the actual valid songs rather than spamming the default
-- buff remaining timers.
function adjust_Timers(spell, action, spellMap)
	local t = os.time()


	-- Eliminate songs that have already expired from our local list.
	local tempreg = {}
	for i,v in pairs(timer_reg) do
		if v < t then tempreg[i] = true end
	end
	for i,v in pairs(tempreg) do
		timer_reg[i] = nil
	end


	local dur = calculate_duration(spell.name, spellMap)
	if timer_reg[spell.name] then
		-- Can delete timers that have less than 120 seconds remaining, since
		-- the new version of the song will overwrite the old one.
		-- Otherwise create a new timer counting down til we can overwrite.
		--if (timer_reg[spell.name] - t) <= 120 then
			send_command('timers delete "'..spell.name..'"')
			timer_reg[spell.name] = t + dur
			send_command('timers create "'..spell.name..'" '..dur..' down')
		--end
	else
		-- Figure out how many songs we can maintain.
		local maxsongs = 2
		if player.equipment.range == info.TerpanderInstrument then
			maxsongs = maxsongs + info.TerpanderSongs
		end
		if buffactive['Clarion Call'] then
			maxsongs = maxsongs+1
		end
		-- If we have more songs active than is currently apparent, we can still overwrite
		-- them while they're active, even if not using appropriate gear bonuses (ie: Daur).
		if maxsongs < table.length(timer_reg) then
			maxsongs = table.length(timer_reg)
		end


		-- Create or update new song timers.
		if table.length(timer_reg) < maxsongs then
			timer_reg[spell.name] = t+dur
			send_command('timers create "'..spell.name..'" '..dur..' down')
		else
			local rep,repsong
			for i,v in pairs(timer_reg) do
				if t+dur > v then
					if not rep or rep > v then
						rep = v
						repsong = i
					end
				end
			end
			if repsong then
				timer_reg[repsong] = nil
				send_command('timers delete "'..repsong..'"')
				timer_reg[spell.name] = t+dur
				send_command('timers create "'..spell.name..'" '..dur..' down')
			end
		end
	end
end


-- Function to calculate the duration of a song based on the equipment used to cast it.
-- Called from adjust_Timers(), which is only called on aftercast().
function calculate_duration(spellName, spellMap)
	local mult = 1
	if player.equipment.range == 'Terpander' then mult = mult + 0.0 end 
	if player.equipment.range == "Gjallarhorn" then mult = mult + 0.4 end -- change to 0.3 with 95 Gjall


	if player.equipment.main == "Carnwenhan" then mult = mult + 0.1 end -- 0.1 for 75, 0.4 for 95, 0.5 for 99/119
	if player.equipment.main == "Kali" then mult = mult + 0.1 end
	if player.equipment.neck == "Aoidos' Matinee" then mult = mult + 0.1 end
	if player.equipment.body == "Fili Hongreline +1" then mult = mult + 0.1 end
	if player.equipment.legs == "Mdk. Shalwar +1" then mult = mult + 0.1 end
	if player.equipment.feet == "Brioso Slippers" then mult = mult + 0.1 end
	if player.equipment.feet == "Brioso Slippers +1" then mult = mult + 0.11 end


	if spellMap == 'Paeon' and player.equipment.head == "Brioso Roundlet" then mult = mult + 0.1 end
	if spellMap == 'Paeon' and player.equipment.head == "Brioso Roundlet +1" then mult = mult + 0.1 end
	if spellMap == 'Madrigal' and player.equipment.head == "Fili Calot +1" then mult = mult + 0.1 end
	if spellMap == 'Minuet' and player.equipment.body == "Fili Hongreline +1" then mult = mult + 0.1 end
	if spellMap == 'March' and player.equipment.hands == 'Fili Manchettes +1' then mult = mult + 0.1 end
	if spellMap == 'Ballad' and player.equipment.legs == "Fili Rhingrave +1" then mult = mult + 0.1 end
	if spellName == "Sentinel's Scherzo" and player.equipment.feet == "Fili Cothurnes +1" then mult = mult + 0.1 end


	if buffactive.Troubadour then
		mult = mult*2
	end
	if spellName == "Sentinel's Scherzo" then
		if buffactive['Soul Voice'] then
			mult = mult*2
		elseif buffactive['Marcato'] then
			mult = mult*1.5
		end
	end


	-- Tweak for inaccuracies in cast vs aftercast timing
	mult = mult - 0.05


	local totalDuration = mult*120


	return totalDuration
end




function daur_song_gap()
	if player.inventory[info.TerpanderInstrument] or player.wardrobe[info.TerpanderInstrument] then
		-- Figure out how many songs we can maintain.
		local maxsongs = 2 + info.TerpanderSongs


		local activesongs = table.length(timer_reg)


		-- If we already have at least 2 songs on, but not enough to max out
		-- on possible Daur songs, flag us as Daur-ready.
		if activesongs >= 2 and activesongs < maxsongs then
			return true
		end
	end


	return false
end






-- Examine equipment to determine what our current TP weapon is.
function pick_tp_weapon()
	if brd_daggers:contains(player.equipment.main) then
		state.CombatWeapon = 'Dagger'

		if S{'NIN','DNC'}:contains(player.sub_job) and brd_daggers:contains(player.equipment.sub) then
			state.CombatForm = "DualWield"
		else
			state.CombatForm = nil
		end
	else
		state.CombatWeapon = nil
		state.CombatForm = nil
	end
end 
 Ragnarok.Flippant
Offline
Server: Ragnarok
Game: FFXI
user: Enceladus
Posts: 658
By Ragnarok.Flippant 2016-07-23 17:43:09
Link | Quote | Reply
 
Going to want to use the [code] tags for that, BBCode is changing the integrity of at least one line.
 Fenrir.Moldtech
Offline
Server: Fenrir
Game: FFXI
user: Moldtech
Posts: 574
By Fenrir.Moldtech 2016-07-23 17:45:50
Link | Quote | Reply
 
yea, it does have an issue with engaging but disengaged and singing its workin'
First Page 2 3 ... 105 106 107 ... 181 182 183
Log in to post.