Item Search
     
BG-Wiki Search
Page 50 of 302 FirstFirst ... 40 48 49 50 51 52 60 100 ... LastLast
Results 981 to 1000 of 6036

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

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

    is there any way i can get this to process with no action taking place by me??

    Code:
    if player.target.name == 'Beach Bunny' then
    	if player.target.hpp <= 20 then
    		equip(main="Teiwaz",sub="empty")
    	end
    end

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

    I thought you could probably use windower.register_event('hp change'), but I think that might only trigger when your HP changes, not necessarily your target's. I looked through the other events and didn't see one for other people's HP.

  3. #983
    Melee Summoner
    Join Date
    Jul 2006
    Posts
    35
    BG Level
    1
    FFXI Server
    Quetzalcoatl

    I'm using Motenten's BRD.lua. So I'm using that, Mote-Include, Mote-Globals, Mote-Mappings, Mote-SelfCommands, and Mote-Utility. The toggles and commands from Mote-SelfCommands work except for Casting Mode: Dire. But the ones from BRD.lua don't.

  4. #984
    Campaign
    Join Date
    Jul 2007
    Posts
    6,633
    BG Level
    8

    Lurking in some simpler GS files, I still need to understand what is the index function and how does it work.
    For instance take this

    Code:
                if spell.english == 'Resolution' then
                        equip(sets.Resolution[sets.Resolution.index[Resolution_ind]])
                end
    When the action you perform is Resolution, he equips sets.Resolution.index.
    At the beginning of the file there are 2 defined Resolution sets: sets.Resolution.attack and sets.Resolution.accuracy.
    Also Resolution_ind is set to the value of 1.
    What does this mean? How does it swap between the two available sub-sets?
    Reading the lua further it seems there is a toggle function. When you activate it it "cycles" to the next sub-set in the list.
    What if I don't want to do that but I want direct access commands for each set?
    Instead of a toggle/cycle thing, I'd love to have a command to bind to my hotkeys and then press it to activate the related set.
    Like G1 key activates the default one, G2 activates accuracy, G3 activates PDT and stuff like that.


    Then another question
    Code:
    function midcast(spell,act)
                if spell.english == 1
                if spell.english == 2
        end
    Of course I simplified the structure to keep it quicker to read.
    What if I want to add an "else"?
    Like, predefining a set number of IFs, and then defining a last one which will handle all other situations which do not fall into the previous IFs.

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

    Quote Originally Posted by Sechs View Post

    Then another question
    Code:
    function midcast(spell,act)
                if spell.english == 1
                if spell.english == 2
        end
    Of course I simplified the structure to keep it quicker to read.
    What if I want to add an "else"?
    Like, predefining a set number of IFs, and then defining a last one which will handle all other situations which do not fall into the previous IFs.
    like this
    Code:
    function midcast(spell,act)
                if spell.english == 1
                elseif spell.english == 2
                else
    end

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

    Ah, very simple. Awesome!

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

    also if you got this some how from my weapon skill include (http://pastebin.com/mVyt5YeN)

    Code:
                if spell.english == 'Resolution' then
                        equip(sets.Resolution[sets.Resolution.index[Resolution_ind]])
                end

    i.e.

    Code:
    	if spell.type == "WeaponSkill"then
    		equip(sets.weaponskill.type[weaponskill.type[spell.name]])
    		equip(sets.weaponskill.element[spell.wsA])
    	end
    in the equip line [weaponskill.type[spell.name] this checks the weaponskill.type table against the spell name which turns sets.weaponskill.type[weaponskill.type[spell.name]] into sets.weaponskill.type.Handtohand for Combo

    if you want it to have a command that you can turn on and off look at my staff include (http://pastebin.com/QM1PXc1T)

    these are the tables and variables
    s
    Code:
    pells.cure = S{'Cura','Cura II','Cura III','Curaga','Curaga II','Curaga III','Curaga IV','Curaga V','Cure','Cure II','Cure III','Cure IV','Cure V','Cure VI'}
            Changestaff = true --Togle with //gs c tchangestaff (true for change staves, false for do not change staves)
            Usestaff = 'Atk' --Togle with //gs c tstaveuse (Atk for Attack Staves, Acc for Accuracy Staves)
    here is the equip code
    Code:
    if Changestaff then
                    if spell.action_type == 'Magic' then
                            if spells.cure[spell.english] then
                    equip(sets.precast.Cur)
                else
                    equip(sets.precast[Usestaff][spell.element])
                end
                    end
            end
    and here is the controle code
    it works with //gs c 'thecorrectcommand' to eather stop, start or select the type of staves you want to equip

    Code:
    if command == 'tstavetouse' then
                    if Usestaff == 'Atk' then
                            Usestaff = 'Acc'
                            send_command('@input /echo ----- STAVES SET TO ACC -----')
                    elseif Usestaff == 'Acc' then
                            Usestaff = 'Atk'
                            send_command('@input /echo ----- STAVES SET TO ATK -----')
                    end
            elseif command == 'tchangemagestaff' then
                    Changestaff = not Changestaff
                    send_command('@input /echo ----- STAVES WILL ' .. (Changestaff and '' or 'NOT ') .. 'CHANGE -----')
            end

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

    Quote Originally Posted by Sechs View Post
    Lurking in some simpler GS files, I still need to understand what is the index function and how does it work.
    For instance take this

    Code:
                if spell.english == 'Resolution' then
                        equip(sets.Resolution[sets.Resolution.index[Resolution_ind]])
                end
    When the action you perform is Resolution, he equips sets.Resolution.index.
    At the beginning of the file there are 2 defined Resolution sets: sets.Resolution.attack and sets.Resolution.accuracy.
    Also Resolution_ind is set to the value of 1.
    What does this mean? How does it swap between the two available sub-sets?
    Index isn't a function, it's a table. He defines it above:
    Code:
    sets.Resolution.index = {'Attack','Accuracy'}
                        Resolution_ind = 1
    In the table, there are two values: Attack and Accuracy, and two keys (not shown), 1 and 2. What sets.Resolution.index really looks like is
    Code:
    sets.Resolution.index={[1]="Attack",[2]="Accuracy"}
    When you use resolution, you don't equip sets.Resolution.index, you equip either sets.Resolution.Attack or sets.Resolution.Accuracy. Which you use depends on the value of Resolution_ind.

    Suppose, for example, that Resolution_ind is 1. Then this line
    Code:
    equip(sets.Resolution[sets.Resolution.index[Resolution_ind]])
    simplifies to equip(sets.Resolution[sets.Resolution.index[1]]). Now sets.Resolution.index[1] is a value corresponding to the key 1 in the table sets.Resolution.index. The line simplifies to
    Code:
    equip(sets.Resolution["Attack"])
    and you equip your attack based resolution set. The benefit is that by changing the value of Resolution_ind you can change the set that equips by default when you use Resolution. If you were to do that manually you would need two macros: one to equip the attack set when using resolution, and one to equip the accuracy set when using resolution. With this, your macro can simply be /ws Resolution.

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

    @Byrth It is possible to add in your Custom Time code for brd songs, to track targets? not really interested in what song I did cast on my target... but the time remaining of the last song I did cast on it.

    Ex.
    I cast 1 song to my target, It creates a Custom timer with Target Name w/ the duration of the song I casted.
    If I cast a second one, just delete old one and add the new one timer.

    ?

    Tried to do something.. but.. couldn't make it to create a custom timer with the target player name.. -_-

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

    Quote Originally Posted by Glecent View Post
    I can't get these self commands to work for some reason. /console gs c set daurdabla Dummy returns the message "Unknown mode value: Dummy for Daurdabla mode." the cycle command returns nothing at all. I haven't made any modifications to your file except for switching to gear that I have. Any idea what I'm doing wrong?
    If you don't have your Daurdabla in inventory, cycle will do nothing, and because it doesn't return the table definition, it will generate the Dummy error you noticed when trying to select a specific value. I'll adjust it so that it generates a more specific error message if the Daurdabla isn't found.

  11. #991
    BG Content
    Join Date
    Jul 2007
    Posts
    22,390
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    The issue is that you can't get the names of everyone hit by the song, I'm sure. I'll see what I can do.

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

    Quote Originally Posted by Byrthnoth View Post
    The issue is that you can't get the names of everyone hit by the song, I'm sure. I'll see what I can do.
    I mean when I cast the song w/ Pianissimo, so it helps me to keep track when the songs on X target will wear off, so I can recast the songs

  13. #993
    BG Content
    Join Date
    Jul 2007
    Posts
    22,390
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Oh:
    Code:
    send_command('timers create "'..spell.name..'" '..dur..' down')
    should be:
    Code:
    send_command('timers create "'..spell.target.name..'" '..dur..' down')

  14. #994
    Melee Summoner
    Join Date
    Jul 2006
    Posts
    35
    BG Level
    1
    FFXI Server
    Quetzalcoatl

    Quote Originally Posted by Motenten View Post
    If you don't have your Daurdabla in inventory, cycle will do nothing, and because it doesn't return the table definition, it will generate the Dummy error you noticed when trying to select a specific value. I'll adjust it so that it generates a more specific error message if the Daurdabla isn't found.
    Ahh ok. I was trying to modify the file so that I could use the new harp instead of Daurdabla. I thought that just switching the harp in the set would work but it seems it will take a bit more than that.

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

    Quote Originally Posted by Glecent View Post
    Ahh ok. I was trying to modify the file so that I could use the new harp instead of Daurdabla. I thought that just switching the harp in the set would work but it seems it will take a bit more than that.
    If you want to remove that restriction entirely, just get rid of the player.inventory.daurdabla check. Given the new harp, I guess I should make adjustments for that as well.

  16. #996
    Melee Summoner
    Join Date
    Apr 2014
    Posts
    39
    BG Level
    1
    FFXI Server
    Asura

    Quote Originally Posted by Motenten View Post
    If you don't have your Daurdabla in inventory, cycle will do nothing, and because it doesn't return the table definition, it will generate the Dummy error you noticed when trying to select a specific value. I'll adjust it so that it generates a more specific error message if the Daurdabla isn't found.
    Are there simple edit(s) that's make it possible to swap Daurdabla w/the Terpander?

    EDIT: You just answered this above, I apologize for the tardy response.

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

    Quote Originally Posted by Glecent View Post
    Ahh ok. I was trying to modify the file so that I could use the new harp instead of Daurdabla. I thought that just switching the harp in the set would work but it seems it will take a bit more than that.
    Followup: I've updated to make it trivial to change to using the Terpander (just change info.DaurdablaInstrument and info.DaurdablaSongs in the user_setup() function). However it's only on the dev branch right now because there's still some significant differences between dev and live GearSwap.

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

    Quote Originally Posted by TSFFXI View Post
    Index isn't a function, it's a table. He defines it above:
    Code:
    sets.Resolution.index = {'Attack','Accuracy'}
                        Resolution_ind = 1
    In the table, there are two values: Attack and Accuracy, and two keys (not shown), 1 and 2. What sets.Resolution.index really looks like is
    Code:
    sets.Resolution.index={[1]="Attack",[2]="Accuracy"}
    When you use resolution, you don't equip sets.Resolution.index, you equip either sets.Resolution.Attack or sets.Resolution.Accuracy. Which you use depends on the value of Resolution_ind.

    Suppose, for example, that Resolution_ind is 1. Then this line
    Code:
    equip(sets.Resolution[sets.Resolution.index[Resolution_ind]])
    simplifies to equip(sets.Resolution[sets.Resolution.index[1]]). Now sets.Resolution.index[1] is a value corresponding to the key 1 in the table sets.Resolution.index. The line simplifies to
    Code:
    equip(sets.Resolution["Attack"])
    and you equip your attack based resolution set. The benefit is that by changing the value of Resolution_ind you can change the set that equips by default when you use Resolution. If you were to do that manually you would need two macros: one to equip the attack set when using resolution, and one to equip the accuracy set when using resolution. With this, your macro can simply be /ws Resolution.
    do something like this

    Code:
    Resolution
    Resolution.index={[1]="Attack",[2]="Accuracy"}
    Resolution_ind = 1
    
    
    equip(sets.Resolution[Resolution.index[Resolution_ind]])
    
    if command == 'Resolutionind' then
    		if Resolution_ind == 1 then
    			Resolution_ind = 2
    		elseif Resolution_ind == 2 then
    			Resolution_ind = 1
    		end
    end

  19. #999
    Melee Summoner
    Join Date
    Jul 2006
    Posts
    35
    BG Level
    1
    FFXI Server
    Quetzalcoatl

    Quote Originally Posted by Motenten View Post
    If you want to remove that restriction entirely, just get rid of the player.inventory.daurdabla check. Given the new harp, I guess I should make adjustments for that as well.
    I tried changing it to

    Code:
    function job_get_mode_list(field)
    	if field == 'Daurdabla' and (player.inventory.daurdabla or player.inventory.terpander) then
    		return options.DaurdablaModes, state.DaurdablaMode
    	end
    end
    But that didn't work so I tried changing it to

    Code:
    function job_get_mode_list(field)
    		return options.DaurdablaModes, state.DaurdablaMode
    end
    and I still got the same error as before about not recognizing dummy as an option.

  20. #1000
    Melee Summoner
    Join Date
    Jul 2006
    Posts
    35
    BG Level
    1
    FFXI Server
    Quetzalcoatl

    Quote Originally Posted by Motenten View Post
    Followup: I've updated to make it trivial to change to using the Terpander (just change info.DaurdablaInstrument and info.DaurdablaSongs in the user_setup() function). However it's only on the dev branch right now because there's still some significant differences between dev and live GearSwap.
    Ok, I'll check out the dev branch of your file and of GearSwap then. Thanks a lot for the quick changes and help.

    EDIT: Finally got it working on the master branch. Thanks again for the help.

Page 50 of 302 FirstFirst ... 40 48 49 50 51 52 60 100 ... LastLast

Similar Threads

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