Up To Date Simple DRK Gear Swap?~

Langues: JP EN DE FR
users online
Forum » FFXI » Jobs » Dark Knight » Up to date simple DRK gear swap?~
Up to date simple DRK gear swap?~
 Phoenix.Habar
Offline
Serveur: Phoenix
Game: FFXI
user: habarnam
Posts: 19
By Phoenix.Habar 2016-10-14 15:46:01
Link | Citer | R
 
Hello I've been searching the forum for a DRK lua,
found a couple on http://www.ffxiah.com/forum/topic/41580/gearswap-support-thread/102/
One is giving me errors... the other one is way too complicated ><

*the error I'm getting is this:
Lua runtime error: gearswap/equip_proccesing.lua:268: attempt to index field '?' (a nil value)
(Not sure if latest patch broke that lua or there might be something else)

If anyone has a file that works and they would be willing to share I would be more than grateful, thank you.~
 Asura.Thorva
Offline
Serveur: Asura
Game: FFXI
user: Thorva
By Asura.Thorva 2016-10-14 15:59:06
Link | Citer | R
 
Here is a bone dry motes lua for drk, could probably have a few extra rules added to it, adjust as needed, but it will load and run. just plug in your gear and you will be fine
Code
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job.  Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------

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

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

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

-- Setup vars that are user-dependent.  Can override this function in a sidecar file.
function user_setup()
    state.OffenseMode:options('Rag', 'RagAcc', 'RagHighAcc', 'Apoc', 'ApocAcc', 'ApocHighAcc', 'NoStpTrait', 'DW')
	state.HybridMode:options ('Reraise')
    state.WeaponskillMode:options('Normal', 'Acc')
    state.CastingMode:options('Normal', 'Resistant')
    state.PhysicalDefenseMode:options('PDT')
    state.MagicalDefenseMode:options('MDT')
    
	select_default_macro_book()

    

end

    -- Define sets and vars used by this job file.
    function init_gear_sets()
            --------------------------------------
            -- Start defining the sets
            --------------------------------------
            -- Precast Sets
			sets.WSDayBonus = {head="Gavialis Helm"}

            -- Precast sets to enhance JAs
            sets.precast.JA['Diabolic Eye'] = {hands="Fallen's finger gauntlets +1"}
            sets.precast.JA['Arcane Circle'] = {feet="Ignominy Sollerets +1"}
            sets.precast.JA['Nether Void'] = {legs="Heathen's Flanchard +1"}
			sets.precast.JA['Souleater'] = {head="Ignominy Burgeonet +1"}
			sets.precast.JA['Weapon Bash'] = {hands="Ignominy Gauntlets +1"}
			sets.precast.JA['Last Resort'] = back="Ankou's Mantle",feet="Fallen's Sollerets"}
			sets.precast.JA['Dark Seal'] = {head="Fallen's Burgeonet"}
			sets.precast.JA['Blood Weapon'] = {head="Fallen's Cuirass"}

			
           -- Waltz set (chr and vit)
    sets.precast.Waltz = {}		   
		   
            -- Fast cast sets for spells
                     
            -- Precast Sets
    sets.precast.FC = {}
                   
            -- Specific spells
    sets.midcast.Utsusemi = {}
     
    sets.midcast.DarkMagic = {}
			
	sets.midcast.Endark = {}
			
	sets.midcast['Endark II'] = sets.midcast.Endark
		   
    sets.midcast['Dread Spikes'] = {}
			
	sets.midcast['Elemental Magic'] = {}
			
	sets.midcast['Enfeebling Magic'] = {}
           
    sets.midcast.Stun = {}
			
	sets.midcast.Absorb = {}
                   
    sets.midcast.Drain = {}
                   
    sets.midcast['Aspir'] = {}
				
	sets.midcast['Aspir II'] = {}
			

	sets.midcast['Drain II'] = {}
			
	sets.midcast['Drain III'] = {}

						                   
            -- 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['Catastrophe'] = {}
					
    sets.precast.WS['Catastrophe'].Acc = {}
					
	sets.precast.WS['Sanguine Blade'] = {}
     
    sets.precast.WS['Torcleaver'] = {}
					
    sets.precast.WS['Torcleaver'].Acc = {}

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

    sets.precast.WS['Scourge'].Acc = {}

	sets.precast.WS['Savage Blade'] = {}
			
	sets.precast.WS['Requiescat'] = {}
			
	sets.precast.WS['Cross Reaper'] = {}
					
    sets.precast.WS['Cross Reaper'].Acc = {}
					
	sets.precast.WS['Quietus'] = {}
					
    sets.precast.WS['Quietus'].Acc = {}
					
    sets.precast.WS['Entropy'] = {}

					
    sets.precast.WS['Entropy'].Acc = {}

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

					
    sets.precast.WS['Insurgency'].Acc = {}
					
    sets.precast.WS['Resolution'] = {}
					
    sets.precast.WS['Resolution'].Acc = {}
					           
            -- Sets to return to when not performing an action.
           
            -- Resting sets
    sets.resting = {}
           
     
            -- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
    sets.idle = {}

            -- Defense sets
    sets.defense.PDT = {}
     
    sets.defense.Reraise = {}
     
    sets.defense.MDT = {}
     
     
     
            -- Engaged sets
			
	sets.engaged.Rag = {}
			
	sets.engaged.RagAcc = {}
			
	sets.engaged.RagHighAcc = {}
	
	sets.engaged.NoStpTrait = {}	
	
	sets.engaged.Apoc = {}
	
	sets.engaged.ApocAcc = {}
			
	sets.engaged.ApocHighAcc = {}		
			
	sets.engaged.DW = {}
	
	
    end
	
