Item Search
     
BG-Wiki Search
Page 117 of 302 FirstFirst ... 67 107 115 116 117 118 119 127 167 ... LastLast
Results 2321 to 2340 of 6036

Thread: Gearswap Help Thread!     submit to reddit submit to twitter

  1. #2321
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Sechs View Post
    Tried this finally and it worked like a charm, thanks dlsmd!
    I noticed a strange thing happening though, it was my first time playing as SCH after patch so I'm not sure if this is the cause.
    Basically I noticed that a couple of times I was unable to use certain spells or mainly JAs. Like stratagems and Dark Arts.
    I was pressing the macro and nothing would happen, no error, no swap, nothing.
    I had to manually use the JA/spell from the menu or type the full form (/ja name <me>) for it to finally work and get out of this "lock".

    Again: maybe it has nothing to do with this new rule, and it only happened to me a few times, but it was like sometimes when I was interrupting an action (by moving or getting interrupted) I was entering a "lock" status and had to what I described above to get out of it.
    It's... hard to explain.
    Am I being paranoid and this was caused by lag, Shortcuts or other addons, or could it be something related to this new rule I added to my GS SCH lua?
    the only way that rule would be causing the issue you describe is if for some reason gearswap is enabling the midcast checks for ja's but as far as i know it should not be because ja's are instant

  2. #2322
    Campaign
    Join Date
    Jul 2007
    Posts
    6,633
    BG Level
    8

    Yeah, I said that maybe it has nothing to do with the new rule.
    I was really tired yesterday anyway.
    I'll try again these days and see if it happens again.

  3. #2323
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Sechs View Post
    Yeah, I said that maybe it has nothing to do with the new rule.
    I was really tired yesterday anyway.
    I'll try again these days and see if it happens again.
    if it was yesterday luacore on the live version needed an update and it is in place not that might have been the issue

  4. #2324
    Chram
    Join Date
    Sep 2007
    Posts
    2,526
    BG Level
    7
    FFXI Server
    Fenrir

    @Orthanc: Ok, the weather issue should be fixed now. You'll need to log out and run the launcher to get a new version of the hook dll.

  5. #2325
    RIDE ARMOR
    Join Date
    Jul 2014
    Posts
    10
    BG Level
    1

    yup all works many thanks hoss /salute

  6. #2326
    Smells like Onions
    Join Date
    Jul 2014
    Posts
    1
    BG Level
    0

    I did a search but might have missed it. Sorry if I did.

    2 questions. First how would I go about doing auto divine caress like used to be done in some whm spellcasts.

    Second. I would like to setup a simple command that would cycle through avators and set a variable to be that avator. Then another command would cast that avator that was set in the variable. I did this in spellcast with triggers for both my smn and my corsair for QuickDraw elements. Is this possible with gearswap?

    Tia

  7. #2327
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by bboyhard View Post
    I did a search but might have missed it. Sorry if I did.

    2 questions. First how would I go about doing auto divine caress like used to be done in some whm spellcasts.

    Second. I would like to setup a simple command that would cycle through avators and set a variable to be that avator. Then another command would cast that avator that was set in the variable. I did this in spellcast with triggers for both my smn and my corsair for QuickDraw elements. Is this possible with gearswap?

    Tia
    both of these are possible but thay would take time to do and then thay would require a lot of debug time to get things just right

  8. #2328
    Smells like Onions
    Join Date
    Jan 2014
    Posts
    2
    BG Level
    0

    umm, title

    Quick question. I'm running into an issue where I'll WS and the mob dies at the end of the WS, but I change back into my TP gear and not all of my gear changes into my Idle set since the battle is over. It's like the transition from WS>TP>Idle is happening too fast and causing confusion.

    I'm using the following lua

    Code:
    Spoiler: show
    ------------------------------------------------------------------------------------------------------------------- -- 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. -- Initialization function for this job file. function get_sets() -- Load and initialize the include file. include('Mote-Include.lua') end -- Setup vars that are user-independent. function job_setup() state.CombatForm = get_combat_form() state.Buff.Hasso = buffactive.Hasso or false state.Buff.Seigan = buffactive.Seigan or false state.Buff.Sekkanoki = buffactive.Sekkanoki or false state.Buff.Sengikori = buffactive.Sengikori or false state.Buff['Meikyo Shisui'] = buffactive['Meikyo Shisui'] or false end -- Setup vars that are user-dependent. Can override this function in a sidecar file. function user_setup() -- Options: Override default values options.OffenseModes = {'Normal', 'Acc'} options.DefenseModes = {'Normal', 'PDT', 'Reraise'} options.WeaponskillModes = {'Normal', 'Acc', 'Att', 'Mod'} options.CastingModes = {'Normal'} options.IdleModes = {'Normal'} options.RestingModes = {'Normal'} options.PhysicalDefenseModes = {'PDT', 'Reraise'} options.MagicalDefenseModes = {'MDT'} state.Defense.PhysicalMode = 'PDT' -- Additional local binds send_command('bind ^` input /ja "Hasso" <me>') send_command('bind !` input /ja "Seigan" <me>') select_default_macro_book() end -- Called when this job file is unloaded (eg: job change) function job_file_unload() send_command('unbind ^`') send_command('unbind !-') end -- Define sets and vars used by this job file. function init_gear_sets() -------------------------------------- -- Start defining the sets -------------------------------------- -- Precast Sets -- Precast sets to enhance JAs sets.precast.JA.Meditate = {head="Myochin Kabuto",hands="Sakonji Kote"} sets.precast.JA['Warding Circle'] = {head="Myochin Kabuto"} sets.precast.JA['Blade Bash'] = {hands="Sakonji Kote"} -- Waltz set (chr and vit) sets.precast.Waltz = {ammo="Sonia's Plectrum", head="Yaoyotl Helm", body="Otronif Harness +1",hands="Buremte Gloves",ring1="Spiral Ring", back="Iximulew Cape",waist="Caudata Belt",legs="Karieyh Brayettes +1",feet="Otronif Boots +1"} -- Don't need any special gear for Healing Waltz. sets.precast.Waltz['Healing Waltz'] = {} -- Weaponskill sets -- Default set for any weaponskill that isn't any more specifically defined sets.precast.WS = {ammo="Hagneia Stone", head="Yaoyotl Helm",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring", body="Mes'yohi Haubergeon",hands="Mikinaak Gauntlets",ring1="Tyrant's ring",ring2="K'ayres Ring", back="Buquwik cape",waist="Prosilio Belt",legs="Mikinaak Cuisses",feet="Whirlpool Greaves"} sets.precast.WS.Acc = set_combine(sets.precast.WS, {back="Letalis Mantle"}) -- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found. sets.precast.WS['Tachi: Fudo'] = set_combine(sets.precast.WS, {neck="Snow Gorget"}) sets.precast.WS['Tachi: Fudo'].Acc = set_combine(sets.precast.WS.Acc, {neck="Snow Gorget"}) sets.precast.WS['Tachi: Fudo'].Mod = set_combine(sets.precast.WS['Tachi: Fudo'], {waist="Snow Belt"}) sets.precast.WS['Tachi: Shoha'] = set_combine(sets.precast.WS, {neck="Thunder Gorget"}) sets.precast.WS['Tachi: Shoha'].Acc = set_combine(sets.precast.WS.Acc, {neck="Thunder Gorget"}) sets.precast.WS['Tachi: Shoha'].Mod = set_combine(sets.precast.WS['Tachi: Shoha'], {waist="Thunder Belt"}) sets.precast.WS['Tachi: Rana'] = set_combine(sets.precast.WS, {neck="Snow Gorget",ear1="Bladeborn Earring",ear2="Steelflash Earring",}) sets.precast.WS['Tachi: Rana'].Acc = set_combine(sets.precast.WS.Acc, {neck="Snow Gorget",ear1="Bladeborn Earring",ear2="Steelflash Earring",}) sets.precast.WS['Tachi: Rana'].Mod = set_combine(sets.precast.WS['Tachi: Rana'], {waist="Snow Belt"}) sets.precast.WS['Tachi: Kasha'] = set_combine(sets.precast.WS, {neck="Light Gorget",waist="Light Belt"}) sets.precast.WS['Tachi: Gekko'] = set_combine(sets.precast.WS, {neck="Snow Gorget",waist="Snow Belt"}) sets.precast.WS['Tachi: Yukikaze'] = set_combine(sets.precast.WS, {neck="Snow Gorget",waist="Snow Belt"}) sets.precast.WS['Tachi: Ageha'] = set_combine(sets.precast.WS, {neck="Soil Gorget",waist="Soil Belt"}) sets.precast.WS['Tachi: Jinpu'] = set_combine(sets.precast.WS, {neck="Soil Gorget",waist="Soil Belt"}) -- Midcast Sets sets.midcast.FastRecast = { head="Yaoyotl Helm", body="Otronif Harness +1",hands="Otronif Gloves", legs="Phorcys Dirs",feet="Otronif Boots +1"} -- Sets to return to when not performing an action. -- Resting sets sets.resting = {neck="Wiglen Gorget",ring1="Sheltered Ring",ring2="Paguroidea Ring"} -- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes) sets.idle.Town = {main="Tsurumaru", sub="Pole Grip",ammo="Hagneia Stone", head="Yaoyotl Helm",neck="Orochi nodowa",ear1="Bladeborn Earring",ear2="Steelflash Earring", body="Mes'yohi Haubergeon",hands="Otronif Gloves",ring1="Sheltered Ring",ring2="Paguroidea Ring", back="Shadow Mantle",waist="Flume Belt",legs="Otronif brais +1",feet="Danzo Sune-ate"} sets.idle.Field = { head="Yaoyotl Helm",neck="Orochi nodowa",ear1="Bladeborn Earring",ear2="Steelflash Earring", body="Mes'yohi Haubergeon",hands="Otronif Gloves",ring1="Sheltered Ring",ring2="Paguroidea Ring", back="Shadow Mantle",waist="Flume Belt",legs="Otronif brais +1",feet="Danzo Sune-ate"} sets.idle.Weak = { head="Twilight Helm",neck="Wiglen Gorget",ear1="Bladeborn Earring",ear2="Steelflash Earring", body="Twilight Mail",hands="Buremte Gloves",ring1="Sheltered Ring",ring2="Paguroidea Ring", back="Shadow Mantle",waist="Flume Belt",legs="Karieyh Brayettes +1",feet="Danzo Sune-ate"} -- Defense sets sets.defense.PDT = {ammo="Iron Gobbet", head="Yaoyotl Helm",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring", body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2=gear.DarkRing.physical, back="Shadow Mantle",waist="Flume Belt",legs="Karieyh Brayettes +1",feet="Otronif Boots +1"} sets.defense.Reraise = { head="Twilight Helm",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring", body="Twilight Mail",hands="Buremte Gloves",ring1="Defending Ring",ring2="Paguroidea Ring", back="Shadow Mantle",waist="Flume Belt",legs="Karieyh Brayettes +1",feet="Otronif Boots +1"} sets.defense.MDT = {ammo="Demonry Stone", head="Yaoyotl Helm",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring", body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2="Shadow Ring", back="Engulfer Cape",waist="Flume Belt",legs="Karieyh Brayettes +1",feet="Otronif Boots +1"} sets.Kiting = {feet="Danzo Sune-ate"} sets.Reraise = {head="Twilight Helm",body="Twilight Mail"} -- 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 -- Normal melee group -- Delay 450 GK, 25 Save TP => 65 Store TP for a 5-hit (25 Store TP in gear) sets.engaged = {ammo="Hagneia Stone", head="Yaoyotl Helm",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring", body="Xaddi Mail",hands="Otronif Gloves",ring1="Tyrant's ring",ring2="K'ayres Ring", back="Takaha Mantle",waist="Goading Belt",legs="Otronif brais +1",feet="Otronif Boots +1"} sets.engaged.Acc = {ammo="Hagneia Stone", head="Yaoyotl Helm",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring", body="Xaddi Mail",hands="Otronif Gloves",ring1="Tyrant's ring",ring2="K'ayres Ring", back="Takaha Mantle",waist="Goading Belt",legs="Otronif brais +1",feet="Otronif Boots +1"} sets.engaged.PDT = {ammo="Thew Bomblet", head="Yaoyotl Helm",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring", body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2="K'ayres Ring", back="Iximulew Cape",waist="Goading Belt",legs="Unkai Haidate +2",feet="Otronif Boots +1"} sets.engaged.Acc.PDT = {ammo="Honed Tathlum", head="Yaoyotl Helm",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring", body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2="K'ayres Ring", back="Letalis Mantle",waist="Goading Belt",legs="Unkai Haidate +2",feet="Otronif Boots +1"} sets.engaged.Reraise = {ammo="Thew Bomblet", head="Twilight Helm",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring", body="Twilight Mail",hands="Otronif Gloves",ring1="Beeline Ring",ring2="K'ayres Ring", back="Ik Cape",waist="Goading Belt",legs="Unkai Haidate +2",feet="Otronif Boots +1"} sets.engaged.Acc.Reraise = {ammo="Thew Bomblet", head="Twilight Helm",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring", body="Twilight Mail",hands="Otronif Gloves",ring1="Beeline Ring",ring2="K'ayres Ring", back="Letalis Mantle",waist="Goading Belt",legs="Unkai Haidate +2",feet="Otronif Boots +1"} -- Melee sets for in Adoulin, which has an extra 10 Save TP for weaponskills. -- Delay 450 GK, 35 Save TP => 89 Store TP for a 4-hit (49 Store TP in gear), 2 Store TP for a 5-hit sets.engaged.Adoulin = {ammo="Hagneia Stone", head="Yaoyotl Helm",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring", body="Xaddi Mail",hands="Otronif Gloves",ring1="Tyrant's ring",ring2="K'ayres Ring", back="Takaha Mantle",waist="Goading Belt",legs="Otronif brais +1",feet="Otronif Boots +1"} sets.engaged.Adoulin.Acc = {ammo="Hagneia Stone", head="Yaoyotl Helm",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring", body="Xaddi Mail",hands="Otronif Gloves",ring1="Tyrant's ring",ring2="K'ayres Ring", back="Takaha Mantle",waist="Goading Belt",legs="Otronif brais +1",feet="Otronif Boots +1"} sets.engaged.Adoulin.PDT = {ammo="Thew Bomblet", head="Yaoyotl Helm",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring", body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2="K'ayres Ring", back="Iximulew Cape",waist="Goading Belt",legs="Unkai Haidate +2",feet="Otronif Boots +1"} sets.engaged.Adoulin.Acc.PDT = {ammo="Honed Tathlum", head="Yaoyotl Helm",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring", body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2="K'ayres Ring", back="Letalis Mantle",waist="Goading Belt",legs="Unkai Haidate +2",feet="Otronif Boots +1"} sets.engaged.Adoulin.Reraise = {ammo="Thew Bomblet", head="Twilight Helm",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring", body="Twilight Mail",hands="Otronif Gloves",ring1="Beeline Ring",ring2="K'ayres Ring", back="Ik Cape",waist="Goading Belt",legs="Unkai Haidate +2",feet="Otronif Boots +1"} sets.engaged.Adoulin.Acc.Reraise = {ammo="Thew Bomblet", head="Twilight Helm",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring", body="Twilight Mail",hands="Otronif Gloves",ring1="Beeline Ring",ring2="K'ayres Ring", back="Letalis Mantle",waist="Goading Belt",legs="Unkai Haidate +2",feet="Otronif Boots +1"} sets.buff.Sekkanoki = {hands="Unkai Kote +2"} sets.buff.Sengikori = {feet="Unkai Sune-ate +2"} sets.buff['Meikyo Shisui'] = {feet="Sakonji Sune-ate"} end ------------------------------------------------------------------------------------------------------------------- -- Job-specific hooks that are called to process player actions at specific points in time. ------------------------------------------------------------------------------------------------------------------- -- Set eventArgs.handled to true if we don't want any automatic target handling to be done. function job_pretarget(spell, action, spellMap, eventArgs) if spell.type == 'WeaponSkill' then -- Change any GK weaponskills to polearm weaponskill if we're using a polearm. if player.equipment.main=='Quint Spear' or player.equipment.main=='Quint Spear' then if spell.english:startswith("Tachi:") then send_command('@input /ws "Penta Thrust" '..spell.target.raw) eventArgs.cancel = true end end end if state.Buff[spell.english] ~= nil then state.Buff[spell.english] = true end end -- Run after the default precast() is done. -- eventArgs is the same one used in job_precast, in case information needs to be persisted. function job_post_precast(spell, action, spellMap, eventArgs) if spell.type:lower() == 'weaponskill' then if state.Buff.Sekkanoki then equip(sets.buff.Sekkanoki) end if state.Buff.Sengikori then equip(sets.buff.Sengikori) end if state.Buff['Meikyo Shisui'] then equip(sets.buff['Meikyo Shisui']) end 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) -- Effectively lock these items in place. if state.DefenseMode == 'Reraise' or (state.Defense.Active and state.Defense.Type == 'Physical' and state.Defense.PhysicalMode == 'Reraise') then equip(sets.Reraise) end end -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done. function job_aftercast(spell, action, spellMap, eventArgs) if state.Buff[spell.english] ~= nil then state.Buff[spell.english] = not spell.interrupted or buffactive[spell.english] end end ------------------------------------------------------------------------------------------------------------------- -- Customization hooks for idle and melee sets, after they've been automatically constructed. ------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------- -- General hooks for other events. ------------------------------------------------------------------------------------------------------------------- -- 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 end ------------------------------------------------------------------------------------------------------------------- -- User code that supplements self-commands. ------------------------------------------------------------------------------------------------------------------- -- Called by the 'update' self-command, for common needs. -- Set eventArgs.handled to true if we don't want automatic equipping of gear. function job_update(cmdParams, eventArgs) state.CombatForm = get_combat_form() end -- Set eventArgs.handled to true if we don't want the automatic display to be run. function display_current_job_state(eventArgs) end ------------------------------------------------------------------------------------------------------------------- -- Utility functions specific to this job. ------------------------------------------------------------------------------------------------------------------- function get_combat_form() if areas.Adoulin:contains(world.area) and buffactive.ionis then return 'Adoulin' end end -- Select default macro book on initial load or subjob change. function select_default_macro_book() -- Default macro set/book if player.sub_job == 'WAR' then set_macro_page(1, 11) elseif player.sub_job == 'DNC' then set_macro_page(2, 11) elseif player.sub_job == 'THF' then set_macro_page(3, 11) elseif player.sub_job == 'NIN' then set_macro_page(4, 11) else set_macro_page(1, 11) end end

  9. #2329
    Hydra
    Join Date
    Sep 2012
    Posts
    118
    BG Level
    3

    An auto divine caress rule should be easy I would think.

    Code:
      -- in precast function
      if S{ 'Cursna', 'Paralyna', "etc." }:contains(spell.english) and get_ability_recasts()[32] < 1 then
      -- In the abilities.lua file in libs/res it has a field called recast_id that is 32, it is also index 270 in the table.
        cancel_spell()
        windower.send_command('input /ja "Divine Caress" <me>; wait 2; input /ma "' .. spell.english .. '" ' .. spell.target)
      end

  10. #2330
    Sea Torques
    Join Date
    Aug 2008
    Posts
    699
    BG Level
    5
    FFXI Server
    Odin

    Ok i got the healing/restoring breaths fixed, anyone see why my gear isnt changing back to my tp/idle set after using jumps or spirit link now? Please and thank you, getting really fustrating.
    Code:
    -- *** Credit goes to Flippant & Martel for helping me with this Gearswap *** --
    -- ** I Use Some of Motenten's Functions ** --
    -- Last Updated: 05/03/14 7:30 AM *Changed HB Rule* --
    
    function get_sets()
    	AccIndex = 1
    	AccArray = {"LowACC","MidACC","HighACC"} -- 3 Levels Of Accuracy Sets For TP/WS/Hybrid. First Set Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below. Most of These Sets Are Empty So You Need To Edit Them On Your Own. Remember To Check What The Combined Set Is For Each Sets. --
    	AttIndex = 1
    	AttArray = {"LowATT","HighATT","LowContent"} -- LowATT Is The Same As LowACC Set. MidACC & HighACC Take Priority Over These 2 Sets(HighATT & LowContent). --
    	IdleIndex = 1
    	IdleArray = {"Movement","Regen","Refresh"} -- Default Idle Set Is Movement --
    	Armor = 'None'
    	Twilight = 'None'
    	Rancor = 'OFF' -- Set Default Rancor ON or OFF Here --
    	Brais = 'OFF' -- Set Default Brais ON or OFF Here --
    	Samurai_Roll = 'OFF' -- Set Default SAM Roll ON or OFF Here --
    	target_distance = 5 -- Set Default Distance Here --
    	select_default_macro_book() -- Change Default Macro Book At The End --
    
    	NM_For_Brais = S{} -- Add More NM Here For High Jump --
    
    	HB_Mage_SubJob = S{"WHM","RDM","BLM","BLU","SCH"} -- 50% Healing Breath Trigger SubJob --
    	HB_DD_SubJob = S{"PLD","DRK","BRD","NIN"} -- 33% Healing Breath Trigger SubJob --
    	sc_map = {SC1="Drakesbane", SC2="SpiritJump", SC3="SoulJump"} -- 3 Additional Binds. Can Change Whatever JA/WS/Spells You Like Here. Remember Not To Use Spaces. --
    
    	sets.Idle = {}
    	-- Idle/Town Sets --
    	sets.Idle.Regen = {
    			ammo="Ginsen",
    			head="Twilight Helm",
    			neck="Wiglen Gorget",
    			ear1="Brutal Earring",
    			ear2="Sanare Earring",
    			body="Ares' Cuirass +1",
    			hands="Xaddi Gauntlets",
    			ring1="Sheltered Ring",
    			ring2="Paguroidea Ring",
    			back="Shadow Mantle",
    			waist="Flume Belt",
    			legs="Crimson Cuisses",
    			feet="Phorcys Schuhs"}
    	sets.Idle.Movement = set_combine(sets.Idle.Regen,{
    			ammo="Ginsen",
    			head="Twilight Helm",
    			neck="Wiglen Gorget",
    			ear1="Brutal Earring",
    			ear2="Sanare Earring",
    			body="Ares' Cuirass +1",
    			hands="Cizin Mufflers +1",
    			ring1="Sheltered Ring",
    			ring2="Paguroidea Ring",
    			back="Shadow Mantle",
    			waist="Flume Belt",
    			legs="Crimson Cuisses",
    		    feet="Gorney Sollerets +1"})
    	sets.Idle.Refresh = set_combine(sets.Idle.Regen,{
    			ammo="Ginsen",
    			head="Twilight Helm",
    			neck="Wiglen Gorget",
    			ear1="Black Earring",
    			ear2="Dawn Earring",
    			body="Ares' Cuirass +1",
    			hands="Xaddi Gauntlets",
    			ring1="Sheltered Ring",
    			ring2="Paguroidea Ring",
    			back="Shadow Mantle",
    			waist="Nierenschutz",
    			legs="Crimson Cuisses",
    			feet="Gorney Sollerets +1"})
    
    	sets.Twilight = {head="Twilight Helm",body="Twilight Mail"}
    
    	-- TP Base Set --
    	sets.TP = {}
    
    	-- Ryunohige(AM3 Down) TP Sets --
    	sets.TP.Ryunohige = {
    			main="Ryunohige",
    			sub="Bloodrain Strap",
    			ammo="Ginsen",
    			head="Otomi Helm",
    			neck="Ganesha's Mala",
    			ear1="Brutal Earring",
    			ear2="Tripudio Earring",
    			body="Xaddi Mail",
    			hands="Xaddi Gauntlets",
    			ring1="K'ayres Ring",
    			ring2="Rajas Ring",
    			back="Atheling Mantle",
    			waist="Windbuffet Belt",
    			legs="Xaddi Cuisses",
    			feet="Huginn Gambieras"}
    	sets.TP.Ryunohige.MidACC = set_combine(sets.TP.Ryunohige,{
    			head="Yaoyotl Helm",
    			back="Letalis Mantle",
    			waist="Dynamic Belt +1"})
    	sets.TP.Ryunohige.HighACC = set_combine(sets.TP.Ryunohige.MidACC,{
    			neck="Iqabi Necklace",
    			feet="Mikinaak Greaves",
    			ring1="Patricius Ring"})
    
    	-- Ryunohige(AM3 Up) TP Sets --
    	sets.TP.Ryunohige.AM3 = set_combine(sets.TP.Ryunohige,{
    			head="Yaoyotl Helm",
    			waist="Goading Belt"})
    	sets.TP.Ryunohige.MidACC.AM3 = set_combine(sets.TP.Ryunohige.AM3,{
    			back="Letalis Mantle",
    			waist="Dynamic Belt +1"})
    	sets.TP.Ryunohige.HighACC.AM3 = set_combine(sets.TP.Ryunohige.MidACC.AM3,{
    			neck="Iqabi Necklace",
    			feet="Mikinaak Greaves",
    			ring1="Patricius Ring"})
    
    	-- Ryunohige(AM3 Down: Ionis) TP Sets --
    	sets.TP.Ryunohige.Ionis = set_combine(sets.TP.Ryunohige,{})
    	sets.TP.Ryunohige.MidACC.Ionis = set_combine(sets.TP.Ryunohige.Ionis,{})
    	sets.TP.Ryunohige.HighACC.Ionis = set_combine(sets.TP.Ryunohige.MidACC.Ionis,{})
    
    	-- Ryunohige(AM3 Up: Ionis) TP Sets --
    	sets.TP.Ryunohige.AM3.Ionis = set_combine(sets.TP.Ryunohige.AM3,{})
    	sets.TP.Ryunohige.MidACC.AM3.Ionis = set_combine(sets.TP.Ryunohige.AM3.Ionis,{})
    	sets.TP.Ryunohige.HighACC.AM3.Ionis = set_combine(sets.TP.Ryunohige.MidACC.AM3.Ionis,{})
    
    	-- Ryunohige(AM3 Down: SAM Roll) TP Sets --
    	sets.TP.Ryunohige.STP = set_combine(sets.TP.Ryunohige,{})
    	sets.TP.Ryunohige.MidACC.STP = set_combine(sets.TP.Ryunohige.STP,{})
    	sets.TP.Ryunohige.HighACC.STP = set_combine(sets.TP.Ryunohige.MidACC.STP,{})
    
    	-- Ryunohige(AM3 Up: SAM Roll) TP Sets --
    	sets.TP.Ryunohige.AM3.STP =  set_combine(sets.TP.Ryunohige.AM3,{})
    	sets.TP.Ryunohige.MidACC.AM3.STP = set_combine(sets.TP.Ryunohige.AM3.STP,{})
    	sets.TP.Ryunohige.HighACC.AM3.STP = set_combine(sets.TP.Ryunohige.MidACC.AM3.STP,{})
    
    	-- Ryunohige(AM3 Down: Ionis + SAM Roll) TP Sets --
    	sets.TP.Ryunohige.Ionis.STP =  set_combine(sets.TP.Ryunohige.Ionis,{})
    	sets.TP.Ryunohige.MidACC.Ionis.STP = set_combine(sets.TP.Ryunohige.Ionis.STP,{})
    	sets.TP.Ryunohige.HighACC.Ionis.STP = set_combine(sets.TP.Ryunohige.MidACC.Ionis.STP,{})
    
    	-- Ryunohige(AM3 Up: Ionis + SAM Roll) TP Sets --
    	sets.TP.Ryunohige.AM3.Ionis.STP =  set_combine(sets.TP.Ryunohige.AM3.Ionis,{})
    	sets.TP.Ryunohige.MidACC.AM3.Ionis.STP = set_combine(sets.TP.Ryunohige.AM3.Ionis.STP,{})
    	sets.TP.Ryunohige.HighACC.AM3.Ionis.STP = set_combine(sets.TP.Ryunohige.MidACC.AM3.Ionis.STP,{})
    
    	-- Gungnir TP Sets --
    	sets.TP.Gungnir = {main="Gungnir",
    			sub="Bloodrain Strap",
    			ammo="Ginsen",
    			head="Otomi Helm",
    			neck="Ganesha's Mala",
    			ear1="Brutal Earring",
    			ear2="Tripudio Earring",
    			body="Xaddi Mail",
    			hands="Xaddi Gauntlets",
    			ring1="K'ayres Ring",
    			ring2="Rajas Ring",
    			back="Atheling Mantle",
    			waist="Goading Belt",
    			legs="Xaddi Cuisses",
    			feet="Huginn Gambieras"}
    	sets.TP.Gungnir.MidACC = set_combine(sets.TP.Gungnir,{head="Yaoyotl Helm",
    			back="Letalis Mantle",
    			waist="Dynamic Belt +1"})
    	sets.TP.Gungnir.HighACC = set_combine(sets.TP.Gungnir.MidACC,{neck="Iqabi Necklace",
    			feet="Mikinaak Greaves",
    			ring1="Patricius Ring"})
    
    	-- Gungnir(Ionis) TP Sets --
    	sets.TP.Gungnir.Ionis = set_combine(sets.TP.Gungnir,{})
    	sets.TP.Gungnir.MidACC.Ionis = set_combine(sets.TP.Gungnir.Ionis,{})
    	sets.TP.Gungnir.HighACC.Ionis = set_combine(sets.TP.Gungnir.MidACC.Ionis,{})
    
    	-- Gungnir(SAM Roll) TP Sets --
    	sets.TP.Gungnir.STP = set_combine(sets.TP.Gungnir,{})
    	sets.TP.Gungnir.MidACC.STP = set_combine(sets.TP.Gungnir.MidACC,{})
    	sets.TP.Gungnir.HighACC.STP = set_combine(sets.TP.Gungnir.HighACC,{})
    
    	-- Gungnir(Ionis + SAM Roll) TP Sets --
    	sets.TP.Gungnir.Ionis.STP = set_combine(sets.TP.Gungnir.Ionis,{})
    	sets.TP.Gungnir.MidACC.Ionis.STP = set_combine(sets.TP.Gungnir.Ionis.STP,{})
    	sets.TP.Gungnir.HighACC.Ionis.STP = set_combine(sets.TP.Gungnir.MidACC.Ionis.STP,{})
    
    	-- Rhongomiant TP Sets --
    	sets.TP.Rhongomiant = {}
    	sets.TP.Rhongomiant.MidACC = set_combine(sets.TP.Rhongomiant,{})
    	sets.TP.Rhongomiant.HighACC = set_combine(sets.TP.Rhongomiant.MidACC,{})
    
    	-- Rhongomiant(Ionis) TP Sets --
    	sets.TP.Rhongomiant.Ionis = set_combine(sets.TP.Rhongomiant,{})
    	sets.TP.Rhongomiant.MidACC.Ionis = set_combine(sets.TP.Rhongomiant.Ionis,{})
    	sets.TP.Rhongomiant.HighACC.Ionis = set_combine(sets.TP.Rhongomiant.MidACC.Ionis,{})
    
    	-- Rhongomiant(SAM Roll) TP Sets --
    	sets.TP.Rhongomiant.STP = set_combine(sets.TP.Rhongomiant,{})
    	sets.TP.Rhongomiant.MidACC.STP = set_combine(sets.TP.Rhongomiant.MidACC,{})
    	sets.TP.Rhongomiant.HighACC.STP = set_combine(sets.TP.Rhongomiant.HighACC,{})
    
    	-- Rhongomiant(Ionis + SAM Roll) TP Sets --
    	sets.TP.Rhongomiant.Ionis.STP = set_combine(sets.TP.Rhongomiant.Ionis,{})
    	sets.TP.Rhongomiant.MidACC.Ionis.STP = set_combine(sets.TP.Rhongomiant.Ionis.STP,{})
    	sets.TP.Rhongomiant.HighACC.Ionis.STP = set_combine(sets.TP.Rhongomiant.MidACC.Ionis.STP,{})
    
    	-- Upukirex TP Sets --
    	sets.TP.Upukirex = {}
    	sets.TP.Upukirex.MidACC = set_combine(sets.TP.Upukirex,{})
    	sets.TP.Upukirex.HighACC = set_combine(sets.TP.Upukirex.MidACC,{})
    
    	-- Upukirex(Ionis) TP Sets --
    	sets.TP.Upukirex.Ionis = set_combine(sets.TP.Upukirex,{})
    	sets.TP.Upukirex.MidACC.Ionis = set_combine(sets.TP.Upukirex.Ionis,{})
    	sets.TP.Upukirex.HighACC.Ionis = set_combine(sets.TP.Upukirex.MidACC.Ionis,{})
    
    	-- Upukirex(SAM Roll) TP Sets --
    	sets.TP.Upukirex.STP = set_combine(sets.TP.Upukirex,{})
    	sets.TP.Upukirex.MidACC.STP = set_combine(sets.TP.Upukirex.MidACC,{})
    	sets.TP.Upukirex.HighACC.STP = set_combine(sets.TP.Upukirex.HighACC,{})
    
    	-- Upukirex(Ionis + SAM Roll) TP Sets --
    	sets.TP.Upukirex.Ionis.STP = set_combine(sets.TP.Upukirex.Ionis,{})
    	sets.TP.Upukirex.MidACC.Ionis.STP = set_combine(sets.TP.Upukirex.Ionis.STP,{})
    	sets.TP.Upukirex.HighACC.Ionis.STP = set_combine(sets.TP.Upukirex.MidACC.Ionis.STP,{})
    
    	-- AM3 Rancor ON Mantle --
    	sets.TP.Rancor = {back="Rancorous Mantle"}
    
    	-- PDT/MDT Sets --
    	sets.PDT = {
    			head="Ighwa Cap",
    			neck="Twilight Torque",
    			ear1="Brutal Earring",
    			ear2="Sanare Earring",
    			body="Xaddi Mail",
    			hands="Cizin Mufflers +1",
    			ring1="Patricius Ring",
    			ring2="Defending Ring",
    			back="Mollusca Mantle",
    			waist="Flume Belt",
    			legs="Cizin Breeches +1",
    			feet="Gorney Sollerets +1"}
    
    	sets.MDT = set_combine(sets.PDT,{
    			ammo="Demonry Stone",
    			head="Ogier's Helm",
    			ear1="Merman's Earring",
    			ear2="Sanare Earring",
    			ring1="Shadow Ring",
    			ring2="Defending Ring",
    			waist="Nierenschutz",
    			back="Mubvumbamiri Mantle"})
    
    	-- Hybrid Sets --
    	sets.TP.Hybrid = set_combine(sets.PDT,{
    			head="Ighwa Cap",
    			neck="Twilight Torque",
    			ear1="Brutal Earring",
    			ear2="Tripudio Earring",
    			body="Xaddi Mail",
    			hands="Cizin Mufflers +1",
    			ring1="Patricius Ring",
    			ring2="Dark Ring",
    			back="Shadow Mantle",
    			waist="Dynamic Belt +1",
    			legs="Xaddi Cuisses",
    			feet="Mikinaak Greaves",})
    	sets.TP.Hybrid.MidACC = set_combine(sets.TP.Hybrid,{})
    	sets.TP.Hybrid.HighACC = set_combine(sets.TP.Hybrid.MidACC,{})
    
    
    	-- WS Base Set --
    	sets.WS = {ammo="Thew Bomblet",
    			head="Otomi Helm",
    			neck="Flame Gorget",
    			ear1="Steelflash Earring",
    			ear2="Bladeborn Earring",
    			body="Miki.Breastplate",
    			hands="Mikinaak Gauntlets",
    			ring2="Rajas Ring",
    			ring1="Pyrosoul Ring",
    			back="Rancorous Mantle",
    			waist="Windbuffet Belt",
    			legs="Scuff. COsciales",
    			feet="Huginn Gambieras"}
    
    	-- WS Sets --
    	sets.WS.Drakesbane = {
    			ammo="Thew Bomblet",
    			head="Otomi Helm",
    			neck="Flame Gorget",
    			ear1="Brutal Earring",
    			ear2="Moonshade Earring",
    			body="Gorney Haubert +1",
    			hands="Mikinaak Gauntlets",
    			ring2="Rajas Ring",
    			ring1="Pyrosoul Ring",
    			back="Rancorous Mantle",
    			waist="Flame Belt",
    			legs="Scuff. Cosciales",
    			feet="Huginn Gambieras"}
    	sets.WS.Drakesbane.MidACC = set_combine(sets.WS.Drakesbane,{
    			ammo="Ginsen",
    			head="Yaoyotl Helm",
    			back="Letalis Mantle",})
    	sets.WS.Drakesbane.HighACC = set_combine(sets.WS.Drakesbane.MidACC,{
    			legs="Miki. Cuisses"})
    
    	-- Drakesbane(Low Level Content) Set --
    	sets.WS.Drakesbane.LowContent = set_combine(sets.WS.Drakesbane,{})
    	-- Drakesbane(High Attack) Set --
    	sets.WS.Drakesbane.HighATT = set_combine(sets.WS.Drakesbane,{})
    
    	sets.WS.Stardiver = {ammo="Thew Bomblet",
    			head="Otomi Helm",
    			neck="Shadow Gorget",
    			ear1="Brutal Earring",
    			ear2="Moonshade Earring",
    			body="Gorney Haubert +1",
    			hands="Mikinaak Gauntlets",
    			ring2="Rajas Ring",
    			ring1="Pyrosoul Ring",
    			back="Buquwik Cape",
    			waist="Shadow Belt",
    			legs="Scuff. Cosciales",
    			feet="Mikinaak Greaves"}
    	sets.WS.Stardiver.MidACC = set_combine(sets.WS.Stardiver,{})
    	sets.WS.Stardiver.HighACC = set_combine(sets.WS.Stardiver.MidACC,{})
    
    	-- Stardiver(High Attack) Set --
    	sets.WS.Stardiver.HighATT = set_combine(sets.WS.Stardiver,{})
    	
    	sets.WS["Camlann's Torment"] = {ammo="Thew Bomblet",
    			head="Otomi Helm",
    			neck="Breeze Gorget",
    			ear1="Brutal Earring",
    			ear2="Moonshade Earring",
    			body="Phorcys Korazin",
    			hands="Mikinaak Gauntlets",
    			ring2="Spiral Ring",
    			ring1="Pyrosoul Ring",
    			back="Buquwik Cape",
    			waist="Caudata Belt",
    			legs="Scuff. Cosciales",
    			feet="Ejekamal Boots"}
    	sets.WS["Camlann's Torment"].MidACC = set_combine(sets.WS.Stardiver,{})
    	sets.WS["Camlann's Torment"].HighACC = set_combine(sets.WS.Stardiver.MidACC,{})
    	
    	
    	sets.WS["Sonic Thrust"] = {ammo="Thew Bomblet",
    			head="Otomi Helm",
    			neck="Ganesha's Mala",
    			ear1="Brutal Earring",
    			ear2="Moonshade Earring",
    			body="Phorcys Korazin",
    			hands="Mikinaak Gauntlets",
    			ring2="Spiral Ring",
    			ring1="Pyrosoul Ring",
    			back="Buquwik Cape",
    			waist="Caudata Belt",
    			legs="Scuff. Cosciales",
    			feet="Ejekamal boots"}
    	sets.WS["Sonic Thrust"].MidACC = set_combine(sets.WS.Stardiver,{})
    	sets.WS["Sonic Thrust"].HighACC = set_combine(sets.WS.Stardiver.MidACC,{})
    	
    	sets.WS.Geirskogul = {ammo="Thew Bomblet",
    			head="Otomi Helm",
    			neck="Snow Gorget",
    			ear1="Brutal Earring",
    			ear2="Moonshade Earring",
    			body="Phorcys Korazin",
    			hands="Mikinaak Gauntlets",
    			ring2="Rajas Ring",
    			ring1="Pyrosoul Ring",
    			back="Atheling Cape",
    			waist="Snow Belt",
    			legs="Scuff. Cosciales",
    			feet="Ejekamal Boots"}
    	sets.WS.Geirskogul.MidACC = set_combine(sets.WS.Geirskogul,{})
    	sets.WS.Geirskogul.HighACC = set_combine(sets.WS.Geirskogul.MidACC,{})
    	
    	
    
    	-- JA Sets --
    	sets.JA = {}
    	sets.JA.Jump = {
    			ammo="Ginsen",
    			head="Otomi Helm",
    			neck="Ganesha's Mala",
    			ear1="Brutal Earring",
    			ear2="Tripudio Earring",
    			body="Xaddi Mail",
    			hands="Xaddi Gauntlets",
    			ring1="K'ayres Ring",
    			ring2="Rajas Ring",
    			back="Atheling Mantle",
    			waist="Windbuffet Belt",
    			legs="Lncr. Cuissots +2",
    			feet="Huginn Gambieras"}
    	sets.JA.Jump.MidACC = set_combine(sets.JA.Jump,{
    			head="Yaoyotl Helm",
    			ear1="Steelflash Earring",
    			ear2="Bladeborn Earring",
    			back="Letalis Mantle",
    			waist="Anguinus Belt",})
    	sets.JA.Jump.HighACC = set_combine(sets.JA.Jump.MidACC,{
    			neck="Iqabi Necklace",
    			body="Miki. Breastplate",
    			legs="Miki. Cuisses"})
    
    	sets.JA["High Jump"] = set_combine(sets.JA.Jump,{legs="Wyrm Brais +2"})
    	sets.JA["High Jump"].MidACC = set_combine(sets.JA.Jump.MidACC,{})
    	sets.JA["High Jump"].HighACC = set_combine(sets.JA.Jump.HighACC,{})
    
    	sets.JA["Spirit Jump"] = set_combine(sets.JA.Jump,{
    			feet="Lncr. Schynbld. +2"})
    	sets.JA["Spirit Jump"].MidACC = set_combine(sets.JA["Spirit Jump"],{
    			head="Yaoyotl Helm",
    			ear1="Steelflash Earring",
    			ear2="Bladeborn Earring",
    			hands="Xaddi Gauntlets",
    			back="Letalis Mantle",
    			waist="Anguinus Belt"})
    	sets.JA["Spirit Jump"].HighACC = set_combine(sets.JA["Spirit Jump"].MidACC,{
    			body="Miki. Breastplate",
    			legs="Miki. Cuisses",
    			neck="Iqabi Necklace"})
    
    	sets.JA["Soul Jump"] = set_combine(sets.JA.Jump,{legs="Lancer's cuissots +2"})
    	sets.JA["Soul Jump"].MidACC = set_combine(sets.JA.Jump.MidACC,{})
    	sets.JA["Soul Jump"].HighACC = set_combine(sets.JA.Jump.HighACC,{})
    
    	sets.JA.Angon = {ammo="Angon",ear1="Dragoon's Earring",hands="Pteroslaver Finger Gauntlets"}
    	sets.JA["Ancient Circle"] = {"Vishap Brais"}
    	sets.JA['Call Wyvern'] = {body="Pteroslaver Mail"}
    	sets.JA['Spirit Surge'] = {body="Pteroslaver Mail"}
    	sets.JA['Spirit Link'] = {head="Drachen Armet",
    	hands="Lncr. Vmbrc. +2",
    	feet="Pteroslaver Greaves"}
    
    	sets.Pet = {}
    	sets.Pet.WyvernHP = {
    			head="Pteroslaver Armet",
    			neck="Lancer's Torque",
    			body="Wyvern Mail",
    			back="Updraft Mantle",
    			ear1="Dragoon's Earring",
    			ear2="Onieros earring",
    			ring1="Kunaji ring",
    			waist="Glassblower's Belt",
    			legs="Vishap Brais",
    			feet="Pteroslaver Greaves"}
    
    	sets.JA["Spirit Link"] = set_combine(sets.Pet.WyvernHP,{head="Drachen Armet",hands="Lncr. Vmbrc. +2",feet="Pteroslaver Greaves"})
    	sets.Pet["Restoring Breath"] = set_combine(sets.Pet.WyvernHP)
    	sets.Pet["Smiting Breath"] = set_combine(sets.Pet.WyvernHP)
    	sets.Pet["Steady Wing"] = set_combine(sets.Pet.WyvernHP)
    
    	-- Healing Breath Trigger --
    	sets.HealingBreathTrigger = set_combine(sets.Pet.WyvernHP,{
    			head="Drachen Armet",
    			body="Gorney Haubert +1",
    			hands="Xaddi Gauntlets",
    			ring1="K'ayres Ring",
    			ring2="Meridian Ring",
    			back="Strendu Mantle",
    			legs="Osmium Cuisses",
    			feet="Gorney Sollerets +1"})
    
    	-- Waltz Set --
    	sets.Waltz = {}
    
    	sets.Precast = {}
    	-- Fastcast Set --
    	sets.Precast.FastCast = {ear1="Loquac. Earring",head="Cizin Helm +1",
    			legs="Enif Cosciales",ring1="Prolix ring",hands="Buremte Gloves"}
    
    	sets.Midcast = {}
    	-- Magic Haste Set --
    	sets.Midcast.Haste = set_combine(sets.PDT,{})
    end
    
    function pretarget(spell,action)
    	if (spell.type:endswith('Magic') or spell.type == 'BardSong' or spell.type == 'Ninjutsu') and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
    		cancel_spell()
    		send_command('input /item "Echo Drops" <me>')
    	elseif spell.english == "Spirit Jump" and not pet.isvalid then -- Change Spirit Jump To Jump If Wyvern Is Not Present --
    		cancel_spell()
    		send_command('Jump')
    	elseif spell.english == "Soul Jump" and not pet.isvalid then -- Change Soul Jump To High Jump If Wyvern Is Not Present --
    		cancel_spell()
    		send_command('HighJump')
    	elseif spell.english == "Dismiss" and pet.hpp < 100 then -- Cancel Dismiss If Wyvern's HP Is Under 100% --
    		cancel_spell()
    		add_to_chat(123, spell.english .. ' Canceled: [' .. pet.hpp .. ']')
    		return
    	elseif spell.english =="Call Wyvern" and pet.isvalid then -- Change Call Wyvern To Dismiss If Wyvern Is Present --
    		cancel_spell()
    		send_command('Dismiss')
    	elseif spell.english == "Berserk" and buffactive.Berserk then -- Change Berserk To Aggressor If Berserk Is On --
    		cancel_spell()
    		send_command('Aggressor')
    	elseif spell.english == "Seigan" and buffactive.Seigan then -- Change Seigan To Third Eye If Seigan Is On --
    		cancel_spell()
    		send_command('ThirdEye')
    	elseif spell.type == "WeaponSkill" and spell.target.distance > target_distance and player.status == 'Engaged' then -- Cancel WS If You Are Out Of Range --
    		cancel_spell()
    		add_to_chat(123, spell.name..' Canceled: [Out of Range]')
    		return
    	end
    end
    
    function precast(spell,action)
    	if midaction() or pet_midaction() then
    		cancel_spell()
    		return
    	end
    	if spell.english == 'Ranged' then
    		equip({ammo="Pebble"})
    	elseif spell.type == "WeaponSkill" then
    		if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It --
    			cancel_spell()
    			add_to_chat(123,'Unable To Use WeaponSkill: [Disengaged]')
    			return
    		else
    			equipSet = sets.WS
    			if equipSet[spell.english] then
    				equipSet = equipSet[spell.english]
    			end
    			if equipSet[AccArray[AccIndex]] then
    				equipSet = equipSet[AccArray[AccIndex]]
    			end
    			if equipSet[AttArray[AttIndex]] then
    				equipSet = equipSet[AttArray[AttIndex]]
    			end
    			if spell.english == "Drakesbane" and string.find(spell.target.name,'Dynamis Lord') then -- Equip Phorcys Korazin When You Use Drakesbane On DL & ADL --
    				equipSet = set_combine(equipSet,{body="Phorcys Korazin"})
    			end
    			equip(equipSet)
    		end
    	elseif spell.type == "JobAbility" then
    		equipSet = sets.JA
    		if equipSet[spell.english] then
    			equipSet = equipSet[spell.english]
    		end
    		if equipSet[AccArray[AccIndex]] then
    			equipSet = equipSet[AccArray[AccIndex]]
    		end
    		if spell.english == "High Jump" and NM_For_Brais:contains(spell.target.name) and Brais == 'ON' then -- Use Vishap Brais +1 Toggle To Equip Vishap Brais +1 For High Jump --
    			equipSet = set_combine(equipSet,{legs="Vishap Brais"})
    		end
    		equip(equipSet)
    	elseif spell.type:endswith('Magic') or spell.type == 'Ninjutsu' or spell.type == 'BardSong' then
    		if buffactive.silence or spell.target.distance > 16+target_distance then
    			cancel_spell()
    			add_to_chat(123, spell.name..' Canceled: [Silenced or Out of Casting Range]')
    			return
    		else
    			if string.find(spell.english,'Utsusemi') then
    				if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
    					cancel_spell()
    					add_to_chat(123,'Utsusemi Canceled: [3+ Images]')
    					return
    				else
    					equip(sets.Precast.FastCast)
    				end
    			else
    				equip(sets.Precast.FastCast)
    			end
    		end
    	elseif spell.type == "Waltz" then
    		refine_waltz(spell,action)
    		equip(sets.Waltz)
    	elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
    		cast_delay(0.2)
    		send_command('cancel Sneak')
    	elseif spell.type == "PetCommand" then
    		equip(sets.Pet[spell.english])
    	end
    	if Twilight == 'Twilight' then
    		equip(sets.Twilight)
    	end
    end
    
    function midcast(spell,action)
    	if spell.english == 'Ranged' then
    		equip({ammo="Pebble"})
    	elseif spell.type:endswith('Magic') or spell.type == 'BardSong' or spell.type == 'Ninjutsu' then
    		if string.find(spell.english,'Utsusemi') then
    			if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)']) then
    				send_command('@wait 1.7;cancel Copy Image*')
    			end
    			equip(sets.Midcast.Haste)
    		elseif spell.english == 'Monomi: Ichi' then
    			if buffactive['Sneak'] then
    				send_command('@wait 1.7;cancel sneak')
    			end
    			equip(sets.Midcast.Haste)
    		elseif HB_Mage_SubJob:contains(player.sub_job) and player.hpp < 61 and pet.isvalid then
    			equip(sets.HealingBreathTrigger)
    		elseif HB_DD_SubJob:contains(player.sub_job) and player.hpp < 34 and pet.isvalid then
    			equip(sets.HealingBreathTrigger)
    		else
    			equip(sets.Midcast.Haste)
    		end
    	end
    end
    
    function aftercast(spell,action)
    	if not spell.interrupted then
    		if spell.type == "WeaponSkill" then
    			send_command('wait 0.2;gs c TP')
    		elseif string.find(spell.english,'Jump') then
    			send_command('wait 0.2;gs c TP')
    		elseif spell.english == "Angon" then -- Angon Timer/Countdown --
    			timer_angon()
    			send_command('wait 80;input /echo '..spell.name..': [WEARING OFF IN 10 SEC.];wait 10;timers delete "Angon";input /p '..spell.name..': [OFF]')
    		elseif spell.english == "Ancient Circle" then -- Ancient Circle Countdown --
    			send_command('wait 260;input /echo '..spell.name..': [WEARING OFF IN 10 SEC.];wait 10;input /echo '..spell.name..': [OFF]')
    		end
    	elseif not string.find(spell.english,'Healing Breath') then
    		status_change(player.status)
    	end
    end
    
    function status_change(new,old)
    	if Armor == 'PDT' then
    		equip(sets.PDT)
    	elseif Armor == 'MDT' then
    		equip(sets.MDT)
    	elseif new == 'Engaged' then
    		equipSet = sets.TP
    		if Armor == 'Hybrid' and equipSet["Hybrid"] then
    			equipSet = equipSet["Hybrid"]
    		end
    		if equipSet[player.equipment.main] then
    			equipSet = equipSet[player.equipment.main]
    		end
    		if equipSet[AccArray[AccIndex]] then
    			equipSet = equipSet[AccArray[AccIndex]]
    		end
    		if buffactive["Aftermath: Lv.3"] and equipSet["AM3"] then
    			if Rancor == 'ON' then -- Default Rancor Toggle Is Rancorous Mantle --
    				equipSet = set_combine(equipSet["AM3"],sets.TP.Rancor)
    			else -- Use Rancor Toggle For Atheling Mantle --
    				equipSet = equipSet["AM3"]
    			end
    		end
    		
    		equip(equipSet)
    	else
    		equip(sets.Idle[IdleArray[IdleIndex]])
    	end
    	if Twilight == 'Twilight' then
    		equip(sets.Twilight)
    	end
    end
    
    function buff_change(buff,gain)
            buff = string.lower(buff)
            if buff == "aftermath: lv.3" then -- AM3 Timer --
                    if gain then
                            send_command('timers create "Aftermath: Lv.3" 180 down;wait 120;input /echo Aftermath: Lv.3 [WEARING OFF IN 60 SEC.];wait 30;input /echo Aftermath: Lv.3 [WEARING OFF IN 30 SEC.];wait 20;input /echo Aftermath: Lv.3 [WEARING OFF IN 10 SEC.]')
                    else
                            send_command('timers delete "Aftermath: Lv.3"')
                            add_to_chat(123,'AM3: [OFF]')
                    end
    	elseif buff == 'weakness' then -- Weakness Timer --
    		if gain then
    			send_command('timers create "Weakness" 300 up')
    		else
    			send_command('timers delete "Weakness"')
    		end
    	end
    	if buff == "sleep" and gain and player.hp > 200 and player.status == "Engaged" then -- Equip Berserker's Torque When You Are Asleep & Have 200+ HP --
    		equip({neck="Berserker's Torque"})
    	else
    		if not midaction() and not pet_midaction() then
    			status_change(player.status)
    		end
    	end
    end
    
    function pet_midcast(spell,action)
    	if string.find(spell.english,'Healing Breath') then
    		equip(sets.Pet["Restoring Breath"])
    	end
    end
    
    function pet_aftercast(spell,action)
    	status_change(player.status)
    end
    
    function pet_change(pet,gain)
    	status_change(player.status)
    end
    
    -- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
    function self_command(command)
    	if command == 'C1' then -- Accuracy Level Toggle --
    		AccIndex = (AccIndex % #AccArray) + 1
    		add_to_chat(158,'Accuracy Level: ' .. AccArray[AccIndex])
    		status_change(player.status)
    	elseif command == 'C9' then -- Attack Toggle --
    		AttIndex = (AttIndex % #AttArray) + 1
    		add_to_chat(158,'Attack Level: '..AttArray[AttIndex])
    		status_change(player.status)
    	elseif command == 'C5' then -- Auto Update Gear Toggle --
    		status_change(player.status)
    		add_to_chat(158,'Auto Update Gear')
    	elseif command == 'C2' then -- Hybrid Toggle --
    		if Armor == 'Hybrid' then
    			Armor = 'None'
    			add_to_chat(123,'Hybrid Set: [Unlocked]')
    		else
    			Armor = 'Hybrid'
    			add_to_chat(158,'Hybrid Set: '..AccArray[AccIndex])
    		end
    		status_change(player.status)
    	elseif command == 'C7' then -- PDT Toggle --
    		if Armor == 'PDT' then
    			Armor = 'None'
    			add_to_chat(123,'PDT Set: [Unlocked]')
    		else
    			Armor = 'PDT'
    			add_to_chat(158,'PDT Set: [Locked]')
    		end
    		status_change(player.status)
    	elseif command == 'C15' then -- MDT Toggle --
    		if Armor == 'MDT' then
    			Armor = 'None'
    			add_to_chat(123,'MDT Set: [Unlocked]')
    		else
    			Armor = 'MDT'
    			add_to_chat(158,'MDT Set: [Locked]')
    		end
    		status_change(player.status)
    	elseif command == 'C16' then -- Rancor Toggle --
    		if Rancor == 'ON' then
    			Rancor = 'OFF'
    			add_to_chat(123,'Rancor: [OFF]')
    		else
    			Rancor = 'ON'
    			add_to_chat(158,'Rancor: [ON]')
    		end
    		status_change(player.status)
    	elseif command == 'C10' then -- Vishap Brais +1 Toggle --
    		if Brais == 'ON' then
    			Brais = 'OFF'
    			add_to_chat(123,'Vishap Brais +1: [OFF]')
    		else
    			Brais = 'ON'
    			add_to_chat(158,'Vishap Brais +1: [ON]')
    		end
    		status_change(player.status)
    	elseif command == 'C17' then -- SAM Roll Toggle --
    		if Samurai_Roll == 'ON' then
    			Samurai_Roll = 'OFF'
    			add_to_chat(123,'SAM Roll: [OFF]')
    		else
    			Samurai_Roll = 'ON'
    			add_to_chat(158,'SAM Roll: [ON]')
    		end
    		status_change(player.status)
    	elseif command == 'C3' then -- Twilight Toggle --
    		if Twilight == 'Twilight' then
    			Twilight = 'None'
    			add_to_chat(123,'Twilight Set: [Unlocked]')
    		else
    			Twilight = 'Twilight'
    			add_to_chat(158,'Twilight Set: [locked]')
    		end
    		status_change(player.status)
    	elseif command == 'C8' then -- Distance Toggle --
    		if player.target.distance then
    			target_distance = math.floor(player.target.distance*10)/10
    			add_to_chat(158,'Distance: '..target_distance)
    		else
    			add_to_chat(123,'No Target Selected')
    		end
    	elseif command == 'C6' then -- Idle Toggle --
    		IdleIndex = (IdleIndex % #IdleArray) + 1
    		add_to_chat(158,'Idle Set: ' .. IdleArray[IdleIndex])
    		status_change(player.status)
    	elseif command == 'TP' then
    		add_to_chat(158,'TP Return: ['..tostring(player.tp)..']')
    	elseif command:match('^SC%d$') then
    		send_command('//' .. sc_map[command])
    	end
    end
    
    function timer_angon()
    	local duration = 90
    	send_command('timers create "Angon" '..tostring(duration)..' down')
    end
    
    function refine_waltz(spell,action)
    	if spell.type ~= 'Waltz' then
    		return
    	end
    
    	if spell.name == "Healing Waltz" or spell.name == "Divine Waltz" or spell.name == "Divine Waltz II" then
    		return
    	end
    
    	local newWaltz = spell.english
    	local waltzID
    
    	local missingHP
    
    	if spell.target.type == "SELF" then
    		missingHP = player.max_hp - player.hp
    	elseif spell.target.isallymember then
    		local target = find_player_in_alliance(spell.target.name)
    		local est_max_hp = target.hp / (target.hpp/100)
    		missingHP = math.floor(est_max_hp - target.hp)
    	end
    
    	if missingHP ~= nil then
    		if player.sub_job == 'DNC' then
    			if missingHP < 40 and spell.target.name == player.name then
    				add_to_chat(123,'Full HP!')
    				cancel_spell()
    				return
    			elseif missingHP < 150 then
    				newWaltz = 'Curing Waltz'
    				waltzID = 190
    			elseif missingHP < 300 then
    				newWaltz = 'Curing Waltz II'
    				waltzID = 191
    			else
    				newWaltz = 'Curing Waltz III'
    				waltzID = 192
    			end
    		else
    			return
    		end
    	end
    
    	local waltzTPCost = {['Curing Waltz'] = 20, ['Curing Waltz II'] = 35, ['Curing Waltz III'] = 50, ['Curing Waltz IV'] = 65, ['Curing Waltz V'] = 80}
    	local tpCost = waltzTPCost[newWaltz]
    
    	local downgrade
    
    	if player.tp < tpCost and not buffactive.trance then
    
    		if player.tp < 20 then
    			add_to_chat(123, 'Insufficient TP ['..tostring(player.tp)..']. Cancelling.')
    			cancel_spell()
    			return
    		elseif player.tp < 35 then
    			newWaltz = 'Curing Waltz'
    		elseif player.tp < 50 then
    			newWaltz = 'Curing Waltz II'
    		elseif player.tp < 65 then
    			newWaltz = 'Curing Waltz III'
    		elseif player.tp < 80 then
    			newWaltz = 'Curing Waltz IV'
    		end
    
    		downgrade = 'Insufficient TP ['..tostring(player.tp)..']. Downgrading to '..newWaltz..'.'
    	end
    
    	if newWaltz ~= spell.english then
    		send_command('@input /ja "'..newWaltz..'" '..tostring(spell.target.raw))
    		if downgrade then
    			add_to_chat(158, downgrade)
    		end
    		cancel_spell()
    		return
    	end
    
    	if missingHP > 0 then
    		add_to_chat(158,'Trying to cure '..tostring(missingHP)..' HP using '..newWaltz..'.')
    	end
    end
    
    function find_player_in_alliance(name)
    	for i,v in ipairs(alliance) do
    		for k,p in ipairs(v) do
    			if p.name == name then
    				return p
    			end
    		end
    	end
    end
    
    function sub_job_change(newSubjob, oldSubjob)
    	select_default_macro_book()
    end
    
    function set_macro_page(set,book)
    	if not tonumber(set) then
    		add_to_chat(123,'Error setting macro page: Set is not a valid number ('..tostring(set)..').')
    		return
    	end
    	if set < 1 or set > 10 then
    		add_to_chat(123,'Error setting macro page: Macro set ('..tostring(set)..') must be between 1 and 10.')
    		return
    	end
    
    	if book then
    		if not tonumber(book) then
    			add_to_chat(123,'Error setting macro page: book is not a valid number ('..tostring(book)..').')
    			return
    		end
    		if book < 1 or book > 20 then
    			add_to_chat(123,'Error setting macro page: Macro book ('..tostring(book)..') must be between 1 and 20.')
    			return
    		end
    		send_command('@input /macro book '..tostring(book)..';wait .1;input /macro set '..tostring(set))
    	else
    		send_command('@input /macro set '..tostring(set))
    	end
    end
    
    function select_default_macro_book()
    	-- Default macro set/book
    	if player.sub_job == 'SAM' then
    		set_macro_page(10, 2)
    	elseif player.sub_job == 'DNC' then
    		set_macro_page(5, 5)
    	elseif player.sub_job == 'WAR' then
    		set_macro_page(10, 2)
    	elseif player.sub_job == 'WHM' then
    		set_macro_page(10, 2)
    	elseif player.sub_job == 'NIN' then
    		set_macro_page(10, 2)
    	else
    		set_macro_page(10, 2)
    	end
    end

  11. #2331
    Relic Shield
    Join Date
    Sep 2007
    Posts
    1,740
    BG Level
    6
    FFXI Server
    Sylph

    Ello, currently need a little assistance with a WHM Lua I've been using for a while, which is Motenten's. I recently obtained Yagrush and am trying to get the gearswap to recognize AM1-3 and create a timer. I was looking through his Utility lua and noticed the code to do such, but was unable to get gearswap to recognize it >.>
    Pretty much just trying to get it to create a timer for:
    AM1: 90 Seconds
    AM2: 120 Seconds
    AM3: 270 Seconds.


    Here's a link to the .lua.
    http://pastebin.com/485hsBvn
    Any help would be appreciated

  12. #2332
    Sea Torques
    Join Date
    Jul 2010
    Posts
    516
    BG Level
    5
    FFXI Server
    Bahamut

    Quote Originally Posted by Skeelo View Post
    ...
    Code:
    function aftercast(spell,action)
    ...
    elseif string.find(spell.english,'Jump') then
    send_command('wait 0.2;gs c TP')
    ...
    Code:
    elseif command == 'TP' then
        add_to_chat(158,'TP Return: ['..tostring(player.tp)..']')
    end
    At no point in your file do you specify that your tp armor should be equipped after using jump. All you do is tell gearswap to tell windower to tell gearswap what your tp is.

  13. #2333
    RIDE ARMOR
    Join Date
    Apr 2014
    Posts
    22
    BG Level
    1

    Kinematics GEO.LUA is missing enfeebling Rules

    I've had success b4 coping nuking/enfeebling paragraphs across lua's before however for this geo.lua, that i put in a int/mnd enfeebling spell gearset from my sch lua into the geo one but acts like its not there after reloading properly. ; ; any ideas?


    ::edit::

    this worked::: BUT the midcast fastrecast set needed to be removed.. i thought the midcast.fastrecast set only kicked on non-defined spells like haste; but its kicking in on my enfeebling magic bucking the enfeebling set off. all-in-all it helps my situation but not properly how you guys could make it work.

    sets.precast.FC['Enfeebling Magic'] = set_combine(sets.precast.FC, {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Impatiens",
    head="Artsieq Hat",neck="Stoicheion Medal",ear1="Psystorm Earring",ear2="Lifestorm Earring",
    body="Artsieq Jubbah",hands="Yaoyotl Gloves",ring1="perception Ring",ring2="Sangoma Ring",
    back="Refraction Cape",waist="Demonry Sash",legs="artsieq hose",feet="Artsieq boots"})

    sets.midcast.FastRecast = {
    head="Haruspex hat",ear2="Loquacious Earring",
    body="Artsieq Jubbah",hands="Otomi Gloves",ring1="Prolix Ring",
    back="Swith Cape",waist="Goading Belt",legs="Artsieq Hose",feet="Artsieq Boots"}

  14. #2334
    Melee Summoner
    Join Date
    Apr 2014
    Posts
    28
    BG Level
    1

    Woke up this morning and all my time specific gear isn't equipping. I use Motenten's lib files.

    Also have windower watching game time so it triggers the necessary gear changes. Help

  15. #2335
    Relic Weapons
    Join Date
    Aug 2010
    Posts
    335
    BG Level
    4
    FFXI Server
    Asura

    Been messing around with code that activates Warrior's Charge before a weaponskill. It works but it's flawed... I'm trying to do something similar as Presto and Steps.

    Anyone got any idea how to better execute this? Also is there a way to not active a JA when on cool down?

    Code:
    	if spell.type == 'WeaponSkill' then 
    		if (not buffactive['Warrior\'s Charge']) then
    			cancel_spell()
    			send_command('input /ja "Warrior\'s Charge" <me>;')
    			if strength_ws:contains(spell.name) then
    				equip(--equip gear--)
    			elseif crithit_ws:contains(spell.name) then
    				equip(--equip gear--)
    			end			
    			send_command('input /ws "'..spell.name..'" <t>;')
    		else
    			if strength_ws:contains(spell.name) then
    				equip(--equip gear--)
    			elseif crithit_ws:contains(spell.name) then
    				equip(--equip gear--)
    			end
    		end
    	end

  16. #2336
    E. Body
    Join Date
    Sep 2008
    Posts
    2,055
    BG Level
    7

    So I'm basically clueless on how this works since I only recently switched to Gearswap (and haven't had much time to play on top of that), but I've been getting this error when I try casting Gekka or Yain.

    Lua error (runtime) - gearswap/helper_functions.lua:520: attempt to index field '?' (a nil value)

    Not that it really matters since I probably won't be using these spells much, just bothers my OCD to have that pop up whenever I do cast those.

  17. #2337
    Relic Weapons
    Join Date
    Aug 2010
    Posts
    335
    BG Level
    4
    FFXI Server
    Asura

    Quote Originally Posted by Kincard View Post
    So I'm basically clueless on how this works since I only recently switched to Gearswap (and haven't had much time to play on top of that), but I've been getting this error when I try casting Gekka or Yain.

    Lua error (runtime) - gearswap/helper_functions.lua:520: attempt to index field '?' (a nil value)

    Not that it really matters since I probably won't be using these spells much, just bothers my OCD to have that pop up whenever I do cast those.
    Looks like an issue with Gearswap and not necessarily your code.

  18. #2338
    BG Content
    Join Date
    Jul 2007
    Posts
    22,375
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Yeah, it's because I never added Gekka/Yain ichi to the Ninjutsu table, but now I have and if you re-run launcher it should be fixed.

  19. #2339
    Banned.

    Join Date
    Jul 2014
    Posts
    1
    BG Level
    0

    Hey if there is someone that could help me with some gearswap question i would be thankful

  20. #2340
    RIDE ARMOR
    Join Date
    Jul 2014
    Posts
    19
    BG Level
    1

    Hi everyone,

    I'm new at Gearswap, so please be patient lol.
    I managed to take my first steps using Gearswap today, and i'm well on my way to figuring out most of the basics. (thanks to Feary!)

    However, I've got a question to run by you guys (duh, why else would I be here).
    This goes back to Autoexec, and me trying to consolidate most of the Autoexec snippets I use into Gearswap.

    This is what I've got so far in Autoexec -> http://pastebin.com/LK4ib81e

    Now there's 2 problems with the above:
    1.) It doesn't work anymore, probably because I'm trying to get too much out of it.
    2.) When it did work, it kept going off no matter what zone I was in. I would need it to only alarm me in Dynamis-Qufim.

    I know that there has to be a way using Gearswap to do this, I just haven't been able to figure it out.
    Yes, I realize I'm asking for a lot with something like this, but I was hoping one of you guys would know how to get it fixed with Gearswap?
    Please help me making my Dynamis farming more fun, I'd be so grateful!

    Thanks in advance! ~

Page 117 of 302 FirstFirst ... 67 107 115 116 117 118 119 127 167 ... LastLast

Similar Threads

  1. Replies: 6547
    Last Post: 2014-07-08, 22:45