Gearswap LUA

Language: JP EN DE FR
2010-09-08
New Items
users online
Forum » FFXI » Jobs » Ninja » Gearswap LUA
Gearswap LUA
 Phoenix.Bunas
Offline
Server: Phoenix
Game: FFXI
user: Teapo
Posts: 21
By Phoenix.Bunas 2016-04-27 22:15:51
Link | Quote | Reply
 
Was wondering if someone could dropbox their NIN Lua for gearswap. Looking to add this to my classes I have geared since the wardrobe II addition.
 Quetzalcoatl.Langly
Offline
Server: Quetzalcoatl
Game: FFXI
user: Langly
Posts: 620
By Quetzalcoatl.Langly 2016-04-28 10:54:47
Link | Quote | Reply
 
Orestes's LUA

This is probably the best place to begin these days. You'll need hardly any modification with it. And Ores is usually around these forums, hangin about.

This is also in one of the two most popular NIN threads.
[+]
 Asura.Azagarth
Online
Server: Asura
Game: FFXI
user: Azagarth
Posts: 1202
By Asura.Azagarth 2016-05-19 21:04:31
Link | Quote | Reply
 
Ive been looking for a new Lua as the one I have I dislike quite a bit haha. Oretes's seems quite out of date though, anyone have anything more up to date? aka accounts for haste2 lol.... oh and maybe a mestsu part.
 Quetzalcoatl.Orestes
Offline
Server: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 424
By Quetzalcoatl.Orestes 2016-05-19 23:29:00
Link | Quote | Reply
 
fwiw, it does account for haste2, but haste2 is not a unique buff according to SE so it has to be done as a toggle. It is what it is.

I don't have Kikoku, hence no metsu, but you're free to add it yourself.
[+]
 Quetzalcoatl.Khajit
Offline
Server: Quetzalcoatl
Game: FFXI
user: Khajit
Posts: 179
By Quetzalcoatl.Khajit 2016-05-23 17:01:13
Link | Quote | Reply
 
I noticed about 2 days ago in ambuscade that it does not notice the existence of Mighty guard.
Eg. I had mighty guard and a single march on but the lua determined that I had only 15% haste on.(no haste because mages forget the damn spell exists or ignore my request to not have goddamn slow active so i couldn't just pretend i had haste 2 on)
Is that a problem with the .lua itself or is there some other file that determine's haste values which needs an update?
 Quetzalcoatl.Langly
Offline
Server: Quetzalcoatl
Game: FFXI
user: Langly
Posts: 620
By Quetzalcoatl.Langly 2016-05-24 11:50:33
Link | Quote | Reply
 
Sorry I didn't fully explain that in /l chat Khajit.

There's a portion of the lua (at least in mine, I'm sure it's in Ores's as well) that determines your haste level.

A function that probably looks like "determine_haste" or something. It contains some branches for your haste totals depending on the buffs you currently have and your haste toggle (for haste 1 or haste 2)

You'll have to adjust that to account for the extra scenario now of Mighty Guard's haste value (15%) in the grand scheme of it all.
 Quetzalcoatl.Orestes
Offline
Server: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 424
By Quetzalcoatl.Orestes 2016-05-24 12:48:16
Link | Quote | Reply
 
I've updated my lua to account for mighty guard. I tried to make the logic more legible as well. I haven't tested yet though.

