Scholar Gearswap .lua

Language: JP EN DE FR
New Items
2023-11-19
users online
Forum » FFXI » Jobs » Scholar » Scholar Gearswap .lua
Scholar Gearswap .lua
First Page 2 3 4 5
 Asura.Yamoman
Offline
Server: Asura
Game: FFXI
user: Yamoman
Posts: 20
By Asura.Yamoman 2016-08-21 12:11:55
Link | Quote | Reply
 
Thx, guess i'll wait to see if Siveria updates his files, Guess it's back to old school vanilla macros to shoot off scs.
 Asura.Krystela
Offline
Server: Asura
Game: FFXI
Posts: 334
By Asura.Krystela 2016-08-21 12:56:45
Link | Quote | Reply
 
Ragnarok.Flippant said: »
Your aftercast is equipping sets.aftercast.Defense, which has both Terra's Staff and Sors Shield. Sub is equipped after main, so this would remove your Terra's Staff. You don't hit any of your other rules unless your MP is less than 80%, you have Sublimation: Activated on, you're in CP mode, or you're in town. Should be fine if you just add a grip or sub=empty

By the way, your status_change function equips nothing unless you meet any of the aforementioned conditions. I also recommend cleaning up your aftercast/status_change:
Code
function aftercast(spell,action)
    status_change(player.status)
end

function status_change(new,tab,old)
    if new == 'Idle' then
        if player.mpp>80 then
            equip(sets.aftercast.Defense)
            if Town:contains(world.zone) then
                equip(sets.aftercast.Town)
            end 
        else    
            equip(sets.aftercast.Idle)
            if player.mpp<50 then
                equip({waist="Fucho-no-obi"})
            end
        end
        if Capacity == 'ON' then
            equip({back="Mecisto. Mantle"})
        end
        if buffactive['Sublimation: Activated'] then
            equip(sets.aftercast.Sublimation) 
        end
    elseif new == 'Resting' then
        equip(sets.resting) 
    end
end
Oh crap, this is smart. I didn't know you could pretty much empty out aftercast and just put all in status change. (I am a self learner, not a programmer)

I will sure do that to my luas to make them more simple.

Thanks flippant <3

PS: Ive been working on them to be more all user friendly, so people dont have to go change gears in the rules. Those were luas intented for me and me only, but people asked for them so I made them public. Always looking to improve them, so feedbacks and tricks are welcomed and awesome.
necroskull Necro Bump Detected! [46 days between previous and next post]
 Valefor.Gorns
Offline
Server: Valefor
Game: FFXI
user: Gorns
Posts: 159
By Valefor.Gorns 2016-10-06 11:35:05
Link | Quote | Reply
 
Asura.Yamoman said: »
Got some issues, i added all the files in Silvxiii/gearswap-scholarFFxi to my GS folder and just kept my SCH_gear should work no problems i assume,i load it says loaded succesfully but when i cast any spell ie sneak, i get
Gearswap lua runtime rror: gearswap/flow.lua:336
Gearswap has detected an error in the user function aftercast:
,,,, files x86)windower4/addons........../sch.lua:928: attemp to index global 'soloSC' (a nil value) error message
also did /console gs solosc1 fusion to see if working got same error cept last line was get_current_'strategem_count' (a nil value)
where did i mess up? thx

Hi,

Did you get any feedback on this problem ?
I got the same and dont know how to fix it.

Many thx !
Offline
By DanielH 2016-10-06 12:16:13
Link | Quote | Reply
 
Valefor.Gorns said: »
Asura.Yamoman said: »
Got some issues, i added all the files in Silvxiii/gearswap-scholarFFxi to my GS folder and just kept my SCH_gear should work no problems i assume,i load it says loaded succesfully but when i cast any spell ie sneak, i get
Gearswap lua runtime rror: gearswap/flow.lua:336
Gearswap has detected an error in the user function aftercast:
,,,, files x86)windower4/addons........../sch.lua:928: attemp to index global 'soloSC' (a nil value) error message
also did /console gs solosc1 fusion to see if working got same error cept last line was get_current_'strategem_count' (a nil value)
where did i mess up? thx

