Jump to content


Photo

Elemental Obi usage in Gearswap


Best Answer Kenshi , 28 October 2014 - 08:27 PM

I'm not blm and I don't use obis, but I think if you set it like this the rules after will overwritte it if you have another waist in the sets, if you want to use obis just for elemental magic (including stone and impact) put it like this:


    function midcast(spell,action)
        if spell.action_type == 'Magic' then
            if sets.midcast[spell.english] then
                equip(sets.midcast[spell.english])
            elseif spell.english:startswith('Protect') or spell.english:startswith('Shell') then
                equip(sets.midcast.ProtectShell)
            elseif spell.skill == 'Elemental Magic' then
                if spell.english:startswith('Stone') then
                     equip(sets.midcast.Stone)	
                elseif spell.english == 'Impact' then
                     equip(sets.midcast['Elemental Magic'],{body="Twilight Cloak"})
                else equip(sets.midcast['Elemental Magic'])
                end
                if spell.element == world.weather_element or spell.element == world.day_element then
                     equip(sets.obi[spell.element])
                end
            elseif sets.midcast[spell.skill] then
                equip(sets.midcast[spell.skill])
            else equip(sets.precast.Fastcast)
            end
        end
    end

if you don't want to use for stone, impact or use for other skill spells you gotta do it other way.

