Item Search
     
BG-Wiki Search
Closed Thread
Page 288 of 302 FirstFirst ... 238 278 286 287 288 289 290 298 ... LastLast
Results 5741 to 5760 of 6036

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

  1. #5741
    i should really shut up
    You can safely ignore me I am a troll

    Join Date
    Sep 2011
    Posts
    6,764
    BG Level
    8
    FFXI Server
    Asura

    Quote Originally Posted by trv View Post
    You have this written at several points:
    Code:
    if LockGearIndex then
           enable('ring1','waist')
           ChangeGear(LockGearSet)
    elseif not LockGearIndex then
           enable('ring1','waist')
           ChangeGear(sets.TP[sets.TP.index[TP_ind]])
    end
    It should be:
    Code:
    if LockGearIndex then
           enable('ring1','waist')
           ChangeGear(LockGearSet)
    else
           enable('ring1','waist')
           ChangeGear(sets.TP[sets.TP.index[TP_ind]])
    end
    As it is written, if you ever added a conditional statement beyond the first two, the new statement would never run.
    Makes sense, fixed it, thanks.


    Bumping Rafleshia's post since I paged it:

    Quote Originally Posted by Rafleshia View Post
    https://pastebin.com/4gba1GcM

    Hi guys, above is my SMN lua, I've spent weeks trying to work out how I would go about adding different toggle modes F9-F12 etc.

    This is taken from my BST lua,
    state.IdleModeptions('Normal', 'PetDT')
    state.OffenseModeptions('Normal', 'PetDT', 'Pet.HighAcc')

    If possible please please please can someone edit my lua so I could toggle through the modes. With F12 putting me into the current idle set. I'm not clever enough!

    Thanks

  2. #5742
    Puppetmaster
    Join Date
    Jun 2007
    Posts
    72
    BG Level
    2
    FFXI Server
    Cerberus

    Quote Originally Posted by Rafleshia View Post
    https://pastebin.com/4gba1GcM

    Hi guys, above is my SMN lua, I've spent weeks trying to work out how I would go about adding different toggle modes F9-F12 etc.

    This is taken from my BST lua,
    state.IdleMode:options('Normal', 'PetDT')
    state.OffenseMode:options('Normal', 'PetDT', 'Pet.HighAcc')

    If possible please please please can someone edit my lua so I could toggle through the modes. With F12 putting me into the current idle set. I'm not clever enough!

    Thanks :)
    Still need help with this if anyone can :<

  3. #5743
    A. Body
    Join Date
    Jun 2007
    Posts
    4,445
    BG Level
    7
    FFXIV Character
    Sir Taint
    FFXIV Server
    Gilgamesh
    FFXI Server
    Cerberus

    Quick question. How do I lock my Capacity point cape so it doesn't swap?

  4. #5744

    Quote Originally Posted by Rafleshia View Post
    Still need help with this if anyone can :<
    im no good with motes include so i cant help
    Quote Originally Posted by Taint View Post
    Quick question. How do I lock my Capacity point cape so it doesn't swap?
    as far as i know you cant tell what your CP is

  5. #5745
    BG Content
    Join Date
    Jul 2007
    Posts
    21,140
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Use //gs disable back

  6. #5746
    Radsourceful

    Join Date
    Jul 2007
    Posts
    1,964
    BG Level
    6
    FFXI Server
    Bismarck

    Quick and easy capacity cape lock: //gs disable back
    Equip cape manually after and won't swap.

  7. #5747
    A. Body
    Join Date
    Jun 2007
    Posts
    4,445
    BG Level
    7
    FFXIV Character
    Sir Taint
    FFXIV Server
    Gilgamesh
    FFXI Server
    Cerberus

    Awesome thanks!

  8. #5748
    Radsourceful

    Join Date
    Jul 2007
    Posts
    1,964
    BG Level
    6
    FFXI Server
    Bismarck

    Quote Originally Posted by Rafleshia View Post
    Still need help with this if anyone can :<
    Not quite sure where you're getting stuck here, so clarify if this doesn't do it.

    In gearswap/data/libs/Mote-Global.lua, you'll have a series of lines around ln44 that bind the keys to do the swaps:

    f# is just that button, with ! includes alt, with ^ includes control, with @ includes windows-key.

    Code:
    function global_on_load()
    	send_command('bind f9 gs c cycle OffenseMode')
    	send_command('bind ^f9 gs c cycle HybridMode')
    	send_command('bind !f9 gs c cycle RangedMode')
    	send_command('bind @f9 gs c cycle WeaponskillMode')
    	send_command('bind f10 gs c set DefenseMode Physical')
    	send_command('bind ^f10 gs c cycle PhysicalDefenseMode')
    	send_command('bind !f10 gs c toggle Kiting')
    	send_command('bind f11 gs c set DefenseMode Magical')
    	send_command('bind !f11 gs c cycle CastingMode')
    	send_command('bind ^f11 gs c cycleback CastingMode')
    	send_command('bind f12 gs c update user')
    	send_command('bind ^f12 gs c cycle IdleMode')
    	send_command('bind !f12 gs c reset DefenseMode')
    
    	send_command('bind ^- gs c toggle selectnpctargets')
    	send_command('bind ^= gs c cycle pctargetmode')
    end
    Any of these are the same as typing "//gs cycle Offensemode" or the like into chat or console.

    Now, if you want to add options, for example, a proc set for blm where you don't do damage - you'd want a line that describes your choices, and sets that have those choices appended to them:

    Code:
    function user_setup()
    	state.CastingMode:options('MB', 'Normal', 'Proc')
    end
    
    ....
    
    function init_gear_sets()
    	sets.midcast['Elemental Magic'] = .... --Comment here - no suffix can be used for "Normal" sets
    	sets.midcast['Elemental Magic'].MB = ....
    	sets.midcast['Elemental Magic'].Proc = ....
    end
    Depending on what set you want to use, pick a different mode than 'casting' to add your options to - idlemode for anything where you're standing around, offensemode for when engaged, etc

  9. #5749
    New Spam Forum
    Join Date
    Nov 2009
    Posts
    190
    BG Level
    3
    FFXI Server
    Sylph

    Problem is, that SMN lua doesn't use Mote-libs entirely, Mote-globals is included for some reason but the Mote-include is not and the lua uses the regular Gearswap functions like precast(), midcast(), aftercast(), etc.

  10. #5750
    Radsourceful

    Join Date
    Jul 2007
    Posts
    1,964
    BG Level
    6
    FFXI Server
    Bismarck

    Fair point, didn't actually read the whole thing. I'd suggest reworking from a mote-base if you want to use those modes, in that case

  11. #5751
    Puppetmaster
    Join Date
    Jun 2007
    Posts
    72
    BG Level
    2
    FFXI Server
    Cerberus

    It's all sorted now but thanks for taking a look. Ended up scrapping that lua and found another that was better for what I wanted. x

  12. #5752
    Salvage Bans
    Join Date
    Dec 2006
    Posts
    888
    BG Level
    5
    FFXI Server
    Leviathan

    I'm having some issues with some updates I've made to my Ranger lua. I'll explain-

    I'm trying to create separate preshot sets depending on my weapon, as I just made a Gastraphetes (which, for those unfamiliar with the weapon, possesses +10 snapshot). Meaning, I need to have different sets for when I use Fomalhaut,etc. My midshot sets have always worked with the syntax "sets.Midshot.<weaponname>.<acclevel>". I attempted this same syntax for preshot, "sets.Preshot.<weaponname>.<flurrylevel>" with no success. The lua itself shows no errors when I load, but with showswaps enabled now NO PRESHOT sets are equipping. I've included the full lua for anyone able to help!

    https://pastebin.com/XUQaKhKf

  13. #5753
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    If i hazarded a guess its cause your preshot only asks for equip(sets.Preshot.Any) (no mention of the weapon equipped) where as your midshot asks for equipSet[player.equipment.range] for example at one point.

    I dont really know about equipSet how it functions though as it isnt how i do my luas.

  14. #5754
    Salvage Bans
    Join Date
    Dec 2006
    Posts
    888
    BG Level
    5
    FFXI Server
    Leviathan

    just tapped a friendly resource in my shell who does some programming, and is more versed in GS/lua writing than I. He changed my preshot command (under the function precast). Here's the new code that replaced the previous, and now it recognizes which weapon is equipped. Just wanted to pass along for other ranged jobs out there, this is one way (by no means the only way) to get it done.

    -----------------OLD PRECAST/PRESHOT COMMAND--------------

    function precast(spell,action)
    if spell.english == 'Ranged' then

    add_to_chat(57,"Flurry Level "..PreshotArray[PreshotIndex])

    if buffactive['Flurry'] then
    add_to_chat(122,"Flurry found")
    if PreshotArray[PreshotIndex] == 'RDM' then
    equip(sets.Preshot.RDM)
    else
    equip(sets.Preshot.Any)
    end
    else
    equip(sets.Preshot)
    add_to_chat(122,"No flurry")
    end

    ------------------NEW PRECAST/PRESHOT COMMAND----------------

    function precast(spell,action)
    if spell.english == 'Ranged' then
    equipSet = sets.Preshot
    add_to_chat(57,"Flurry Level "..PreshotArray[PreshotIndex])
    if buffactive['Flurry'] then
    add_to_chat(122,"Flurry found")
    if PreshotArray[PreshotIndex] == 'RDM' then
    if equipSet[player.equipment.range].RDM then
    equipSet = equipSet[player.equipment.range].RDM
    end
    else
    if equipSet[player.equipment.range].Any then
    equipSet = equipSet[player.equipment.range].Any
    end
    end
    else
    if equipSet[player.equipment.range] then
    equipSet = equipSet[player.equipment.range]
    end
    add_to_chat(122,"No flurry")
    end

    equip(equipSet)

  15. #5755
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    looks like he basically added the equipment part i mentioned in. looking at that code i guess i see how equipset works now. but seems like it isnt really saving any steps i guess to me.

  16. #5756

    THF TH

    Hate to bother you fine folks but looking for some help if I can please. I want to write some handling of TH that I know I understand and can grasp and having some trouble. I am trying to use inspiration from Mote's to some extent.
    One thing I am trying to do is an action event that will trigger upon successful melee hit not just a miss. I dont seem to be understand the param right.
    This is what I have that isnt working.

    Code:
        windower.register_event('action', function(action)
            if action.actor_id == player.id then
                if action.category == 1 and action.param == 1 then
                    windower.add_to_chat(8,string.char(0x81,0x9A)..
                        ' TH Test for ACTION!!!!!!')
                end
            end
        end)
    However if I remove the "and action.param == 1" portion it then does work.

    Not sure what I am doing wrong.

    I am sure I will have other questions but for now just want to understand what I am missing.
    Thank you

  17. #5757
    BG Content
    Join Date
    Jul 2007
    Posts
    21,140
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    If you're doing this in a gearswap file, use windower.raw_register_event.

    You can't use action.param like that, I think. I don't think it takes a defined (or, at least, useful) value for melee attack rounds.

    This is probably what you want, approximately:
    Code:
        windower.raw_register_event('incoming chunk', function(id,org)
            if id == 0x1A then
                local action = windower.packets.parse_action(org)
                if action.actor_id == player.id then
                    if action.category == 1 and S{1,67,373}:contains(action.targets[1].actions[1].message) then -- Includes normal hits, critical hits, and absorbed hits
                        windower.add_to_chat(8,string.char(0x81,0x9A)..
                            ' TH Test for ACTION!!!!!!')
                    end
                end
            end
        end)
    It uses the Sets library. Also, it's only looking at the first swing of the attack round.

    I use incoming chunk because battlemod messes with the messages parameter of action packets before they hit the action event.

  18. #5758

    Thanks for helping, is raw needed? I noticed before when I had raw in it wouldnt call sets or other functions.

    Just tried to test this as written but it doesnt seem to work for me.

  19. #5759
    BG Content
    Join Date
    Jul 2007
    Posts
    21,140
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    You can't use equip() and some variables aren't updated in raw_, but it's going to cause lag if you don't use it with incoming chunk.

    Use the raw_ example above, then send_command('gs c TH') or something and use your equip commands in self_command

  20. #5760

    I tried to use the code above as is but didnt work. I would like to use it with an existing portion if possible then since need to use incoming chunk.

    Code:
        windower.raw_register_event('incoming chunk', function(id,data,org)
            if id == 0x29 then
                local message_id = data:unpack('H',0x19)%32768
                if message_id == 234 then
                    --equip(sets.misc.TreasureHunter)
                    windower.add_to_chat(8,string.char(0x81,0x9A)..
                        ' TH Test for auto target change when they die......')
                end
            end
            if id == 0x1A then
                local action = windower.packets.parse_action(org)
                if action.actor_id == player.id then
                    if action.category == 1 and S{1,67,373}:contains(action.targets[1].actions[1].message) then -- Includes normal hits, critical hits, and absorbed hits
                        windower.add_to_chat(8,string.char(0x81,0x9A)..
                            ' TH Test for ACTION!!!!!!')
                    end
                end
            end
        end)
    The first 'if' seems to work when I auto-target then next mob.
    Sorry to bother you with this, wish i knew more.

Similar Threads

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