Hi,

Did you get any feedback on this problem ?
I got the same and dont know how to fix it.

Many thx !

stratagem error is because line 160 in (SCH_soloSC.lua):
Code
local nbStrat = get_current_strategem_count()

should be:
Code
local nbStrat = getNbStratagems() 



Other ERROR you can avoid by changing Line 931 (sch.LUA):
Code
if (soloSC.active==true) and (spell.english==soloSC.step.spell or spell.english=='Immanence') then

to:
Code
if (soloSC ~= nil) and (soloSC.active==true) and (spell.english==soloSC.step.spell or spell.english=='Immanence') then
 Valefor.Gorns
Offline
Server: Valefor
Game: FFXI
user: Gorns
Posts: 159
By Valefor.Gorns 2016-10-07 04:10:14
Link | Quote | Reply
 
Many thanks Daniel !

So from now, I just have to edit the SCH.lua file with my equip set w/o making any changes to the other files ?
(asides of the lines dealing with stratagem recast like "fullRechargeTime = 5*48" to 5*33 when I'll unlock the 550 JP gifts)
 Lakshmi.Vadian
Offline
Server: Lakshmi
Game: FFXI
user: elii
Posts: 55
By Lakshmi.Vadian 2016-11-04 19:02:08
Link | Quote | Reply
 
So I notice in every GS code i look at, and i've only recently started trying to get GS setup with all my gear and stuff. But There's always a PDT, MDT, and sometimes and HybridDT section. I never see in the code that it notices you getting hit by X and it changing into that gear. I also noticed that when I use GS and i'm taking hits I don't swap into PDT, MDT, or HybridDT gear at all. How is this function supposed to work?
 Shiva.Hiep
Offline
Server: Shiva
Game: FFXI
user: Hiepo
Posts: 669
By Shiva.Hiep 2016-11-04 19:05:33
Link | Quote | Reply
 
Lakshmi.Vadian said: »
So I notice in every GS code i look at, and i've only recently started trying to get GS setup with all my gear and stuff. But There's always a PDT, MDT, and sometimes and HybridDT section. I never see in the code that it notices you getting hit by X and it changing into that gear. I also noticed that when I use GS and i'm taking hits I don't swap into PDT, MDT, or HybridDT gear at all. How is this function supposed to work?

Assuming that you're using mote's SCH GS, there's toggles for PDT, MDT, HybridDT sets. F10 puts you into PDT, F11 MDT, Alt F10 Kiting, and Alt F12 takes you off defense mode (puts you in idle mode set). You have to either manually hit these keys on your keyboard or make a macro (I forgot the macro way) to force you into these modes, GS doesn't auto detect a move/spell and swaps you into PDT or MDT as far as I know.
 Lakshmi.Vadian
Offline
Server: Lakshmi
Game: FFXI
user: elii
Posts: 55
By Lakshmi.Vadian 2016-11-04 19:11:47
Link | Quote | Reply
 
Shiva.Hiep said: »
Lakshmi.Vadian said: »
So I notice in every GS code i look at, and i've only recently started trying to get GS setup with all my gear and stuff. But There's always a PDT, MDT, and sometimes and HybridDT section. I never see in the code that it notices you getting hit by X and it changing into that gear. I also noticed that when I use GS and i'm taking hits I don't swap into PDT, MDT, or HybridDT gear at all. How is this function supposed to work?

Assuming that you're using mote's SCH GS, there's toggles for PDT, MDT, HybridDT sets. F10 puts you into PDT, F11 MDT, Alt F10 Kiting, and Alt F12 takes you off defense mode (puts you in idle mode set). You have to either manually hit these keys on your keyboard or make a macro (I forgot the macro way) to force you into these modes, GS doesn't auto detect a move/spell and swaps you into PDT or MDT as far as I know.


Ok, that makes a lot of sense then. Now i need to find a mote, lol.
 Shiva.Hiep
Offline
Server: Shiva
Game: FFXI
user: Hiepo
Posts: 669
By Shiva.Hiep 2016-11-04 19:15:07
Link | Quote | Reply
 
This is the one that I meant by mote's SCH GS.
https://github.com/Kinematics/GearSwap-Jobs/blob/master/SCH.lua
Offline
Posts: 87
By mrlooolz 2016-11-21 07:03:59
Link | Quote | Reply
 
Been following this close. How are the latest version of the lua's coming along. excited to take one and test it out.
necroskull Necro Bump Detected! [102 days between previous and next post]
 Carbuncle.Darkiori
Offline
Server: Carbuncle
Game: FFXI
user: Darkiori
Posts: 8
By Carbuncle.Darkiori 2017-03-02 22:52:18
Link | Quote | Reply
 
Ok, so I have this random lua i found, but it only has casting mode normal and resistant then something that says magic burst modes none single double locked and i have no idea what those mean... can someone help me change the modes to have them as casting normal, resistant, mb and mb resistant? idk how to bind them to the keys so that persay f10 is my "free nuke/resistant nuke" and f10 is "MB/resistant MB"
Code
    options.CastingModes = {'Normal', 'Resistant'}
    options.OffenseModes = {'None', 'Normal'}
    options.DefenseModes = {'Normal'}
    options.WeaponskillModes = {'Normal'}
    options.IdleModes = {'Normal', 'Refresh', 'PDT'}
    options.RestingModes = {'Normal'}
    options.PhysicalDefenseModes = {'PDT'}
    options.MagicalDefenseModes = {'MDT'}
    options.MagicBurstModes = {'None', 'Single', 'Double', 'Locked'}
    options.EnhancingModes = {'Potency', 'Duration'}

    state.OffenseMode = 'None'
    state.Defense.PhysicalMode = 'PDT'
    state.MagicBurstMode = 'None'
    state.EnhancingMode = 'Potency'

    gear.default.obi_waist = "Refoccilation Stone"

    send_command('bind ^= gs c cycle MagicBurst')
    send_command('bind != gs c cycle MagicBurst')
    send_command('bind ^` gs c cycle Enhancing')
    send_command('bind !` gs c cycle Enhancing')
 Bismarck.Kyaaadaa
Offline
Server: Bismarck
Game: FFXI
user: Kyaaadaa
Posts: 585
By Bismarck.Kyaaadaa 2017-03-03 04:36:38
Link | Quote | Reply
 
Takes this command at the beginning of your .lua.
Code
    
function user_setup()
state.CastingMode:options('Normal', 'Acc', 'MB1', 'MB2')
	send_command('bind f2 gs c set castingmode normal')
	send_command('bind f3 gs c set castingmode Acc')
	send_command('bind f4 gs c set castingmode MB1')
	send_command('bind f5 gs c set castingmode MB2')
	send_command('bind f6 gs equip sets.idle.kiting')
end


You had that bit at the bottom, but it was bound to other keys. This will make it f2, f3, etc.
Offline
Posts: 182
By Sammeh 2017-03-03 06:23:34
Link | Quote | Reply
 
Carbuncle.Darkiori said: »
i have no idea what those mean...

I may not be deciphering this correctly - but what I assume is basically set the next 2 spells to be in Magic Burst mode and then likely it has logic to go back to normal mode.

I have a logictech G11 keyboard which has 18 (x3) extra function keys - so I bind a quick perss to the 'gs c set castingmode MagicBurst' (or normal/macc and a storetp mode - because every good sch has an Occult accumen set right????).

Anyway I just manually toggle but the auto-swap back to 'normal' intrigues me. I wonder if a better option would be to combine that logic w/ some skillchain packet watching and auto-adjust if you're within the magic burst window. Oh if I'm bored enough this weekend I may just attempt this.
 Carbuncle.Darkiori
Offline
Server: Carbuncle
Game: FFXI
user: Darkiori
Posts: 8
By Carbuncle.Darkiori 2017-03-03 13:47:37
Link | Quote | Reply
 
Do i need to change something in this hook to make sure the lua does the MB set? or just in the beginning, also how do I name the sets for it to recognize it when i put in the equip

like is it

set.midcast.????? =
Code
-------------------------------------------------------------------------------------------------------------------
-- Customization hooks for idle and melee sets, after they've been automatically constructed.
-------------------------------------------------------------------------------------------------------------------

-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
    if spell.action_type == 'Magic' then
        if default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
            if world.weather_element == 'Light' then
                return 'CureWithLightWeather'
            end
        elseif spell.skill == 'Elemental Magic' and default_spell_map ~= 'ElementalEnfeeble' then
            if not lowTierNukes:contains(spell.english) then
                return 'HighTierNuke'
            end
        end
    end
end

function customize_idle_set(idleSet)
    if state.Buff.Sublimation then
        if state.IdleMode == 'Normal' then
            idleSet = set_combine(idleSet, sets.buff.FullSublimation)
        elseif state.IdleMode == 'PDT' then
            idleSet = set_combine(idleSet, sets.buff.PDTSublimation)
        end
    end

    return idleSet
end
 Bismarck.Snprphnx
Offline
Server: Bismarck
Game: FFXI
user: Snprphnx
Posts: 2691
By Bismarck.Snprphnx 2017-03-03 14:35:53
Link | Quote | Reply
 
Correct me if I'm wrong, but aren't the F1-F8 keys natively assigned to auto-target players or mobs. May not want to use those.
 Shiva.Spynx
Offline
Server: Shiva
Game: FFXI
user: auron86
Posts: 371
By Shiva.Spynx 2017-03-03 14:45:07
Link | Quote | Reply
 
I suggest you to put the magic burst logic in the job_post_midcast method that is always executed post the default one (handling the spellmap classes like HighTierNuke). Something like this will work and you won't have to make any changes to job_get_spell_map:
Code
	function job_post_midcast(spell, action, spellMap, eventArgs)
		-- Handle MB if elemental magic and any MB mode is set
		if spell.skill == 'Elemental Magic' and options.MagicBurstModes.value ~= 'None' then
			-- Equip correct MB gear based on CastingMode
			if options.CastingModes.value == 'Resistant' then
				equip(sets.magic_burst_resist)
			else
				equip(sets.magic_burst)
			end
		end
	end
 Carbuncle.Darkiori
Offline
Server: Carbuncle
Game: FFXI
user: Darkiori
Posts: 8
By Carbuncle.Darkiori 2017-03-03 16:56:08
Link | Quote | Reply
 
i dont seem to have that, or do i just add that? i might have to get another lua since this one might be missing stuff from what it looks like... is there a lua already that has what i'm talking about? or how do I post the lua i have on here?
 Shiva.Arislan
Offline
Server: Shiva
Game: FFXI
user: Arislan
Posts: 1052
By Shiva.Arislan 2017-03-03 19:02:38
Link | Quote | Reply
 
https://github.com/ArislanShiva/luas/blob/master/Arislan-SCH.lua
 Bismarck.Kyaaadaa
Offline
Server: Bismarck
Game: FFXI
user: Kyaaadaa
Posts: 585
By Bismarck.Kyaaadaa 2017-03-04 18:17:20
Link | Quote | Reply
 
Bismarck.Snprphnx said: »
Correct me if I'm wrong, but aren't the F1-F8 keys natively assigned to auto-target players or mobs. May not want to use those.
Some people don't like to, as they are used for targeting yourself, your party members, and nearest enemy, but other people don't really care. I don't mess with F1, but I do use F2-F5 for switching modes.
necroskull Necro Bump Detected! [41 days between previous and next post]
Offline
Posts: 74
By wick 2017-04-15 03:36:33
Link | Quote | Reply
 
fixed, carry on
necroskull Necro Bump Detected! [112 days between previous and next post]
 Asura.Kogasho
Offline
Server: Asura
Game: FFXI
user: kogasho
Posts: 50
By Asura.Kogasho 2017-08-05 13:33:04
Link | Quote | Reply
 

I was using a old SCH gearswap an apparently it hasnt been putting Relic equipment in slots for JAs Im looking for a new gearswap, does this GS equip the gear used for JAs? My old GS wouldnt equip Peda. M.Board +1 for focalization, +1 Pants for TR. It was a complete mess but my Nuking an buffing set work.

<GS NOOB :(
 Shiva.Arislan
Offline
Server: Shiva
Game: FFXI
user: Arislan
Posts: 1052
By Shiva.Arislan 2017-08-05 15:28:45
Link | Quote | Reply
 
AFAIK, everything works great.
 Asura.Kogasho
Offline
Server: Asura
Game: FFXI
user: kogasho
Posts: 50
By Asura.Kogasho 2017-08-05 17:50:20
Link | Quote | Reply
 
does it automatically equip my MB set when im going to MB or do i have to hit a Key to set it like how F10 is dt set?
 Shiva.Arislan
Offline
Server: Shiva
Game: FFXI
user: Arislan
Posts: 1052
By Shiva.Arislan 2017-08-05 22:02:09
Link | Quote | Reply
 
Toggle: Alt + ~
 Cerberus.Lauranna
Offline
Server: Cerberus
Game: FFXI
Posts: 17
By Cerberus.Lauranna 2017-08-15 10:14:42
Link | Quote | Reply
 
Hey Everyone.
I recently started to use GearSwap for my Sch.
As a newbie with code and everything, I'm having an issue with my Nuking and Enfeebling swap.
When I nuke it swap to my FastCast gears as required but it never change to my nuking gears. Same for Enfeebling.
Which means I cast very fast but not very strong which is disturbing ^^'
I think the problem is between the screen and the chair but more precisely from line 136 to line 141...

Do you have any ideas what I did wrong ?

Thanks in advance.

https://pastebin.com/x6vmAH9i
 Leviathan.Isiolia
Offline
Server: Leviathan
Game: FFXI
user: Isiolia
Posts: 458
By Leviathan.Isiolia 2017-08-15 10:34:34
Link | Quote | Reply
 
Try changing
Code
if spell.skill == "ElementalMagic" then


to
Code
if spell.skill == 'Elemental Magic' then
 Phoenix.Sevrina
Offline
Server: Phoenix
Game: FFXI
user: Sevrina
Posts: 30
By Phoenix.Sevrina 2017-08-15 10:49:55
Link | Quote | Reply
 
try changing also:
Code
sets.midcast_ElementalMagic


to
Code
sets.midcast['Elemental Magic']


for each type of magic you'll need to fix as the same
 Cerberus.Shadowmeld
Offline
Server: Cerberus
Game: FFXI
Posts: 1667
By Cerberus.Shadowmeld 2017-08-15 11:09:39
Link | Quote | Reply
 
You've got a lot of issues, but here are a few
Code
function midcast(spell, action, spellMap, eventArgs)
    if string.find(spell.english,'Cur') then
        equip(sets.midcast_Cure)
        if spell.element == world.weather_element or spell_element == world.day_element then
            equip({main="Chatoyant Staff"},sets.Obi[spell.element])
        end
        if buffactive.rapture then
            equip({head="Savant's Bonnet +2"})
        end
    elseif spell.english == 'Impact' then
        local tempset = sets['midcast_Impact']
        tempset['body'] = 'Twilight Cloak'
        tempset['head'] = empty
        equip(tempset)
        if spell.element == world.weather_element or spell_element == world.day_element then
            equip(sets.Obi[spell.element])
        end
        if sets.staves.damage[spell.element] then
            equip(sets.staves.damage[spell.element])
        end
    elseif spell.skill == "ElementalMagic" then
        if string.find(spell.english,'helix') then
            equip(sets['midcast_Helix'])   
    end        
    if spell.skill == "ElementalMagic" then
        equip(sets.midcast_ElementalMagic)
    if spell.skill == 'EnfeeblingMagic' then
        equip(sets.midcast_EnfeeblingMagic)
    if spell.skill == 'DarkMagic' then
        equip(sets.midcast_DarkMagic)
    end
        else
            equip(sets.midcast_ElementalMagic)
            if spell.element=='Earth' then
                equip({neck="Quanpur Necklace"})
            end
            if spell.element == world.weather_element or spell_element == world.day_element then
                equip(sets.Obi[spell.element])
            end
        end
    end
        if buffactive.ebullience then
            equip({head="Savant's Bonnet +2"})
        end
        if buffactive.klimform then
            equip ({feet="Savant's Loafers +2"})
        end
    elseif spell.english == 'Phalanx' then
        equip(sets['midcast_Phalanx'])
    elseif spell.english == 'Stoneskin' then
        equip(sets['midcast_Stoneskin'])
    elseif spell.skill == 'EnhancingMagic' then
        if spell.english == 'Embrava' then
            equip(sets['midcast_Embrava'])
            if not buffactive.perpetuance then
                add_to_chat(8,'--------- Perpetuance is down ---------')
            end
            if not buffactive.accession then
                add_to_chat(8,'--------- Accession is down ---------')
            end
            if not buffactive.penury then
                add_to_chat(8,'--------- Penury is down ---------')
            end
        end
        if buffactive.perpetuance then
            equip(sets['midcast_EnhancingMagic'],{hands="Savant's Bracers +2"})
        else
            equip(sets['midcast_EnhancingMagic'])
        end
    else
        weathercheck(spell.element,sets['midcast_'..spell.skill])
    end
   
    if spell.english == 'Sneak' then
        send_command('@wait 1.8;cancel 71;')
    end
end 


You've got a bunch of un-ended if statements. I'm surprised it actually loads properly honestly.

Key info.

Magic skills are not one word. ElementalMagic should be Elemental Magic. You have errors of this nature on lines 132, 136, 138, 140, and 163

On line 135 you inexplicably end your if-else checks and then do 3 consecutive if statements, only 1 of which is ended properly, then you have a rogue else statement that isn't tied to any specific if statement.

I think those two would fix most of your issues, but I would also like to point out that you have some really inefficient steps in your code.

If I might suggest, I would structure it closer to this:
Code
function midcast(spell)
  if spell.skill == 'Healing Magic' then
    if spell.name:startswith("Cure") or spell.name:startswith("Curaga") then
    -- I changed this because the way you had it before it would catch Cursna as well.  This way you can make rules for cursna later
      equip(sets.midcast_Cure)

      -- Chatoyant staff and obi rules here
    end
  elseif spell.skill == 'Elemental Magic' then
    if spell.name == 'Impact' then
      -- Impact rule
    elseif spell.name:find("helix") then
      -- Helix Rule
    else
      equip(sets.midcast_ElementalMagic)

      -- obi rule here
    end
  elseif spell.skill == 'Enhancing Magic' then

  elseif spell.skill == 'Enfeebling Magic' then

  elseif spell.skill == 'Dark Magic' then

  end
end


This way your if statements flow properly and your code would be more efficient. Does that make sense?
 Cerberus.Lauranna
Offline
Server: Cerberus
Game: FFXI
Posts: 17
By Cerberus.Lauranna 2017-08-15 11:29:22
Link | Quote | Reply
 
Leviathan.Isiolia said: »
Try changing
Code
if spell.skill == "ElementalMagic" then


to
Code
if spell.skill == 'Elemental Magic' then
Phoenix.Sevrina said: »
try changing also:
Code
sets.midcast_ElementalMagic


to
Code
sets.midcast['Elemental Magic']


for each type of magic you'll need to fix as the same

Thanks it worked !
[+]
Log in to post.