GS And Flurry.

Language: JP EN DE FR
2010-09-08
New Items
users online
Forum » FFXI » Jobs » Ranger » GS and Flurry.
GS and Flurry.
 
Offline
Posts:
By 2019-11-06 21:25:12
| Edit  | Link | Quote | Reply
 
Post deleted by User.
 Leviathan.Comeatmebro
Offline
Server: Leviathan
Game: FFXI
user: Rairin
Posts: 6052
By Leviathan.Comeatmebro 2019-11-06 22:17:25
Link | Quote | Reply
 
Flurry and Flurry 2 are the same buff(which is called Flurry), you need a bit more advanced code to check which spell was last cast on you to be able to differentiate them. The buff icon won't do it, and that's what gearswap is checking.
[+]
 Shiva.Arislan
Offline
Server: Shiva
Game: FFXI
user: Arislan
Posts: 1052
By Shiva.Arislan 2019-11-06 22:18:47
Link | Quote | Reply
 
Quote:
I can see that when you manually inspect your buffs, it still says "Flurry" and not "Flurry II", which is what I'm assuming is causing the issue.

Bingo.

The only way to automatically differentiate between states of Flurry (and Haste) is to packet sniff for the spell's unique param.

Otherwise, you gotta set up a manual toggle.
[+]
 
Offline
Posts:
By 2019-11-06 22:57:49
 Undelete | Edit  | Link | Quote | Reply
 
Post deleted by User.
 Bahamut.Ivebian
Offline
Server: Bahamut
Game: FFXI
user: Smg1388
Posts: 39
By Bahamut.Ivebian 2019-11-06 23:46:11
Link | Quote | Reply
 
The first flurry effect is a beneficial pathos, has nothing to do with the RDM spells.
 
Offline
Posts:
By 2019-11-06 23:56:58
 Undelete | Edit  | Link | Quote | Reply
 
Post deleted by User.
Offline
Posts: 152
By Unzero 2019-11-07 00:19:24
Link | Quote | Reply
 
Windower\plugins\resources\spells.xml
Offline
Posts: 152
By Unzero 2019-11-07 00:19:56
Link | Quote | Reply
 
<s id="80" index="845" prefix="/magic" english="Flurry" japanese="スナップ" type="WhiteMagic" element="Wind" targets="Self, Party, Ally, NPC" skill="EnhancingMagic" mpcost="40" casttime="3" recast="20" duration="180" alias="" />

<s id="81" index="846" prefix="/magic" english="Flurry II" japanese="スナップII" type="WhiteMagic" element="Wind" targets="Self, Party, Ally, NPC" skill="EnhancingMagic" mpcost="80" casttime="3" recast="20" duration="180" alias="" />
Offline
Posts: 152
By Unzero 2019-11-07 00:20:46
Link | Quote | Reply
 
845 and 846 for Flurry 1 and 2 respectively
 Leviathan.Comeatmebro
Offline
Server: Leviathan
Game: FFXI
user: Rairin
Posts: 6052
By Leviathan.Comeatmebro 2019-11-07 00:21:26
Link | Quote | Reply
 
There is no ID that will differentiate Flurry and Flurry 2 using that function.

You need to track the incoming action packet, record which was last cast on you, and use that to be able to tell the difference.

There may be someone with that code already written, there may not, but that is the only way to do it besides having a manual toggle.
[+]
 Shiva.Arislan
Offline
Server: Shiva
Game: FFXI
user: Arislan
Posts: 1052
By Shiva.Arislan 2019-11-07 00:36:13
Link | Quote | Reply
 
Code
function precast(spell,action)
    if spell.action_type == 'Ranged Attack' then
        if flurry == 2 then
            equip(sets.precastrangedattackTF2)
        elseif flurry == 1 then
            equip(sets.precastrangedattackTF1)
        end
    end
end

Code
function buff_change(name,gain)
    if S{'flurry'}:contains(buff:lower()) then
        if not gain then
            flurry = nil
            add_to_chat(122, "Flurry status cleared.")
        end
    end
end

Code
windower.register_event('action',
    function(act)
        --check if you are a target of spell
        local actionTargets = act.targets
        playerId = windower.ffxi.get_player().id
        isTarget = false
        for _, target in ipairs(actionTargets) do
            if playerId == target.id then
                isTarget = true
            end
        end
        if isTarget == true then
            if act.category == 4 then
                local param = act.param
                if param == 845 and flurry ~= 2 then
                    add_to_chat(122, 'Flurry Status: Flurry I')
                    flurry = 1
                elseif param == 846 then
                    add_to_chat(122, 'Flurry Status: Flurry II')
                    flurry = 2
              end
            end
        end
    end)