relevent portion
Code
function determine_haste_group()

    classes.CustomMeleeGroups:clear()
    -- assuming +4 for marches (ghorn has +5)
    -- Haste (white magic) 15%
    -- Haste Samba (Sub) 5%
    -- Haste (Merited DNC) 10% (never account for this)
    -- Victory March +0/+3/+4/+5    9.4/14%/15.6%/17.1% +0
    -- Advancing March +0/+3/+4/+5  6.3/10.9%/12.5%/14%  +0
    -- Embrava 30% with 500 enhancing skill
    -- Mighty Guard - 15%
    -- buffactive[580] = geo haste
    -- buffactive[33] = regular haste
    -- buffactive[604] = mighty guard
    -- state.HasteMode = toggle for when you know Haste II is being cast on you
    -- Hi = Haste II is being cast. This is clunky to use when both haste II and haste I are being cast
    if state.HasteMode.value == 'Hi' then
        if ( ( (buffactive[33] or buffactive[580] or buffactive.embrava) and (buffactive.march or buffactive[604]) ) or
             ( buffactive[33] and (buffactive[580] or buffactive.embrava) ) or
             ( buffactive.march == 2 and buffactive[604] ) ) then
            add_to_chat(8, '-------------Max-Haste Mode Enabled--------------')
            classes.CustomMeleeGroups:append('MaxHaste')
        elseif ( (buffactive[33] or buffactive.march == 2 or buffactive[580]) and buffactive['haste samba'] ) then
            add_to_chat(8, '-------------Haste 35%-------------')
            classes.CustomMeleeGroups:append('Haste_35')
        elseif ( ( buffactive[580] or buffactive[33] or buffactive.march == 2 ) or
                 ( buffactive.march == 1 and buffactive[604] ) ) then
            add_to_chat(8, '-------------Haste 30%-------------')
            classes.CustomMeleeGroups:append('Haste_30')
        elseif ( buffactive.march == 1 or buffactive[604] ) then
            add_to_chat(8, '-------------Haste 15%-------------')
            classes.CustomMeleeGroups:append('Haste_15')
        end
    else
        if ( buffactive[580] and ( buffactive.march or buffactive[33] or buffactive.embrava or buffactive[604]) ) or  -- geo haste + anything
           ( buffactive.embrava and (buffactive.march or buffactive[33] or buffactive[604]) ) or  -- embrava + anything
           ( buffactive.march == 2 and (buffactive[33] or buffactive[604]) ) or  -- two marches + anything
           ( buffactive[33] and buffactive[604] and buffactive.march ) then -- haste + mighty guard + any marches
            add_to_chat(8, '-------------Max Haste Mode Enabled--------------')
            classes.CustomMeleeGroups:append('MaxHaste')
        elseif ( (buffactive[604] or buffactive[33]) and buffactive['haste samba'] and buffactive.march == 1) or -- MG or haste + samba with 1 march
               ( buffactive.march == 2 and buffactive['haste samba'] ) or
               ( buffactive[580] and buffactive['haste samba'] ) then 
            add_to_chat(8, '-------------Haste 35%-------------')
            classes.CustomMeleeGroups:append('Haste_35')
        elseif ( buffactive.march == 2 ) or -- two marches from ghorn
               ( (buffactive[33] or buffactive[604]) and buffactive.march == 1 ) or  -- MG or haste + 1 march
               ( buffactive[580] ) or  -- geo haste
               ( buffactive[33] and buffactive[604] ) then  -- haste with MG
            add_to_chat(8, '-------------Haste 30%-------------')
            classes.CustomMeleeGroups:append('Haste_30')
        elseif buffactive[33] or buffactive[604] or buffactive.march == 1 then
            add_to_chat(8, '-------------Haste 15%-------------')
            classes.CustomMeleeGroups:append('Haste_15')
        end
    end

end


You also have to add mighty guard to job_buff_change() where the above function is triggered.
Code
    if S{'haste', 'march', 'mighty guard', 'embrava', 'haste samba', 'geo-haste', 'indi-haste'}:contains(buff:lower()) then
        determine_haste_group()
        if not midaction() then
            handle_equipping_gear(player.status)
        end
    end


What do you guys think about having another haste mode for trusts? (similar to how you toggle Haste2). I was thinking, Joachim/Ulmia are most likely casting March's without any bonus applied, so they'll equal 19% magic haste instead of the 31% you'd get from ghorn.

I considered making it automatic. Something like..
Code
function job_pretarget(spell, action, spellMap, eventArgs)
   -- determine if we're using trusts
   if spell.type == 'Trust' then
      state.WeakSongs:toggle()
   end
end

But.. this would toggle true if you call ANY trust, so it wouldn't be a good catch all. That's why it could be done manually as well. Then i wonder if this overkill lol
[+]
 Quetzalcoatl.Langly
Offline
Server: Quetzalcoatl
Game: FFXI
user: Langly
Posts: 620
By Quetzalcoatl.Langly 2016-05-24 17:13:53
Link | Quote | Reply
 
No, no Ores... it's never overkill. :D

A toggle for marches is probably right up this lua's alley. :D
necroskull Necro Bump Detected! [70 days between previous and next post]
 Asura.Azagarth
Online
Server: Asura
Game: FFXI
user: Azagarth
Posts: 1202
By Asura.Azagarth 2016-08-02 10:47:18
Link | Quote | Reply
 
So I have bought a new comp and started my GS from scratch. I noticed my utsu San is was only getting 5 shadows which means its not recognizing my usts set and then it dawned on me that san had to be entered in manually if i remember correctly to be looked at as if it was ni or ichi. I just forget where you add it too, was it motes files? Could anyone help on this?
necroskull Necro Bump Detected! [34 days between previous and next post]
 Asura.Azagarth