Go to the full post


    9 replies to this topic

    #1 Gukai

    Gukai

      Advanced Member

    • Members
    • PipPipPip
    • 95 posts

      Posted 24 October 2014 - 06:55 AM

      Hi

      I've been looking around, and through other people's lua's but I cannot find how to input the usage of the elemental obi's for black mages that does not utilize Mote's include/utility files.  I am not a fan of having these and I want to learn how to do it on my own.  Can someone point me in the right direction?  Thanks!



      #2 sdahlka

      sdahlka

        Advanced Member

      • Members
      • PipPipPip
      • 324 posts

        Posted 24 October 2014 - 10:53 AM

        sets.obi = {
            Fire = {waist="Karin Obi"},
            Earth = {waist="Dorin Obi"},
            Water = {waist="Suirin Obi"},
            Wind = {waist="Furin Obi"},
            Ice = {waist="Hyorin Obi"},
            Lightning = {waist="Rairin Obi"},
            Light = {waist="Korin Obi"},
            Dark = {waist="Anrin Obi"},
            }
        if spell.element == world.weather_element or spell.element == world.day_element then
            equip(sets.obi[spell.element])
        end
         


        #3 Gukai

        Gukai

          Advanced Member

        • Members
        • PipPipPip
        • 95 posts

          Posted 24 October 2014 - 02:13 PM

          Thanks!  I have to add the sets.obi = {} too right?

           

          in the order among my other sets, is there a specific place I put it?  Same with the rule, do I put it in the beginning of my elemental magic midcast rules?



          #4 sdahlka

          sdahlka

            Advanced Member

          • Members
          • PipPipPip
          • 324 posts

            Posted 24 October 2014 - 08:14 PM

            Thanks!  I have to add the sets.obi = {} too right?

             

            in the order among my other sets, is there a specific place I put it?  Same with the rule, do I put it in the beginning of my elemental magic midcast rules?

            you need only what i posted

             

            put

             

            sets.obi = {
                Fire = {waist="Karin Obi"},
                Earth = {waist="Dorin Obi"},
                Water = {waist="Suirin Obi"},
                Wind = {waist="Furin Obi"},
                Ice = {waist="Hyorin Obi"},
                Lightning = {waist="Rairin Obi"},
                Light = {waist="Korin Obi"},
                Dark = {waist="Anrin Obi"},
                }
             

            in your get_sets

            and the best way to have the rule is like this in midcast

             

                if spell.action_type == "Magic" then
                    if spell.element == world.weather_element or spell.element == world.day_element then
                        equip(sets.obi[spell.element])
                    end
                end
             


            #5 Gukai

            Gukai

              Advanced Member

            • Members
            • PipPipPip
            • 95 posts

              Posted 24 October 2014 - 08:36 PM

              Thank you!  I'm still trying to get my blm gearsets to change appropriately, theres another support forum posted by me, but i'll get this inputted into the lua right away   :)

               

              Much appreciated!



              #6 Gukai

              Gukai

                Advanced Member

              • Members
              • PipPipPip
              • 95 posts

                Posted 28 October 2014 - 03:36 PM

                Hi!  So my blm lua is finally firing on all fronts, but then I remembered I needed to test the obi's.  I only have blizzard and thunder for now so I had to wait, finally got the chance, and saw it didnt work.  I think it's my rules, please look:

                 

                function midcast(spell,action)
                	if spell.action_type == 'Magic' then
                		if spell.element == world.weather_element or spell.element == world.day_element then
                			equip(sets.obi[spell.element])
                		end
                		if sets.midcast[spell.english] then
                			equip(sets.midcast[spell.english])
                		elseif spell.english:startswith('Protect') or spell.english:startswith('Shell') then
                			equip(sets.midcast.ProtectShell)
                		elseif spell.skill == 'Elemental Magic' then
                			if spell.english:startswith('Stone') then
                				equip(sets.midcast.Stone)		
                			elseif spell.english == 'Impact' then
                				equip(sets.midcast['Elemental Magic'],{body="Twilight Cloak"})
                			else equip(sets.midcast['Elemental Magic'])
                			end
                		elseif sets.midcast[spell.skill] then
                			equip(sets.midcast[spell.skill])
                		else equip(sets.precast.Fastcast)
                		end
                	end
                end
                

                I think it needs to be moved into the elemental magic rules part, and maybe dont 'end' it right away



                #7 Kenshi

                Kenshi

                  Advanced Member

                • Members
                • PipPipPip
                • 334 posts

                  Posted 28 October 2014 - 08:27 PM   Best Answer

                  I'm not blm and I don't use obis, but I think if you set it like this the rules after will overwritte it if you have another waist in the sets, if you want to use obis just for elemental magic (including stone and impact) put it like this:

                  
                      function midcast(spell,action)
                          if spell.action_type == 'Magic' then
                              if sets.midcast[spell.english] then
                                  equip(sets.midcast[spell.english])
                              elseif spell.english:startswith('Protect') or spell.english:startswith('Shell') then
                                  equip(sets.midcast.ProtectShell)
                              elseif spell.skill == 'Elemental Magic' then
                                  if spell.english:startswith('Stone') then
                                       equip(sets.midcast.Stone)	
                                  elseif spell.english == 'Impact' then
                                       equip(sets.midcast['Elemental Magic'],{body="Twilight Cloak"})
                                  else equip(sets.midcast['Elemental Magic'])
                                  end
                                  if spell.element == world.weather_element or spell.element == world.day_element then
                                       equip(sets.obi[spell.element])
                                  end
                              elseif sets.midcast[spell.skill] then
                                  equip(sets.midcast[spell.skill])
                              else equip(sets.precast.Fastcast)
                              end
                          end
                      end
                  
                  

                  if you don't want to use for stone, impact or use for other skill spells you gotta do it other way.



                  #8 Gukai

                  Gukai

                    Advanced Member

                  • Members
                  • PipPipPip
                  • 95 posts

                    Posted 28 October 2014 - 09:24 PM

                    Thank ya!  Looks good to me, the logic and all that.  I'll try it when I get home.  Cool beans, thanks!



                    #9 Gukai

                    Gukai

                      Advanced Member

                    • Members
                    • PipPipPip
                    • 95 posts

                      Posted 07 November 2014 - 08:27 AM

                      Hi

                      I have a question.

                       

                      I want the obi to work on elemental spells that have cast times longer than 3 seconds, which is essentially tier3 and above.  I tried this:

                      		if spell.skill == 'Elemental Magic' then
                      			if spell.cast_time < 9 then
                      				if spell.english:startswith('Stone') then
                      					equip(sets.midcast.Stone,{head="Buremte Hat"})			
                      				else equip(sets.midcast.ElementalLow)
                      				end
                      			elseif spell.english:startswith('Stone') then
                      				equip(sets.midcast.Stone)
                      			elseif spell.english == 'Impact' then
                      				equip(sets.midcast.Impact)
                      			else equip(sets.midcast['Elemental Magic'])
                      			end
                      			if spell.cast_time > 9 then
                      				if spell.element == world.weather_element or spell.element == world.day_element then
                      					equip(sets.obi[spell.element])
                      				end
                      			end 

                      it didnt work.  Can someone please review?  Thanks!



                      #10 Gukai

                      Gukai

                        Advanced Member

                      • Members
                      • PipPipPip
                      • 95 posts

                        Posted 10 November 2014 - 12:54 AM

                        it works, dunno what was happening when it was crapping out on me!  sorry!






                        1 user(s) are reading this topic

                        0 members, 1 guests, 0 anonymous users