Proper Usage Of Orpheus's Sash

Eorzea Time
 
 
 
Langues: JP EN FR DE
users online
Forum » FFXI » Jobs » Corsair » proper usage of Orpheus's Sash
proper usage of Orpheus's Sash
 Bahamut.Celebrindal
Offline
Serveur: Bahamut
Game: FFXI
Posts: 1640
By Bahamut.Celebrindal 2019-10-16 13:35:27
Link | Citer | R
 
Having difficulties getting my lua to properly use Orpheus's Sash based on distance to target. I've tried the following in my

function precast(spell,action)

section.

if spell.english == "Leaden Salute" and
(spell.target.distance <8) then
equip({waist="Orpheus's Sash"})

without any results. Suggestions on how to properly deploy it? I'd prefer to alter my existing lua vs creating a new one.
 Asura.Barone
Offline
Serveur: Asura
Game: FFXI
user: Barone
Posts: 32
By Asura.Barone 2019-10-16 13:45:52
Link | Citer | R
 
Here you go;

sets.precast.WS['Leaden Salute'].Orph = set_combine(sets.precast.WS['Leaden Salute'], {
waist="Orpheus's Sash"})


function job_post_precast(spell, action, spellMap, eventArgs)
if spell.english == 'Leaden Salute' and spell.target.distance <5 then
equip(sets.precast.WS['Leaden Salute'].Orph)
end
end
[+]
 Bahamut.Celebrindal
Offline
Serveur: Bahamut
Game: FFXI
Posts: 1640
By Bahamut.Celebrindal 2019-10-16 14:37:41
Link | Citer | R
 
your help was appreciated. However, here's what I got to work w/ my lua for both Orpheus's Sash AND Hachiryn-no-obi, with preference given to Orpheus's Sash.

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

if spell.english == 'Leaden Salute' and spell.target.distance <8 then
equipSet = set_combine(equipSet,{waist="Orpheus's Sash"})

elseif spell.english == 'Leaden Salute' and (world.weather_element == 'Dark' or world.day_element == 'Dark') then
add_to_chat(125,'weather mode')
equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
end
 Asura.Barone
Offline
Serveur: Asura
Game: FFXI
user: Barone
Posts: 32
By Asura.Barone 2019-10-16 15:23:08
Link | Citer | R
 
Thanks! I was having issue getting the Hachirin to work!
 Bahamut.Qiyana
Offline
Serveur: Bahamut
Game: FFXI
user: Anaurine
By Bahamut.Qiyana 2019-10-16 15:29:07
Link | Citer | R
 
Finally you got it! Congrats man! :D
[+]
 Asura.Elizabet
Offline
Serveur: Asura
Game: FFXI
user: Elizabet
Posts: 496
By Asura.Elizabet 2019-10-16 15:38:35
Link | Citer | R
 
Hi Celebrindal, here's a nifty function you could add to improve. (specially for Dynamis-D)
Code
-- Function to get the current weather intensity: 0 for none, 1 for single weather, 2 for double weather.
function get_weather_intensity()
    return gearswap.res.weather[world.weather_id].intensity
end


So you can make a rule like:

if get_weather_intensity() == 2 then

so in double weather you could choose obi over orpheus as it yields more bonus. For leaden, you'd also have to make sure weather is dark..

world.weather_element will give you the weather element.


For example here's my enspell weather check:
Code
function EnspellCheck()

    -- Enspell matches double weather
    if Buff['En-Weather'] and get_weather_intensity() == 2 then
        equip(sets.midcast.Obi)
    -- Enspell matches day AND weather
    elseif Buff['En-Weather'] and Buff['En-Day'] then
        equip(sets.midcast.Obi)
    -- Enspell is there but doesnt match a double weather
    elseif Buff['Enspell'] then
        equip(sets.midcast.Orpheus)
    end 
end
 Shiva.Xelltrix
Offline
Serveur: Shiva
Game: FFXI
user: Xelltrix
Posts: 393
By Shiva.Xelltrix 2019-10-16 17:52:29
Link | Citer | R
 
I have one tailored for Corsair like so