Online
Server: Asura
Game: FFXI
user: Azagarth
Posts: 1202
By Asura.Azagarth 2016-09-05 01:23:36
Link | Quote | Reply
 
So I am looking for a very in depth nin lua. Automatic haste changes (recognizes haste2 and MG or atleast a toggle), 3 acc tiers that affect all sets, MAB/resit/MBD sets that recognize san for relic+2 head or ni for other head, obis, lugras, fast feet, auto -dt for sleep/terro/etc, enmity tank set, cp mantle, ws sets base on acc tiers, and and most important a futae reognition please! basically all the bells and whistle a nin could use and then some :D.

I am just not smart enough to code this myself.....
necroskull Necro Bump Detected! [313 days between previous and next post]
Offline
Posts: 16
By Gunshin 2017-07-15 01:18:38
Link | Quote | Reply
 
Is there a working up to date version of Orest's NIN lua? I have his old one but its getting runtime errors for 'is_sc_element_today' tried removing it completely still got the error
Offline
Posts: 68
By hushmunkey 2017-07-23 19:27:28
Link | Quote | Reply
 
This is just Ores' lua w/his haste update and a casting toggle for free, enmity, and bursting.

https://www.dropbox.com/s/vcf1rppp944bxab/NIN.lua?dl=0
necroskull Necro Bump Detected! [106 days between previous and next post]
 Bahamut.Witchbane
Offline
Server: Bahamut
Game: FFXI
user: Witchbane
Posts: 29
By Bahamut.Witchbane 2017-11-06 13:52:56
Link | Quote | Reply
 
Asura.Azagarth said: »
So I am looking for a very in depth nin lua. Automatic haste changes (recognizes haste2 and MG or atleast a toggle), 3 acc tiers that affect all sets, MAB/resit/MBD sets that recognize san for relic+2 head or ni for other head, obis, lugras, fast feet, auto -dt for sleep/terro/etc, enmity tank set, cp mantle, ws sets base on acc tiers, and and most important a futae reognition please! basically all the bells and whistle a nin could use and then some :D.

I am just not smart enough to code this myself.....

Azagarth, did you ever find a fully kitted out NINJA lua?
necroskull Necro Bump Detected! [65 days between previous and next post]
 Odin.Slore
Offline
Server: Odin
Game: FFXI
user: Slore
Posts: 1348
By Odin.Slore 2018-01-10 10:14:18
Link | Quote | Reply
 
If he did he did not say. I been watching thread hoping for one to pop up out of the kindness of peoples hearts haha.

Does anyone have a self auto changing lua that changes per haste level? I got one for my blu but recently lost my nin when when I had to reinstall.
 Quetzalcoatl.Xilkk
Offline
Server: Quetzalcoatl
Game: FFXI
user: Xilk
Posts: 959
By Quetzalcoatl.Xilkk 2018-01-10 12:17:08
Link | Quote | Reply
 
I thought the hold up was that no one who plays nin is capable of making such a lua... :P

/troll
 Shiva.Spynx
Offline
Server: Shiva
Game: FFXI
user: auron86
Posts: 366
By Shiva.Spynx 2018-01-10 12:44:53
Link | Quote | Reply
 
Odin.Slore said: »
If he did he did not say. I been watching thread hoping for one to pop up out of the kindness of peoples hearts haha.

Does anyone have a self auto changing lua that changes per haste level? I got one for my blu but recently lost my nin when when I had to reinstall.

You can start from this created by Arislan. All his LUAs are amazing both in term of gearset coverage and extra functions (auto-haste detection with haste1/2 toggle, gear equip based on environment/buff conditions, etc). I highly recommend them for literally any job.
[+]
 Quetzalcoatl.Langly
Offline
Server: Quetzalcoatl
Game: FFXI
user: Langly
Posts: 620
By Quetzalcoatl.Langly 2018-01-10 13:33:13
Link | Quote | Reply
 
You're welcome to mine.

https://github.com/sethmccauley/GearSwap/blob/master/NIN.lua

Uses toggles for Haste/HasteII. Trust/+3/+7/Honor March for BRDs. Magic Bursting or resistant mobs.

You can construct your own haste tiers in the determine_haste function area, I wrote this area to count the actual haste values from the different sources you were receiving.
Offline
Posts: 1148
By Boshi 2018-01-10 13:39:55
Link | Quote | Reply
 
