Jump to content


Photo

Gearswap (help!) - changing to cures instead of waltzes


    7 replies to this topic

    #1 Cptbirdseye

    Cptbirdseye

      Advanced Member

    • Members
    • PipPipPip
    • 88 posts

      Posted 10 November 2014 - 01:14 AM

      As the topic states, I'm trying to avoid an overload of too many macros used for specific subjobs and wondering if there's a way to switch from using curing waltzes to whm cures when using whm sub instead of dnc sub?  I'm staring at the mote utility file and think I might know of a way but could use some assistance and how to find the spell IDs.



      #2 Arcon

      Arcon

        Advanced Member

      • Windower Staff
      • 1189 posts
      • LocationMunich, Germany

      Posted 10 November 2014 - 06:38 AM

      I don't think it's anything that complicated. Trivially you can simply abort the spell and input a Windower command that starts a new spell, like this:

         if player.sub_job == 'WHM' and spell.english:startswith('Curing Waltz') then
              cancel_spell()
      
              windower.send_command('input /ma "Cure III" <t>')
      
              return
          end


      #3 sdahlka

      sdahlka

        Advanced Member

      • Members
      • PipPipPip
      • 324 posts

        Posted 10 November 2014 - 02:16 PM

        if spell.type == 'Waltz' then
            if spell.english == 'Curing Waltz III' then
                cancel_spell()
                send_command('@input /ma "Cure III" '..spell.target.raw)
                return
            elseif spell.english == 'Curing Waltz II' then
                cancel_spell()
                send_command('@input /ma "Cure II" '..spell.target.raw)
                return
            elseif spell.english == 'Curing Waltz' then
                cancel_spell()
                send_command('@input /ma "Cure" '..spell.target.raw)
                return
            end
        end
         

        if your not using main/sub dnc you need to put this in the filtered_action function



        #4 Arcon

        Arcon

          Advanced Member

        • Windower Staff
        • 1189 posts
        • LocationMunich, Germany

        Posted 10 November 2014 - 08:36 PM

        You can leave out the "@" in those commands, as send_command will prepend that itself. You can do this to save some code:

        if spell.type == 'Waltz' and spell.english:startswith('Curing') then
            local tier = spell.english:match('Curing Waltz(.*)')
            cancel_spell()
            send_command('input /ma "Cure %s" %s':format(tier, spell.target.raw))
            return
        end


        #5 Cptbirdseye

        Cptbirdseye

          Advanced Member

        • Members
        • PipPipPip
        • 88 posts

          Posted 11 November 2014 - 01:56 PM

          Unfortunately I tried all your ideas and all I got was:

          /ja "Curing Waltz III" <stpc>
          ...A command error occurred.
           

          No matter where I moved it to and modified it I kept getting the same error above.  I originally tried putting it on line 211 in Mote-Utility.lua and added a line above like so:

          elseif player.sub_job == 'WHM' then
              if spell.type == 'Waltz' and spell.english:startswith('Curing') then
                  local tier = spell.english:match('Curing Waltz(.*)')
                  cancel_spell()
                  send_command('input /ma "Cure %s" %s':format(tier, spell.target.raw))
                  return
              end


          #6 Arcon

          Arcon

            Advanced Member

          • Windower Staff
          • 1189 posts
          • LocationMunich, Germany

          Posted 12 November 2014 - 04:36 AM

          You should never modify Mote's files (unless you really know what you're doing), only your own user files. Did you try putting it in filtered_action?



          #7 sdahlka

          sdahlka

            Advanced Member

          • Members
          • PipPipPip
          • 324 posts

            Posted 12 November 2014 - 06:23 AM

            any action that your char can not do because of main job, sub job, main job lvl, sub job lvl, main weapon type, required buff(i.e. unbridled learning), or if the ability/spell requires an item(i.e. nin spells) gearswap will send it to filtered_action and not to the pretarget/precast/midcast/aftercast sequences

             

            sence motes includes does not do anything with filtered_action just add this to your own gs lua file

            function filtered_action(spell)
                if spell.type == 'Waltz' and spell.english:startswith('Curing') then
                    local tier = spell.english:match('Curing Waltz(.*)')
                    cancel_spell()
                    send_command('input /ma "Cure %s" %s':format(tier, spell.target.raw))
                    return
                end
            end
             


            #8 Cptbirdseye

            Cptbirdseye

              Advanced Member

            • Members
            • PipPipPip
            • 88 posts

              Posted 12 November 2014 - 11:17 PM

              ok I'll give it a try.

               

              Sweet, it worked!  Thank you so much, glad I got that to work.  Saved me having to make multiple macros.






              1 user(s) are reading this topic

              0 members, 1 guests, 0 anonymous users