Code
	-- Handles equipment modifications based of distance and spell weather/day alignment.
    if spell.type == 'WeaponSkill' and magical_ws:contains(spell.name) then
		-- If the spell element does not match either the weather or the day and there is less than 15 yalms between the caster and the target
		if spell.element ~= world.day_element and spell.element ~= world.weather_element then
			if spell.target.distance < (15 - spell.target.model_size) then
				equip { waist="Orpheus's Sash" }
			end
		-- If the element of a spell matches both the day and weather with a net intensity of at least 2
		elseif (spell.element == world.day_element and spell.element == world.weather_element)
				or (spell.element == world.weather_element and get_weather_intensity() == 2 and world.day_element ~= elements.strong_to[spell.element]) then
			equip { waist="Hachirin-no-Obi" }
		-- If the element of a non-helix spell matches either day or weather with a net intensity of 1.	
		elseif (spell.element == world.day_element or (spell.element == world.weather_element and get_weather_intensity() == 1)
				or (spell.element == world.weather_element and get_weather_intensity() == 2 and world.day_element == elements.strong_to[spell.element])) then
			if (spell.target.distance < (7 - spell.target.model_size)) then
				equip { waist="Orpheus's Sash" }
			else
				equip { waist="Hachirin-no-Obi" }
			end
		end	
	end



You can replace magical_ws section with Leaden and Wildfire if you don't have one of those. I made it factor in weather intensity so that it will consider when contrary conditions are in effect or when Sash will pull ahead of Obi in single-weather situations.
[+]
 Asura.Barone
Offline
Serveur: Asura
Game: FFXI
user: Barone
Posts: 32
By Asura.Barone 2019-10-16 19:18:57
Link | Citer | R
 
You may want to consider lowering the distance to around 7 or 8. I was testing it in Dyna and I had better luck with the Svetz [i didn't have hachirin coded yet] over the sash. at about 7 it was optimal.
necroskull Necro Bump Detected! [30 days between previous and next post]
 Bismarck.Sterk
Offline
Serveur: Bismarck
Game: FFXI
user: Llewelyn
Posts: 309
By Bismarck.Sterk 2019-11-15 17:58:02
Link | Citer | R
 
Asura.Elizabet said: »
Code
-- Function to get the current weather intensity: 0 for none, 1 for single weather, 2 for double weather.
function get_weather_intensity()
    return gearswap.res.weather[world.weather_id].intensity
end
I'm having trouble getting this to work while I have both double weather and a Storm active. It'll work if I have either:
Double weather
or
Single weather + Storm buff
but with both double weather and storm, it will return with Orpheus's Sash.
Code
function job_post_midcast(spell, action, spellMap, eventArgs)

	if blue_magic_maps.Magical:contains(spell.english) and (spell.element == world.weather_element and get_weather_intensity() == 2) or (spell.element == world.weather_element and spell.element == world.day_element) then
		equip{waist="Hachirin-no-Obi"}
	end
end

Any assistance would be appreciated.
Offline
Posts: 1584
By Felgarr 2019-11-15 18:28:48
Link | Citer | R
 
This is the logic I have for Orpheus Sash in my AshitaCast <midmagic> set:

Code
<if at_distance="<5">
	<equip set="OrpheusSash" />
</if>
<elseif at_distance="<10" advanced="(%ad_element!=%e_weatherelement)&(%ad_element!=%e_dayelement)">
		<equip set="OrpheusSash" />
</elseif>
<elseif advanced="(%ad_element=%e_weatherelement)|(%ad_element=%e_dayelement)">
	<equip set="Hachirin-no-Obi" />
</elseif>
<else>
	<!-- This is not necessary, as NukeMB set has the default Nuking MAB+ belt -->
</else>
The pseudo-code is:

  • If my target is < 5.0 yalms away, use Orpheus Sash in place of existing waist.

  • Otherwise, if my target < 10 yalms away, with no element-day or element-weather to benefit from, use Sash in place of existing waist item.

  • Otherwise there is weather/day to benefit from and the target is > 10 yalms away), just use Hachirin-no-Obi instead.

  • Otherwise, (no weather to benefit from and greater than 10 yalms away), use existing waist item.


*Thorny helped optimize this logic, just FYI.
[+]
 Asura.Chiaia
VIP
Offline
Serveur: Asura
Game: FFXI
user: Demmis
Posts: 1652
By Asura.Chiaia 2019-11-15 21:01:05
Link | Citer | R
 
Asura.Elizabet said: »
Code
-- Function to get the current weather intensity: 0 for none, 1 for single weather, 2 for double weather.
function get_weather_intensity()
    return gearswap.res.weather[world.weather_id].intensity