[+]
Offline
Posts: 258
By Demhar 2019-11-08 11:58:51
Link | Quote | Reply
 
What about when you have Barrage active? How are you gonna not make it swap to to midshot?
 Shiva.Spynx
Offline
Server: Shiva
Game: FFXI
user: auron86
Posts: 371
By Shiva.Spynx 2019-11-08 14:18:34
Link | Quote | Reply
 
Flurry kicks in precast while barrage gear will affect midcast so no issue there.
Offline
Posts: 258
By Demhar 2019-11-13 11:18:06
Link | Quote | Reply
 
.lua:80: attempt to call global 'ChangeGear' (a nil value)


any ideas?



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

function get_sets()

-- Preshot --
sets.Preshot1 = {
head="Taeon Chapeau",
neck="Scout's Gorget +2",
body="Amini caban +1",
hands="Carmine Fin. Ga. +1",
back={ name="Belenus's Cape", augments={'"Snapshot"+10',}},
waist="Impulse Belt",
legs="Orion Braccae +3",
feet="Meg. Jam. +2",
}

-- Preshot --
sets.Preshot2 = {
head="Orion beret +3",
neck="Scout's Gorget +2",
body="Amini caban +1",
hands="Carmine Fin. Ga. +1",
back={ name="Belenus's Cape", augments={'"Snapshot"+10',}},
waist="Yemaya Belt",
legs="Adhemar Kecks +1",
feet="Arcadian Socks +3",
}


-- Midshot --
sets.Midshot = {
head="Arcadian Beret +3",
neck="Scout's Gorget +2",
ear1="Dedition Earring",
ear2="Telos Earring",
body="Orion Jerkin +3",
hands="Adhemar Wrist. +1",
ring1="Rajas ring",
ring2="Ilabrat Ring",
back={ name="Belenus's Cape", augments={'AGI+20','Rng.Acc.+20 Rng.Atk.+20','AGI+10','"Store TP"+10',}},
waist="Yemaya belt",
legs="Adhemar Kecks +1",
feet="Adhe. Gamashes +1",
}
-- Barrage --
sets.Barrage = {
head="Orion Beret +3",
neck="Scout's Gorget +2",
ear1="Enervating Earring",
ear2="Telos Earring",
body="Orion Jerkin +3",
hands="Orion Bracers +3",
ring1="Regal Ring",
ring2="Cacoethic Ring +1",
back={ name="Belenus's Cape", augments={'AGI+20','Rng.Acc.+20 Rng.Atk.+20','AGI+10','"Store TP"+10',}},
waist="Kwahu Kachina Belt",
legs="Adhemar Kecks +1",
feet="Orion Socks +3",
}
-- Double Shot --
sets.DoubleShot = {
head="Arcadian Beret +3",
body="Arc. Jerkin +3",
back={ name="Belenus's Cape", augments={'AGI+20','Rng.Acc.+20 Rng.Atk.+20','AGI+10','"Store TP"+10',}},
feet="Osh. Leggings +1",
}



end


function autoRA()
send_command('@wait 2.5; input /ra <t>')
end

function precast(spell,action)
if spell.english == 'Ranged' then
if buffactive['Flurry II'] then
ChangeGear(sets.Preshot2)
else
ChangeGear(sets.Preshot1)
end
end

function midcast(spell,action)
if spell.english == 'Ranged' then
if state.Buff['Barrage'] then
ChangeGear(sets.Barrage)
elseif state.Buff['Double Shot'] then
ChangeGear(sets.DoubleShot)
else
ChangeGear(sets.Midshot)
end
end

end


function ChangeGear(GearSet)
equipSet = GearSet
equip(GearSet)
end
end
Offline
Posts: 152
By Unzero 2019-11-13 12:28:12
Link | Quote | Reply
 
How are we supposed to know what line 81 is
 Shiva.Spynx
Offline
Server: Shiva
Game: FFXI
user: auron86
Posts: 371
By Shiva.Spynx 2019-11-13 12:47:57
Link | Quote | Reply
 
What's even the point of the changeGear function, just use the 'equip' one directly.
Offline
Posts: 258
By Demhar 2019-11-13 13:24:18
Link | Quote | Reply
 
Unzero said: »
How are we supposed to know what line 81 is

 Asura.Nebohh
Offline
Server: Asura
Game: FFXI
user: Kealohaa
Posts: 141
By Asura.Nebohh 2019-11-13 14:38:50
Link | Quote | Reply
 
Next time just use the syntax:
[ code ] paste your code inside here [ /code ]
Just remove the extra spacing above.
 
