Gearswap Support Thread

Langues: JP EN DE FR
users online
Forum » Windower » Support » Gearswap Support Thread
Gearswap Support Thread
First Page 2 3 ... 52 53 54 ... 182 183 184
Offline
Posts: 10
By MarrocAdalwulf 2015-02-06 17:12:00
Link | Citer | R
 
Odin.Quixacotl said: »
MarrocAdalwulf said: »
So, I'm still trying to figure out what's wrong with my gearsets in my BRD lua files. I tried using Conagh's file, but it confused the hell out of me, and would force me to completely rework how I play BRD from the ground up. I'd rather not do that if I can help it. If someone could look over the coding for it, it's right here for the initial code, while I have a sidecar file with my gearsets here.

I'll admit, I'm not that great at working with this code, as I don't fully understand it yet. Most coding I've done would be HTML coding for websites, and very slight work on simple gaming designs, all several years ago, so I know I'm rusty at best. Any help would be much appreciated.
If you're using a sidecar for your gearsets then you have to include the function user_setup() in your sidecar. That's what's missing. Also, function user_setup() should be the exact copy as in your main lua.

Your sidecar should look like this:
Code
-------------------------------------------------------------------------------------------------------------------
-- 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('None', 'Normal')
    state.CastingMode:options('Normal', 'Resistant')
    state.IdleMode:options('Normal', 'PDT')

    brd_daggers = S{'Izhiikoh', 'Vanir Knife', 'Atoyac', 'Aphotic Kukri', 'Sabebus'}
    pick_tp_weapon()
    
    -- Adjust this if using the Terpander (new +song instrument)
    info.ExtraSongInstrument = 'Daurdabla'
    -- How many extra songs we can keep from Daurdabla/Terpander
    info.ExtraSongs = 2
    
    -- Set this to false if you don't want to use custom timers.
    state.UseCustomTimers = M(true, 'Use Custom Timers')
    
    -- Additional local binds
    send_command('bind ^` gs c cycle ExtraSongsMode')
    send_command('bind !` input /ma "Chocobo Mazurka" <me>')

    select_default_macro_book()
end

-- Define sets and vars used by this job file.
function init_gear_sets()
    -- gear here
    -- more gear
end
Tried inputting the function user_setup() in my sidecar file, and it's still completely ignoring my debuff set while equipping my BardSong set. The really weird part is, it's putting my earrings and rings on from the debuff set, but all the other gear is from BardSong.
Offline
Posts: 10
By MarrocAdalwulf 2015-02-06 17:14:29
Link | Citer | R
 
Odin.Myhnegon said: »
Hello everyone,

i'm using Motenten's BRD lua and when i use showswaps, it seems like it isn't putting the grip in the sub slot at the midcast section (As aftercast tho). Precast is Dagger, then switching to staff and grip. Maybe it's too fast and can't put sub in in time? Any way around this?


Thx for ur help
Looks like we're having the exact same problem here.
 Odin.Quixacotl
Offline
Serveur: Odin
Game: FFXI
user: Quixacotl
Posts: 170
By Odin.Quixacotl 2015-02-06 21:35:30
Link | Citer | R
 
Stupid question... Are you sure you don't have an /equip line in your macro? I have to ask because you'd be surprised how many people do and then spend hours and days looking for a bug in GS.

I'm no Brd so I can't try out Kinematic's lua's to see if there's a bug in there somewhere, which is possible but unlikely. There does seem to be an issue with Kinematic's BRD as mentioned on other forums. But for the most part, those turned out to an error on the user part.

All I can suggest is to backup your luas and start with a fresh copy to see if that works properly. Make sure you rename both the main file AND the sidecar. If it does work then the bug is at your end and you'll have to rework Kinematic's again.

It would help tremendously if you could post your entire lua and not just your gear. That way we could pinpoint where the culprit is.

My gut feeling is it's some error you've overlooked that's small yet big enough to make you SMH.
Offline
Posts: 10
By MarrocAdalwulf 2015-02-06 21:43:37
Link | Citer | R
 
Odin.Quixacotl said: »
Stupid question. Are you sure you don't have an /equip line in your macro? I had to ask because you'd be surprised how many people do and then spend hours and days looking for a bug in GS.

I'm no Brd so I can't try out Kinematic's lua's to see if there's a bug in there somewhere, which is possible but unlikely. There does seem to be an issue with Kinematic's BRD as mentioned on other forums. But for the most part, those turned out to an error on the user part.

All I can suggest is to backup your luas and start with a fresh copy to see if that works properly. Make sure you rename both the main file AND the sidecar. If it does work then the bug is at your end and you'll have to rework Kinematic's again.

It would help tremendously if you could post your entire lua and not just your gear. That way we could pinpoint where the culprit is.

My gut feeling is it's some error you've overlooked that's small yet big enough to make you SMH.
Just double checked my macros, and the only ones that are messing up don't have any of the /equip lines in there. It's just a simple /ma "" <t> macro. Basic lua here and gearsets lua here. I'll also try using the original lua without any modifications, short of gear, and see if that fixes the problem.
Offline
Posts: 10
By MarrocAdalwulf 2015-02-06 22:16:23
Link | Citer | R
 
Odin.Quixacotl said: »
Stupid question... Are you sure you don't have an /equip line in your macro? I have to ask because you'd be surprised how many people do and then spend hours and days looking for a bug in GS.

I'm no Brd so I can't try out Kinematic's lua's to see if there's a bug in there somewhere, which is possible but unlikely. There does seem to be an issue with Kinematic's BRD as mentioned on other forums. But for the most part, those turned out to an error on the user part.

All I can suggest is to backup your luas and start with a fresh copy to see if that works properly. Make sure you rename both the main file AND the sidecar. If it does work then the bug is at your end and you'll have to rework Kinematic's again.

It would help tremendously if you could post your entire lua and not just your gear. That way we could pinpoint where the culprit is.

My gut feeling is it's some error you've overlooked that's small yet big enough to make you SMH.
I just figured it out! I was going through, adding in all my gear to the fresh copy, and I noticed that the midcast set wasn't called BardSong, just the precast set. The midcast set was called SongEffect. So, I switched the names, and it works just fine now. Thank you for your help! <3
 Odin.Quixacotl
Offline
Serveur: Odin
Game: FFXI
user: Quixacotl
Posts: 170
By Odin.Quixacotl 2015-02-06 22:48:46
Link | Citer | R
 
MarrocAdalwulf said: »
Odin.Myhnegon said: »
Hello everyone,

i'm using Motenten's BRD lua and when i use showswaps, it seems like it isn't putting the grip in the sub slot at the midcast section (As aftercast tho). Precast is Dagger, then switching to staff and grip. Maybe it's too fast and can't put sub in in time? Any way around this?


Thx for ur help
Looks like we're having the exact same problem here.
This is just a shot in the dark but try doing this (I removed gear just to emphasize main, sub, range and ammo slots). It's something I would try.