This is the haste rule I use that's originally by Quetzalcoatl.Langly, I just tweaked it a bit and added a toggle for geomancy level when Cornelia came out.
If you want discussion about it Langy originally posted it around page 89 or 90 in the nin guide topic.
The Geo toggle has 3 levels:
first: first geo is 20%, 2nd is a normal geo bubble
2nd: first geo is normal geo bubble, 2nd is 20%
3rd: first geo is idris geo bubble, 2nd is 20%
I've been using this for pretty much all my jobs: RDM & BLU I take the haste toggle off and just make it always haste2, on dnc I just change samba to 10%.
Code
function job_setup()
    determine_haste_group()
end

function user_setup()
	send_command('bind !h gs c cycle HasteMode')
	send_command('bind !m gs c cycle MarchMode')
	send_command('bind !g gs c cycle GeoHasteMode')	
end

function user_unload()
	send_command('unbind !h')
	send_command('unbind !m')
	send_command('unbind !g')
end

function job_buff_change(buff, gain, buff_table)
	-- If we gain or lose any haste buffs, adjust which gear set we target.
    if S{'haste','march','embrava','haste samba','mighty guard','weakness','slow','elegy'}:contains(buff:lower()) then
        determine_haste_group()
        handle_equipping_gear(player.status)
    elseif state.Buff[buff] ~= nil then
        handle_equipping_gear(player.status)
    end
end

function determine_haste_group()
    -- Gearswap can't detect the difference between Haste I and Haste II
    -- so use alt+F9 to manually set Haste and alt+F10 to manually set March spell levels.

    -- Haste (buffactive[33]) - 15%
    -- Haste II (buffactive[33]) - 30%
    ------------------------------ Haste Samba - 5~10%
    -- Honor March - 12~16%
    -- Victory March - 15~28%
    -- Advancing March - 10~18%
    -- Embrava - 25%
    -- Mighty Guard (buffactive[604]) - 15%
    -- Geo-Haste (buffactive[580]) - 30~40%
	
	classes.CustomMeleeGroups:clear()
    h = 0
    -- Spell Haste 15/30
    if buffactive[33] then
        if state.HasteMode.value == 'Haste I' then
            h = h + 15
        elseif state.HasteMode.value == 'Haste II' then
            h = h + 30
        end
    end
------
	--weakness -100%
	if buffactive[1] then
            h = h - 100
	end
	--slow -50%
	if buffactive[13] then
            h = h - 50
	end
	--slow geo -20% -selkit??
	if buffactive[565] then
            h = h - 20
	end
	--elegy big bird one is -100%
	if buffactive[194] then
            h = h - 100
	end
	--samba 5%
	if buffactive[370] then
            h = h + 5
	end
    -- Geo Haste :: 35.4%(Dunna) :: 40.9%(Idris) :: 20% Cornelia Trust
    if buffactive[580] then
		if state.GeoHasteMode.value == 'Cornelia' then
			if buffactive[580] == 2 then
                h = h + 20 + 35.4
            elseif buffactive[580] == 1 then
                h = h + 20
            end
		elseif state.GeoHasteMode.value == 'Basic' then
			if buffactive[580] == 2 then
                h = h + 20 + 35.4
            elseif buffactive[580] == 1 then
                h = h + 35.4
            end
		elseif state.GeoHasteMode.value == 'Idris' then
			if buffactive[580] == 2 then
                h = h + 20 + 40.9
            elseif buffactive[580] == 1 then
                h = h + 40.9
            end
		end
	end
    -- Mighty Guard :: 15%
    if buffactive[604] then
        h = h + 15
    end
    -- Embrava :: (21% at lvl 99, 25.9% max)
    if buffactive.embrava then
        h = h + 21
    end
    -- March(es) 
    if buffactive.march then
        if state.MarchMode.value == 'Honor' then
            if buffactive.march == 2 then
                h = h + 27 + 16
            elseif buffactive.march == 1 then
                h = h + 16
            elseif buffactive.march == 3 then
                h = h + 27 + 17 + 16
            end
        elseif state.MarchMode.value == 'Trusts' then
            if buffactive.march == 2 then
                h = h + 26
            elseif buffactive.march == 1 then
                h = h + 16
            elseif buffactive.march == 3 then
                h = h + 27 + 17 + 16
            end
        elseif state.MarchMode.value == '7' then
            if buffactive.march == 2 then
                h = h + 27 + 17
            elseif buffactive.march == 1 then
                h = h + 27
            elseif buffactive.march == 3 then
                h = h + 27 + 17 + 16
            end
        elseif state.MarchMode.value == '3' then
            if buffactive.march == 2 then
                h = h + 13.5 + 20.6
            elseif buffactive.march == 1 then
                h = h + 20.6
            elseif buffactive.march == 3 then
                h = h + 27 + 17 + 16
            end
        end
    end
 
    -- Determine CustomMeleeGroups
	 if h >= -1000 and h < 0 then 
        classes.CustomMeleeGroups:append('Slow')
        add_to_chat('Haste Group: SLOW -- From Haste Total: '..h)
	elseif h >= 0 and h < 15 then
		add_to_chat('Haste Group: 0% -- From Haste Total: '..h)
    elseif h >= 15 and h < 20 then 
        classes.CustomMeleeGroups:append('HasteFifteen')
        add_to_chat('Haste Group: 15% -- From Haste Total: '..h)
	elseif h >= 20 and h < 25 then 
        classes.CustomMeleeGroups:append('HasteTwenty')
        add_to_chat('Haste Group: 20% -- From Haste Total: '..h)
	elseif h >= 25 and h < 30 then 
        classes.CustomMeleeGroups:append('HasteTwentyfive')
        add_to_chat('Haste Group: 25% -- From Haste Total: '..h)
    elseif h >= 30 and h < 35 then 
        classes.CustomMeleeGroups:append('HasteThirty')
        add_to_chat('Haste Group: 30% -- From Haste Total: '..h)
    elseif h >= 35 and h < 40 then 
        classes.CustomMeleeGroups:append('HasteThirtyfive')
        add_to_chat('Haste Group: 35% -- From Haste Total: '..h)
    elseif h >= 40 then
        classes.CustomMeleeGroups:append('MaxHaste')
        add_to_chat('Haste Group: Max -- From Haste Total: '..h)
    end
	
