Item Search
     
BG-Wiki Search
+ Reply to Thread
Page 20 of 20 FirstFirst ... 10 18 19 20
Results 381 to 395 of 395
  1. #381
    i should really shut up
    Join Date
    Sep 2011
    Posts
    3,638
    BG Level
    7
    FFXI Server
    Asura

    Quote Originally Posted by Byrthnoth View Post
    With a superficial glance, I don't see how the error is possible. It is nominally throwing the error for mc_JA, which contains no indexing. Also, even if it was indexing in there it should be indexing the local variable spell, not the global variable spell. Given that, the only options are that either the line number in your paste / on your computer don't correspond or that the function definition itself is being interpreted as referencing the global variable.

    I'm guessing that there are some scoping problems. The only weird things I see in the paste are the:
    Code:
    do return end
    statements.

    Could you please change them to
    Code:
    return
    and see if it fixes it?

    Do blocks in Lua are not something I use frequently and while there shouldn't *really* be a problem with that code as I understand it, I'm also not entirely sure about it.
    Thanks for looking at it. I got it working now. I'm not sure what exactly it was, but after ripping shit out of it and making that change, it loads.

    There is one other issue I am having with THF, buffactive['Sneak Attack'] or Trick Attack as a means of calling to use a stacked WS set over an unstacked WS set is too unreliable, and only works a fraction of the time. E.g:

    Code:
            if spell.english == "Rudra's Storm" or spell.english == 'Mandalic Stab' or spell.english == 'Shark Bite' then
    			if buffactive['Sneak Attack'] or buffactive['Trick Attack'] then
    				ChangeGear(sets.RudrasStacked[sets.RudrasStacked.index[RudrasStacked_ind]])
    			else
    				ChangeGear(sets.RudrasUnstacked[sets.RudrasUnstacked.index[RudrasUnstacked_ind]])
    			end


    I was thinking of setting a true false variable anytime SA or TA is used, and using that instead, but it seems like a cumbersome idea. Any suggestions on a best practice?

  2. #382
    BG Content
    Join Date
    Jul 2007
    Posts
    20,027
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    That's probably your best bet. The problem is that SE is a bit slow in updating your buff list, so you don't appear to have the Sneak Attack buff until >1 second after using Sneak Attack, at which point you've already sent the command to use a WS (without the buff).

  3. #383
    i should really shut up
    Join Date
    Sep 2011
    Posts
    3,638
    BG Level
    7
    FFXI Server
    Asura

    Quote Originally Posted by Byrthnoth View Post
    That's probably your best bet. The problem is that SE is a bit slow in updating your buff list, so you don't appear to have the Sneak Attack buff until >1 second after using Sneak Attack, at which point you've already sent the command to use a WS (without the buff).
    Any suggestion on where to stick that in the .lua?

    I'd imagine its just an if spell.english =='Sneak Attack' or TA then variable return true- somewhere. Then separately somewhere sticking an elseif spell.action_type =='WeaponSkill' variable return false inside Function Aftercast?

  4. #384
    Relic Weapons
    Join Date
    Oct 2006
    Posts
    328
    BG Level
    4

    I want to automatically reequip my weapons after getting hit by one of those mob abilities that unequips them. What's the best way to do that? The best way I've thought of is hacky, but if I define my main/off in sets.engaged and sets.idle and sets.WS there should be no omitted sets and it shouldn't ever switch because it's always the same two weapons so I never lose TP, right?

    I use mote's luas, there seems to be a function in selindre's that does it but I don't fully understand it so I'm leery of using it.

  5. #385
    i should really shut up
    Join Date
    Sep 2011
    Posts
    3,638
    BG Level
    7
    FFXI Server
    Asura

    Quote Originally Posted by Byrthnoth View Post
    That's probably your best bet. The problem is that SE is a bit slow in updating your buff list, so you don't appear to have the Sneak Attack buff until >1 second after using Sneak Attack, at which point you've already sent the command to use a WS (without the buff).
    Quote Originally Posted by Spicyryan View Post
    Any suggestion on where to stick that in the .lua?

    I'd imagine its just an if spell.english =='Sneak Attack' or TA then variable return true- somewhere. Then separately somewhere sticking an elseif spell.action_type =='WeaponSkill' variable return false inside Function Aftercast?
    Just going to bump this for a second.

    Lua

  6. #386
    Melee Summoner
    Join Date
    Jun 2007
    Posts
    32
    BG Level
    1
    FFXI Server
    Asura

    Hello all,

    I've been trying to understand gearswap and all its inner workings.
    But there is something that really confuses me; the user_setup part of a lua file.

    All those states that are declared (OffenseMode,WeaponskillMode, IdleMode, RestingMode, etc.) are something that I haven't quite understood. Hopefully someone can clarify for me in detail. Let me elaborate:

    I see all these example lua files that have several states declared, and each state has their own options ('Normal', 'Acc', 'PDT', 'Killer', 'Blabla' etc.)

    What I don't understand is where and how are these states defined explicitly in the gearsets, because I've seen several lua files from several jobs and I just don't understand how the different gear sets are supposed to apply depending on the conditions.

    Does a gearset have to have an ending named exactly as the state?
    i.e.: If we have declared:

    Code:
    state.OffenseMode:options('Normal', 'Acc')
    Does that mean that we have to append a specific gearset with .Normal or .Acc?
    sets.engaged ---> that's for Normal? (maybe the 'Normal' tag can be omitted?)
    sets.engaged.Acc --> that would be for the other state?

    Is the 'Normal' state more generic and can be omitted in a gearset declaration?
    In this specific case, does OffenseMode apply only to a specific set?
    Is that set "Engaged" perhaps?


    Another question:
    Let's say I'm a RNG and I want to define different gearsets for it.
    When I engage a mob (i.e.: just draw my weapons), which state applies? OffenseMode or RangedMode?
    Or does RangedMode only apply when I do a '/ra <t>' macro?


    Last question:
    So with all the precast/midcast/aftercast gear sets... where do they all fit in this?


    Hope my questions weren't misleading or confusing; I'd be glad to further elaborate, I'm just lost at how these states work and I'd like some pointers into how I can make a better lua file for my jobs, instead of just blindly copying existing lua files from other people.

    Thanks!

  7. #387
    BG Content
    Join Date
    Jul 2007
    Posts
    20,027
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    To retarget your question, you are asking about Motenten's user files (perhaps specifically the RNG one), not gearswap itself. I wrote Gearswap and don't know the answers to any of your questions here.

  8. #388
    a p. sweet dude
    Pens win! Pens Win!!! PENS WIN!!!!!

    Join Date
    Jul 2010
    Posts
    18,587
    BG Level
    9

    If I wanted to check to see if the current spell being cast contains a string (trying to catch Gain spells in this case), how would I do it?

  9. #389
    Relic Horn
    Join Date
    Jun 2007
    Posts
    3,494
    BG Level
    7
    FFXI Server
    Odin
    WoW Realm
    Lightbringer

    Quote Originally Posted by Obsidian View Post
    If I wanted to check to see if the current spell being cast contains a string (trying to catch Gain spells in this case), how would I do it?
    if spell.name:match('Gain') then

  10. #390
    a p. sweet dude
    Pens win! Pens Win!!! PENS WIN!!!!!

    Join Date
    Jul 2010
    Posts
    18,587
    BG Level
    9

    Ah, I ended up going with something a little different (spell.english:startswith('Gain-')).

    Is there a list of functions somewhere I can look at, and also a list of properties on gearswap objects?

  11. #391
    BG Content
    Join Date
    Jul 2007
    Posts
    20,027
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    https://docs.windower.net/addons/gearswap/reference/

    I forget who made this (not me) but they deserve a million points.

    Starts with and such are coming from the strings library. I don't know if we have a reference for those as I always look at the source (add-ons/libs)

  12. #392
    a p. sweet dude
    Pens win! Pens Win!!! PENS WIN!!!!!

    Join Date
    Jul 2010
    Posts
    18,587
    BG Level
    9

    Perfect, thank you!

  13. #393
    i should really shut up
    Join Date
    Sep 2011
    Posts
    3,638
    BG Level
    7
    FFXI Server
    Asura

    Is there a way to trigger a variable to activate (T/F) without using Buffactive before the precast section of a lua is triggered?

    Since buffactive['Sneak Attack'] isnt reliable and often fails to register in time I have been trying to create a variable that activates instead to trigger a stacked WS and is then returned to false in the aftercast.

    Returning it to false is simple, and if I set the variable to true from the outset it works. However, it never works outside of that. I have tried something along the lines of this:

    Code:
    function buff_change(n, gain, buff_table)
    	local name
        name = string.lower(n)
    	
    	if name == "sneak attack" or name == "trick attack" then
    		if gain then
    			StackWS  = true
    		end
    	end
    I assume it comes after the precast in terms of priority. I placed a test message in and it activated in showswaps after precast had already gone off, and then the false message came right before aftercast. Which leads me to believe that is the case.

    Any suggestions?

  14. #394

    edit sorry

  15. #395
    Smells like Onions
    Join Date
    May 2021
    Posts
    1
    BG Level
    0

    I cannot get gear swap add on to work in FFXI. I used the same whm.lua as friend but just revised the gear portions. I have tried restarting the game, changing jobs, //gs enable, and //gs reload and nothing happens! I even double checked that the addon is in fact turned on in Windower. Help!

Quick Reply Quick Reply

  • Decrease Size
    Increase Size
  • Remove Text Formatting
  • Insert Link Insert Image Insert Video
  • Wrap [QUOTE] tags around selected text
  • Insert NSFW Tag
  • Insert Spoiler Tag

Similar Threads

  1. Gearswap Help Thread!
    By JSHidaka in forum FFXI: Everything
    Replies: 6035
    Last Post: 2018-05-06, 17:15
  2. Randomerest Question Thread III: This Time It's Random
    By isladar in forum FFXI: Everything
    Replies: 868
    Last Post: 2009-08-18, 12:03