Item Search
     
BG-Wiki Search
Page 24 of 302 FirstFirst ... 14 22 23 24 25 26 34 74 ... LastLast
Results 461 to 480 of 6036

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

  1. #461
    RIDE ARMOR
    Join Date
    Jan 2014
    Posts
    12
    BG Level
    1
    FFXI Server
    Fenrir

    Quote Originally Posted by Keyoku View Post
    Cleaned out all the old bits from SAM as per your advice, Mote, and changed the code around a bit. Once your newest fix is out, I'll port it to that, but for now... I still can't get it to equip Vishap Armet.
    the relevant code I'm not sure about:
    Code:
    function job_midcast(spell, action, spellMap, eventArgs)
    	if spell.action_type == 'Magic' then
    		equip(sets.midcast.FastRecast)
    	end
    	if spell.english:endswith('Magic') then 
        if player.hpp < 51 then
          equip(sets.HB.Pre) -- which is: sets.HB.Pre = {head="Vishap Armet"}
        end
      end
    end
    Once I get down to the 33% threshold, it'll use the appropriate set for Healing Breath, so that part works, just triggering it at 49% is refusing to work.
    Two things come to mind: the first is that it might have your swap getting changed with something else down the line because you aren't telling mote's function to not try to equip anything else when it comes back from your function (that is where eventArgs.handled = true comes into play (don't quote me on the capitalization there please)) and secondly have you thought about trying to do the swap by using classes.CustomClass ="setnamehere" instead of the direct equip call? With the logical flow of mote's files if you have that custom class specified it should make sure it gets equipped (otherwise it checks for a couple different set name variations to try if I am remembering correctly)

  2. #462
    Melee Summoner
    Join Date
    Apr 2013
    Posts
    35
    BG Level
    1
    FFXI Server
    Cerberus

    How would that look in code? My understanding of GearSwap is beyond limited and all I basically did so far is copy and paste, lua r gearswap, try a feature, move on. If you could please show me how and where to put it, I'll gladly try it out. Thanks for the input!

  3. #463
    RIDE ARMOR
    Join Date
    Jan 2014
    Posts
    12
    BG Level
    1
    FFXI Server
    Fenrir

    Example keeping the equip and using the event args setting would be like (using your code from above):
    Code:
    function job_midcast(spell, action, spellMap, eventArgs)
    	if spell.action_type == 'Magic' then
    		equip(sets.midcast.FastRecast)
    	end
    	if spell.english:endswith('Magic') then 
        if player.hpp < 51 then
          equip(sets.HB.Pre) -- which is: sets.HB.Pre = {head="Vishap Armet"}
          eventArgs.handled = true -- This tells mote's include that the job file handled all the actions and it shouldn't try to handle other things (more or less; mote could give a better explanation :D )
        end
      end
    end
    Example using the class would be (using your code from above except the set to use):
    Code:
    function job_midcast(spell, action, spellMap, eventArgs)
    	if spell.action_type == 'Magic' then
    		equip(sets.midcast.FastRecast)
    	end
    	if spell.english:endswith('Magic') then 
        if player.hpp < 51 then
          classes.CustomClass = "Breath" -- This would cause it to look for sets.x.Breath where x is Precast, Midcast, etc depending on the function
        end
      end
    end
    Note: I haven't gotten around to working on my DRG lua yet outside of getting its skeleton in place (haven't really used it much of late...as is the case with far too many of my jobs ) so I haven't had the change to work out all the tendencies with the various breaths so another DRG that has been playing with lua for the job might be a better person to ask

  4. #464
    Melee Summoner
    Join Date
    Apr 2013
    Posts
    35
    BG Level
    1
    FFXI Server
    Cerberus

    Thanks for the intel, Animetwins, greatly appreciated! tried the first option and it wasn't doing anything else. If I use the customclass, do I then have to create a set? what would it be called?
    Also, side note: I thought I should try just adding Vishap Armet to my fastcast set to see if that would work at all. but when I leave my equipment window open, and type /ma dia <t>, then I don't notice a swap at all. Time to update to a newer mote version?

  5. #465
    RIDE ARMOR
    Join Date
    Jan 2014
    Posts
    12
    BG Level
    1
    FFXI Server
    Fenrir

    The custom class tends to be used as the final name for an action. For example for a midcast action it would look for sets.midcast.CustomClassName so you would need to create that set if you wanted it to be applied for midcast.

    Personally I would adjust the logic that you had used to be more along the lines of:
    Code:
    function job_midcast(spell, action, spellMap, eventArgs)
    	if spell.action_type == 'Magic' then
    		equip(sets.midcast.FastRecast)
    		if player.hpp < 51 then
    			classes.CustomClass = "Breath" -- This would cause it to look for sets.midcast.Breath 
    		end
    	end
    end
    And then have the set defined something like:
    Code:
    sets.midcast.Breath = 
    	set_combine(
    		sets.midcast.FastRecast, 
    		{ head="Vishap Armet" }
    	)

  6. #466
    Melee Summoner
    Join Date
    Apr 2013
    Posts
    35
    BG Level
    1
    FFXI Server
    Cerberus

    Thanks again, added the set and that code but sorry yet again to report that it's still not working. Also not sure why, but still getting the "lua error (runtiem) - table index is nil" whenever I use Dia.

    Edit: Maybe I'll just wait till Mote pushes his new update onto non-Dev and use all his new files and just add my drg rules and sets to his template. I think I am using an outdated Mote-incl. etc. I notice my character not swapping between any sets while casting, so now I figure that's probably the source of my problems.

  7. #467
    Melee Summoner
    Join Date
    Dec 2006
    Posts
    35
    BG Level
    1

    I'm not sure if I'm doing something wrong, but I'm unable to successfully detect if I'm in the middle of casting anymore. midaction() always returns false even during casting for me. Just a simple precast just says midaction false, even in the middle of a long reraise spell.
    Code:
    function precast(spell,action)
    	if midaction() then
    		windower.add_to_chat(167, "Midaction true")
    	else
    		windower.add_to_chat(167, "Midaction false")
    	end
    end
    Is anyone else having issues with this or am I doing something retarded?

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

    Midaction in the precast function? Don't really get what you wanna do

  9. #469
    Melee Summoner
    Join Date
    Dec 2006
    Posts
    35
    BG Level
    1

    I want to stop processing the spell if I'm in the middle of casting a spell already. I.e. I've started curing, i'm in the midcast phase with cure potency gear on, but I've pressed cure again (because I spam sometimes) and it pushes me back to the precast function, equips cure cast time gear and I end up finishing my spell in the wrong gear. Previously I was using if midaction() to detect this, and it was working fine, but since the update it no longer works for me.

  10. #470
    Smells like Onions
    Join Date
    Jul 2013
    Posts
    2
    BG Level
    0

    I can't seem to get a string from world.day_element. Its only returning nil. Is anyone else having this problem?

  11. #471
    Melee Summoner
    Join Date
    Dec 2006
    Posts
    35
    BG Level
    1

    Quote Originally Posted by Norms View Post
    I can't seem to get a string from world.day_element. Its only returning nil. Is anyone else having this problem?
    I've taken a look at the code and it appears as though the windower function get_info() no longer returns day or day_element as it should. Byrth is assigning all values from this function to the global variable world, but day and day_element aren't being returned by luacore. i.e. this is an issue with luacore rather than gearswap. We'll just have to wait for a luacore update

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

    Quote Originally Posted by Miang View Post
    I want to stop processing the spell if I'm in the middle of casting a spell already. I.e. I've started curing, i'm in the midcast phase with cure potency gear on, but I've pressed cure again (because I spam sometimes) and it pushes me back to the precast function, equips cure cast time gear and I end up finishing my spell in the wrong gear. Previously I was using if midaction() to detect this, and it was working fine, but since the update it no longer works for me.
    Afaik In GS even if you spam the macro it won't swap your gear back to precast, it have some lock for that(I remember Byrth did write something about this when GS was starting)

    But kind of can confirm it, enabling showswaps(gs showswaps) and like that example spam a cure macro, and check the gearswaps.

  13. #473
    BG Content
    Join Date
    Jul 2007
    Posts
    22,369
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    I removed the forced delay and let people implement their own system for it using midaction(). I'm checking what's wrong with it now.

  14. #474
    RIDE ARMOR
    Join Date
    Jan 2014
    Posts
    22
    BG Level
    1

    Anyone getting error with latest update using motes LUA.

    LUA Error attempt to call global 'init_include' (a nil value)

    Or have i done something wrong?

    Thanks

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

    Quote Originally Posted by viperkc View Post
    Anyone getting error with latest update using motes LUA.

    LUA Error attempt to call global 'init_include' (a nil value)

    Or have i done something wrong?

    Thanks
    this probably? not sure I dont use Includes.

  16. #476
    Hydra
    Join Date
    Oct 2009
    Posts
    109
    BG Level
    3
    FFXI Server
    Bismarck

    Edit2: Just needed to reload to download the newly pushed GearSwap and Luacore.

    However, new errors.

    gearswap/refresh.lua:259: table index is nil

    data/Mote-Include.lua:168: attempt to call global 'init_gear_sets' (a nil value)

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

    With the new update, I've pushed all my latest changes. Also created a new branch for my own files for dev work, so people can get from that branch if they're using the dev version.

    With this change:

    include('Mote-Include') no longer needs to be followed by init_include(). It self-initializes.

    Because it can self-initialize now, I've moved the remaining global setup functions into the include. get_sets() now only has the single call to include().

    Includes no longer need the table wrapper (eg: local MoteInclude = {}; return MoteInclude). All the functions and vars are added directly to the user environment. Update all Mote-* files, as well as user-includes and sidecar files if you use them. (see earlier explanation).

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

    Quote Originally Posted by Eastaran View Post
    Edit2: Just needed to reload to download the newly pushed GearSwap and Luacore.

    However, new errors.

    gearswap/refresh.lua:259: table index is nil

    data/Mote-Include.lua:168: attempt to call global 'init_gear_sets' (a nil value)

    The error in gearswap/refresh is from a bug in the puppet stuff. Being fixed now.

  19. #479
    Hydra
    Join Date
    Oct 2009
    Posts
    109
    BG Level
    3
    FFXI Server
    Bismarck

    Is the Mode-Include error a side-effect from that? I pulled everything straight from the git-hub but I checked to make sure all of the init_includes were gone still.

    Edit: Doesn't matter for now as it won't even load anything because of the refresh error.

  20. #480
    BG Content
    Join Date
    Jul 2007
    Posts
    22,369
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    midaction and pet_midaction functions should both work properly again now. Please let me know if anything funky happens.

Page 24 of 302 FirstFirst ... 14 22 23 24 25 26 34 74 ... LastLast

Similar Threads

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