If you do have a shield then replace sub=empty with sub="Genbu's Shield" or whatever shield. Otherwise use sub=empty.
Code
    sets.precast.FC = {main="Lehbrailg +2", sub="Vivid Strap", range=empty, ammo="Impatiens"}

    sets.precast.FC.BardSong = {main="Felibre's Dague", sub="Genbu's Shield", range="Linos", ammo=empty}

    sets.midcast.SongEffect = {main="Legato Dagger", sub=empty, range="Gjallarhorn", ammo=empty}

    sets.midcast.SongDebuff = {main="Lehbrailg +2", sub="Mephitis Grip", range="Gjallarhorn", ammo=empty}

    sets.midcast.ResistantSongDebuff = {main="Lehbrailg +2", sub="Mephitis Grip", range="Gjallarhorn", ammo=empty}

    sets.midcast.DaurdablaDummy = {main="Izhiikoh", sub=empty, range=info.ExtraSongInstrument, ammo=empty}

    sets.idle = {main="Terra's Staff", sub="Mephitis Grip", range="Oneiros Harp", ammo=empty}

    sets.idle.Town = {main="Terra's Staff", sub="Mephitis Grip", range="Oneiros Harp", ammo=empty}
 Odin.Myhnegon
Offline
Serveur: Odin
Game: FFXI
user: Myhnegon
Posts: 33
By Odin.Myhnegon 2015-02-06 23:30:28
Link | Citer | R
 
Odin.Quixacotl said: »
This is just a shot in the dark but try doing this (I removed gear just to emphasize main, sub, range and ammo slots). It's something I would try.

If you do have a shield then replace sub=empty with sub="Genbu's Shield" or whatever shield. Otherwise use sub=empty.
Code
    sets.precast.FC = {main="Lehbrailg +2", sub="Vivid Strap", range=empty, ammo="Impatiens"}

    sets.precast.FC.BardSong = {main="Felibre's Dague", sub="Genbu's Shield", range="Linos", ammo=empty}

    sets.midcast.SongEffect = {main="Legato Dagger", sub=empty, range="Gjallarhorn", ammo=empty}

    sets.midcast.SongDebuff = {main="Lehbrailg +2", sub="Mephitis Grip", range="Gjallarhorn", ammo=empty}

    sets.midcast.ResistantSongDebuff = {main="Lehbrailg +2", sub="Mephitis Grip", range="Gjallarhorn", ammo=empty}

    sets.midcast.DaurdablaDummy = {main="Izhiikoh", sub=empty, range=info.ExtraSongInstrument, ammo=empty}

    sets.idle = {main="Terra's Staff", sub="Mephitis Grip", range="Oneiros Harp", ammo=empty}

    sets.idle.Town = {main="Terra's Staff", sub="Mephitis Grip", range="Oneiros Harp", ammo=empty}
Tyvm Quixacotl, that sub=empty and ammo=empty did the trick for me.

but i have another question

Motenten placed song enhancing gear extra
Code
-- Gear to enhance certain classes of songs.  No instruments added here since Gjallarhorn is being used.
    sets.midcast.Ballad = {legs="Aoidos' Rhing. +2"}
    sets.midcast.Lullaby = {hands="Brioso Cuffs"}
    sets.midcast.Madrigal = {head="Aoidos' Calot +2"}
    sets.midcast.March = {hands="Aoidos' Manchettes +2"}
    sets.midcast.Minuet = {body="Aoidos' Hongreline +2"}
    sets.midcast.Minne = {}
    sets.midcast.Paeon = {head="Brioso Roundlet"}
    sets.midcast.Carol = {head="Aoidos' Calot +2",
        body="Aoidos' Hongreline +2",hands="Aoidos' Manchettes +2",
        legs="Aoidos' Rhing. +2",feet="Aoidos' Cothrn. +2"}
    sets.midcast["Sentinel's Scherzo"] = {feet="Aoidos' Cothrn. +2"}
    sets.midcast['Magic Finale'] = {neck="Piper's Torque",waist="Aoidos' Belt",legs="Aoidos' Rhing. +2"}

And for the mentioned songs, it replaces the items in the buff or debuff set. Is there a way to turn that off by command, so it would use the full buff/debuff set?

It's mainly about Lullaby, the Brioso Cuffs add sleep duration, but on resisting stuff I'd like to use hands from the debuff set.

I hope u get what I mean.

Thx again
 Odin.Quixacotl
Offline
Serveur: Odin
Game: FFXI
user: Quixacotl
Posts: 170
By Odin.Quixacotl 2015-02-07 02:17:38
Link | Citer | R
 
Odin.Myhnegon said: »
Tyvm Quixacotl, that sub=empty and ammo=empty did the trick for me.
I'm glad it worked out for you. The idea occurred to me when I remembered the code for Twilight Cloak or Respite Cloak. Since you can't equip headgear for cloaks then you need a placeholder at precast and midcast or it won't equip (in this case, head=empty). Same idea goes for main/grips and range/ammo.
Odin.Myhnegon said: »
but i have another question

Motenten placed song enhancing gear extra
Code
-- Gear to enhance certain classes of songs.  No instruments added here since Gjallarhorn is being used.
    sets.midcast.Ballad = {legs="Aoidos' Rhing. +2"}
    sets.midcast.Lullaby = {hands="Brioso Cuffs"}
    sets.midcast.Madrigal = {head="Aoidos' Calot +2"}
    sets.midcast.March = {hands="Aoidos' Manchettes +2"}
    sets.midcast.Minuet = {body="Aoidos' Hongreline +2"}
    sets.midcast.Minne = {}
    sets.midcast.Paeon = {head="Brioso Roundlet"}
    sets.midcast.Carol = {head="Aoidos' Calot +2",
        body="Aoidos' Hongreline +2",hands="Aoidos' Manchettes +2",
        legs="Aoidos' Rhing. +2",feet="Aoidos' Cothrn. +2"}
    sets.midcast["Sentinel's Scherzo"] = {feet="Aoidos' Cothrn. +2"}
    sets.midcast['Magic Finale'] = {neck="Piper's Torque",waist="Aoidos' Belt",legs="Aoidos' Rhing. +2"}

And for the mentioned songs, it replaces the items in the buff or debuff set. Is there a way to turn that off by command, so it would use the full buff/debuff set?

It's mainly about Lullaby, the Brioso Cuffs add sleep duration, but on resisting stuff I'd like to use hands from the debuff set.

I hope u get what I mean.

Thx again
You already have the command built-in. It's 'gs c cycle CastingMode' (/console gs c cycle CastingMode for macros or ctrl-F11). This command cycles between CastingMode:Normal and CastingMode:Resistant.

When you are in CastingMode:Normal you use Brioso Cuffs for lullaby. But when you're in CastingMode:Resistant then you switch to Aoidos' Manchettes +2 along with the other gear in sets.midcast.ResistantSongDebuff.

Forget which mode you're in? Just hit F12 to display your current status and modes.

CastingMode:Normal is set as default but you can always set CastingMode:Resistant as default by switching the two options like this:
Code
state.CastingMode:options('Resistant', 'Normal')

Here are the applicable codes to give you a better picture how it works.
 Odin.Myhnegon
Offline
Serveur: Odin
Game: FFXI
user: Myhnegon
Posts: 33
By Odin.Myhnegon 2015-02-07 05:37:05
Link | Citer | R
 
Odin.Quixacotl said: »
Odin.Myhnegon said: »
Tyvm Quixacotl, that sub=empty and ammo=empty did the trick for me.
I'm glad it worked out for you. The idea occurred to me when I remembered the code for Twilight Cloak or Respite Cloak. Since you can't equip headgear for cloaks then you need a placeholder at precast and midcast or it won't equip (in this case, head=empty). Same idea goes for main/grips and range/ammo.
Odin.Myhnegon said: »
but i have another question

