Item Search
     
BG-Wiki Search
+ Reply to Thread
Page 286 of 294 FirstFirst ... 236 276 284 285 286 287 288 ... LastLast
Results 5701 to 5720 of 5878

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

  1. #5701
    Radsourceful

    Join Date
    Jul 2007
    Posts
    1,926
    BG Level
    6
    FFXI Server
    Bismarck

    Quote Originally Posted by Spicyryan View Post
    Will that apply it to water and ice or just darksday? Other than that it looks like it should work without even trying it.

    Thanks :D


    Now to wait for watersday..
    It'll apply to any days that have "Darkness" listed in the snippet you posted - both ice and water (as well as earth and dark, though they're already included from the gravitation property)

    Code:
    check_ws_day = {
    Firesday=S{'Liquefaction','Fusion','Light'},
    Earthsday=S{'Scission','Gravitation','Darkness'},
    Watersday=S{'Reverberation','Distortion','Darkness'},
    Windsday=S{'Detonation','Fragmentation','Light'},
    Iceday=S{'Induration','Distortion','Darkness'},
    Lightningday=S{'Impaction','Fragmentation','Light'},
    Lightsday=S{'Transfixion','Fusion','Light'},
    Darksday=S{'Compression','Gravitation','Darkness'},}

  2. #5702
    i should really shut up
    Join Date
    Sep 2011
    Posts
    1,714
    BG Level
    6
    FFXI Server
    Asura

    Tested the rule and it works. Whew!

  3. #5703
    i should really shut up
    Join Date
    Sep 2011
    Posts
    1,714
    BG Level
    6
    FFXI Server
    Asura

    Tried making something intuitive for my idle rules, and neither the refresh or the weakness set are triggering.

    I assume both issues are my syntax

    Code:
    function IdleState()
        ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
        if player.status == 'Weakness' then
    		ChangeGear({head = "Twilight Helm", body = "Twilight Mail"})
    	elseif player.sub_job:contains('WHM', 'BLM', 'RDM', 'SMN', 'BLU', 'SCH', 'GEO', 'PLD', 'DRK', 'RUN') and player.mpp < 90 then
            ChangeGear(sets.Idle.Refresh)
        end
    	
    end

  4. #5704

    Quote Originally Posted by Spicyryan View Post
    Tried making something intuitive for my idle rules, and neither the refresh or the weakness set are triggering.

    I assume both issues are my syntax

    Code:
    function IdleState()
        ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
        if player.status == 'Weakness' then
            ChangeGear({head = "Twilight Helm", body = "Twilight Mail"})
        elseif player.sub_job:contains('WHM', 'BLM', 'RDM', 'SMN', 'BLU', 'SCH', 'GEO', 'PLD', 'DRK', 'RUN') and player.mpp < 90 then
            ChangeGear(sets.Idle.Refresh)
        end
        
    end
    weakness/Refresh are a buffs not a statuses
    all the known statuses are in Windower4\res\statuses.lua

  5. #5705
    i should really shut up
    Join Date
    Sep 2011
    Posts
    1,714
    BG Level
    6
    FFXI Server
    Asura

    Quote Originally Posted by dlsmd View Post
    weakness/Refresh are a buffs not a statuses
    all the known statuses are in Windower4\res\statuses.lua
    Makes sense.

    My next guess before I just tinker around would be changing that if player.status == 'Weakness' then line to if buffactive['Weakness'] then

  6. #5706

    Quote Originally Posted by Spicyryan View Post
    Makes sense.

    My next guess before I just tinker around would be changing that if player.status == 'Weakness' then line to if buffactive['Weakness'] then
    no buffactive['weakness']

  7. #5707
    i should really shut up
    Join Date
    Sep 2011
    Posts
    1,714
    BG Level
    6
    FFXI Server
    Asura

    Quote Originally Posted by dlsmd View Post
    no buffactive['weakness']
    Actually got around to testing the rule just now, and it does work as:


    Code:
    function IdleState()
        ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
        if buffactive['Weakness'] then
    		ChangeGear({head = "Twilight Helm", body = "Twilight Mail"})
    	elseif player.sub_job:contains('WHM', 'BLM', 'RDM', 'SMN', 'BLU', 'SCH', 'GEO', 'PLD', 'DRK', 'RUN') and player.mpp < 75 then
            ChangeGear({head = "Jumalik Helm", body = "Chozoron Coselete"})
        end
    	
    end
    Happy I got it working before posting pretty much, its nice to have a basic competency in something :D.
    The only issue is if I don't have the gear for the slot, say I leave my refresh head and body in the MH from DRG, and cast a spell /mage. My precast/midcast will come on and then my idle will equip in all but those two spots. Is there something that will avoid this?

    While the weakness thing works too, there is probably a better way of handling that. It is conceivable that since nothing is locked there, I could preform an action the same time I die and lose the reraise from the set. I wonder how others handle that.

    Here is what I have worked up so far

  8. #5708
    Old Merits
    Join Date
    Sep 2010
    Posts
    1,082
    BG Level
    6
    FFXI Server
    Ragnarok

    Well, you could do an inventory check for the items in question.

    Code:
    if not player.inventory["Refresh body"] then
    --Stuff to do if your refresh body isn't in inv
    end
    Although, this only searches inventory, not wardrobe. So keep that in mind.

  9. #5709
    Old Merits
    Join Date
    Sep 2010
    Posts
    1,082
    BG Level
    6
    FFXI Server
    Ragnarok

    Looking over you lua, very briefly since I'm at work.

    It's really inefficient to have rules for every ja, when all the rule does is equip the matching set. Almost every lua I've ever seen handles ja, and a lot of spells as follows.

    Code:
    if sets.JA[spell.english] then
    		equip(sets.JA[spell.english])
    although in your case it would be ChangeGear not equip.

    The rule here checks to see if any sets matching sets.JA. then the exact English spell name. This means that if you have a sets.JA.Jump and you are using jump, it would equip that set.

    Notes on set names. For single word names just sets.JA.JAname works fine. But for anythings with a space or an apostrophe in it, you will need to do, sets.JA["JAname"]. Keep in mind that this is all case sensitive. So sets.JA.Jump would trigger, but sets.JA.jump would not.

    Much the same system is often used for WS as well.

    /mage healing breath triggers. You have;

    Code:
    if spell.action_type == 'Magic' and player.hpp <= 50 then
    		ChangeGear(sets.HB.Trigger)
    	end
    The issue with this is two fold. 1, swapping gear changes HP. so after your swap, you might not have the HP gap to HB anymore. 2, It's fairly standard practice for DRG/mage, when anyone even uses it anymore, to swap in HP+ gear on the trigger spell, to raise the threshold at which you can trigger a healing breath. Naturally, if you're only swapping in Armet when HP is already at or below 50%, this would be pretty pointless.

    EDIT2: Wait, that's at or greater than 50% HP... So are you going for a swap HP when above 50% and just armet when below? Cause the B. Trigger set only had armet in it, and i don't see an else rule to handle below 50%... that <= a typo?

    Anyway, I'll look over this some more as I have time and tell you if I notice anything else.


    EDIT:
    Code:
    	--The Freshmaker--
    	sets.HB.Mentos = {
    		head = "Pteroslaver Armet"
    	}
    This cracked me up.

  10. #5710

    Quote Originally Posted by Martel View Post
    Looking over you lua, very briefly since I'm at work.

    It's really inefficient to have rules for every ja, when all the rule does is equip the matching set. Almost every lua I've ever seen handles ja, and a lot of spells as follows.

    Code:
    if sets.JA[spell.english] then
            equip(sets.JA[spell.english])
    no this is not inefficient at all it is vary efficient
    this is because there is only one check every time this line runs
    it is infact more efficient then running
    Code:
    if spell.english == "janame" then
            equip(sets.JA.set_name)
    because it does not check the spell.name against all prior spell names in the if/elseif/else sequence
    Code:
    if sets.JA[spell.english] then
    just checks to see if the table sets.JA[spell.english] exists
    there is one issue that can arrise and that is when you create a gearset that does not have any gear in it but you want it to equip your default gear for that type but because you do not have any gear in the sets.JA[spell.english] table it will not change gear at all

  11. #5711
    Old Merits
    Join Date
    Sep 2010
    Posts
    1,082
    BG Level
    6
    FFXI Server
    Ragnarok

    My mistake then.

    Let me rephrase. It's far less a pain the ass than to have to write a rule for every action. It's time efficient from a personal perspective. This way when adding a new set for an action, all you have to do is make the set in the correct format.

  12. #5712

    Quote Originally Posted by Martel View Post
    My mistake then.

    Let me rephrase. It's far less a pain the ass than to have to write a rule for every action. It's time efficient from a personal perspective. This way when adding a new set for an action, all you have to do is make the set in the correct format.
    It is efficient in both code run time and coding time because of the fact that all you need to do is what you stated above

  13. #5713
    i should really shut up
    Join Date
    Sep 2011
    Posts
    1,714
    BG Level
    6
    FFXI Server
    Asura

    Quote Originally Posted by Martel View Post
    EDIT2: Wait, that's at or greater than 50% HP... So are you going for a swap HP when above 50% and just armet when below? Cause the B. Trigger set only had armet in it, and i don't see an else rule to handle below 50%... that <= a typo?

    Anyway, I'll look over this some more as I have time and tell you if I notice anything else.


    EDIT:
    Code:
    	--The Freshmaker--
    	sets.HB.Mentos = {
    		head = "Pteroslaver Armet"
    	}
    This cracked me up.
    That is a <= 50% meaning if it is less than or equal to 50%. I like the idea of adding HP gear into the trigger set (I was a DRG back at 75, and then Voidwatch with OAT polearm until years away from it so I am familiar with that ), but this is by far a manual process. I just made a NQ Plackart last night so needless to say my gear isn't all gathered. I can't think of any way to have it account for the increase though aside from specifying it.

    And yes, I enjoyed being silly with it like I always do. Like with the message players see when they first load the GS.

    Quote Originally Posted by Martel View Post
    My mistake then.

    Let me rephrase. It's far less a pain the ass than to have to write a rule for every action. It's time efficient from a personal perspective. This way when adding a new set for an action, all you have to do is make the set in the correct format.
    But it's not a pain in the ass. It's not hard to type out a few sets there. Frankly it's easier to visually organize that way is why I do it. I do appreciate the interest in and help with my GS though. I know it can use more polish before I offer it out to others for their uses like my BLU one.
    If my RUN one (looks like this one but tp and tanking sets are in the same toggle...) didn't suck, I'd put it in my pastebin for others too.

  14. #5714
    Old Merits
    Join Date
    Sep 2010
    Posts
    1,082
    BG Level
    6
    FFXI Server
    Ragnarok

    Hmm, I may possibly retarded when it comes to < and > or something. Well, that's why I always test this stuff first.

    It should be entirely possible to calculate your post swap HP, but there are various factors that complicate it. HP+/- buffs, atma/atmacite,vorseals, food, etc.

    What I did was just choose a specific set of spells as trigger spells, then have those spells always swap for a healing breath. That way they can trigger, if possible even when cursed,/HP downed, etc.

    Then you just need to know how much total HP you have in your trigger set to get your threshold, so you know when you're able to trigger. That said, I don't think /mage gets much use anymore with Trusts being a thing.

    Quote Originally Posted by Spicyryan View Post
    But it's not a pain in the ass. It's not hard to type out a few sets there. Frankly it's easier to visually organize that way is why I do it.
    I'm not sure if we're talking about writing case by case rules being a pain or making sets being a pain now. I meant the former. But it's your lua, do what you want.

    You've got an Odyllic Subterfuge rule in there with your JA.

    The warcry rule references a set that doesn't exist. sets.JA.Warcry. Would throw an error on use.

    Also sets.JA.Provoke appears to just be a set_combine with a sets.Enmity. Not in and of itself a problem, but... There is no gear that directly enhances Provoke specifically(as opposed to just enmity+ gear) and there's no DRG wearable warcry gear. Why not just have the rules for voke/warcry point to directly sets.Enmity? Although you might consider a toggle for warcry depending on if you actually want to be pulling hate or not.

    Ditto Meditate. DRG can't wear anything that enhances it, and the set referenced in the rules doesn't exist.
    Code:
    function pet_midcast(spell, act)
    	if string.find(spell.english,'Healing Breath') or spell.english == 'Steady Wing' or spell.english == 'Smiting Breath' then
    		ChangeGear(sets.HB.Mentos)
    	end
    end
    Steady wing is a player used JA. The wyvern just receives the effect, much like spirit link. The steady wing portion of this rule would never be true since pet_midcast would never activate on steady wing.

    When you use smiting breath, the spell name that passes for the pet midcast, is going to be the name of the breath the wyvern uses, Flame breath, etc. Not Smiting breath.

    Healing breath, Smiting breath, and steady wing should all have different sets.

    -Healing breath uses a mix of breath+ and WHP+.
    -Smiting is all Breath+, and no WHP+, since elemental breaths are based on current wyvern HP, rather than max like HB.
    -Steady wing should be all WHP+.

    line 280 in pc_magic
    if spell.skill == 'BlueMagic' then

    I'm fairly sure you'd need a space between blue and magic for that to ever return true.

    Line 249
    if IgnoreWS:contains(spell.english) then

    The table IgnoreWS doesn't exist in this lua.

  15. #5715
    i should really shut up
    Join Date
    Sep 2011
    Posts
    1,714
    BG Level
    6
    FFXI Server
    Asura

    Quote Originally Posted by Martel View Post
    Hmm, I may possibly retarded when it comes to < and > or something. Well, that's why I always test this stuff first.

    It should be entirely possible to calculate your post swap HP, but there are various factors that complicate it. HP+/- buffs, atma/atmacite,vorseals, food, etc.

    What I did was just choose a specific set of spells as trigger spells, then have those spells always swap for a healing breath. That way they can trigger, if possible even when cursed,/HP downed, etc.

    Then you just need to know how much total HP you have in your trigger set to get your threshold, so you know when you're able to trigger. That said, I don't think /mage gets much use anymore with Trusts being a thing.


    I'm not sure if we're talking about writing case by case rules being a pain or making sets being a pain now. I meant the former. But it's your lua, do what you want.

    You've got an Odyllic Subterfuge rule in there with your JA.

    The warcry rule references a set that doesn't exist. sets.JA.Warcry. Would throw an error on use.

    Also sets.JA.Provoke appears to just be a set_combine with a sets.Enmity. Not in and of itself a problem, but... There is no gear that directly enhances Provoke specifically(as opposed to just enmity+ gear) and there's no DRG wearable warcry gear. Why not just have the rules for voke/warcry point to directly sets.Enmity? Although you might consider a toggle for warcry depending on if you actually want to be pulling hate or not.

    Ditto Meditate. DRG can't wear anything that enhances it, and the set referenced in the rules doesn't exist.
    Code:
    function pet_midcast(spell, act)
    	if string.find(spell.english,'Healing Breath') or spell.english == 'Steady Wing' or spell.english == 'Smiting Breath' then
    		ChangeGear(sets.HB.Mentos)
    	end
    end
    Steady wing is a player used JA. The wyvern just receives the effect, much like spirit link. The steady wing portion of this rule would never be true since pet_midcast would never activate on steady wing.

    When you use smiting breath, the spell name that passes for the pet midcast, is going to be the name of the breath the wyvern uses, Flame breath, etc. Not Smiting breath.

    Healing breath, Smiting breath, and steady wing should all have different sets.

    -Healing breath uses a mix of breath+ and WHP+.
    -Smiting is all Breath+, and no WHP+, since elemental breaths are based on current wyvern HP, rather than max like HB.
    -Steady wing should be all WHP+.

    line 280 in pc_magic
    if spell.skill == 'BlueMagic' then

    I'm fairly sure you'd need a space between blue and magic for that to ever return true.

    Line 249
    if IgnoreWS:contains(spell.english) then

    The table IgnoreWS doesn't exist in this lua.
    -Added the ignoreWS table, will add stuff to it if i need to, but I don't think theres anything I need to as that is a magical WS sort of rule. Previously in my BLU LUA this housed magical WS and things I didn't want Ishvara on like sanguine blade. I tend to keep these things innocuously around in case they are of a future use.

    -Fixed Steady Wing

    -Fixed that Blue Magic thing, but it was actually a nonissue. FC triggered because it was a spell, but the original purpose of that set was for equipping the empyrean BLU body for BLU only spells on BLU. I never need that body, but left the rule in there for others, but never tested it probably. So it was a non issue for me, but fixed none the less, that was a really good catch though.

    -Removed the Odyllic rule, it was just a remnant of the RUN GS. As was the case for the RUN GS from my BLU. I just copy pasted and started ripping stuff out, adding stuff, etc.

    - Meditate rule is there to equip enmity gear while using meditate same for warcry, was specially for RUN, but I will remove that too. I was really tired while working on that part of the GS so I forgot to remove that other part of the rule. Fixed this now though.

    -As for HB, yeah that isn't such a big thing for anyone anymore, but much like how I don't even have Deep Breathing merited, I wanted it accounted for.

    Fixed, but untested:
    - Elemental Breaths, while I don't plan on carrying around different gear since wyvern breaths are so shitty for DDing, I did want to make this work right obviously. So I made a table for it and added an elseif to the healing breath rule. It should work, but I never know until I test it.


    Here is the updated lua after all that


    EDIT: For some reason when I am in the MH I get a spam every 3 seconds of "You cannot use that command here." While I am just sitting on the MH/Garden.

    I went and zoned out to the field and it hasn't said anything about it.

    Show swaps was on and it wasn't trying to change anything so I don't get why that keeps happening.

  16. #5716
    Old Merits
    Join Date
    Sep 2010
    Posts
    1,082
    BG Level
    6
    FFXI Server
    Ragnarok

    I would have thought Ishvara would have been very good for sanguine. <,<

    For your error, maybe put some echos in various functions, like in self command put one that reports the current command, in status change one that says the new status, etc. Spell.english for pre/mid/etc. If any of those are outputting something it might tell you what's doing it.

    Edit: Oh, or just turn on debug mode. WOuld show what ever function is being called, pre/mid/status etc.

    //gs debugmode

  17. #5717
    i should really shut up
    Join Date
    Sep 2011
    Posts
    1,714
    BG Level
    6
    FFXI Server
    Asura

    Quote Originally Posted by Martel View Post
    I would have thought Ishvara would have been very good for sanguine. <,<

    For your error, maybe put some echos in various functions, like in self command put one that reports the current command, in status change one that says the new status, etc. Spell.english for pre/mid/etc. If any of those are outputting something it might tell you what's doing it.

    Edit: Oh, or just turn on debug mode. WOuld show what ever function is being called, pre/mid/status etc.

    //gs debugmode
    It is a bug with my refresh line, at least in kamihr drifts atm. Keeps saying it every 3 seconds Entering buff_refresh in the debug. My rule must be poorly written.

    Regardless of threshold it is trying to put it on, even when it is already on.

    It works too though, puts on that gear correctly when idle after mp goes below the threshold.

    It probably does this for weakened with twilight too I'd assume.

    However that doesnt explain why it keeps saying i cant do that in the MH, because you can change gear there.

    EDIT: The idle refresh rule is faulty anyway, only works with the first listed SJ there. Anything after WHM in that list won't change gear. I replaced 'BLU' , as the first term instead of WHM and it stopped working for sub 'WHM'.

  18. #5718
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,771
    BG Level
    6

    What about something like this. Make a table then refer to it in the code with the second line.

    Code:
    mp_jobs = S{"WHM","BLM","RDM","SMN","BLU","SCH","GEO","PLD","DRK","RUN"}
    
    elseif mp_jobs[player.sub_job] and player.mpp < 75 then

  19. #5719

    Quote Originally Posted by Trumpy View Post
    What about something like this. Make a table then refer to it in the code with the second line.

    Code:
    mp_jobs = S{"WHM","BLM","RDM","SMN","BLU","SCH","GEO","PLD","DRK","RUN"}
    
    elseif mp_jobs[player.sub_job] and player.mpp < 75 then
    that wont work because there are no sub tables in mp_jobs
    you would need to do this
    Code:
    elseif mp_jobs:contains(player.sub_job) and player.mpp < 75 then

  20. #5720
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,771
    BG Level
    6

    that wont work because there are no sub tables in mp_jobs
    you would need to do this
    Code:
    mp_jobs = S{"WHM","BLM","RDM","SMN","BLU","SCH","GEO","PLD","DRK","RUN"}
    
    if command == 'mpjobcheck' then
    	if mp_jobs[player.sub_job] then
    		windower.add_to_chat(50, '======= '..('[  MP  JOB  ]'):color(5)..''..(' ======='):color(50))
    	else
    		windower.add_to_chat(50, '======= '..('[ NO MP JOB ]'):color(20)..''..(' ======='):color(50))
    	end
    end
    This code works for me. not sure what you mean by sub tables. I use this kind of code alot in my luas.

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. Replies: 6547
    Last Post: 2014-07-08, 22:45