Item Search
     
BG-Wiki Search
Closed Thread
Page 58 of 302 FirstFirst ... 8 48 56 57 58 59 60 68 108 ... LastLast
Results 1141 to 1160 of 6036

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

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

    http://pastebin.com/VdtZMtGJ

    Still getting an error on line 216, "state.WeaponskillMode = 'Acc'".
    It says "attempt to index global 'state' (a nil value)".
    Can I even use that command in that context?

    Ah and also putting those 2 lines from function user_setup to function get_sets doesn't work, gives me an error.

  2. #1142

    you need to add above state.WeaponskillMode = 'Normal'

    state = {}

    when you write out your variables you need to do it like this

    a = {}
    a.b ={}
    a.c = {}
    a.b.c = {}
    a.c.b = {}

    you can do

    a.b = {}
    a.c = {}

    this is what i needed to do for my basic gs lua (http://pastebin.com/RrKy7KPU)
    Code:
            with = {}
            with.status = 'none'
            Waltz = {}
            Waltz.debuff = S{'Max HP Down','Max MP Down','Magic Evasion Down','Max TP Down','Magic Atk. Down','Magic Acc. Down','Magic Def. Down','Defense Down','Evasion Down','Attack Down','Accuracy Down','CHR Down','AGI Down','DEX Down','VIT Down','MND Down','INT Down','STR Down','Bane','Bio','Blind','Curse','Dia','Disease','Shock','Rasp','Choke','Frost','Burn','Drown','Flash','Paralyze','Plague','Poison','Silence','Slow','Weight'}
            Waltz.change = true
            Waltz.spells = S{'Healing Waltz','Curing Waltz III','Curing Waltz II','Curing Waltz I'}
            spells = {}
            spells.transport = S{'Retrace','Escape','Warp','Warp II','Teleport-Dem','Teleport-Holla','Teleport-Mea','Teleport-Altep','Teleport-Vahzl','Recall-Jugner','Recall-Meriph','Recall-Pashh'}
    you dont need to do this with sets because sets = {} is defined in gearswap by default as an empty gear set

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

    http://i58.tinypic.com/4q299d.png

    I still get "unknown command" in the chatbox (not the Windower console) whenever I tried to use the command "state.WeaponskillMode = 'something'".
    Allow me to understand better those lines, since I copypasted from a suggestion Motenten gave to me some pages ago.

    Code:
    function user_setup()
    	options.WeaponskillModes = {'Normal', 'Acc', 'Mod'}
    	state.WeaponskillMode = 'Normal'
    end
    I don't get how it works, but I assumed the first line was to define the possible values that the WS variable can accept (there's also a few lines under function self_command which are used, I assume, to handle exceptions when you try to feed that variable a value which is not within the range of the predefined possible ones).
    Then the second line means that the variable called "state.WeaponskillMode" takes the value 'Normal'.
    I interpreted this as a way to give an initial value to the variable.

    Now appearently there was this missing line "state = {}" and that's ok, but I don't get the rest then, especially the first line.
    Also, wouldn't an "options = {}" be needed too, following what you wrote in your previous post?

  4. #1144

    ok im not sure what line 192 -209 does but if you only plan on toggling through the list i dont even think you need it but you should ask mote for help as it part of his code because im lost

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

    I handle toggling in a strange way. It's a first time for me, I need to see how I like it, so far in my FFXI life I've only used straight commands. I.e. one macro/keybind = 1 set.
    Atm in that Lua I'm handling a toggle to cycle between 5 basic TP sets, and left PDT/MDT outside of the cycle (direct commands for those)
    WSsets have straight commands (in theory it should be that "state.WeaponskillMode = 'something'") but I imbued them into the Cycle part.
    I.e. if I move to Dynamis TP set I want to be using the .Mod WS set.
    If I move to Accuracy TP set, I want to be using the .Acc WS set, and so on.

    Guess I'll pester Mote about it to better understand how it works and what is wrong

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

    Try //gs debugmode and check what it try to do

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

    Quote Originally Posted by Sechs View Post
    http://i58.tinypic.com/4q299d.png

    I still get "unknown command" in the chatbox (not the Windower console) whenever I tried to use the command "state.WeaponskillMode = 'something'".
    Allow me to understand better those lines, since I copypasted from a suggestion Motenten gave to me some pages ago.

    Code:
    function user_setup()
    	options.WeaponskillModes = {'Normal', 'Acc', 'Mod'}
    	state.WeaponskillMode = 'Normal'
    end
    I don't get how it works, but I assumed the first line was to define the possible values that the WS variable can accept (there's also a few lines under function self_command which are used, I assume, to handle exceptions when you try to feed that variable a value which is not within the range of the predefined possible ones).
    Then the second line means that the variable called "state.WeaponskillMode" takes the value 'Normal'.
    I interpreted this as a way to give an initial value to the variable.

    Now appearently there was this missing line "state = {}" and that's ok, but I don't get the rest then, especially the first line.
    Also, wouldn't an "options = {}" be needed too, following what you wrote in your previous post?


    1) user_setup() is a function used by my includes. If you're not using my includes, and you don't make a call to it yourself, it does *nothing*.

    2) 'options' and 'state' are tables that are intended to contain other stuff (in this case, WeaponskillModes and WeaponskillMode). However if you have not defined them yourself, they don't exist (GearSwap itself only defines the 'sets' table). If you simply copy those two lines into get_sets() without defining the base tables, of course you're going to get an error. You don't get an error now because, as per #1, user_setup() is never called, and thus never even tries to do anything.

    Both "state = {}" and "options = {}" are needed, yes. I didn't write them explicitly because I assumed that that much was obvious, and I didn't want to bog the example down with too many minor technicalities.

    3) "state.WeaponskillMode = 'something'" is not a command. It is a variable assignment, and only makes sense within the scope of the actual programming language itself. If you have a macro with that in it, then it is completely nonsensical garbage as far as the game and GearSwap are concerned. If this is not the case, then you need to be clearer in what you were doing to generate the error.

    4)
    Quote Originally Posted by Sechs
    I assumed the first line was to define the possible values that the WS variable can accept ... Then the second line means that the variable called "state.WeaponskillMode" takes the value 'Normal'. I interpreted this as a way to give an initial value to the variable.
    Those assumptions are correct. However you also need to understand how to incorporate them into what you're doing.

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

    Quote Originally Posted by Motenten View Post
    If you have a macro with that in it, then it is completely nonsensical garbage as far as the game and GearSwap are concerned. If this is not the case, then you need to be clearer in what you were doing to generate the error.
    http://pastebin.com/1PXnxKT9

    You can see the meaningful part concerning those two tables at the end of my file.
    The part generating errors is the very last part of the function self_command, more in particular the part where I handle the toggle cycling of TP sets.
    It works for them, but I tried to incorporate a Weapon Skill set changes within that cycle.
    It works in theory, but in reality it does not because those lines "state.WeaponskillMode = 'XXX'" are probably the wrong way to do what I'm trying to do (i.e. change the current value of the state.WeaponskillMode table)

  9. #1149

    Quote Originally Posted by Sechs View Post
    http://pastebin.com/1PXnxKT9

    You can see the meaningful part concerning those two tables at the end of my file.
    The part generating errors is the very last part of the function self_command, more in particular the part where I handle the toggle cycling of TP sets.
    It works for them, but I tried to incorporate a Weapon Skill set changes within that cycle.
    It works in theory, but in reality it does not because those lines "state.WeaponskillMode = 'XXX'" are probably the wrong way to do what I'm trying to do (i.e. change the current value of the state.WeaponskillMode table)
    this is the way i would do it (based on your own lua)
    http://pastebin.com/5DQVbKxG
    (expires: in 7 days from this post)
    i have not tested this

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

    Note: state.WeaponskillMode is not a table. It's a field containing a string. 'state' is a table, and 'state.WeaponskillModes' is a table.

    Annnnd. I see the problem. Look just above the statement that starts checking for "toggle TP set". You'll note that it says what you're seeing in your chat log: "Unknown command." Why? Because it's part of an if/else block. The IF check sees if the self-command started with the word "set". If it did not, it executes the ELSE half, which simply tells you that it doesn't know what that command is. Because that code that I provided you only checked for that one command, and wasn't set up to handle anything else. Anything else you added needed to be inserted in the appropriate location. Which it wasn't.

    Constructing the series of conditionals should simply be a set of simple yes/no questions:

    Code:
    1) Do we have a command that we know how to check for? (for example: Is the first word of the command "set"?) [This is a top-level IF or ELSEIF.]
    - Yes? Execute code related to this command.  End.
    - No?
      2) Do we have any more commands to check for?
      - Yes? Go to #1
      - No? Notify the user we couldn't find the command. End.
    Also note that the user notification does not end the function (though it was expected to implicitly end the function by there not being anything else after the end of that IF block). That is, it prints that warning message to the chat log, and then -keeps going-. Whereupon it will find the next code block that you copied in, and performs all the bits in there that it's instructed to. So even though you're getting an error message, it should still be setting the various weaponskill and TP variables.

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

    Aaaah now I see, thanks Mote
    And thanks dlsmd, your example gave me quite a few cool ideas.

  12. #1152
    BG Content
    Join Date
    Jul 2007
    Posts
    21,105
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Just so that 'yall are prepared, it is highly likely that GearSwap will temporarily break with the addition of Mog Armory or whatever they're calling it. They will likely change the outgoing equip packet to include an inventory ID, and I will have to adjust GearSwap's guts significantly so it looks in multiple bags and keeps track of the inventory ID and bag, etc.

  13. #1153

    we will find out in may
    but as far as i have seen the command for equiping out of the mog wardrobe looks like this /equip (Slot) (Item) just like now

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

    Is there a way to send a GS command from the console to equip a certain predefined set?
    Example: let's say I want to create a macro to manually equip my sets.TP.PDT set. What would I have to type?

    "//gs equip(sets.TP.PDT)" doesn't work.
    Atm I solved the issue by creating some custom commands in the self_commands section, and then putting "//gs c commandname" in the macro.
    The result is the same I guess, but with this solution I had to create additional lines into the Lua.
    Don't know which solution I like more tbh.

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

    From the GearSwap documentation:

    //gs equip <setname>
    Equips sets[setname].

    So to equip the set, "sets.TP.PDT", you'd issue the command "//gs equip sets.TP.PDT" or "//gs equip TP.PDT" (the initial "sets" table is implied, and not strictly necessary).

  16. #1156
    Puppetmaster
    Join Date
    Apr 2013
    Posts
    63
    BG Level
    2
    FFXI Server
    Asura

    Question, have Terpander (Daurdabla -1) lol, what lines would i have to change in Monts brd.lua to have it act accordingly without breaking the lua, figure changing the word Terpander to Daurdabla? i tried replacing some lines and Made a macro /console gs c set Duardabla Daurdabla and it works fine, 3rd song goes up no problem but for some reason i occasionally get an "cannot cast fire spirit" message. adding Link to make it easier.https://github.com/Kinematics/GearSw...master/BRD.lua Thx in advance.

  17. #1157

    windower console - gs equip sets.TP.PDT
    ffxi chat - //gs equip sets.TP.PDT
    macro - /console gs equip sets.TP.PDT

  18. #1158
    Relic Weapons
    Join Date
    Aug 2010
    Posts
    335
    BG Level
    4
    FFXI Server
    Asura

    Been using this code for presto on DNC and it was working until today. Not sure but I think the update that happened today broke the code :S

    Code:
    	if string.find(spell.name:lower(), 'step') and (not buffactive['Presto']) then
    		if (not buffactive['Finishing Move']) or buffactive['Finishing Move 2'] then
    			cancel_spell()			
    			send_command('input /ja "Presto" <me>;wait 2;input /ja "'..spell.name..'" <t>;')
    		end
    	end

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

    Questions!
    * Does it work if you don't have any FMs up?
    * Are you on -dev?

    Why I ask!
    The logic on the second line is a little flawed:
    Code:
    if (not buffactive['Finishing Move']) or buffactive['Finishing Move 2'] then
    It is probably meant to be:
    Code:
    if not (buffactive['Finishing Move 3'] or buffactive['Finishing Move 4'] or buffactive['Finishing Move 5']) then
    Looking at the non-dev resources, it appears that all FM buffs are currently named "Finishing Move," which is why your version should work without FMs. If you have no FMs on, buffactive['Finishing Move'] will be nil and your code would return true and cancel the spell/send Presto. If you have 1~5 FM on, buffactive['Finishing Move'] would be 1. With non-dev resources, buffactive['Finishing Move 1~5'] will always be nil. The -dev resources will be pushed live on Monday and should restore the numbers after FMs, though. After that, you can use the code I posted above and it'll work as you intended.

  20. #1160

    Quote Originally Posted by Treize Kordero View Post
    Been using this code for presto on DNC and it was working until today. Not sure but I think the update that happened today broke the code :S
    try
    Code:
    	if spell.type == 'Step' and (not buffactive['Presto']) then
    		if (not buffactive['Finishing Move 1']) or buffactive['Finishing Move 2'] then
    			cancel_spell()			
    			send_command('input /ja "Presto" <me>;wait 2;input /ja "'..spell.name..'" <t>;')
    		end
    	end
    [/QUOTE]

Closed Thread
Page 58 of 302 FirstFirst ... 8 48 56 57 58 59 60 68 108 ... LastLast

Similar Threads

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