end
That is not needed anymore, you can do world.weather_intensity inside of gearswap. . .
Code
if world.weather_intensity == 2 then
    blah blah blah
end
[+]
Offline
Posts: 27
By DianC 2019-11-27 10:01:28
Link | Citer | R
 
Shiva.Xelltrix said: »
I have one tailored for Corsair like so

Code
	-- Handles equipment modifications based of distance and spell weather/day alignment.
    if spell.type == 'WeaponSkill' and magical_ws:contains(spell.name) then
		-- If the spell element does not match either the weather or the day and there is less than 15 yalms between the caster and the target
		if spell.element ~= world.day_element and spell.element ~= world.weather_element then
			if spell.target.distance < (15 - spell.target.model_size) then
				equip { waist="Orpheus's Sash" }
			end
		-- If the element of a spell matches both the day and weather with a net intensity of at least 2
		elseif (spell.element == world.day_element and spell.element == world.weather_element)
				or (spell.element == world.weather_element and get_weather_intensity() == 2 and world.day_element ~= elements.strong_to[spell.element]) then
			equip { waist="Hachirin-no-Obi" }
		-- If the element of a non-helix spell matches either day or weather with a net intensity of 1.	
		elseif (spell.element == world.day_element or (spell.element == world.weather_element and get_weather_intensity() == 1)
				or (spell.element == world.weather_element and get_weather_intensity() == 2 and world.day_element == elements.strong_to[spell.element])) then
			if (spell.target.distance < (7 - spell.target.model_size)) then
				equip { waist="Orpheus's Sash" }
			else
				equip { waist="Hachirin-no-Obi" }
			end
		end	
	end



You can replace magical_ws section with Leaden and Wildfire if you don't have one of those. I made it factor in weather intensity so that it will consider when contrary conditions are in effect or when Sash will pull ahead of Obi in single-weather situations.

anyone mind posting their full cor lua with a similar or just generally a working logic for sash + obi, because I can't get this to work in mine :/
necroskull Necro Bump Detected! [74 days between previous and next post]
 Shiva.Xelltrix
Offline
Serveur: Shiva
Game: FFXI
user: Xelltrix
Posts: 393
By Shiva.Xelltrix 2020-02-09 12:33:19
Link | Citer | R
 
You can just place the following line:
Code
if spell.type == 'WeaponSkill' and magical_ws:contains(spell.name) then


with:
Code
if spell.type == 'WeaponSkill' and (spell.english == 'Leaden Salute' or spell.english == 'Wildfire') then



Assuming you're using Mote as a base, you should have a Mapping file containing spell.element. The rest of the keywords are in base gearswap so it shouldn't have any problems. Don't forget it also is factoring in distance so you need to be within <15 range of the center of the mob for it to trigger.
 Odin.Nehalania
Offline
Serveur: Odin
Game: FFXI
user: Nehalania
Posts: 11
By Odin.Nehalania 2020-02-13 08:53:05
Link | Citer | R
 
Is there a way to use that code for Selindrile's Lua?
 Asura.Toralin
Offline
Serveur: Asura
Game: FFXI
user: toralin
Posts: 1361
By Asura.Toralin 2020-02-13 09:18:46
Link | Citer | R
 
Odin.Nehalania said: »
Is there a way to use that code for Selindrile's Lua?
selindriles already has code for orph sash
[+]
 Odin.Nehalania
Offline
Serveur: Odin
Game: FFXI
user: Nehalania
Posts: 11
By Odin.Nehalania 2020-02-13 10:14:09
Link | Citer | R
 
Shoot, I couldn't find it. I'll take a closer look when I get home then. Yep, you're right! Thanks. ^^
 Asura.Aeonova
Offline
Serveur: Asura
Game: FFXI
user: aeonova
Posts: 3113
By Asura.Aeonova 2020-02-13 10:29:35
Link | Citer | R
 
Proper use is to obtain as many as you can through Neo Nyzul Isle campaign and unload them on AH for $200,000,000 each the way Altana intended.
[+]
necroskull Necro Bump Detected! [38 days between previous and next post]
Offline
Posts: 33
By Tarualex 2020-03-21 23:45:10
Link | Citer | R
 