Motenten placed song enhancing gear extra
Code
-- Gear to enhance certain classes of songs.  No instruments added here since Gjallarhorn is being used.
    sets.midcast.Ballad = {legs="Aoidos' Rhing. +2"}
    sets.midcast.Lullaby = {hands="Brioso Cuffs"}
    sets.midcast.Madrigal = {head="Aoidos' Calot +2"}
    sets.midcast.March = {hands="Aoidos' Manchettes +2"}
    sets.midcast.Minuet = {body="Aoidos' Hongreline +2"}
    sets.midcast.Minne = {}
    sets.midcast.Paeon = {head="Brioso Roundlet"}
    sets.midcast.Carol = {head="Aoidos' Calot +2",
        body="Aoidos' Hongreline +2",hands="Aoidos' Manchettes +2",
        legs="Aoidos' Rhing. +2",feet="Aoidos' Cothrn. +2"}
    sets.midcast["Sentinel's Scherzo"] = {feet="Aoidos' Cothrn. +2"}
    sets.midcast['Magic Finale'] = {neck="Piper's Torque",waist="Aoidos' Belt",legs="Aoidos' Rhing. +2"}

And for the mentioned songs, it replaces the items in the buff or debuff set. Is there a way to turn that off by command, so it would use the full buff/debuff set?

It's mainly about Lullaby, the Brioso Cuffs add sleep duration, but on resisting stuff I'd like to use hands from the debuff set.

I hope u get what I mean.

Thx again
You already have the command built-in. It's 'gs c cycle CastingMode' (/console gs c cycle CastingMode for macros or ctrl-F11). This command cycles between CastingMode:Normal and CastingMode:Resistant.

When you are in CastingMode:Normal you use Brioso Cuffs for lullaby. But when you're in CastingMode:Resistant then you switch to Aoidos' Manchettes +2 along with the other gear in sets.midcast.ResistantSongDebuff.

Forget which mode you're in? Just hit F12 to display your current status and modes.

CastingMode:Normal is set as default but you can always set CastingMode:Resistant as default by switching the two options like this:
Code
state.CastingMode:options('Resistant', 'Normal')

Here are the applicable codes to give you a better picture how it works.
Thx again for ur support

Yes, i know of the ctrl+F11 function and i just double checked to be sure, but unfortunately it keeps swapping in the Brioso Cuffs.

I think the code for it is this
Code
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_midcast(spell, action, spellMap, eventArgs)
    if spell.action_type == 'Magic' then
        if spell.type == 'BardSong' then
            -- layer general gear on first, then let default handler add song-specific gear.
            local generalClass = get_song_class(spell)
            if generalClass and sets.midcast[generalClass] then
                equip(sets.midcast[generalClass])
            end
        end
    end
end


As far as i can tell, it doesn't make any difference between normal and resistant gear set.

Might have to add gear sets just for lullaby and remove the Brioso Cuffs from the enhancing gear list?
 Odin.Quixacotl
Offline
Serveur: Odin
Game: FFXI
user: Quixacotl
Posts: 170
By Odin.Quixacotl 2015-02-07 14:47:10
Link | Citer | R
 
Odin.Myhnegon said: »
Thx again for ur support

Yes, i know of the ctrl+F11 function and i just double checked to be sure, but unfortunately it keeps swapping in the Brioso Cuffs.

I think the code for it is this
Code
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_midcast(spell, action, spellMap, eventArgs)
    if spell.action_type == 'Magic' then
        if spell.type == 'BardSong' then
            -- layer general gear on first, then let default handler add song-specific gear.
            local generalClass = get_song_class(spell)
            if generalClass and sets.midcast[generalClass] then
                equip(sets.midcast[generalClass])
            end
        end
    end
end


As far as i can tell, it doesn't make any difference between normal and resistant gear set.

Might have to add gear sets just for lullaby and remove the Brioso Cuffs from the enhancing gear list?
You might want to add the following lines to your function job_post_midcast block. It doesn't fix the real problem since it's a workaround but at least it insures that you equip resist gear for Lullaby when you are in CastingMode:Resistant.
Code
function job_post_midcast(spell, action, spellMap, eventArgs)
    if spell.type == 'BardSong' then
        if state.ExtraSongsMode.value == 'FullLength' then
            equip(sets.midcast.Daurdabla)
        end

        state.ExtraSongsMode:reset()

        if spell.english:contains('Lullaby') and state.CastingMode.value == 'Resistant' then
            equip(sets.midcast.ResistantSongDebuff)
        elseif spell.english:contains('Lullaby') and state.CastingMode.value == 'Normal' then
            equip(sets.midcast.SongDebuff, sets.midcast.Lullaby)
        end

    end
end
 Odin.Myhnegon
Offline
Serveur: Odin
Game: FFXI
user: Myhnegon
Posts: 33
By Odin.Myhnegon 2015-02-07 22:46:49
Link | Citer | R
 
Thx again, that helps alot^^
 Cerberus.Rabies
Offline
Serveur: Cerberus
Game: FFXI
user: Rabies666
Posts: 57
By Cerberus.Rabies 2015-02-11 19:28:54
Link | Citer | R
 

This is my current COR lua, I'm looking to add a option for Racc bullets. This is the code I have in Function user_setup:
Code
function user_setup()
    state.OffenseMode:options('Melee', 'Acc')
    state.RangedMode:options('Normal', 'Acc')
    state.WeaponskillMode:options('Normal', 'Acc')


    gear.RAbullet = "Adlivun Bullet"
    gear.WSbullet = "Adlivun Bullet"
    gear.MAbullet = "Decimating Bullet"
    gear.QDbullet = "Animikii Bullet"
    options.ammo_warning_limit = 15

    -- Additional local binds
    send_command('bind ^` input /ja "Double-up" <me>')
    send_command('bind !` input /ja "Bolter\'s Roll" <me>')

    select_default_macro_book()
end


This is the rule for Ranged Attack with these bullets I believe:
Code
function do_bullet_checks(spell, spellMap, eventArgs)
    local bullet_name
    local bullet_min_count = 1
    
    if spell.type == 'WeaponSkill' then
        if spell.skill == "Marksmanship" then
            if spell.element == 'None' then
                -- physical weaponskills
                bullet_name = gear.WSbullet
            else
                -- magical weaponskills
                bullet_name = gear.MAbullet
            end
        else
            -- Ignore non-ranged weaponskills
            return
        end
    elseif spell.type == 'CorsairShot' then
        bullet_name = gear.QDbullet
    elseif spell.action_type == 'Ranged Attack' then
        bullet_name = gear.RAbullet
        if buffactive['Triple Shot'] then
            bullet_min_count = 3
        end
    end


Anyone know how I would go about making it work with a new bullet under User_Function, such as "gear.RACCbullet"?
 Carbuncle.Galmaximas
Offline
Serveur: Carbuncle
Game: FFXI
Posts: 88
By Carbuncle.Galmaximas 2015-02-11 21:21:50
Link | Citer | R
 
http://pastebin.com/nbPuPX3n

screwed up my whm lua trying to edit error reads issue near line 294 if someone can help me out
 Asura.Sabishii
Offline
Serveur: Asura
Game: FFXI
user: Sabishii
Posts: 230
By Asura.Sabishii 2015-02-11 22:07:53
Link | Citer | R
 
Carbuncle.Galmaximas said: »
http://pastebin.com/nbPuPX3n