function precast(spell,abil)
	--equips favorite weapon if disarmed
	if player.equipment.main == "empty" or player.equipment.sub == "empty" then
		equip({main="Ragnarok",
		sub="Nepenthe Grip +1"})
	end
end

-- Run after the default midcast() is done.
-- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
function job_post_midcast(spell, action, spellMap, eventArgs)
    if spell.skill == 'Elemental Magic' then
        if spell.element == world.day_element or spell.element == world.weather_element then
            equip(sets.midcast['Elemental Magic'], {waist="Hachirin-No-Obi"})
        end
    end
end
------------------------------------------------------------------------------
function job_post_midcast(spell, action, spellMap, eventArgs)
    if (skillchain_elements[spell.skillchain_a]:contains(world.day_element) or skillchain_elements[spell.skillchain_b]:contains(world.day_element) or skillchain_elements[spell.skillchain_c]:contains(world.day_element))
		then equip({head="Gavialis Helm"})
    end
end 


function job_post_midcast(spell, action, spellMap, eventArgs)
    if S{"Drain","Drain II","Drain III"}:contains(spell.english) and (spell.element==world.day_element or spell.element==world.weather_element) then
        equip({waist="Hachirin-no-obi"})
    end
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)
    if state.Buff[buff] ~= nil then
        state.Buff[buff] = gain
    end
    if buff:lower()=='sleep' then
        if gain and player.hp > 120 and player.status == "Engaged" then -- Equip Berserker's Torque When You Are Asleep
            equip({neck="Berserker's Torque"})
        elseif not gain then -- Take Berserker's off
            handle_equipping_gear(player.status)
        end
    end
end

function customize_melee_set(meleeSet)
    if state.Buff.Sleep and player.hp > 120 and player.status == "Engaged" then -- Equip Berserker's Torque When You Are Asleep
        meleeSet = set_combine(meleeSet,{neck="Berserker's Torque"})
    end
    return meleeSet
end

-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
    set_macro_page(1, 2)
end
[+]
 Phoenix.Habar
Offline
Serveur: Phoenix
Game: FFXI
user: habarnam
Posts: 19
By Phoenix.Habar 2016-10-14 16:05:11
Link | Citer | R
 
Thanks a lot, I'm sure i can copy paste some other functions but if it works its a good start :D
 Asura.Azagarth
Offline
Serveur: Asura
Game: FFXI
user: Azagarth
Posts: 1325
By Asura.Azagarth 2016-10-14 18:05:47
Link | Citer | R
 
here is mt lua, its the one thorva posted with a few extras.
[+]
 Phoenix.Habar
Offline
Serveur: Phoenix
Game: FFXI
user: habarnam
Posts: 19
By Phoenix.Habar 2016-10-14 18:30:03
Link | Citer | R
 
Found out why I got errors, having on me new ambuscade gear made gs upset lol forgot gs/windower both need separate updates after patches like this.
Offline
Posts: 194
By Gruknor 2016-10-14 19:37:32
Link | Citer | R
 
Phoenix.Habar said: »
Found out why I got errors, having on me new ambuscade gear made gs upset lol forgot gs/windower both need separate updates after patches like this.

Was it the new askar? Or did you mean anything from ambuscade caused the error?
 Phoenix.Habar
Offline
Serveur: Phoenix
Game: FFXI
user: habarnam
Posts: 19
By Phoenix.Habar 2016-10-15 06:00:38
Link | Citer | R
 
Its the new Flamma gear, tho a friend uses pieces on his SAM GS lua and says he has no issues :x
not sure if GS is updated yet with this new gear.

