Item Search
     
BG-Wiki Search
Page 21 of 302 FirstFirst ... 11 19 20 21 22 23 31 71 ... LastLast
Results 401 to 420 of 6036

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

  1. #401
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    Attn: Mote : Where did UserGlobals disappear to ?

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

    Quote Originally Posted by haruhigumi View Post
    Yea I noticed the same thing, the LUA logic and such , such as saying ammo empty and so on is showing, no errors, but no swaps are actually occuring at all. But I'm hearing from people on Spellcast that their gear is swapping (packet vs input?)

    Edit: and suddenly I can't WS anymore... weird. (as if the logic of knowing whether or not the player is engaged isn't known).
    well just updated again, now swaps works.

  3. #403
    Cerberus
    Join Date
    Jul 2008
    Posts
    476
    BG Level
    4
    FFXIV Character
    John Blaze
    FFXIV Server
    Diabolos
    FFXI Server
    Asura

    Quote Originally Posted by haruhigumi View Post
    Attn: Mote : Where did UserGlobals disappear to ?
    I think he changed it to Mote-Globals

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

    Year, gear equipping fixed.

    haruhigumi: My version was renamed as Mote-Globals.lua, while the user can create a version called user-globals.lua. If user-globals.lua exists, it will load that instead. That way it's completely separated from any files you might pull from the repository.

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

    function buff_change(status,gain_or_loss) and if buffactive.xxxxxx not working... my guess till resources get update

  6. #406
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    Quote Originally Posted by Motenten View Post
    Year, gear equipping fixed.

    haruhigumi: My version was renamed as Mote-Globals.lua, while the user can create a version called user-globals.lua. If user-globals.lua exists, it will load that instead. That way it's completely separated from any files you might pull from the repository.
    I see, Also like how you added something to load a separate gear set (makes it easier for someone updating from say my Rng example), however with this RNG_gear.lua http://pastebin.com/Wc8ctAu6

    I'm getting the following error
    Code:
    GearSwap: Loaded your RNG Lua File!
    GearSwap: Lua error (runtime - ...86)Windower4/addons/GearSwap/Data/Mote-Utility.lua:429:
    GearSwap: Nothing was returned by the include (RNG_gear.lua). Cannot add it to the user enviroment.
    And this is the main RNG.lua in progress. : http://pastebin.com/mLAgEcUJ

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

    Example code:

    Code:
    local user = {}
    
    function user.init_user_gear_sets()
        add_to_chat(123,'sidecar load')
    end
    
    return user

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

    Also, there's a bug in my auto-selection of gorgets/belts/etc, somewhere. Will have to debug it. For now, you can comment out lines 526-529 of Mote-Include to get around it.

  9. #409
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    Also appears to be a bug in Mote-Utility.lua:171

    When I try to do curing waltz with that refine_waltz function, I get
    Attempt to index global 'WaltzTPCost' a nil value.

  10. #410
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    Quote Originally Posted by Motenten View Post
    Example code:

    Code:
    local user = {}
    
    function user.init_user_gear_sets()
        add_to_chat(123,'sidecar load')
    end
    
    return user
    Hrm course my stuff like U_Shot_Ammo do not appear to be of a larger scope, as such when called from say precast or such, it complains of being a nil value.

    Had to add that plus DefaultAmmo into the get_sets in the main file, which in a way sort of defeats the purpose (but not as big a problem since it leaves the bulk of the changes outside of the main).

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

    Quote Originally Posted by haruhigumi View Post
    Also appears to be a bug in Mote-Utility.lua:171

    When I try to do curing waltz with that refine_waltz function, I get
    Attempt to index global 'WaltzTPCost' a nil value.
    Fixed that.

  12. #412
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    I also noticed that stuff like

    Code:
    	sets.Kiting = {feet="Fajin Boots"}
    don't work side-carded.

  13. #413
    Sea Torques
    Join Date
    Aug 2006
    Posts
    518
    BG Level
    5
    FFXI Server
    Leviathan

    gearswap is giving me refresh.lua.456 attempt to index field '?' (a nil value)

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

    The bug in auto-selection is that day and weather element info is currently broken. As such, only set_spell_obi_cape_ring(spell) (line 526) needs commenting out. Gorget/belt/staff selection should still work.

    I'll push a version with it commented out for now.

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

    Quote Originally Posted by haruhigumi View Post
    I also noticed that stuff like

    Code:
    	sets.Kiting = {feet="Fajin Boots"}
    don't work side-carded.

    I'm testing on whm, and it seems to work perfectly fine. You should have a file called rng_gear.lua, and within it have a copy of init_gear_sets, named: user.init_user_gear_sets (assuming you're using the above template).

    Oh, I guess I should ask, you rebuilt from the template didn't you? The layout of the functions has changed a bit recently. get_sets() is just a light helper function to make sure the other functions get called properly.

  16. #416
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    Quote Originally Posted by Motenten View Post
    I'm testing on whm, and it seems to work perfectly fine. You should have a file called rng_gear.lua, and within it have a copy of init_gear_sets, named: user.init_user_gear_sets (assuming you're using the above template).

    Oh, I guess I should ask, you rebuilt from the template didn't you? The layout of the functions has changed a bit recently. get_sets() is just a light helper function to make sure the other functions get called properly.
    In progress and example are the two files utilizing that method of side-carding.

    http://pastebin.com/u/KBeezie

    and yes it's rng_gear.lua, I had to move U_Shot_Ammo and Default Ammo into the main file's get_sets() because they weren't being carried over from the rng_gear.lua (As if the scope of it ended there). And when I was only using rng_gear.lua for my gear sets, turning kiting on was not equiping the fajin boots, but if I left the gear sets in the main file instead, it works.

    Regarding template, I'd look at it and compare if any function names and such have changed.

  17. #417
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    Also in regards to your documentation:

    Code:
    Within whm_gear.lua, create a function called init_user_gear_sets().  When first created you can copy everything from the main file's init_gear_sets() function, and then fill in your own actual gear.  user_unload() is called when the file is unloaded, if you need any custom unload logic.
    As you mentioned there's no example of it in the repository, and the instructions mentions nothing regarding needing to set local user = {} and return user in order to make it not error out. And I'm thinking it's probably a scope issue because with just that and the same thing I had in init_gear_sets() those variables don't all seem to have the scope needed in the functions. ie: Kiting wasn't working, and some of the other variables. Works fine if I just don't do the side loaded file and just keep it in the init_gear_sets() in the main file.

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

    In your rng_gear.lua, you have:

    function init_user_gear_sets()

    which needs to be:

    function user.init_user_gear_sets()


    Otherwise init_user_gear_sets isn't added to the user table, and so doesn't get returned, and thus doesn't get added to the calling environment, which means nothing you define in it will be retained.

    Same for user_unload.

    The doc file should have that basic template shown, but I need to add the unload function in there as well.

  19. #419
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    Quote Originally Posted by Motenten View Post
    In your rng_gear.lua, you have:

    function init_user_gear_sets()

    which needs to be:

    function user.init_user_gear_sets()


    Otherwise init_user_gear_sets isn't added to the user table, and so doesn't get returned, and thus doesn't get added to the calling environment, which means nothing you define in it will be retained.

    Same for user_unload.

    The doc file should have that basic template shown, but I need to add the unload function in there as well.
    Understood, I was wondering why the user var seemed so useless, but without the function attached, of course it wouldn't work. Thanks for clearing that up.

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

    I may actually not even need a different function name, but use init_gear_sets for both the job.lua and job_gear.lua. By including it, it should overwrite the one in the main file. A quick test seems to work. If it doesn't break anything, I'll probably do that.

Page 21 of 302 FirstFirst ... 11 19 20 21 22 23 31 71 ... LastLast

Similar Threads

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