Item Search
     
BG-Wiki Search
Page 174 of 302 FirstFirst ... 124 164 172 173 174 175 176 184 224 ... LastLast
Results 3461 to 3480 of 6036

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

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

    The Variable "siphonelement" should never be nil except at the beginning of the function where I initialize it.
    It either assumes the value of the weather (if intensity is 2) otherwise if the weather has intensity 1 or 0 (i.e. absent) then "siphonelement" assumes the value of the current day.
    So... it should never be nil or "none" by the time GS processes the last line.

    I guess maybe there's a mistake in the previous part and my code fails to assign a specific value to the "siphonelement" variable? But it looks like working to me

  2. #3462
    Smells like Onions
    Join Date
    Dec 2014
    Posts
    5
    BG Level
    0

    Quote Originally Posted by Trumpy View Post
    You said you have "one hat is not working" Do you mean one spell isnt working? if so what spell? (I am no expert on LUA). I do notice you have "function precast(spell)" twice. you should prolly put that stoneskin stuff in with the other precast. I know from my experience putting the same function in an include as well as the lua file for the job seems to cause one of them to not work, but I do not know if having 2 of the same functions in the same lua file messes things up.
    Quote Originally Posted by dlsmd View Post
    if you have 2 functions/variables named the same thay will over write each other

    example1:
    precast = "hello" ---this is over written
    function precast()
    end

    example2
    function precast()----this is over written
    end ----this is over written
    precast = "hello"

    example3:
    function precast()----this is over written
    end ----this is over written
    function precast()
    end

    example4:
    precast = "hello" ---this is over written
    precast = "good buy"
    THANK YOU SO MUCH! This was it. I put the stoneskin rule in with the other precast section and it works. Thanks so much!

  3. #3463
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Kazaki View Post
    THANK YOU SO MUCH! This was it. I put the stoneskin rule in with the other precast section and it works. Thanks so much!
    i hope you removed the other function

  4. #3464
    Smells like Onions
    Join Date
    Dec 2014
    Posts
    1
    BG Level
    0

    I am looking for help with using gearswap to cancel an attempt to use a weapon skill if the current target is under a certain amount of HP%. Any help would be great

  5. #3465
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    here
    Code:
    if spell.type == "WeaponSkill" and player.target.hpp <= 15 then
        cancel_spell()
    end
    if you want it for a specific weapon skill you just need to add
    and spell.name == "<wsname>"
    before the then

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

    Quote Originally Posted by Sechs View Post
    Just noticed this isn't working. Not sure if it was working before... haven't been using SMN in months, literally:

    Code:
    spirit_maps = {['Light']="Light Spirit", ['Dark']="Dark Spirit", ['Fire']="Fire Spirit", ['Earth']="Earth Spirit", ['Water']="Water Spirit", ['Wind']="Air Spirit", ['Ice']="Ice Spirit", ['Lightning']="Thunder Spirit"}
    
    ...
    
    function handle_siphon()
    	local siphonelement = ""
    	local intense = get_weather_intensity()
    	if intense == '0' or intense == '1' then
    		siphonelement = world.day_element
    	else
    		siphonelement = world.weather_element
    	end
    	send_command('input /ma "'..spirit_maps[siphonelement]..'" <me>')
    end
    To be specific I get an error on the last line.
    Where could the mistake be?
    Found the error. "If intense =" etc. I had to remove the ' around 0 and 1, now it works

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

    What's the general consensus with Bards in precasting Impatiens?
    If all goes well it works flawlessly, but if you get a packetloss at the wrong time you could end up midcasting songs with Impatiens and that could fuck up a rotation during a vital time.

    As much as packetloss are rare, that kinda pulled me off from the idea of using Impatiens in my precast set on BRD.

  8. #3468
    Melee Summoner
    Join Date
    Jan 2010
    Posts
    29
    BG Level
    1
    FFXI Server
    Caitsith

    How would I write a command for blu Mage so that it checks to see if party members are low hp and if I'm going to self cure have it cast AOE instead if the proper spells are set?

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

    How can you UNEQUIP a slot in a precast function?
    I want to handle "Sange" for NIN in the following way.

    1) When the Sange JA is used, unequip whatever ammo I have in the ammo slot, no matter what's there
    2) Attempt to equip another ammo for the duration of the JA/Buff.


    If you know how Sange works you can understand why I want to play it safe and make absolutely sure Ammo1 gets unequipped 100% before attempting to equip ammo2 (which could be missing from my inventory for instance)

  10. #3470
    BG Content
    Join Date
    Jul 2007
    Posts
    22,356
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    equip({ammo=empty})

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

    Awesome, thanks Byrth. That should work even in a set combine right?
    Like:

    set_combine(set1, {ammo=empty})

    correct?

  12. #3472
    BG Content
    Join Date
    Jul 2007
    Posts
    22,356
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    yeah

  13. #3473
    Custom Title
    Join Date
    Nov 2008
    Posts
    1,065
    BG Level
    6
    FFXI Server
    Diabolos

    Quote Originally Posted by worldslost View Post
    How would I write a command for blu Mage so that it checks to see if party members are low hp and if I'm going to self cure have it cast AOE instead if the proper spells are set?
    Getting the missing HP of a player is annoying, or at least it used to be. A ripped Mote function from a while back, which I used for automatic upgrade/downgrade on WHM cures:
    Code:
    function find_player_in_alliance(name)
        for i,v in ipairs(alliance) do
            for k,p in ipairs(v) do
                if p.name == name then
                    return p
                end
            end
        end
    end
    Maybe some of this is more exposed now, but that'll find it for a given player.

    What you'd have to do is reappropriate this array walk to totalize and/or average missing HP from all members within, while ignoring anyone who's close enough to max HP.

    Something like:
    Code:
    function average_alliance_missing_hp()
    	local tot = 0
    	local ct = 0
    	for i,v in ipairs(alliance) do
    	    for k,p in ipairs(v) do
    	       	local maxhp = p.hp / (p.hpp/100)
    	        local missinghp = math.floor(maxhp - p.hp)
    	        if missinghp > 100 then
    	        	tot += missinghp
    	        	ct++
            	end
    	    end
    	end
    	return math.floor(tot/ct)
    end
    You can tune on the threshold (the >100) so you don't get insignificant amounts mixed in as well as the returned average. Could possibly return the count of players past the missing hp threshold instead, or a list/array/whatever with both. I think having the average value is handy if you want to upgrade a tier, but I'm working in WHM space again.

  14. #3474
    Relic Horn
    Join Date
    Jul 2005
    Posts
    3,478
    BG Level
    7

    How would I go about adding a toggle to 2 IMPACT sets? My earlier attempts all ended futile and it would just equip the base set regardless. I feel like I am missing something. I can mod and copy/paste luas but am no codemonkey.

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

    What do you mean a "toggle"? A trigger that once activated enables Impact set2 instead of Impact set1? If it's just that even a noob like me can help you, it's very easy.


    Let's see now

    Code:
    Impactmode = "default" --put this line at the beginning of your lua
    
    ...
    
    sets.precast.Impact = {} --leave this empty
    sets.precast.Impact.default = {} --your default Impact precast set
    sets.precast.Impact.special = {} --your special Impact precast set
    
    ...
    
    sets.midcast.Impact = {} --leave this empty
    sets.midcast.Impact.default = {} --your default Impact midcast set
    sets.midcast.Impact.special = {} --your special Impact midcast set
    
    ...
    
    function precast(spell,action)
    if spell.english == 'Impact' then
    	equip(sets.precast.Impact[Impactmode])
    end
    end
    
    ...
    
    function midcast(spell,action)
    	if spell.english == 'Impact' then
    		equip(sets.midcast.Impact[Impactmode]
    	end
    end
    
    ...
    
    function self_command(command)
    	if command == 'impactmode' then
    		if Impactmode == "default" then
    			Impactmode = "special"
    		else
    			Impactmode = "default"
    		end
    		add_to_chat(053,' ***** Changed Impact mode to: '..Impactmode..' *****')
    	end
    end

    At this point take the line "//gc c impactmode" and either bind it to a hotkey or a macro.
    Each time you press that hotkey or macro your Impact mode will change and a chat line will be displayed saying which wich Impact mode has been deployed.

  16. #3476
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Sechs View Post
    What do you mean a "toggle"? A trigger that once activated enables Impact set2 instead of Impact set1? If it's just that even a noob like me can help you, it's very easy.


    Let's see now

    <code removed to make smaller>
    At this point take the line "//gc c impactmode" and either bind it to a hotkey or a macro.
    Each time you press that hotkey or macro your Impact mode will change and a chat line will be displayed saying which wich Impact mode has been deployed.
    this is better
    Code:
    function get_sets()
        ...
        Impactmode = 'default' --put this line at the beginning of your lua
        ...
        sets.precast.Impact = {} --leave this empty
        sets.precast.Impact.default = {} --your default Impact precast set
        sets.precast.Impact.special = {} --your special Impact precast set
        ...
        sets.midcast.Impact = {} --leave this empty
        sets.midcast.Impact.default = {} --your default Impact midcast set
        sets.midcast.Impact.special = {} --your special Impact midcast set
    end
    function precast(spell,action)
        ...
        if spell.english == 'Impact' then
            equip(sets.precast.Impact[Impactmode])
        end
    end
    function midcast(spell,action)
        ...
        if spell.english == 'Impact' then
            equip(sets.midcast.Impact[Impactmode])
        end
    end
    function self_command(command)
        ...
        if command == 'impactmode' then
            Impactmode = (Impactmode=='default' and 'special' or 'default')
        end
    end
    still uses //gc c impactmode to switch impact modes

    the only times you need to do this sets.precast['Impact'] if you need something like these
    sets.precast['Curaga IV'] <see the space in the name>
    sets.precast["Army's Paeon"] <see the ' in the name> <of coarse this one also has a space so it would have needed it even if it did not have a '>

  17. #3477
    Hydra
    Join Date
    Sep 2007
    Posts
    131
    BG Level
    3

    Sechs is close, but not quite. Brackets and periods are both used for referring to an immediate child of the parent table, but they are used differently. A name after a period is interpreted as being the literal string index of the element. In your example, it will look for a child called "Impactmode" inside the sets.midcast['Impact'] table. If you place the name of something inside of brackets, it will be interpreted normally, meaning that letters that aren't inside quotes are read as variables. If you have a string index that starts with a number or contains characters other than letters, numbers, and underscores, you have to use the bracket method, hence why you will see sets.midcast["Rudra's Storm"] etc.

    So, sets.midcast['Impact'].Impactmode is the same as saying sets['midcast']['Impact']['Impactmode'], but what you're really looking for is sets.midcast.Impact[Impactmode] (can keep Impact the way it is, but it's unnecessary).

    Also, the first line should be Impactmode = "default" and gotta correct "defaultl" in your condition to "default".

    Edit: Well, beat anyway, but wanted to explain why

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

    Yeah forgot that, won't work without the brackets. Editing the text just in case.
    Other than that it works, I don't have my lua in front of me atm but I have a similar rule for Nuke mode (normal/macc) and it works flawlessly.
    Altough I have no problems believing it can be done better like dlsmd showed, I'm a GS noob after all

  19. #3479
    Relic Shield
    Join Date
    Feb 2012
    Posts
    1,909
    BG Level
    6

    Alright so I quit for many years and came back and spellcast was all the rage, but I didn't play mages so I ignored it. Then it changed to gearswap but my windower macros worked just fine for me, so I ignored it. But now I'm starting to see the windower macros "lag" as I find myself still equipping my +dex ring instead of my rajas when I know I switched back to tp gear and heard this is a current bug or something. So I'm thinking I need to finally get on the GearSwap boat. Is there a good guide for it? I saw a lua tutorial on the windower site, but that didn't explain what commands to utilize for my in-game macros to properly utilize the addon. And well, I'd rather not read 174 pages of this thread to try and pick things up, at least not if I can avoid it...

    From my general gist once setup the game will automatically change between SA, WS and TP sets as I use SA, use a WS, and after a WS, right? Does this mean I no longer need a macro specifically to equip a TP set, but a macro to...setup which 'mode' so gearswap knows which set to equip...?

  20. #3480
    Relic Horn
    Join Date
    Jul 2005
    Posts
    3,478
    BG Level
    7

    Just to elaborate my stupidness I tried to copy paste the "..." with my stuff.



    Where do I put the 3 functions at the end? Tried to copy paste it in at the end but //gc c impactmode doesnt do anything so far.



    EDIT: I guess this is a big problem with guy behind the PC thing. I am still using mote include 1 because I didnt want to break my .lua file.

Page 174 of 302 FirstFirst ... 124 164 172 173 174 175 176 184 224 ... LastLast

Similar Threads

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