Item Search
     
BG-Wiki Search
Closed Thread
Page 284 of 302 FirstFirst ... 234 274 282 283 284 285 286 294 ... LastLast
Results 5661 to 5680 of 6036

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

  1. #5661

    Quote Originally Posted by Trumpy View Post
    you can always say go to pastebin at this address

    y32JMRPg

    for this example address http://pastebin.com/y32JMRPg
    (using your example)
    i would use
    Pastebin: y32JMRPg (this is so that people know where its located)

  2. #5662
    RIDE ARMOR
    Join Date
    Feb 2017
    Posts
    19
    BG Level
    1
    FFXI Server
    Bismarck

    Thanks for the advice

    Anyway, concerning my LUA, I'm coding it from scratch myself, but I don't know much about scripting/coding. I'm a complete beginner, and I didn't like the single WHM lua that the entire internet seems to share... but I figured if I just tried to do it anyway I could figure it out and completely customize it to my liking.

    It's not even close to done yet, but here's my LUA so far...
    Pastebin: zmk2eBem

    I'm trying to get it to function so that when I hit the f9-f12 keys, it will define a different idle set as my current default. I really don't like how most LUAs just rely on cycling. I'm not sure what I'm doing wrong here though. When I cast a spell, I get this error...

    "Gearswap has detected an error in the user function aftercast:
    ... Files (x86Windower4/addons/GearSwap/data/WHM.lua:166: attempt to index global 'idle_set' (a nil value)"

    So I understand that the issue is partly with my aftercast, but I'm not sure what the correct way to write it would be. I've tried correcting it, but now my gear won't even swap when I hit my function keys, even if I reload my LUA. It would before I tried to fix the issue, but I didn't have the foresight to make a backup of the LUA.

    Anyone have any advice/input? Thanks.

  3. #5663

    ill break down what that error code is
    "Gearswap has detected an error"
    Gearswap found the error
    "in the user function aftercast"
    the error was found while running your aftercast function
    "Files (x86Windower4/addons/GearSwap/data/WHM.lua"
    the error was found in your WHM.lua file
    "166"
    the error was found on line 166 of your WHM.lua
    "attempt to index global 'idle_set' (a nil value)"
    this is the error it found

    the error "attempt to index global 'idle_set' (a nil value)" means that while indexing the global table idle_set it returned nil

    lets look at line 166
    equip(sets.idle[idle_sets[idle_index]])

    equip(..) is a gearswap function

    sets.idle is one of the tables in your get_sets() function
    idle_sets is another table in your get_sets() function
    idle_index is not in your get_sets() function or anywhere else in your file so this would be what caused your error
    -im betting you wanted to use idle_ind not idle_index

  4. #5664
    RIDE ARMOR
    Join Date
    Feb 2017
    Posts
    19
    BG Level
    1
    FFXI Server
    Bismarck

    That definitely removed the error line, but my idle set still isn't functioning like it should. What concerns me is I'm not getting any errors at all. I've made a few more changes, like adding staves to my resting and idle sets to make it easier at a glance to see if things are working correctly or not. I'm definitely switching to Chatoyant when I sit, but nothing I do will equip my idle sets like I want.

    Here's my updated LUA...
    Pastebin: 0g44t47b

    Thanks for your help so far btw dlsmd, I appreciate it

  5. #5665

    Quote Originally Posted by TaruRassius View Post
    That definitely removed the error line, but my idle set still isn't functioning like it should. What concerns me is I'm not getting any errors at all. I've made a few more changes, like adding staves to my resting and idle sets to make it easier at a glance to see if things are working correctly or not. I'm definitely switching to Chatoyant when I sit, but nothing I do will equip my idle sets like I want.

    Here's my updated LUA...
    Pastebin: 0g44t47b

    Thanks for your help so far btw dlsmd, I appreciate it
    let me look at it a little

    --edit
    i dont see anything wrong with your code
    what is your code not doing??

    is it not equiping the idle set you set it to or is it ignoring your commands to change sets when you use your f keys

  6. #5666
    RIDE ARMOR
    Join Date
    Feb 2017
    Posts
    19
    BG Level
    1
    FFXI Server
    Bismarck

    Well, when I cast, i'm not being returned to my idle set, nor when I get up from resting. Also if i load the LUA as is, and don't cast, if I hit the function keys, they aren't switching my gear at all. So I suppose both?

  7. #5667

    Quote Originally Posted by TaruRassius View Post
    Well, when I cast, i'm not being returned to my idle set, nor when I get up from resting. Also if i load the LUA as is, and don't cast, if I hit the function keys, they aren't switching my gear at all. So I suppose both?
    are you getting the chat lines when you try to set which idle set you want with your f keys??
    if yes then
    are your trying to use PDT or MDT because in the code you posted you do not have any gear in them so nothing will change

  8. #5668
    RIDE ARMOR
    Join Date
    Feb 2017
    Posts
    19
    BG Level
    1
    FFXI Server
    Bismarck

    Yeah, I'm getting the chat lines, and no, I'm just trying my f9 and f10 keys, since they're the ones that will show me if the script is working correctly via the headgear.

  9. #5669

  10. #5670
    RIDE ARMOR
    Join Date
    Feb 2017
    Posts
    19
    BG Level
    1
    FFXI Server
    Bismarck

    It still doesn't equip my headpieces.

  11. #5671

    Quote Originally Posted by TaruRassius View Post
    It still doesn't equip my headpieces.
    are you going from in combat to out side of combat??
    are you casting a spell outside of combat??
    are you trying from resting to idle

  12. #5672
    RIDE ARMOR
    Join Date
    Feb 2017
    Posts
    19
    BG Level
    1
    FFXI Server
    Bismarck

    ...I found out what was wrong with it. The idle index had "travel" and "standard" as "Travel" and "Standard". The letters were uppercase.

    Such a minor detail causing so many issues. I'm honestly shocked that I didn't get an error message. Probably because the letters were correct, but it was just caps sensitive. I wonder if this is something that we should report to the devs? Is it a bug that I didn't get an error message?

    Also, seriously, thank you for taking your time to help me dlsmd. I really appreciate you

  13. #5673
    Smells like Onions
    Join Date
    Feb 2017
    Posts
    2
    BG Level
    0

    hi all long time lurker here finally made an account....

    please help me out looking for 2 lua's ones im using so out of date.

    PLD and BLM

    thanks all

  14. #5674
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    I dont think case sensitive is a bug. anywhere I have ever found information about gearswap has always explicitly said when something is "case in/sensitive" For me i just have taken to keepin everything i can lowercase where ever possible in my latest versions of my luas. Thing is tho if you use anything that directly relates to a spell say you have something like

    Code:
    if sets[spell.name] then
    	equip(sets[spell.name])
    elseif sets[spell.type] then
    	equip(sets[spell.type])
    end
    you will need to capitalize the spell name in the set. so sets.Provoke instead of sets.provoke . Other than that i keep it all lower unless its displayed somewhere.

  15. #5675

    Quote Originally Posted by Trumpy View Post
    I dont think case sensitive is a bug. anywhere I have ever found information about gearswap has always explicitly said when something is "case in/sensitive" For me i just have taken to keepin everything i can lowercase where ever possible in my latest versions of my luas. Thing is tho if you use anything that directly relates to a spell say you have something like

    Code:
    if sets[spell.name] then
    	equip(sets[spell.name])
    elseif sets[spell.type] then
    	equip(sets[spell.type])
    end
    you will need to capitalize the spell name in the set. so sets.Provoke instead of sets.provoke . Other than that i keep it all lower unless its displayed somewhere.
    its not a bug nut a feature witch allows more variation
    you cant have 2 functions/tables with the same name
    functction a()
    function A()
    b.c={}
    B.C={}
    and still call each separately

    and lua is nothing more then a series of tables containing variables and functions starting with _G.

  16. #5676
    RIDE ARMOR
    Join Date
    Feb 2017
    Posts
    19
    BG Level
    1
    FFXI Server
    Bismarck

    I'm almost completely done with my Lua, thanks to you guys. You rock

    I'm running into one final snag before I can say that my Lua has officially hit 1.0, that that's on lines 124 and 143. That logic should work just fine for JAs that only have one word in their name, like devotion, but the game defines JAs as two words in their tables in the res folder. Now, I COULD make it easier on myself now but harder on myself later by just including logic for only devotion and divine caress specifically, but I'm trying to future proof this lua as much as possible to reduce the workload on myself later, when I inevitably start making this more complex.

    How would I go about making this work? I can't put a space in my sets, right?

    Here's my current WIP Lua: http://pastebin.com/dQ0QfBzM

    Thanks again.

  17. #5677

    Quote Originally Posted by TaruRassius View Post
    I'm almost completely done with my Lua, thanks to you guys. You rock

    I'm running into one final snag before I can say that my Lua has officially hit 1.0, that that's on lines 124 and 143. That logic should work just fine for JAs that only have one word in their name, like devotion, but the game defines JAs as two words in their tables in the res folder. Now, I COULD make it easier on myself now but harder on myself later by just including logic for only devotion and divine caress specifically, but I'm trying to future proof this lua as much as possible to reduce the workload on myself later, when I inevitably start making this more complex.

    How would I go about making this work? I can't put a space in my sets, right?

    Here's my current WIP Lua: http://pastebin.com/dQ0QfBzM

    Thanks again.
    like this
    sets.ja["Divine Caress"] = {}

    [] allows you to give an special name be it a string ["what even you want"] or a number [1] or even a bool [true]

  18. #5678
    RIDE ARMOR
    Join Date
    Feb 2017
    Posts
    19
    BG Level
    1
    FFXI Server
    Bismarck

    Quote Originally Posted by dlsmd View Post
    like this
    sets.ja["Divine Caress"] = {}

    [] allows you to give an special name be it a string ["what even you want"] or a number [1] or even a bool [true]
    Brilliant. Thanks again dlsmd.

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

    I pushed some changes live today. They'll largely probably not be noticeable, but this one is important:

    I made a spelling error in the extdata library, which has now been fixed. "Magic Burst mdg." is now "Magic Burst dmg." This means gearswap will no longer recognize "Magic Burst mdg." augments and you will have to replace them.

    I announce this because it wouldn't cause an error. Your MBs would just start doing shitty damage and you'd have no idea why.

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

    Couple questions on send_command() vs. self_command(). I notice some luas use "send_command('gs c set treasuremode none')" and the like; is there any advantage to doing it this way, vs. "self_command('set treasuremode none")? Seems to me that self_command() is more efficient, or at least less typing.

    Second, I could have sworn I saw somewhere that it was recommended to use the @ symbol at the beginning of commands, i.e. "send_command('@exec warp-ring.txt')" What's the reason to do it that way? I tried it with a couple of aliases I set up and it seems to work either with or without.

Similar Threads

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