Item Search
     
BG-Wiki Search
Closed Thread
Page 52 of 302 FirstFirst ... 2 42 50 51 52 53 54 62 102 ... LastLast
Results 1021 to 1040 of 6036

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

  1. #1021
    Sea Torques
    Join Date
    Jun 2012
    Posts
    570
    BG Level
    5
    FFXI Server
    Asura
    WoW Realm
    The Scryers

    Quote Originally Posted by Sechs View Post
    Ok that's to define the possible commands into the GS lua file, to make it "receptive" to those commands.
    And then how do you call them from the console?

    "/console GS c tstavetouseACC"?
    Or like Motenten suggested, something like "/console GS c set TableName_index X", where X is the number of the set inside that table that I want to "equip" and turn into the current default one.
    Well... supposing I managed to understand.
    Really hope I'll get some time to actually test these things in-game this weekend.
    Lately I get so little time to play that when I manage to log I wanna do stuff instead of spending hours refining my spellcast/gearswap/macros lol
    Yeah I know, it sounds very lazy... it is!



    Slightly OT, what's the purpose of "includes"? They were present in SC too but I never used (like to keep my files as straightforward/simple as possible, and tbh I didn't even use SC for all of my jobs)
    I always imagined includes as a way to create and define sets/rules in a single file, and then use those rules/sets in multiple job-specific files. So that if you need to do some updating/changes you do it in the central file, and then it spreads to all other files who use that main one as one of their "includes".
    Is this correct?
    "/console GS c set TableName_index X" only works if you already have the "set" command, if its for the RUN Lua you posted in the shop thread, it wont work. Would need to copy it from other .lua that already have it... Or I guess is somewhere in this thread too..

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

    Quote Originally Posted by dlsmd View Post
    i have a question with my SMN.lua
    http://pastebin.com/sfCz1hWH <--i posted this so you could see what my code looks like

    is this a valid way to change gear based on what avatar i have??
    sets.Engaged.none.yespet = set_combine(sets.Engaged.none.nopet, {main=[pettype.Summon.weapon[pet.element]]})
    No, it's not valid. get_sets() is only run once, when the script is first loaded. The above will hardcode the pet.element value of whatever pet you have (if any) when you load the script, and never change it after that.

    It also refers to the pettype table before it's defined, which is invalid as well.

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

    Quote Originally Posted by Sechs View Post
    Ok that's to define the possible commands into the GS lua file, to make it "receptive" to those commands.
    And then how do you call them from the console?

    "/console GS c tstavetouseACC"?
    Remember, you only ever use "/console" when writing an in-game macro. If you're using a keybind (which intrinsically sends the command directly to the console), leave that part off. So, macro: "/console GS c tstavetouseACC"; keybind: "GS c tstavetouseACC".

    Further, to clarify, if you're using a "gs c" command (ie: a self-command), everything starting with the word after the "c" is sent directly to your self_command() function. In other words, if you set the above keybind and hit it, then:

    Code:
    function self_command(command)
        -- this is the value the parameter will have:
        command == "tstavetouseACC"
    Or, if you used the macro "/console GS c set TableName_index X", then:

    Code:
    function self_command(command)
        -- this is the value the parameter will have:
        command == "set TableName_index X"
    Note that it sends it as all one string, not broken up into words. The system merely gives you exactly what you typed in (with a couple caveats that you're unlikely to encounter). It's entirely up to you to decide what to do with that text.

    In my example code a few posts ago, I used command:split(" ") to split the command into individual words. That way I could immediately tell if the first word of the command was "set" (or "increment", in the example), and use logic appropriate for setting a variable to a value from there.

    So, you don't "have" to write things any particular way, you just have to know how you intend to write the commands, and set up the logic to deal with them as you wrote them.

  4. #1024

    Quote Originally Posted by Motenten View Post
    No, it's not valid. get_sets() is only run once, when the script is first loaded. The above will hardcode the pet.element value of whatever pet you have (if any) when you load the script, and never change it after that.

    It also refers to the pettype table before it's defined, which is invalid as well.
    you would not know how i could do it then would you??

    also no mater what i do i cant get any thing with the below code in any form to work(i have tried to do it several ways but no luck)

    this is just code to show its working for now
    function buff_change(name,gain)
    if name == 'Sleep' then
    if gain then
    send_command('@input /echo ----- sleep gained -----')
    else
    send_command('@input /echo ----- sleep lost -----')
    end
    end
    end

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

    Remember to use [code] tags when you write code, so that it's readable.

    Code:
    function get_sets()
    
    -- Add a 'None' value to the staff list, to handle the default when you have no pet.
        .. ['None'] = "Sedikutchi"
    
    -- After the pettype table is defined, you can set this to get a default value that matches your existing pet on script load, if any.
        with.mainstaff = {name=pettype.Summon.weapon[pet.element or "None"]}
    
    -- The above needs to be defined before you use them in any gear sets
    
    -- Then just add that variable to the top level of each set chain (ie: you don't have to re-specify the value in the derived sets).
        sets.Engaged.none.nopet = {
                    main=with.mainstaff,  ...
    
    
    
    -- Then any time you gain or lose a pet, update the value.  You will then equip the appropriate staff anytime you use the equip() command.
    function pet_change(pet, gain)
        if gain then
            with.mainstaff.name = pettype.Summon.weapon[pet.element]
        else
            with.mainstaff.name = pettype.Summon.weapon["None"]
        end
    end

    Use this code to see exactly what buff you're gaining/losing when slept. Make sure it matches what you think you're testing for.
    Code:
    function buff_change(buff, gain)
        add_to_chat(123,"Buff="..buff..', gain='..tostring(gain))
    end

  6. #1026

    Quote Originally Posted by Motenten View Post
    Remember to use [code] tags when you write code, so that it's readable.

    Use this code to see exactly what buff you're gaining/losing when slept. Make sure it matches what you think you're testing for.
    Code:
    function buff_change(buff, gain)
        add_to_chat(123,"Buff="..buff..', gain='..tostring(gain))
    end
    this is giving me an error
    attempt to concatenate global 'buff' (a nil value)

    --edit--
    in had to change this ..buff.. to ..name..

    --edit2--
    ok i figured it out some of the buffs are capitalized and some are not i needed sleep not Sleep

    --edit3--
    so for the sum.lua this should work??
    http://pastebin.com/sfCz1hWH

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

    Quote Originally Posted by dlsmd
    so for the sum.lua this should work??
    http://pastebin.com/sfCz1hWH
    They're still out of order. Remember, a variable has to exist before you can use it (or rather, for it to be at all meaningful when it's used). You reference with.mainstaff before you define it, and with.mainstaff references pettype.Summon.weapon before you define it. You need to reverse the order in which you define things for them.

    You also have an orphan parenthesis in one of your comparisons:
    Code:
            if Changesumstaff then)

  8. #1028

    Quote Originally Posted by Motenten View Post
    They're still out of order. Remember, a variable has to exist before you can use it (or rather, for it to be at all meaningful when it's used). You reference with.mainstaff before you define it, and with.mainstaff references pettype.Summon.weapon before you define it. You need to reverse the order in which you define things for them.

    You also have an orphan parenthesis in one of your comparisons:
    Code:
            if Changesumstaff then)
    this should be better http://pastebin.com/sfCz1hWH
    i was thinking that order outside of the if/elseif/else did not mater

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

    You fixed maintaff relative to pettype, but not mainstaff relative to gear sets.

  10. #1030

    Quote Originally Posted by Motenten View Post
    You fixed maintaff relative to pettype, but not mainstaff relative to gear sets.
    question
    with.mainstaff.name = pettype.Summon.weapon[pet.element] just changes the variable with.mainstaff to the correct weapon??
    i.e.
    with.mainstaff = 'Atar III' if the pet is a fire element or if its ifrit

    if that's the case you can look at my weapon skill include the variables do not need to be put before the sets for it to work because those work with out issue and the same is true for my mage staves include

    Weapon Skill include.lua = http://pastebin.com/mVyt5YeN
    Mage Staves include.lua = http://pastebin.com/QM1PXc1T

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

    At no point in either of those files do you ever define a variable before you use it.

    In your smn lua, you reference an undefined variable, which means that it assigns a value of nil to that spot. You then later create a table and assign it to that variable, but that table isn't hooked in to the point where you'll later want to reference it (the gear sets), so it won't work.

  12. #1032

    Quote Originally Posted by Motenten View Post
    At no point in either of those files do you ever define a variable before you use it.

    In your smn lua, you reference an undefined variable, which means that it assigns a value of nil to that spot. You then later create a table and assign it to that variable, but that table isn't hooked in to the point where you'll later want to reference it (the gear sets), so it won't work.
    ok understood
    it should be fixed now http://pastebin.com/sfCz1hWH

    1 more question is there a way to do something when the targest hpp is less then a specific amount with out doing anything(i.e. casting a spell or using a weapon skill,jobability etc.)

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

    Looks decent from just a quick scan.

    1 more question is there a way to do something when the targest hpp is less then a specific amount with out doing anything(i.e. casting a spell or using a weapon skill,jobability etc.)
    No.

  14. #1034
    Smells like Onions
    Join Date
    Mar 2014
    Posts
    5
    BG Level
    0

    Hey, I was wondering with Motes BRD LUA how would you go about changing his Daurdabla actions into the new Terpander instead.

    I have my own seperate brd_gear file for the gear changes but here is a copy of the main LUA:
    Code:
    -------------------------------------------------------------------------------------------------------------------
    -- 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.
    
    --[[
    	Custom commands:
    	
    	Daurdabla has a set of modes: None, Dummy, Daurdabla
    	
    	You can set these via the standard 'set' and 'cycle' self-commands.  EG:
    	gs c cycle daurdabla
    	gs c set daurdabla Dummy
    	
    	The Dummy state will equip the Daurdabla and ensure non-duration gear is equipped.
    	The Daurdabla state will simply equip the Daurdabla on top of standard gear.
    	
    	Use the Dummy version to put up dummy songs that can be overwritten by full-potency songs.
    	
    	Use the Daurdabla version to simply put up additional songs without worrying about dummy songs.
    	
    	
    	Simple macro to cast a dummy Daurdabla song:
    	/console gs c set daurdabla Dummy
    	/ma "Shining Fantasia" <me>
    	
    	
    	There is also an auto-handling of Daurdabla songs, via the state.AutoDaurdabla flag:
    	
    	If state.DaurdablaMode is None, and if currently tracked songs (via timers) is less
    	than the max we could sing while using the Daurdabla, and if the song is cast on
    	self (rather than Pianissimo on another player), then it will equip the Daurdabla on
    	top of standard duration gear.
    
    --]]
    
    -- 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.Buff['Pianissimo'] = buffactive['pianissimo'] or false
    
    	options.DaurdablaModes = {'None','Dummy','Daurdabla'}
    	state.DaurdablaMode = 'None'
    
    	-- For tracking current recast timers via the Timers plugin.
    	timer_reg = {}
    end
    
    
    -- Setup vars that are user-dependent.  Can override this function in a sidecar file.
    function user_setup()
    	-- Options: Override default values
    	options.CastingModes = {'Normal', 'Resistant'}
    	options.OffenseModes = {'None', 'Normal'}
    	options.DefenseModes = {'Normal'}
    	options.WeaponskillModes = {'Normal'}
    	options.IdleModes = {'Normal', 'PDT'}
    	options.RestingModes = {'Normal'}
    	options.PhysicalDefenseModes = {'PDT'}
    	options.MagicalDefenseModes = {'MDT'}
    
    	state.Defense.PhysicalMode = 'PDT'
    	state.OffenseMode = 'None'
    
    	brd_daggers = S{'Izhiikoh', 'Vanir Knife', 'Atoyac', 'Aphotic Kukri'}
    	pick_tp_weapon()
    	
    	-- How many extra songs we can keep from Daurdabla
    	info.DaurdablaSongs = 2
    	-- Whether to try to automatically use Daurdabla when an appropriate gap in current vs potential
    	-- songs appears, and you haven't specifically changed state.DaurdablaMode.
    	state.AutoDaurdabla = false
    	
    	-- Additional local binds
    	send_command('bind ^` input /ma "Chocobo Mazurka" <me>')
    
    	-- Default macro set/book
    	set_macro_page(2, 18)
    end
    
    
    -- Called when this job file is unloaded (eg: job change)
    function file_unload()
    	if binds_on_unload then
    		binds_on_unload()
    	end
    
    	send_command('unbind ^`')
    end
    
    
    -- Define sets and vars used by this job file.
    function init_gear_sets()
    	--------------------------------------
    	-- Start defining the sets
    	--------------------------------------
    	
    	-- Precast Sets
    
    	-- Fast cast sets for spells
    	sets.precast.FC = {head="Nahtirah Hat",ear2="Loquac. Earring",
    		hands="Gendewitha Gages",ring1="Prolix Ring",
    		back="Swith Cape",waist="Witful Belt",legs="Orvail Pants +1",feet="Chelona Boots +1"}
    
    	sets.precast.FC.Cure = set_combine(sets.precast.FC, {body="Heka's Kalasiris"})
    
    	sets.precast.FC.EnhancingMagic = set_combine(sets.precast.FC, {waist="Siegel Sash"})
    
    	sets.precast.FC.BardSong = {main="Felibre's Dague",range="Gjallarhorn",
    		head="Aoidos' Calot +2",neck="Aoidos' Matinee",ear1="Aoidos' Earring",ear2="Loquac. Earring",
    		body="Sha'ir Manteel",hands="Gendewitha Gages",ring1="Prolix Ring",
    		back="Swith Cape",waist="Witful Belt",legs="Gendewitha Spats",feet="Bokwus Boots"}
    
    	sets.precast.FC.Daurdabla = set_combine(sets.precast.FC.BardSong, {range="Daurdabla"})
    		
    	
    	-- Precast sets to enhance JAs
    	
    	sets.precast.JA.Nightingale = {feet="Bihu Slippers"}
    	sets.precast.JA.Troubadour = {body="Bard's Justaucorps +2"}
    	sets.precast.JA['Soul Voice'] = {legs="Bard's Cannions +2"}
    
    	-- Waltz set (chr and vit)
    	sets.precast.Waltz = {range="Gjallarhorn",
    		head="Nahtirah Hat",
    		body="Gendewitha Bliaut",hands="Buremte Gloves",
    		back="Refraction Cape",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
    	
           
    	-- Weaponskill sets
    	-- Default set for any weaponskill that isn't any more specifically defined
    	sets.precast.WS = {range="Gjallarhorn",
    		head="Nahtirah Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
    		body="Bard's Justaucorps +2",hands="Buremte Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
    		back="Atheling Mantle",waist="Caudata Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
    	
    	-- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
    	sets.precast.WS['Evisceration'] = {
    		head="Nahtirah Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
    		body="Bard's Justaucorps +2",hands="Buremte Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
    		back="Atheling Mantle",waist="Caudata Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
    
    	sets.precast.WS['Exenterator'] = {
    		head="Nahtirah Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
    		body="Bard's Justaucorps +2",hands="Buremte Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
    		back="Atheling Mantle",waist="Caudata Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
    
    	sets.precast.WS['Mordant Rime'] = {range="Gjallarhorn",
    		head="Nahtirah Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
    		body="Bard's Justaucorps +2",hands="Buremte Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
    		back="Atheling Mantle",waist="Caudata Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
    	
    	
    	-- Midcast Sets
    
    	-- General set for recast times.
    	sets.midcast.FastRecast = {range="Angel Lyre",
    		head="Nahtirah Hat",ear2="Loquacious Earring",
    		body="Vanir Cotehardie",hands="Gendewitha Gages",ring1="Prolix Ring",
    		back="Swith Cape",waist="Goading Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
    		
    	-- 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.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="Wind Torque",waist="Corvax Sash",legs="Aoidos' Rhing. +2"}
    
    	sets.midcast.Mazurka = {range="Daurdabla"}
    	
    
    	-- For song buffs (duration and AF3 set bonus)
    	sets.midcast.SongEffect = {main="Legato Dagger",range="Gjallarhorn",
    		head="Aoidos' Calot +2",neck="Aoidos' Matinee",ear2="Loquacious Earring",
    		body="Aoidos' Hongreline +2",hands="Aoidos' Manchettes +2",ring1="Prolix Ring",
    		back="Harmony Cape",waist="Corvax Sash",legs="Marduk's Shalwar +1",feet="Brioso Slippers"}
    
    	-- For song defbuffs (duration primary, accuracy secondary)
    	sets.midcast.SongDebuff = {main="Legato Dagger",range="Gjallarhorn",
    		head="Nahtirah Hat",neck="Aoidos' Matinee",ear1="Psystorm Earring",ear2="Lifestorm Earring",
    		body="Aoidos' Hongreline +2",hands="Aoidos' Manchettes +2",ring1="Prolix Ring",ring2="Sangoma Ring",
    		back="Refraction Cape",waist="Goading Belt",legs="Marduk's Shalwar +1",feet="Brioso Slippers"}
    
    	-- For song defbuffs (accuracy primary, duration secondary)
    	sets.midcast.ResistantSongDebuff = {main="Izhiikoh",range="Gjallarhorn",
    		head="Nahtirah Hat",neck="Wind Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
    		body="Brioso Justaucorps +1",hands="Aoidos' Manchettes +2",ring1="Prolix Ring",ring2="Sangoma Ring",
    		back="Refraction Cape",waist="Goading Belt",legs="Aoidos' Rhing. +2",feet="Bokwus Boots"}
    
    	-- Song-specific recast reduction
    	sets.midcast.SongRecast = {ear2="Loquacious Earring",
    		ring1="Prolix Ring",
    		back="Harmony Cape",waist="Corvax Sash",legs="Aoidos' Rhing. +2"}
    
    	--sets.midcast.Daurdabla = set_combine(sets.midcast.FastRecast, sets.midcast.SongRecast, {range="Daurdabla"})
    
    	-- Cast spell with normal gear, except using Daurdabla instead
    	sets.midcast.Daurdabla = {range="Daurdabla"}
    
    	-- Dummy song with Daurdabla; minimize duration to make it easy to overwrite.
    	sets.midcast.DaurdablaDummy = {main="Izhiikoh",range="Daurdabla",
    		head="Nahtirah Hat",neck="Wind Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
    		body="Brioso Justaucorps +1",hands="Aoidos' Manchettes +2",ring1="Prolix Ring",ring2="Sangoma Ring",
    		back="Swith Cape",waist="Goading Belt",legs="Gendewitha Spats",feet="Bokwus Boots"}
    
    	-- Other general spells and classes.
    	sets.midcast.Cure = {main="Arka IV",sub='Achaq Grip',
    		head="Gendewitha Caubeen",
    		body="Gendewitha Bliaut",hands="Bokwus Gloves",ring1="Ephedra Ring",ring2="Sirona's Ring",
    		legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
    		
    	sets.midcast.Curaga = sets.midcast.Cure
    		
    	sets.midcast.Stoneskin = {
    		head="Nahtirah Hat",
    		body="Gendewitha Bliaut",hands="Gendewitha Gages",
    		legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
    		
    	sets.midcast.Cursna = {
    		neck="Malison Medallion",
    		hands="Hieros Mittens",ring1="Ephedra Ring"}
    
    	
    	-- Sets to return to when not performing an action.
    	
    	-- Resting sets
    	sets.resting = {main=gear.Staff.HMP, 
    		body="Gendewitha Bliaut",
    		legs="Nares Trews",feet="Chelona Boots +1"}
    	
    	
    	-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
    	sets.idle = {main=gear.Staff.PDT, sub="Mephitis Grip",range="Oneiros Harp",
    		head="Gendewitha Caubeen",neck="Wiglen Gorget",ear1="Bloodgem Earring",ear2="Loquacious Earring",
    		body="Gendewitha Bliaut",hands="Gendewitha Gages",ring1="Paguroidea Ring",ring2="Sangoma Ring",
    		back="Umbra Cape",waist="Flume Belt",legs="Nares Trews",feet="Aoidos' Cothurnes +2"}
    
    	sets.idle.Town = {main=gear.Staff.PDT, sub="Mephitis Grip",range="Oneiros Harp",
    		head="Gendewitha Caubeen",neck="Wiglen Gorget",ear1="Bloodgem Earring",ear2="Loquacious Earring",
    		body="Gendewitha Bliaut",hands="Gendewitha Gages",ring1="Paguroidea Ring",ring2="Sangoma Ring",
    		back="Umbra Cape",waist="Flume Belt",legs="Nares Trews",feet="Aoidos' Cothurnes +2"}
    	
    	sets.idle.Weak = {main=gear.Staff.PDT,sub="Mephitis Grip",range="Oneiros Harp",
    		head="Gendewitha Caubeen",neck="Twilight Torque",ear1="Bloodgem Earring",
    		body="Gendewitha Bliaut",hands="Gendewitha Gages",ring1="Dark Ring",ring2="Sangoma Ring",
    		back="Umbra Cape",waist="Flume Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
    	
    	
    	-- Defense sets
    
    	sets.defense.PDT = {main=gear.Staff.PDT,sub="Mephitis Grip",
    		head="Gendewitha Caubeen",neck="Twilight Torque",
    		body="Gendewitha Bliaut",hands="Gendewitha Gages",ring1='Dark Ring',
    		back="Umbra Cape",waist="Flume Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
    
    	sets.defense.MDT = {main=gear.Staff.PDT,sub="Mephitis Grip",
    		head="Nahtirah Hat",neck="Twilight Torque",
    		body="Gendewitha Bliaut",hands="Gendewitha Gages",ring1='Dark Ring',ring2="Shadow Ring",
    		back="Engulfer Cape",waist="Flume Belt",legs="Bokwus Slops",feet="Gendewitha Galoshes"}
    
    	sets.Kiting = {feet="Aoidos' Cothurnes +2"}
    
    	-- 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
    	
    	-- Basic set for if no TP weapon is defined.
    	sets.engaged = {range="Angel Lyre",
    		head="Nahtirah Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
    		body="Vanir Cotehardie",hands="Buremte Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
    		back="Atheling Mantle",waist="Goading Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
    
    	-- Sets with weapons defined.
    	sets.engaged.Dagger = {range="Angel Lyre",
    		head="Nahtirah Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
    		body="Vanir Cotehardie",hands="Buremte Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
    		back="Atheling Mantle",waist="Goading Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
    
    	-- Set if dual-wielding
    	sets.engaged.DualWield = {range="Angel Lyre",
    		head="Nahtirah Hat",neck="Asperity Necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
    		body="Vanir Cotehardie",hands="Buremte Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
    		back="Atheling Mantle",waist="Goading Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
    end
    
    
    -------------------------------------------------------------------------------------------------------------------
    -- Job- versions of event handlers, allowing overriding default handling.
    -------------------------------------------------------------------------------------------------------------------
    
    -- 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)
    	if spell.type == 'BardSong' then
    		-- Auto-Pianissimo
    		if spell.target.type == 'PLAYER' and not spell.target.charmed and not state.Buff['Pianissimo'] then
    			cancel_spell()
    			send_command('@input /ja "Pianissimo" <me>; wait 1.25; input /ma "'..spell.name..'" '..spell.target.name)
    			eventArgs.cancel = true
    			return
    		end
    	end
    end
    
    
    -- 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
    		-- Default base equipment layer of fast recast.
    		equip(sets.midcast.FastRecast)
    
    		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
    
    
    function job_post_midcast(spell, action, spellMap, eventArgs)
    	if spell.type == 'BardSong' then
    		if state.DaurdablaMode == 'Daurdabla' then
    			equip(sets.midcast.Daurdabla)
    		elseif state.DaurdablaMode == 'None' and spell.target.type == 'SELF' and state.AutoDaurdabla and daur_song_gap() then
    			equip(sets.midcast.Daurdabla)
    		end
    
    		state.DaurdablaMode = 'None'
    	end
    end
    
    
    -- Set eventArgs.handled to true if we don't want automatic gear equipping to be done.
    function job_aftercast(spell, action, spellMap, eventArgs)
    	if not spell.interrupted then
    		if state.Buff[spell.name] ~= nil then
    			state.Buff[spell.name] = true
    		end
    
    		if spell.type == 'BardSong' then
    			if spell.target then
    				if spell.target.type and spell.target.type:upper() == 'SELF' then
    					adjust_Timers(spell, action, spellMap)
    				end
    			end
    		end
    	end
    end
    
    -------------------------------------------------------------------------------------------------------------------
    -- Hooks for other events that aren't handled by the include file.
    -------------------------------------------------------------------------------------------------------------------
    
    function job_buff_change(buff, gain)
    	if state.Buff[buff] ~= nil then
    		state.Buff[buff] = gain
    	end
    end
    
    -------------------------------------------------------------------------------------------------------------------
    -- Hooks for Daurdabla mode handling.
    -------------------------------------------------------------------------------------------------------------------
    
    -- Request job-specific mode tables.
    -- Return true on the third returned value to indicate an error: that we didn't recognize the requested field.
    function job_get_mode_list(field)
    	if field == 'Daurdabla' and player.inventory.daurdabla then
    		return options.DaurdablaModes, state.DaurdablaMode
    	end
    end
    
    -- Set job-specific mode values.
    -- Return true if we recognize and set the requested field.
    function job_set_mode(field, val)
    	if field == 'Daurdabla' then
    		state.DaurdablaMode = val
    		return true
    	end
    end
    
    -------------------------------------------------------------------------------------------------------------------
    -- User code that supplements self-commands.
    -------------------------------------------------------------------------------------------------------------------
    
    -- Called by the 'update' self-command.
    function job_update(cmdParams, eventArgs)
    	pick_tp_weapon()
    end
    
    
    -- Handle notifications of general user state change.
    function job_state_change(stateField, newValue)
    	if stateField == 'OffenseMode' then
    		if newValue == 'Normal' then
    			disable('main','sub')
    		else
    			enable('main','sub')
    		end
    	elseif stateField == 'Reset' then
    		if state.OffenseMode == 'None' then
    			enable('main','sub')
    		end
    	end
    end
    
    -- Function to display the current relevant user state when doing an update.
    -- Return true if display was handled, and you don't want the default info shown.
    function display_current_job_state(eventArgs)
    	local defenseString = ''
    	if state.Defense.Active then
    		local defMode = state.Defense.PhysicalMode
    		if state.Defense.Type == 'Magical' then
    			defMode = state.Defense.MagicalMode
    		end
    
    		defenseString = 'Defense: '..state.Defense.Type..' '..defMode..', '
    	end
    	
    	local meleeString = ''
    	if state.OffenseMode == 'Normal' then
    		if state.CombatForm then
    			meleeString = 'Melee: Dual-wield, '
    		else
    			meleeString = 'Melee: Single-wield, '
    		end
    	end
    
    	add_to_chat(122,'Casting ['..state.CastingMode..'], '..meleeString..'Idle ['..state.IdleMode..'], '..defenseString..
    		'Kiting: '..on_off_names[state.Kiting])
    
    	eventArgs.handled = true
    end
    
    -------------------------------------------------------------------------------------------------------------------
    -- Utility functions specific to this job.
    -------------------------------------------------------------------------------------------------------------------
    
    -- Determine the custom class to use for the given song.
    function get_song_class(spell)
    	if spell.targets:contains('Enemy') then
    		if state.CastingMode == 'Resistant' then
    			return 'ResistantSongDebuff'
    		else
    			return 'SongDebuff'
    		end
    	elseif state.DaurdablaMode == 'Dummy' then
    		return 'DaurdablaDummy'
    	else
    		return 'SongEffect'
    	end
    end
    
    
    -- Function to create custom buff-remaining timers with the Timers plugin,
    -- keeping only the actual valid songs rather than spamming the default
    -- buff remaining timers.
    function adjust_Timers(spell, action, spellMap)
    	local t = os.time()
    	
    	-- Eliminate songs that have already expired from our local list.
    	local tempreg = {}
    	for i,v in pairs(timer_reg) do
    		if v < t then tempreg[i] = true end
    	end
    	for i,v in pairs(tempreg) do
    		timer_reg[i] = nil
    	end
    	
    	local dur = calculate_duration(spell.name, spellMap)
    	if timer_reg[spell.name] then
    		-- Can delete timers that have less than 120 seconds remaining, since
    		-- the new version of the song will overwrite the old one.
    		-- Otherwise create a new timer counting down til we can overwrite.
    		if (timer_reg[spell.name] - t) <= 120 then
    			send_command('timers delete "'..spell.name..'"')
    			timer_reg[spell.name] = t + dur
    			send_command('timers create "'..spell.name..'" '..dur..' down')
    		end
    	else
    		-- Figure out how many songs we can maintain.
    		local maxsongs = 2
    		if player.equipment.range == 'Daurdabla' then
    			maxsongs = maxsongs + info.DaurdablaSongs
    		end
    		if buffactive['Clarion Call'] then
    			maxsongs = maxsongs+1
    		end
    		-- If we have more songs active than is currently apparent, we can still overwrite
    		-- them while they're active, even if not using appropriate gear bonuses (ie: Daur).
    		if maxsongs < table.length(timer_reg) then
    			maxsongs = table.length(timer_reg)
    		end
    		
    		-- Create or update new song timers.
    		if table.length(timer_reg) < maxsongs then
    			timer_reg[spell.name] = t+dur
    			send_command('timers create "'..spell.name..'" '..dur..' down')
    		else
    			local rep,repsong
    			for i,v in pairs(timer_reg) do
    				if t+dur > v then
    					if not rep or rep > v then
    						rep = v
    						repsong = i
    					end
    				end
    			end
    			if repsong then
    				timer_reg[repsong] = nil
    				send_command('timers delete "'..repsong..'"')
    				timer_reg[spell.name] = t+dur
    				send_command('timers create "'..spell.name..'" '..dur..' down')
    			end
    		end
    	end
    end
    
    -- Function to calculate the duration of a song based on the equipment used to cast it.
    -- Called from adjust_Timers(), which is only called on aftercast().
    function calculate_duration(spellName, spellMap)
    	local mult = 1
    	if player.equipment.range == 'Daurdabla' then mult = mult + 0.3 end -- change to 0.25 with 90 Daur
    	if player.equipment.range == "Gjallarhorn" then mult = mult + 0.4 end -- change to 0.3 with 95 Gjall
    	
    	if player.equipment.main == "Carnwenhan" then mult = mult + 0.1 end -- 0.1 for 75, 0.4 for 95, 0.5 for 99/119
    	if player.equipment.main == "Legato Dagger" then mult = mult + 0.1 end
    	if player.equipment.neck == "Aoidos' Matinee" then mult = mult + 0.1 end
    	if player.equipment.body == "Aoidos' Hngrln. +2" then mult = mult + 0.1 end
    	if player.equipment.legs == "Mdk. Shalwar +1" then mult = mult + 0.1 end
    	if player.equipment.feet == "Brioso Slippers" then mult = mult + 0.1 end
    	if player.equipment.feet == "Brioso Slippers +1" then mult = mult + 0.11 end
    	
    	if spellMap == 'Paeon' and player.equipment.head == "Brioso Roundlet" then mult = mult + 0.1 end
    	if spellMap == 'Paeon' and player.equipment.head == "Brioso Roundlet +1" then mult = mult + 0.1 end
    	if spellMap == 'Madrigal' and player.equipment.head == "Aoidos' Calot +2" then mult = mult + 0.1 end
    	if spellMap == 'Minuet' and player.equipment.body == "Aoidos' Hngrln. +2" then mult = mult + 0.1 end
    	if spellMap == 'March' and player.equipment.hands == 'Ad. Mnchtte. +2' then mult = mult + 0.1 end
    	if spellMap == 'Ballad' and player.equipment.legs == "Aoidos' Rhing. +2" then mult = mult + 0.1 end
    	if spellName == "Sentinel's Scherzo" and player.equipment.feet == "Aoidos' Cothrn. +2" then mult = mult + 0.1 end
    	
    	if buffactive.Troubadour then
    		mult = mult*2
    	end
    	if spellName == "Sentinel's Scherzo" then
    		if buffactive['Soul Voice'] then
    			mult = mult*2
    		elseif buffactive['Marcato'] then
    			mult = mult*1.5
    		end
    	end
    	
    	-- Tweak for inaccuracies in cast vs aftercast timing
    	mult = mult - 0.05
    	
    	local totalDuration = mult*120
    
    	return totalDuration
    end
    
    
    function daur_song_gap()
    	if player.inventory.daurdabla then
    		-- Figure out how many songs we can maintain.
    		local maxsongs = 2 + info.DaurdablaSongs
    		
    		local activesongs = table.length(timer_reg)
    		
    		-- If we already have at least 2 songs on, but not enough to max out
    		-- on possible Daur songs, flag us as Daur-ready.
    		if activesongs >= 2 and activesongs < maxsongs then
    			return true
    		end
    	end
    	
    	return false
    end
    
    
    
    -- Examine equipment to determine what our current TP weapon is.
    function pick_tp_weapon()
    	if brd_daggers:contains(player.equipment.main) then
    		state.CombatWeapon = 'Dagger'
    		
    		if S{'NIN','DNC'}:contains(player.sub_job) and brd_daggers:contains(player.equipment.sub) then
    			state.CombatForm = "DualWield"
    		else
    			state.CombatForm = nil
    		end
    	else
    		state.CombatWeapon = nil
    		state.CombatForm = nil
    	end
    end
    I've basically change everything that had Daurdabla(and 2 songs into 1) in it to the new harp, but it just don't seem to do anything. For some reason even using the gs c cycle daurdabla/set daurdabla dummy they don't give me anything either.


    Edit: Managed to fix the BRD Lua now. It was on these:

    Line 214 Daurdabla into Terpander
    Line 386 - if field == 'Daurdabla' and player.inventory.daurdabla then actually needs to be if field == 'Daurdabla' and player.inventory.terpander then

    It was line 386 that kept messing me up, didn't notice it before after going through it.

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

    Im using http://pastebin.com/u/Bokura DRG gearswap and I finally jumped on drg today to mess around. Ive noticed that after i use Restoring Breath it swaps back into melee gear before it finishes breath so i dont recieve the bonus's from wyvern hp. Any idea on how to put a delay in there to give me the extra 2-3 seconds for wyvern hp to count for it? Please and Thanks

  16. #1036
    D. Ring
    Join Date
    Jul 2008
    Posts
    4,529
    BG Level
    7
    FFXI Server
    Phoenix

    It also switches into breath gear after every WS, and it won't swap back in time before you attack always. You'll want to remove whatever was doing that, been a while since I played drg.

  17. #1037

    Quote Originally Posted by Skeelo View Post
    Im using http://pastebin.com/u/Bokura DRG gearswap and I finally jumped on drg today to mess around. Ive noticed that after i use Restoring Breath it swaps back into melee gear before it finishes breath so i dont recieve the bonus's from wyvern hp. Any idea on how to put a delay in there to give me the extra 2-3 seconds for wyvern hp to count for it? Please and Thanks
    Quote Originally Posted by Darkmagi View Post
    It also switches into breath gear after every WS, and it won't swap back in time before you attack always. You'll want to remove whatever was doing that, been a while since I played drg.
    as far as i can tell as long as your using this code http://pastebin.com/MmfE8yxq with no changes it should be working correctly

    how ever having said that if a breath spell comes in before or after a ws is activated it can and probly will mess with the gear setup for eather breaths or weapon skills

    but you can put this in(first) to all pretarget,precast functions which will always kill any spell and stop all gear changes untill the current spell reaches aftercast


    Code:
    	if midaction() or pet_midaction() then
    		cancel_spell()
    		return
    	end

  18. #1038
    Hydra
    Join Date
    Jul 2010
    Posts
    119
    BG Level
    3
    FFXI Server
    Asura

    I'm using mote's brd lua and can't seem to solve an issue with Midcast equipment not always swapping into the Range slot. I can recreate this on demand with every other song not equipping an instrument.

    I tested using knight's minne 1/2 in rolanberry with only an Eluder's Satchet (junk legion ammo drop) and Ghorn in my inventory. I have Eluder's Satchet in my precast.FC.BardSong set for testing purposes. midcast.SongEffect set has Gjallarhorn.

    Every single time, this is what I get:



    Over and over again... not a one time fluke. Changing to a different set of songs doesn't appear to make a difference. What it's supposed to be doing is sending a precast and a micast for every single attempt, instead it's not equipping midcast every other cast. I take that back, when I have all of my normal gear in my inventory, it will equip all the other slots correctly, its the ammo/ranged slot specifically that seems to be failing.

    This makes me thing I screwed something up in my gear file; so I removed it from the data folder and reloaded gearswap. I added an "add_to_chat(123,"Heretic's Test Lua loaded)" line into mote's default brd.lua to verify gearswap was loading the right file. Sadly, same result as the image above.

    I've been doing events all day not realizing my instruments weren't equipping half of the time how to fix?!

    For reference, the entire gearswap file since I know rarely are you able to troubleshoot without seeing the big picture: http://pastebin.com/NwdikKEf


    Many thanks for your time!

  19. #1039
    Sea Torques
    Join Date
    Jun 2012
    Posts
    570
    BG Level
    5
    FFXI Server
    Asura
    WoW Realm
    The Scryers

    Quote Originally Posted by |Heretic| View Post
    I've been doing events all day not realizing my instruments weren't equipping half of the time how to fix?!

    For reference, the entire gearswap file since I know rarely are you able to troubleshoot without seeing the big picture: http://pastebin.com/NwdikKEf


    Many thanks for your time!
    Fix:
    1. Make you own .lua











    1. If your idle/precast/anything prior equipping instrument gear have "ammo" there.. then need to add range=empty and in the sets where you need to equip instrument need to add ammo=empty

    Ex.

    Precast fastcast/occ quickcast
    Code:
    	sets.precast.FC.Song = {
    		head="Aoidos' Calot +2",
    		body="Marduk's Jubbah +1",
    		hands="Gendewitha Gages",
    		legs="Gendewitha Spats",
    		feet="Bihu Slippers",
    		neck="Aoidos' Matinee",
    		waist="Witful Belt",
    		left_ear="Aoidos' Earring",
    		right_ear="Loquac. Earring",
    		left_ring="Prolix Ring",
    		right_ring="Veneficium Ring",
    		back="Ogapepo Cape",
    		range=empty,
    		ammo="Impatiens", <<<<<<<<<<<<<<<<<<<<<<<<<<<
    	        main="Felibre's Dague",
    		sub=empty, <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    }
    Midcast
    Code:
     	sets.midcast.BuffSet = {
    		ammo=empty, <<<<<<<<<<<<<<<<<<<<<<<<
    		head="Aoidos' Calot +2",
    		body="Aoidos' Hngrln. +2",
    		hands="Ad. Mnchtte. +2",
    		legs="Aoidos' Rhing. +2",
    		feet="Aoidos' Cothrn. +2",
    		neck="Aoidos' Matinee",
    		waist="Witful Belt",
    		range="Gjallarhorn", <<<<<<<<<<<<<<<<<
    		left_ear="Aoidos' Earring",
    		right_ear="Loquac. Earring",
    		left_ring="Prolix Ring",
    		right_ring="Balrahn's Ring",
    		back="Swith Cape",
    		main="Legato Dagger",
    		sub="Genbu's Shield",
    }

  20. #1040
    Hydra
    Join Date
    Jul 2010
    Posts
    119
    BG Level
    3
    FFXI Server
    Asura

    Quote Originally Posted by JSHidaka View Post
    Fix:
    1. Make you own .lua
    hurrr

    Quote Originally Posted by JSHidaka View Post
    1. If your idle/precast/anything prior equipping instrument gear have "ammo" there.. then need to add range=empty and in the sets where you need to equip instrument need to add ammo=empty
    Thanks, that worked. Although I don't think I've had this problem in the past going from Incantor Stone (precast) to Aureole (midcast enfeebling). Has slot=empty always been needed?

Closed Thread
Page 52 of 302 FirstFirst ... 2 42 50 51 52 53 54 62 102 ... LastLast

Similar Threads

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