the error is in this file:
Lua runtime error: gearswap/equip_proccesing.lua:268: attempt to index field '?' (a nil value)
Offline
Posts: 194
By Gruknor 2016-10-15 14:46:23
Link | Citer | R
 
Phoenix.Habar said: »
Its the new Flamma gear, tho a friend uses pieces on his SAM GS lua and says he has no issues :x
not sure if GS is updated yet with this new gear.

the error is in this file:
Lua runtime error: gearswap/equip_proccesing.lua:268: attempt to index field '?' (a nil value)

I am not familiar with that error code. If I were you I would copy paste that into a google search and see what comes up.
 Phoenix.Habar
Offline
Serveur: Phoenix
Game: FFXI
user: habarnam
Posts: 19
By Phoenix.Habar 2016-10-15 16:08:13
Link | Citer | R
 
Found out what was the issue...
If anyone has the same issue or similar, seems that some people don't get they're windower resources automatically updated.
You can download them in the links below:
https://github.com/Windower/Resources/tree/master/lua
http://resources.windower.net/live/lua/
 Shiva.Alcadias
Offline
Serveur: Shiva
Game: FFXI
user: Equinoxx
Posts: 34
By Shiva.Alcadias 2016-10-29 16:51:28
Link | Citer | R
 
Asura.Azagarth said: »
here is mt lua, its the one thorva posted with a few extras.
I keep running into a problem when using this. It says Cannot find the include file (Include/AugmentedGear.lua).
 Asura.Thorva
Offline
Serveur: Asura
Game: FFXI
user: Thorva
By Asura.Thorva 2016-10-29 17:10:01
Link | Citer | R
 
Shiva.Alcadias said: »
Asura.Azagarth said: »
here is mt lua, its the one thorva posted with a few extras.
I keep running into a problem when using this. It says Cannot find the include file (Include/AugmentedGear.lua).

take out line 13
 Shiva.Alcadias
Offline
Serveur: Shiva
Game: FFXI
user: Equinoxx
Posts: 34
By Shiva.Alcadias 2016-10-29 17:13:16
Link | Citer | R
 
Asura.Thorva said: »
Shiva.Alcadias said: »
Asura.Azagarth said: »
here is mt lua, its the one thorva posted with a few extras.
I keep running into a problem when using this. It says Cannot find the include file (Include/AugmentedGear.lua).

take out line 13
From there do I just replace all the lines that were trying to use the include?
 Asura.Azagarth
Offline
Serveur: Asura
Game: FFXI
user: Azagarth
Posts: 1325
By Asura.Azagarth 2016-10-29 18:09:33
Link | Citer | R
 
so the (Include/AugmentedGear.lua) is actually a separate folder called Include that contains a lua called AugmentedGear.lua

I made this a file for me to keep ALL of my augmented gear in because I got tired of having to add it manually in every time for the double hand full of jobs I actively play.

This makes it easy if you have another job, say war, that share all that odys/valo stuff as an example. Then when I am in my drk or war lua I can just call ValoHead.ACC instead of some crazy long string of augs, or having to give that crazy long stream of augs a nickname at the top of each file that uses them.

Honestly you can just delete it if its to much for you, and just fill in all the ValoBody.WSD etc type augs with your own "gear",
 Shiva.Alcadias
Offline
Serveur: Shiva
Game: FFXI
user: Equinoxx
Posts: 34
By Shiva.Alcadias 2016-10-29 18:14:22
Link | Citer | R
 
I'm just very new to GS and it is a little confusing but ty for all the help!
 Shiva.Alcadias
Offline
Serveur: Shiva
Game: FFXI
user: Equinoxx
Posts: 34
By Shiva.Alcadias 2016-10-30 02:35:29
Link | Citer | R
 
Every thing is working properly except the only thing I noticed is that it isn't adding the midcast for Drain III but is working fine for Drain I and II. Is there any way to add Drain III to the list?
 Asura.Azagarth
Offline
Serveur: Asura
Game: FFXI
user: Azagarth
Posts: 1325
By Asura.Azagarth 2016-10-30 02:56:04
Link | Citer | R
 
you need to go into motes file and add it, nothing to do with the actual lua.
necroskull Necro Bump Detected! [812 days between previous and next post]
Offline
Posts: 9
By Gaude1 2019-01-19 23:40:38
Link | Citer | R
 
Hello all,

Could someone tell me why I cant get a gearswap to happen when casting dark magic, or absorb spells? Its the one azagarth posted, and ive started adding some gear that I currently have for the job.

It all seems to work so far in testing, except the darkmagic/absorbs... The stun works tho.
Log in to post.