Offline
Posts:
By 2019-11-13 16:02:38
 Undelete | Edit  | Link | Quote | Reply
 
Post deleted by User.
[+]
Offline
Posts: 258
By Demhar 2019-11-13 17:17:04
Link | Quote | Reply
 
Asura.Nebohh said: »
Next time just use the syntax:
[ code ] paste your code inside here [ /code ]
Just remove the extra spacing above.

Thank you!
Offline
Posts: 258
By Demhar 2019-11-13 17:17:34
Link | Quote | Reply
 
Have you verified with //gs showswaps on that the correct gear is swapping for Flurry or Flurry II? From the responses to this thread so far, it seems like if buffactive['Flurry II'] won't work... it's never worked for me so far, anyway.

Also, just try removing this bit and see if it will load:

function autoRA()
send_command('@wait 2.5; input /ra <t>')
end




Thank you! Will test that tonight.
 Shiva.Arislan
Offline
Server: Shiva
Game: FFXI
user: Arislan
Posts: 1052
By Shiva.Arislan 2019-11-13 17:44:15
Link | Quote | Reply
 
If you're not sure what you're doing, it would save you (and others) a lot of trouble if you didn't try to write something from scratch.

There's ready-made RNG luas out there. Tinker with those.
[+]
 
Offline
Posts:
By 2019-11-13 17:56:11
 Undelete | Edit  | Link | Quote | Reply
 
Post deleted by User.
[+]
necroskull Necro Bump Detected! [50 days between previous and next post]
 Bahamut.Celebrindal
Offline
Server: Bahamut
Game: FFXI
Posts: 1636
By Bahamut.Celebrindal 2020-01-02 10:05:37
Link | Quote | Reply
 
The only way I've ever dealt with varying levels of "No Flurry","Flurry", and "Flurry II" preshot sets is with a toggle. Here's the function part of my lua:

---------------
Code
       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 



I have 3 preshot sets for every weapon due to needing different sets for Gastraphetes vs other weapons (with Snapshot +10 on Gastra). They're all named in this convention:

sets.Preshot.<weapon name> = no flurry
sets.Preshot.<weapon name>.Any = Flurry
sets.Preshot.<weapon name>.RDM = Flurry II

my naming convention makes sense in my head....."Any" mage can give me Flurry, but only a "RDM" can give me Flurry II. If I see a RDM, I just hit my toggle (bound to CTRL-(tilde)...the key to the left of the 1 on your keyboard).

If I am not receiving flurry, it defaults to my base preshot set no matter what the toggle is set to.
[+]
necroskull Necro Bump Detected! [258 days between previous and next post]
Offline
Posts: 4
By Caliper 2020-09-16 00:43:07
Link | Quote | Reply
 
This is all assuming you're using a Mote-Include lua.

for tracking purposes you will need to declare a global variable called flurry in job_setup()
Code
flurry=nil

There are two functions which require modification or creation...
Code
function job_buff_change(buff,gain)
	if S{'flurry'}:contains(buff:lower()) then
        if not gain then
            flurry = nil
            add_to_chat(122, "Flurry status cleared.")
        end
        if not midaction() then
            handle_equipping_gear(player.status)
        end
    end
end

And the main course...
Code
windower.register_event('action',
    function(act)
        --check if you are a target of spell
        local actionTargets = act.targets
        playerId = windower.ffxi.get_player().id
        isTarget = false
        for _, target in ipairs(actionTargets) do
            if playerId == target.id then
                isTarget = true
            end
        end
        if isTarget == true then
            if act.category == 4 then
                local param = act.param
                if param == 845 and flurry ~= 2 then
                    add_to_chat(122, 'Flurry Status: Flurry I')
                    flurry = 1
                elseif param == 846 then
                    add_to_chat(122, 'Flurry Status: Flurry II')
                    flurry = 2
              end
            end
        end
    end)

Now that those are in place, we append the custom range group under the function job_post_precast() as follows...
Code
if spell.action_type == 'Ranged Attack' then
		if flurry == 2 then
			classes.CustomRangedGroups:append('Flurry2')
		elseif flurry == 1 then
			classes.CustomRangedGroups:append('Flurry1')
		end
end

Now we can create the following sets...
Code
sets.precast.RA.Flurry1 = {)
sets.precast.RA.Flurry2 = {)


This logic is also "CombatWeapon" compatible out of the box if you are using them, as follows...
Code
sets.precast.RA.Gastraphetes = {}
sets.precast.RA.Gastraphetes.Flurry1 = {}
sets.precast.RA.Gastraphetes.Flurry2 = {}

I hope you find this information useful, please let me know if i can help further.
Log in to post.