Jump to content


Photo

gear swap help

change spell

    3 replies to this topic

    #1 theblackdeath

    theblackdeath

      Member

    • Members
    • PipPip
    • 15 posts

      Posted 24 February 2014 - 11:14 PM

      im trying to get gearswap to change a ws to another if im in my polearm mode but i can seam to get it to work ive tried a couple different ways but none so far works any help would be great

       

       

      function init_gear_sets()
      if CombatStyle == 'PolearmYoichi' then
      if spell.name == "Tachi: Shoha" then 
      send_command('@input /ws "double thrust"')
      if spell.name == "double thrust" then
      equip(sets.ws.doublethrust[OffenseLevel .. '_com'])
      end
      end
      end
       
       
      thats what i have so far


      #2 theblackdeath

      theblackdeath

        Member

      • Members
      • PipPip
      • 15 posts

        Posted 28 February 2014 - 04:53 PM

        no one knows huh

         



        #3 Arcon

        Arcon

          Advanced Member

        • Windower Staff
        • 1189 posts
        • LocationMunich, Germany

        Posted 28 February 2014 - 07:21 PM

        The best way to check is to add print-statements. For example, before that you can add this line: print(spell.name)

         

        One thing I noticed here is that you do if spell.name == "double thrust" then, which will never be true, because it's case sensitive, so you'd need to do "Double Thrust" instead. If that doesn't work you'll need to print more of the code.



        #4 theblackdeath

        theblackdeath

          Member

        • Members
        • PipPip
        • 15 posts

          Posted 28 February 2014 - 07:54 PM

          http://pastebin.com/9u4G7mJz

           

          im not really sure the role of how to use print(spell.name)  is it like saying add to chat double thrust when the above if is true or does it go at the op of the ifs and a broad add to chat any spell going off im very sorry for spending your time i know spellcast pretty well but figurring out this lua is a whole new ball game that and i cant seam to find a good refrence to all the if type statements you can use like on the send_command('@input /ws "double thrust"') is there a way of just canceling spell fudo and telling it to changespell double thrust?






          1 user(s) are reading this topic

          0 members, 1 guests, 0 anonymous users