Odin.Nehalania said: »
Shoot, I couldn't find it. I'll take a closer look when I get home then. Yep, you're right! Thanks. ^^
@Nehalania - I've poured through the lua and cannot find reference to the sash. Where did you find it?
necroskull Necro Bump Detected! [42 days between previous and next post]
Offline
Posts: 281
By Galkapryme 2020-05-02 17:17:11
Link | Citer | R
 
Please rate for accuracy and possible improvement:
Code
-- Orpheus Sash Leaden Salute and Wildfire
function job_post_precast(spell, action, spellMap, eventArgs)
	if spell.english == 'Leaden Salute' and spell.target.distance <5 then
		equip(sets.precast.WS['Leaden Salute'].Orph)
	elseif spell.english == 'Leaden Salute' and (world.weather_element == 'Dark' or world.day_element == 'Dark') then
		add_to_chat(125,'weather mode')
		equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
	end
end

function job_post_precast(spell, action, spellMap, eventArgs)
if spell.english == 'Wildfire' and spell.target.distance <5 then
equip(sets.precast.WS['Wildfire'].Orph)
	elseif spell.english == 'Wildfire' and (world.weather_element == 'Fire' or world.day_element == 'Fire') then
		add_to_chat(125,'weather mode')
		equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
	end
end
Offline
Posts: 281
By Galkapryme 2020-05-02 17:18:41
Link | Citer | R
 
I think the 125 weather mode speaks specifically to Dark weather. If anyone knows the code to Fire weather or where I can find it, I'd appreciate it.
 Siren.Itachi
Offline
Serveur: Siren
Game: FFXI
Posts: 1016
By Siren.Itachi 2020-05-02 17:26:04
Link | Citer | R
 
Code
elemental_ws = S{'Aeolian Edge', 'Leaden Salute', 'Wildfire','Earth Shot','Ice Shot','Water Shot','Fire Shot','Wind Shot','Thunder Shot'}


-- Function to get the current weather intensity: 0 for none, 1 for single weather, 2 for double weather.
function get_weather_intensity()
    return gearswap.res.weather[world.weather_id].intensity
end

	if elemental_ws:contains(spell.name) then
		-- Matching double weather (w/o day conflict).
		if spell.element == world.weather_element and get_weather_intensity() == 2 then
			equip({waist="Hachirin-no-Obi"})
		-- Target distance under 1.7 yalms.
		elseif spell.target.distance < (1.7 + spell.target.model_size) then
			equip({waist="Orpheus's Sash"})
		-- Matching day and weather.
		elseif spell.element == world.day_element and spell.element == world.weather_element then
			equip({waist="Hachirin-no-Obi"})
		-- Target distance under 8 yalms.
		elseif spell.target.distance < (8 + spell.target.model_size) then
			equip({waist="Orpheus's Sash"})
		-- Match day or weather.
		elseif spell.element == world.day_element or spell.element == world.weather_element then
			equip({waist="Hachirin-no-Obi"})
		end
	end

Offline
Posts: 281
By Galkapryme 2020-05-02 17:42:53
Link | Citer | R
 
Thanks. I appreciate this. Would I put Line 1 up at the beginning of the gearswap file or down towards the end precisely where you have it?
Offline
Posts: 281
By Galkapryme 2020-05-02 17:48:58
Link | Citer | R
 
Hmmm.

attempt to index global 'spell' (a nil value).

The error is at line 9. Should I have changed that to something else?
 Siren.Itachi
Offline
Serveur: Siren
Game: FFXI
Posts: 1016
By Siren.Itachi 2020-05-02 18:56:34
Link | Citer | R
 
Put line 1 at the beginning of the gearswap file. If you have any global variables I would put it under that.

Make sure to put the get_weather_intensity() function separate (not inside) from any other functions.

The large if statement goes at the end of your precast function (or post precast function)
VIP
Offline
Posts: 663
By Lili 2020-05-02 19:32:13
Link | Citer | R
 
Siren.Itachi said: »
Make sure to put the get_weather_intensity() function separate (not inside) from any other functions.

That function is no longer necessary, Gearswap now has a world.weather_intensity variable that you can access. 1 for single 2 for double weather.
[+]
 Siren.Itachi
Offline
Serveur: Siren
Game: FFXI
Posts: 1016
By Siren.Itachi 2020-05-02 20:09:20
Link | Citer | R
 