screwed up my whm lua trying to edit error reads issue near line 294 if someone can help me out
Code
  sets.midcast.['Enhancing Magic'] 'name'=
    {main="Ababinili",


Take out that 'name' thing.
 Carbuncle.Galmaximas
Offline
Serveur: Carbuncle
Game: FFXI
Posts: 88
By Carbuncle.Galmaximas 2015-02-11 22:11:22
Link | Citer | R
 
Asura.Sabishii said: »
Carbuncle.Galmaximas said: »
http://pastebin.com/nbPuPX3n

screwed up my whm lua trying to edit error reads issue near line 294 if someone can help me out
Code
  sets.midcast.['Enhancing Magic'] 'name'=
    {main="Ababinili",


Take out that 'name' thing.

Doesn't work it says name expected on line 293 near '['
 Asura.Darvamos
VIP
Offline
Serveur: Asura
Game: FFXI
user: Demmis
Posts: 234
By Asura.Darvamos 2015-02-11 23:13:07
Link | Citer | R
 
This
sets.midcast.['Enhancing Magic'] 'name'=
{main="Ababinili",

Should be
sets.midcast['Enhancing Magic'] =
{main="Ababinili",


Edit:
Also taking a very quick look at your GS lua I noticed you have two for Sacrific.

sets.midcast.Sacrific
sets.midcast['Sacrific']
 Carbuncle.Galmaximas
Offline
Serveur: Carbuncle
Game: FFXI
Posts: 88
By Carbuncle.Galmaximas 2015-02-12 00:58:22
Link | Citer | R
 
Asura.Darvamos said: »
This
sets.midcast.['Enhancing Magic'] 'name'=
{main="Ababinili",

Should be
sets.midcast['Enhancing Magic'] =
{main="Ababinili",


Edit:
Also taking a very quick look at your GS lua I noticed you have two for Sacrific.

sets.midcast.Sacrific
sets.midcast['Sacrific']

meh I just repasted my back up and deleted that one it was too jacked up to mess with but thx sir for the help I suck at lua language
 Odin.Quixacotl
Offline
Serveur: Odin
Game: FFXI
user: Quixacotl
Posts: 170
By Odin.Quixacotl 2015-02-12 05:56:26
Link | Citer | R
 
Cerberus.Rabies said: »
This is my current COR lua, I'm looking to add a option for Racc bullets. This is the code I have in Function user_setup:
Code
function user_setup()
    state.OffenseMode:options('Melee', 'Acc')
    state.RangedMode:options('Normal', 'Acc')
    state.WeaponskillMode:options('Normal', 'Acc')


    gear.RAbullet = "Adlivun Bullet"
    gear.WSbullet = "Adlivun Bullet"
    gear.MAbullet = "Decimating Bullet"
    gear.QDbullet = "Animikii Bullet"
    options.ammo_warning_limit = 15

    -- Additional local binds
    send_command('bind ^` input /ja "Double-up" <me>')
    send_command('bind !` input /ja "Bolter\'s Roll" <me>')

    select_default_macro_book()
end


This is the rule for Ranged Attack with these bullets I believe:
Code
function do_bullet_checks(spell, spellMap, eventArgs)
    local bullet_name
    local bullet_min_count = 1
    
    if spell.type == 'WeaponSkill' then
        if spell.skill == "Marksmanship" then
            if spell.element == 'None' then
                -- physical weaponskills
                bullet_name = gear.WSbullet
            else
                -- magical weaponskills
                bullet_name = gear.MAbullet
            end
        else
            -- Ignore non-ranged weaponskills
            return
        end
    elseif spell.type == 'CorsairShot' then
        bullet_name = gear.QDbullet
    elseif spell.action_type == 'Ranged Attack' then
        bullet_name = gear.RAbullet
        if buffactive['Triple Shot'] then
            bullet_min_count = 3
        end
    end


Anyone know how I would go about making it work with a new bullet under User_Function, such as "gear.RACCbullet"?
Adlivun Bullet already has the highest Racc + which is 15 but okay whatever.

Motes has 2 RangedModes built-in, Normal and Acc but you'd still have to add a few new lines for the additional ammo. You could do something like this. Then all you'd need to do is hit Alt-F9 to cycle between RangedMode:Normal and RangedMode:Acc and the appropriate ammo.
 Cerberus.Rabies
Offline
Serveur: Cerberus
Game: FFXI
user: Rabies666
Posts: 57
By Cerberus.Rabies 2015-02-12 15:18:15
Link | Citer | R
 
Thanks a lot Quixacotl, I know Adlivun has the highest Racc it's the bullet I want to use for it but I was planning on using Eminent for non-acc purpose due to higher DMG.
 Bismarck.Airgetlamh
Offline
Serveur: Bismarck
Game: FFXI
user: Arnegis
Posts: 6
By Bismarck.Airgetlamh 2015-02-12 15:37:20
Link | Citer | R
 
Using Mote's MNK file. All works fine except the impetus rule. I'm using a sidecar file with my own gearsets in which I define the sets.impetus_body the rule calls for in the main file.

Mote MNK

Lines 291-300.

No idea why it's not working.
Any ideas?

Thanks
 Cerberus.Rabies
Offline
Serveur: Cerberus
Game: FFXI
user: Rabies666
Posts: 57
By Cerberus.Rabies 2015-02-12 18:05:52
Link | Citer | R
 
Odin.Quixacotl said: »
Cerberus.Rabies said: »
This is my current COR lua, I'm looking to add a option for Racc bullets. This is the code I have in Function user_setup:
Code
function user_setup()
    state.OffenseMode:options('Melee', 'Acc')
    state.RangedMode:options('Normal', 'Acc')
    state.WeaponskillMode:options('Normal', 'Acc')


    gear.RAbullet = "Adlivun Bullet"
    gear.WSbullet = "Adlivun Bullet"
    gear.MAbullet = "Decimating Bullet"
    gear.QDbullet = "Animikii Bullet"
    options.ammo_warning_limit = 15

    -- Additional local binds
    send_command('bind ^` input /ja "Double-up" <me>')
    send_command('bind !` input /ja "Bolter\'s Roll" <me>')

    select_default_macro_book()
end


This is the rule for Ranged Attack with these bullets I believe:
Code
function do_bullet_checks(spell, spellMap, eventArgs)
    local bullet_name
    local bullet_min_count = 1
    
    if spell.type == 'WeaponSkill' then
        if spell.skill == "Marksmanship" then
            if spell.element == 'None' then
                -- physical weaponskills
                bullet_name = gear.WSbullet
            else
                -- magical weaponskills
                bullet_name = gear.MAbullet
            end
        else
            -- Ignore non-ranged weaponskills
            return
        end
    elseif spell.type == 'CorsairShot' then
        bullet_name = gear.QDbullet
    elseif spell.action_type == 'Ranged Attack' then
        bullet_name = gear.RAbullet
        if buffactive['Triple Shot'] then
            bullet_min_count = 3
        end
    end


Anyone know how I would go about making it work with a new bullet under User_Function, such as "gear.RACCbullet"?
Adlivun Bullet already has the highest Racc + which is 15 but okay whatever.

Motes has 2 RangedModes built-in, Normal and Acc but you'd still have to add a few new lines for the additional ammo. You could do something like this. Then all you'd need to do is hit Alt-F9 to cycle between RangedMode:Normal and RangedMode:Acc and the appropriate ammo.


When I add "gear.RAbullet.Acc = "Adlivun Bullet" under my function_user_setup() I get an error:

Gearswap: Lua runtime error: Gearswap/flow.lua:295;
Gearswap has detected an error in the user function get_sets:
Rabies_COR.lua:45: attempt to index field 'RAbullet' (a string value)

Know whats causing this by chance?
 Bahamut.Phidruran
Offline
Serveur: Bahamut
Game: FFXI
user: phidruran
Posts: 62
By Bahamut.Phidruran 2015-02-12 21:50:44
Link | Citer | R
 
What would be the easiest way to add coding to a gearswap file to use Marin Staff for all wind magic?
 Odin.Quixacotl
Offline
Serveur: Odin
Game: FFXI
user: Quixacotl
Posts: 170
By Odin.Quixacotl 2015-02-12 22:24:22
Link | Citer | R
 
Code
sets.midcast['Elemental Magic'] = {nuke gear here}

function midcast(spell,action)
    if spell.skill == 'Elemental Magic' then
        if spell.element == 'Wind' then
            equip(sets.midcast['Elemental Magic'], {main="Marin Staff"})
        end
    end
end
Offline
Posts: 806
By Crevox 2015-02-12 22:36:18
Link | Citer | R
 
Wouldn't it be
Code
set_combine(sets.midcast['Elemental Magic'], {main="Marin Staff"})
 Odin.Quixacotl
Offline
Serveur: Odin
Game: FFXI
user: Quixacotl
Posts: 170
By Odin.Quixacotl 2015-02-12 22:37:46
Link | Citer | R
 
Cerberus.Rabies said: »
When I add "gear.RAbullet.Acc = "Adlivun Bullet" under my function_user_setup() I get an error:

Gearswap: Lua runtime error: Gearswap/flow.lua:295;
Gearswap has detected an error in the user function get_sets:
Rabies_COR.lua:45: attempt to index field 'RAbullet' (a string value)

Know whats causing this by chance?
Oops substitute gear.RAbullet_Acc instead of gear.RAbullet.Acc. That should work.
 Odin.Quixacotl
Offline
Serveur: Odin
Game: FFXI
user: Quixacotl
Posts: 170
By Odin.Quixacotl 2015-02-12 22:38:58
Link | Citer | R
 
Crevox said: »
Wouldn't it be
Code
set_combine(sets.midcast['Elemental Magic'], {main="Marin Staff"})
Edit: In this case,
Code
equip(sets.midcast['Elemental Magic'], {main="Marin Staff"})

... is the correct syntax because equip() is a GS command. Example: equip(set1, set2, set3, etc). set_combine is only used within get_sets.
 Odin.Quixacotl
Offline
Serveur: Odin
Game: FFXI
user: Quixacotl
Posts: 170
By Odin.Quixacotl 2015-02-12 22:48:04
Link | Citer | R
 
Bismarck.Airgetlamh said: »
Using Mote's MNK file. All works fine except the impetus rule. I'm using a sidecar file with my own gearsets in which I define the sets.impetus_body the rule calls for in the main file.

Mote MNK

Lines 291-300.

No idea why it's not working.
Any ideas?

Thanks
Does your sidecar include the function user_setup block?

Your sidecar should look like this:
Code
-------------------------------------------------------------------------------------------------------------------
-- 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('Normal', 'SomeAcc', 'Acc', 'Fodder')
    state.WeaponskillMode:options('Normal', 'SomeAcc', 'Acc', 'Fodder')
    state.HybridMode:options('Normal', 'PDT', 'Counter')
    state.PhysicalDefenseMode:options('PDT', 'HP')

    update_combat_form()
    update_melee_groups()

    select_default_macro_book()
end

-- Define sets and vars used by this job file.
function init_gear_sets()
    -- Gear
    -- More Gear
end
 Cerberus.Rabies
Offline
Serveur: Cerberus
Game: FFXI
user: Rabies666
Posts: 57
By Cerberus.Rabies 2015-02-13 02:11:59
Link | Citer | R
 
Odin.Quixacotl said: »
Cerberus.Rabies said: »
When I add "gear.RAbullet.Acc = "Adlivun Bullet" under my function_user_setup() I get an error:

Gearswap: Lua runtime error: Gearswap/flow.lua:295;
Gearswap has detected an error in the user function get_sets:
Rabies_COR.lua:45: attempt to index field 'RAbullet' (a string value)

Know whats causing this by chance?
Oops substitute gear.RAbullet_Acc instead of gear.RAbullet.Acc. That should work.

Thanks for the help and quick reply it's very helpful wish I wasn't so computer illiterate at times. I replaced everything with what you said:
Code
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job.  Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------

--[[
    gs c toggle LuzafRing -- Toggles use of Luzaf Ring on and off
    
    Offense mode is melee or ranged.  Used ranged offense mode if you are engaged
    for ranged weaponskills, but not actually meleeing.
    
    Weaponskill mode, if set to 'Normal', is handled separately for melee and ranged weaponskills.
--]]


-- Initialization function for this job file.
function get_sets()
    mote_include_version = 2
    
    -- Load and initialize the include file.
    include('Mote-Include.lua')
end

-- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
function job_setup()
    -- Whether to use Luzaf's Ring
    state.LuzafRing = M(false, "Luzaf's Ring")
    -- Whether a warning has been given for low ammo
    state.warned = M(false)

    define_roll_values()
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('Ranged', 'Melee', 'Acc')
    state.RangedMode:options('Normal', 'Acc')
    state.WeaponskillMode:options('Normal', 'Acc', 'Att', 'Mod')
    state.CastingMode:options('Normal', 'Resistant')
    state.IdleMode:options('Normal', 'PDT', 'Refresh')

    gear.RAbullet = "Eminent Bullet"
	gear.RAbullet_Acc = "Adluvun Bullet"
	
    gear.WSbullet = "Adlivun Bullet"
    gear.MAbullet = "Bronze Bullet"
    gear.QDbullet = "Adlivun Bullet"
    options.ammo_warning_limit = 15

    -- Additional local binds
    send_command('bind ^` input /ja "Double-up" <me>')
    send_command('bind !` input /ja "Bolter\'s Roll" <me>')

    select_default_macro_book()
end


-- Called when this job file is unloaded (eg: job change)
function user_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['Triple Shot'] = {body="Navarch's Frac +2"}
    sets.precast.JA['Snake Eye'] = {legs="Lanun Culottes"}
    sets.precast.JA['Wild Card'] = {feet="Lanun Bottes"}
    sets.precast.JA['Random Deal'] = {body="Lanun Frac"}

    
    sets.precast.CorsairRoll = {head="Lanun Tricorne",hands="Navarch's Gants +2",ring2="Luzaf's Ring"}
    
    sets.precast.CorsairRoll["Caster's Roll"] = set_combine(sets.precast.CorsairRoll, {legs="Navarch's Culottes +2"})
    sets.precast.CorsairRoll["Courser's Roll"] = set_combine(sets.precast.CorsairRoll, {feet="Navarch's Bottes +2"})
    sets.precast.CorsairRoll["Blitzer's Roll"] = set_combine(sets.precast.CorsairRoll, {head="Navarch's Tricorne +2"})
    sets.precast.CorsairRoll["Tactician's Roll"] = set_combine(sets.precast.CorsairRoll, {body="Navarch's Frac +2"})
    sets.precast.CorsairRoll["Allies' Roll"] = set_combine(sets.precast.CorsairRoll, {hands="Navarch's Gants +2"})
    
    sets.precast.LuzafRing = {ring2="Luzaf's Ring"}
    sets.precast.FoldDoubleBust = {hands="Lanun Gants"}
    
    sets.precast.CorsairShot = {head="Blood Mask"}
    

    -- Waltz set (chr and vit)
    sets.precast.Waltz = {
        head="Whirlpool Mask",
        body="Iuitl Vest",hands="Iuitl Wristbands",
        legs="Nahtirah Trousers",feet="Iuitl Gaiters +1"}
        
    -- Don't need any special gear for Healing Waltz.
    sets.precast.Waltz['Healing Waltz'] = {}

    -- Fast cast sets for spells
    
    sets.precast.FC = {head="Haruspex Hat",ear2="Loquacious Earring",hands="Thaumas Gloves",ring1="Prolix Ring"}

    sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {neck="Magoraga Beads"})


    sets.precast.RA = {ammo=gear.RAbullet,
        head="Navarch's Tricorne +2",
        body="Laksamana's Frac",hands="Lanun Gants",
        back="Navarch's Mantle",waist="Impulse Belt",legs="Nahtirah Trousers",feet="Wurrukatte Boots"}
		
	sets.precast.RA.Acc = set_combine(sets.precast.RA, {ammo=gear.RAbullet_Acc})	

       
    -- Weaponskill sets
    -- Default set for any weaponskill that isn't any more specifically defined
    sets.precast.WS = {
        head="Whirlpool Mask",neck=gear.ElementalGorget,ear1="Bladeborn Earring",ear2="Steelflash Earring",
        body="Manibozho Jerkin",hands="Iuitl Wristbands",ring1="Rajas Ring",ring2="Epona's Ring",
        back="Atheling Mantle",waist=gear.ElementalBelt,legs="Manibozho Brais",feet="Iuitl Gaiters +1"}


    -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
    sets.precast.WS['Evisceration'] = sets.precast.WS

    sets.precast.WS['Exenterator'] = set_combine(sets.precast.WS, {legs="Nahtirah Trousers"})

    sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS, {legs="Nahtirah Trousers"})

    sets.precast.WS['Last Stand'] = {ammo=gear.WSbullet,
        head="Whirlpool Mask",neck=gear.ElementalGorget,ear1="Clearview Earring",ear2="Moonshade Earring",
        body="Laksamana's Frac",hands="Iuitl Wristbands",ring1="Rajas Ring",ring2="Stormsoul Ring",
        back="Terebellum Mantle",waist=gear.ElementalBelt,legs="Nahtirah Trousers",feet="Iuitl Gaiters +1"}

    sets.precast.WS['Last Stand'].Acc = {ammo=gear.WSbullet,
        head="Laksamana's Hat",neck=gear.ElementalGorget,ear1="Clearview Earring",ear2="Moonshade Earring",
        body="Laksamana's Frac",hands="Buremte Gloves",ring1="Hajduk Ring",ring2="Stormsoul Ring",
        back="Libeccio Mantle",waist=gear.ElementalBelt,legs="Thurandaut Tights +1",feet="Laksamana's Bottes"}


    sets.precast.WS['Wildfire'] = {ammo=gear.MAbullet,
        head="Wayfarer Circlet",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Hecate's Earring",
        body="Manibozho Jerkin",hands="Iuitl Wristbands",ring1="Stormsoul Ring",ring2="Demon's Ring",
        back="Toro Cape",waist=gear.ElementalBelt,legs="Iuitl Tights",feet="Iuitl Gaiters +1"}

    sets.precast.WS['Wildfire'].Brew = {ammo=gear.MAbullet,
        head="Wayfarer Circlet",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Hecate's Earring",
        body="Manibozho Jerkin",hands="Iuitl Wristbands",ring1="Stormsoul Ring",ring2="Demon's Ring",
        back="Toro Cape",waist=gear.ElementalBelt,legs="Iuitl Tights",feet="Iuitl Gaiters +1"}
    
    sets.precast.WS['Leaden Salute'] = sets.precast.WS['Wildfire']
    
    
    -- Midcast Sets
    sets.midcast.FastRecast = {
        head="Whirlpool Mask",
        body="Iuitl Vest",hands="Iuitl Wristbands",
        legs="Manibozho Brais",feet="Iuitl Gaiters +1"}
        
    -- Specific spells
    sets.midcast.Utsusemi = sets.midcast.FastRecast

    sets.midcast.CorsairShot = {ammo=gear.QDbullet,
        head="Blood Mask",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Hecate's Earring",
        body="Lanun Frac",hands="Schutzen Mittens",ring1="Hajduk Ring",ring2="Demon's Ring",
        back="Toro Cape",waist="Aquiline Belt",legs="Iuitl Tights",feet="Lanun Bottes"}

    sets.midcast.CorsairShot.Acc = {ammo=gear.QDbullet,
        head="Laksamana's Hat",neck="Stoicheion Medal",ear1="Lifestorm Earring",ear2="Psystorm Earring",
        body="Lanun Frac",hands="Schutzen Mittens",ring1="Stormsoul Ring",ring2="Sangoma Ring",
        back="Navarch's Mantle",waist="Aquiline Belt",legs="Iuitl Tights",feet="Iuitl Gaiters +1"}

    sets.midcast.CorsairShot['Light Shot'] = {ammo=gear.QDbullet,
        head="Laksamana's Hat",neck="Stoicheion Medal",ear1="Lifestorm Earring",ear2="Psystorm Earring",
        body="Lanun Frac",hands="Schutzen Mittens",ring1="Stormsoul Ring",ring2="Sangoma Ring",
        back="Navarch's Mantle",waist="Aquiline Belt",legs="Iuitl Tights",feet="Iuitl Gaiters +1"}

    sets.midcast.CorsairShot['Dark Shot'] = sets.midcast.CorsairShot['Light Shot']


    -- Ranged gear
    sets.midcast.RA = {ammo=gear.RAbullet,
        head="Lanun Tricorne",neck="Ocachi Gorget",ear1="Clearview Earring",ear2="Volley Earring",
        body="Laksamana's Frac",hands="Iuitl Wristbands",ring1="Rajas Ring",ring2="Stormsoul Ring",
        back="Terebellum Mantle",waist="Commodore Belt",legs="Nahtirah Trousers",feet="Iuitl Gaiters +1"}

    sets.midcast.RA.Acc = {ammo=gear.RAbullet_Acc,
        head="Laksamana's Hat",neck="Huani Collar",ear1="Clearview Earring",ear2="Volley Earring",
        body="Laksamana's Frac",hands="Buremte Gloves",ring1="Hajduk Ring",ring2="Beeline Ring",
        back="Libeccio Mantle",waist="Commodore Belt",legs="Thurandaut Tights +1",feet="Laksamana's Bottes"}

    
    -- Sets to return to when not performing an action.
    
    -- Resting sets
    sets.resting = {neck="Wiglen Gorget",ring1="Sheltered Ring",ring2="Paguroidea Ring"}
    

    -- Idle sets
    sets.idle = {ammo=gear.RAbullet,
        head="Whirlpool Mask",neck="Wiglen Gorget",ear1="Clearview Earring",ear2="Volley Earring",
        body="Iuitl Vest",hands="Iuitl Wristbands",ring1="Sheltered Ring",ring2="Paguroidea Ring",
        back="Shadow Mantle",waist="Flume Belt",legs="Nahtirah Trousers",feet="Skadi's Jambeaux +1"}

    sets.idle.Town = {main="Surcouf's Jambiya",range="Eminent Gun",ammo=gear.RAbullet,
        head="Laksamana's Hat",neck="Wiglen Gorget",ear1="Clearview Earring",ear2="Volley Earring",
        body="Laksamana's Frac",hands="Iuitl Wristbands",ring1="Sheltered Ring",ring2="Paguroidea Ring",
        back="Shadow Mantle",waist="Flume Belt",legs="Nahtirah Trousers",feet="Skadi's Jambeaux +1"}
    
    -- Defense sets
    sets.defense.PDT = {
        head="Whirlpool Mask",neck="Twilight Torque",ear1="Clearview Earring",ear2="Volley Earring",
        body="Iuitl Vest",hands="Iuitl Wristbands",ring1="Defending Ring",ring2=gear.DarkRing.physical,
        back="Shadow Mantle",waist="Flume Belt",legs="Nahtirah Trousers",feet="Iuitl Gaiters +1"}

    sets.defense.MDT = {
        head="Whirlpool Mask",neck="Twilight Torque",ear1="Clearview Earring",ear2="Volley Earring",
        body="Iuitl Vest",hands="Iuitl Wristbands",ring1="Defending Ring",ring2="Shadow Ring",
        back="Engulfer Cape",waist="Flume Belt",legs="Nahtirah Trousers",feet="Iuitl Gaiters +1"}
    

    sets.Kiting = {feet="Skadi's Jambeaux +1"}

    -- 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
    sets.engaged.Melee = {ammo=gear.RAbullet,
        head="Whirlpool Mask",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
        body="Iuitl Vest",hands="Iuitl Wristbands",ring1="Rajas Ring",ring2="Epona's Ring",
        back="Atheling Mantle",waist="Windbuffet Belt",legs="Manibozho Brais",feet="Iuitl Gaiters +1"}
    
    sets.engaged.Acc = {ammo=gear.RAbullet,
        head="Whirlpool Mask",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
        body="Iuitl Vest",hands="Iuitl Wristbands",ring1="Rajas Ring",ring2="Epona's Ring",
        back="Atheling Mantle",waist="Hurch'lan Sash",legs="Manibozho Brais",feet="Iuitl Gaiters +1"}

    sets.engaged.Melee.DW = {ammo=gear.RAbullet,
        head="Whirlpool Mask",neck="Asperity Necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
        body="Iuitl Vest",hands="Iuitl Wristbands",ring1="Rajas Ring",ring2="Epona's Ring",
        back="Atheling Mantle",waist="Windbuffet Belt",legs="Manibozho Brais",feet="Iuitl Gaiters +1"}
    
    sets.engaged.Acc.DW = {ammo=gear.RAbullet,
        head="Whirlpool Mask",neck="Asperity Necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
        body="Iuitl Vest",hands="Iuitl Wristbands",ring1="Rajas Ring",ring2="Epona's Ring",
        back="Atheling Mantle",waist="Hurch'lan Sash",legs="Manibozho Brais",feet="Iuitl Gaiters +1"}


    sets.engaged.Ranged = {ammo=gear.RAbullet,
        head="Whirlpool Mask",neck="Twilight Torque",ear1="Clearview Earring",ear2="Volley Earring",
        body="Iuitl Vest",hands="Iuitl Wristbands",ring1="Defending Ring",ring2=gear.DarkRing.physical,
        back="Shadow Mantle",waist="Flume Belt",legs="Nahtirah Trousers",feet="Iuitl Gaiters +1"}
end

-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------

-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
    -- Check that proper ammo is available if we're using ranged attacks or similar.
    if spell.action_type == 'Ranged Attack' or spell.type == 'WeaponSkill' or spell.type == 'CorsairShot' then
        do_bullet_checks(spell, spellMap, eventArgs)
    end
	
-- Run after the default precast() is done.
function job_post_precast(spell, action, spellMap, eventArgs)
    if state.RangedMode.value == 'Acc' then
        equip(gear.RAbullet_Acc)
    end
end

    -- gear sets
    if (spell.type == 'CorsairRoll' or spell.english == "Double-Up") and state.LuzafRing.value then
        equip(sets.precast.LuzafRing)
    elseif spell.type == 'CorsairShot' and state.CastingMode.value == 'Resistant' then
        classes.CustomClass = 'Acc'
    elseif spell.english == 'Fold' and buffactive['Bust'] == 2 then
        if sets.precast.FoldDoubleBust then
            equip(sets.precast.FoldDoubleBust)
            eventArgs.handled = true
        end
    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 spell.type == 'CorsairRoll' and not spell.interrupted then
        display_roll_info(spell)
    end
end

-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------

-- Return a customized weaponskill mode to use for weaponskill sets.
-- Don't return anything if you're not overriding the default value.
function get_custom_wsmode(spell, spellMap, default_wsmode)
    if buffactive['Transcendancy'] then
        return 'Brew'
    end
end


-- 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)
    if newStatus == 'Engaged' and player.equipment.main == 'Chatoyant Staff' then
        state.OffenseMode:set('Ranged')
    end
end


-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
    local msg = ''
    
    msg = msg .. 'Off.: '..state.OffenseMode.current
    msg = msg .. ', Rng.: '..state.RangedMode.current
    msg = msg .. ', WS.: '..state.WeaponskillMode.current
    msg = msg .. ', QD.: '..state.CastingMode.current

    if state.DefenseMode.value ~= 'None' then
        local defMode = state[state.DefenseMode.value ..'DefenseMode'].current
        msg = msg .. ', Defense: '..state.DefenseMode.value..' '..defMode
    end
    
    if state.Kiting.value then
        msg = msg .. ', Kiting'
    end
    
    if state.PCTargetMode.value ~= 'default' then
        msg = msg .. ', Target PC: '..state.PCTargetMode.value
    end

    if state.SelectNPCTargets.value then
        msg = msg .. ', Target NPCs'
    end

    msg = msg .. ', Roll Size: ' .. ((state.LuzafRing.value and 'Large') or 'Small')
    
    add_to_chat(122, msg)

    eventArgs.handled = true
end


-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------

function define_roll_values()
    rolls = {
        ["Corsair's Roll"]   = {lucky=5, unlucky=9, bonus="Experience Points"},
        ["Ninja Roll"]       = {lucky=4, unlucky=8, bonus="Evasion"},
        ["Hunter's Roll"]    = {lucky=4, unlucky=8, bonus="Accuracy"},
        ["Chaos Roll"]       = {lucky=4, unlucky=8, bonus="Attack"},
        ["Magus's Roll"]     = {lucky=2, unlucky=6, bonus="Magic Defense"},
        ["Healer's Roll"]    = {lucky=3, unlucky=7, bonus="Cure Potency Received"},
        ["Puppet Roll"]      = {lucky=4, unlucky=8, bonus="Pet Magic Accuracy/Attack"},
        ["Choral Roll"]      = {lucky=2, unlucky=6, bonus="Spell Interruption Rate"},
        ["Monk's Roll"]      = {lucky=3, unlucky=7, bonus="Subtle Blow"},
        ["Beast Roll"]       = {lucky=4, unlucky=8, bonus="Pet Attack"},
        ["Samurai Roll"]     = {lucky=2, unlucky=6, bonus="Store TP"},
        ["Evoker's Roll"]    = {lucky=5, unlucky=9, bonus="Refresh"},
        ["Rogue's Roll"]     = {lucky=5, unlucky=9, bonus="Critical Hit Rate"},
        ["Warlock's Roll"]   = {lucky=4, unlucky=8, bonus="Magic Accuracy"},
        ["Fighter's Roll"]   = {lucky=5, unlucky=9, bonus="Double Attack Rate"},
        ["Drachen Roll"]     = {lucky=3, unlucky=7, bonus="Pet Accuracy"},
        ["Gallant's Roll"]   = {lucky=3, unlucky=7, bonus="Defense"},
        ["Wizard's Roll"]    = {lucky=5, unlucky=9, bonus="Magic Attack"},
        ["Dancer's Roll"]    = {lucky=3, unlucky=7, bonus="Regen"},
        ["Scholar's Roll"]   = {lucky=2, unlucky=6, bonus="Conserve MP"},
        ["Bolter's Roll"]    = {lucky=3, unlucky=9, bonus="Movement Speed"},
        ["Caster's Roll"]    = {lucky=2, unlucky=7, bonus="Fast Cast"},
        ["Courser's Roll"]   = {lucky=3, unlucky=9, bonus="Snapshot"},
        ["Blitzer's Roll"]   = {lucky=4, unlucky=9, bonus="Attack Delay"},
        ["Tactician's Roll"] = {lucky=5, unlucky=8, bonus="Regain"},
        ["Allies's Roll"]    = {lucky=3, unlucky=10, bonus="Skillchain Damage"},
        ["Miser's Roll"]     = {lucky=5, unlucky=7, bonus="Save TP"},
        ["Companion's Roll"] = {lucky=2, unlucky=10, bonus="Pet Regain and Regen"},
        ["Avenger's Roll"]   = {lucky=4, unlucky=8, bonus="Counter Rate"},
    }
end

function display_roll_info(spell)
    rollinfo = rolls[spell.english]
    local rollsize = (state.LuzafRing.value and 'Large') or 'Small'

    if rollinfo then
        add_to_chat(104, spell.english..' provides a bonus to '..rollinfo.bonus..'.  Roll size: '..rollsize)
        add_to_chat(104, 'Lucky roll is '..tostring(rollinfo.lucky)..', Unlucky roll is '..tostring(rollinfo.unlucky)..'.')
    end
end


-- Determine whether we have sufficient ammo for the action being attempted.
function do_bullet_checks(spell, spellMap, eventArgs)
    local bullet_name
    local bullet_min_count = 1
    
    if spell.type == 'WeaponSkill' then
        if spell.skill == "Marksmanship" then
            if spell.element == 'None' then
                -- physical weaponskills
                bullet_name = gear.WSbullet
            else
                -- magical weaponskills
                bullet_name = gear.MAbullet
            end
        else
            -- Ignore non-ranged weaponskills
            return
        end
    elseif spell.type == 'CorsairShot' then
        bullet_name = gear.QDbullet
    elseif spell.action_type == 'Ranged Attack' then
        bullet_name = gear.RAbullet
	elseif state.RangedMode.value == 'Acc' then
		bullet_name = gear.RAbullet_Acc
	end		
        if buffactive['Triple Shot'] then
            bullet_min_count = 3
        end
    end
    
    local available_bullets = player.inventory[bullet_name] or player.wardrobe[bullet_name]
    
    -- If no ammo is available, give appropriate warning and end.
    if not available_bullets then
        if spell.type == 'CorsairShot' and player.equipment.ammo ~= 'empty' then
            add_to_chat(104, 'No Quick Draw ammo left.  Using what\'s currently equipped ('..player.equipment.ammo..').')
            return
        elseif spell.type == 'WeaponSkill' and player.equipment.ammo == gear.RAbullet then
            add_to_chat(104, 'No weaponskill ammo left.  Using what\'s currently equipped (standard ranged bullets: '..player.equipment.ammo..').')
            return
        else
            add_to_chat(104, 'No ammo ('..tostring(bullet_name)..') available for that action.')
            eventArgs.cancel = true
            return
        end
    end
    
    -- Don't allow shooting or weaponskilling with ammo reserved for quick draw.
    if spell.type ~= 'CorsairShot' and bullet_name == gear.QDbullet and available_bullets.count <= bullet_min_count then
        add_to_chat(104, 'No ammo will be left for Quick Draw.  Cancelling.')
        eventArgs.cancel = true
        return
    end
    
    -- Low ammo warning.
    if spell.type ~= 'CorsairShot' and state.warned.value == false
        and available_bullets.count > 1 and available_bullets.count <= options.ammo_warning_limit then
        local msg = '*****  LOW AMMO WARNING: '..bullet_name..' *****'
        --local border = string.repeat("*", #msg)
        local border = ""
        for i = 1, #msg do
            border = border .. "*"
        end
        
        add_to_chat(104, border)
        add_to_chat(104, msg)
        add_to_chat(104, border)

        state.warned:set()
    elseif available_bullets.count > options.ammo_warning_limit and state.warned then
        state.warned:reset()
    end
end	

-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
    set_macro_page(1, 7)
end




Now when I try to load I'm getting the error
"Rabies_COR.lua:482: '<eof>' expected near 'end'"
Tried google but couldn't really find anyone that had same problem and a solution you know what this is cause by?
 Bismarck.Airgetlamh
Offline
Serveur: Bismarck
Game: FFXI
user: Arnegis
Posts: 6
By Bismarck.Airgetlamh 2015-02-13 07:27:34
Link | Citer | R
 
Odin.Quixacotl said: »
Bismarck.Airgetlamh said: »
Using Mote's MNK file. All works fine except the impetus rule. I'm using a sidecar file with my own gearsets in which I define the sets.impetus_body the rule calls for in the main file.

Mote MNK

Lines 291-300.

No idea why it's not working.
Any ideas?

Thanks
Does your sidecar include the function user_setup block?

Your sidecar should look like this:
Code
-------------------------------------------------------------------------------------------------------------------
-- 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('Normal', 'SomeAcc', 'Acc', 'Fodder')
    state.WeaponskillMode:options('Normal', 'SomeAcc', 'Acc', 'Fodder')
    state.HybridMode:options('Normal', 'PDT', 'Counter')
    state.PhysicalDefenseMode:options('PDT', 'HP')

    update_combat_form()
    update_melee_groups()

    select_default_macro_book()
end

-- Define sets and vars used by this job file.
function init_gear_sets()
    -- Gear
    -- More Gear
end

Well that's embarrassing. Out of all my gear files, this is the only one I don't have the vars in at the start.... ugh.
Thanks!
 Odin.Quixacotl
Offline
Serveur: Odin
Game: FFXI
user: Quixacotl
Posts: 170
By Odin.Quixacotl 2015-02-13 08:04:02
Link | Citer | R
 
Cerberus.Rabies said: »
Thanks for the help and quick reply it's very helpful wish I wasn't so computer illiterate at times. I replaced everything with what you said:

Now when I try to load I'm getting the error
"Rabies_COR.lua:482: '<eof>' expected near 'end'"
Tried google but couldn't really find anyone that had same problem and a solution you know what this is cause by?
That's what happens when you post half a function block. When it's corrected and you paste that back then things don't fall into the right places.

Anyways I buttoned everything up so there should be no errors. It should do what you're asking. Hit Alt-F9 to cycle RangedMode:Normal and RangedMode:Acc and Eminent and Adlivun Bullets accordingly for RA. http://pastebin.com/KdiUM8pk
First Page 2 3 ... 52 53 54 ... 182 183 184
Log in to post.