end



(Note I was really anal about levels of haste and overdid it, you can simplify it). I changed the names to numerical values for my ease most people do "max" "mid" ect. You can't have a number in the word that's why they're spelled out.
[+]
 Odin.Slore
Offline
Server: Odin
Game: FFXI
user: Slore
Posts: 1348
By Odin.Slore 2018-01-10 14:34:05
Link | Quote | Reply
 
thanks all!
 Quetzalcoatl.Langly
Offline
Server: Quetzalcoatl
Game: FFXI
user: Langly
Posts: 620
By Quetzalcoatl.Langly 2018-01-10 15:05:17
Link | Quote | Reply
 
Hahaha! You really did go nuts with those levels. Love it.

I found I didn't have enough need to change gear that often (for those levels). But I do like the idea of adjusting for cornelia's geo haste vs player characters.
necroskull Necro Bump Detected! [526 days between previous and next post]
Offline
Posts: 4
By Mozer 2019-06-20 09:26:39
Link | Quote | Reply
 
Quetzalcoatl.Langly said: »
You're welcome to mine.

https://github.com/sethmccauley/GearSwap/blob/master/NIN.lua

Uses toggles for Haste/HasteII. Trust/+3/+7/Honor March for BRDs. Magic Bursting or resistant mobs.

You can construct your own haste tiers in the determine_haste function area, I wrote this area to count the actual haste values from the different sources you were receiving.

Ehi guys could you link me any updated NIN lua? Thx
 Quetzalcoatl.Orestes
Offline
Server: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 424
By Quetzalcoatl.Orestes 2019-06-20 09:46:45
Link | Quote | Reply
 
Mozer said: »
Quetzalcoatl.Langly said: »
You're welcome to mine.

https://github.com/sethmccauley/GearSwap/blob/master/NIN.lua

Uses toggles for Haste/HasteII. Trust/+3/+7/Honor March for BRDs. Magic Bursting or resistant mobs.

You can construct your own haste tiers in the determine_haste function area, I wrote this area to count the actual haste values from the different sources you were receiving.

Ehi guys could you link me any updated NIN lua? Thx

What exactly does "updated" mean? Are you looking for gear?

That's a solid lua, and no reason why you wouldn't use it.
Offline
Posts: 4
By Mozer 2019-06-20 09:56:55
Link | Quote | Reply
 
I didn’t know if it was outdated after 1 year somehow... Then i’ll use it as template, thx :D
 Quetzalcoatl.Orestes
Offline
Server: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 424
By Quetzalcoatl.Orestes 2019-06-20 10:34:56
Link | Quote | Reply
 
Nah, it'll swap your gears.

I have one too, if you want a little variety. NIN.lua
[+]
Log in to post.