Lili said: »
Siren.Itachi said: »
Make sure to put the get_weather_intensity() function separate (not inside) from any other functions.

That function is no longer necessary, Gearswap now has a world.weather_intensity variable that you can access. 1 for single 2 for double weather.

Oh that's very nice. So that means we can do something like this. I'll test it out
Code
elemental_ws = S{'Aeolian Edge', 'Leaden Salute', 'Wildfire','Earth Shot','Ice Shot','Water Shot','Fire Shot','Wind Shot','Thunder Shot'}
 
 
    if elemental_ws:contains(spell.name) then
        -- Matching double weather (w/o day conflict).
        if spell.element == world.weather_element and world.weather_intensity == 2 then
            equip({waist="Hachirin-no-Obi"})
        -- Target distance under 1.7 yalms.
        elseif spell.target.distance < (1.7 + spell.target.model_size) then
            equip({waist="Orpheus's Sash"})
        -- Matching day and weather.
        elseif spell.element == world.day_element and spell.element == world.weather_element then
            equip({waist="Hachirin-no-Obi"})
        -- Target distance under 8 yalms.
        elseif spell.target.distance < (8 + spell.target.model_size) then
            equip({waist="Orpheus's Sash"})
        -- Match day or weather.
        elseif spell.element == world.day_element or spell.element == world.weather_element then
            equip({waist="Hachirin-no-Obi"})
        end
    end
 Valefor.Yandaime
Offline
Serveur: Valefor
Game: FFXI
user: Yandaime
Posts: 747
By Valefor.Yandaime 2020-05-03 00:24:57
Link | Citer | R
 
Siren.Itachi said: »
I'll test it out
Was looking for an optimized ruling for this so I just tested it myself.

Works fine except on the Day + Weather ruling (Dark Day with Voidstorm I). Everything was working fine except for when I got closer than 1.7 Yalm, it would switch to Orpheus on Sanguine Blade despite Obi on 2+ being stronger. Tested everything on Lv.-1 Wild Rabbits outside of South Sandy and locked the Hachirin just to make sure it was stronger on Dark Day + Void Storm than Orpheus Point Blank.

So will have to fiddle with it to keep it from swapping at super-close range if there are two or more weather/day sources present.

Edit:

Its doing it in Dynamis too, but the day passed so unless Voidstorm + Dyna weather counts? It looks like that 1.7 rule is overriding the Weather Rulings.
necroskull Necro Bump Detected! [31 days between previous and next post]
 Siren.Itachi
Offline
Serveur: Siren
Game: FFXI
Posts: 1016
By Siren.Itachi 2020-06-02 14:47:02
Link | Citer | R
 
Commenting a month late because I completely forgot about this to be honest. Thanks for testing it and you're right Yandaime that it should be using Obi over Osash when either (Double Weather, Weather + Day, or Double Weather + Day) so I have updated it to the below.

As a caveat one thing to mention is it's not checking on the Double Weather check for if the Day's element is opposite to the spell.element. For example if I did Leaden on Lightsday with Double Dark weather that would only give me 10% boost with Hachi (which the below code would swap to). If I'm at 1.7 yalms from monster, the boost from Osash should be higher and it should swap to that.

Maybe someone who knows gearswap syntax can chime in with a property or function to solve for this.
Code
elemental_ws = S{'Aeolian Edge', 'Leaden Salute', 'Wildfire','Earth Shot','Ice Shot','Water Shot','Fire Shot','Wind Shot','Thunder Shot'}
  
  
    if elemental_ws:contains(spell.name) then
        -- Matching double weather (w/o day conflict).
        if spell.element == world.weather_element and world.weather_intensity == 2 then
            equip({waist="Hachirin-no-Obi"})
        -- Matching day and weather.
        elseif spell.element == world.day_element and spell.element == world.weather_element then
            equip({waist="Hachirin-no-Obi"})
        -- Target distance under 1.7 yalms.
        elseif spell.target.distance < (1.7 + spell.target.model_size) then
            equip({waist="Orpheus's Sash"})
        -- Target distance under 8 yalms.
        elseif spell.target.distance < (8 + spell.target.model_size) then
            equip({waist="Orpheus's Sash"})
        -- Match day or weather.
        elseif spell.element == world.day_element or spell.element == world.weather_element then
            equip({waist="Hachirin-no-Obi"})
        end
    end