Jump to content


Photo

Gearswap Issue

gearswap

Best Answer Arcon , 29 January 2014 - 02:51 PM

if spell.english == 'Atonement' or 'Burning Blade' or 'Red Lotus Blade' or 'Shining Blade' or 'Seraph Blade' or 'Spirits Within' or 'Sanguine Blade' then

 

This won't work. It has to be this:

 

if spell.english == 'Atonement' or spell.english == 'Burning Blade' or spell.english == 'Red Lotus Blade' or spell.english == 'Shining Blade' or spell.english == 'Seraph Blade' or spell.english == 'Spirits Within' or spell.english == 'Sanguine Blade' then

 

If you wanna make it simpler, define this somewhere at the top of your file:
 

magic_ws = S{'Atonement', 'Burning Blade', 'Red Lotus Blade', 'Shining Blade', 'Seraph Blade', 'Spirits Within', 'Sanguine Blade'}

 

And similar for the other WS types. Then, later on, use it like this:

 

if magic_ws:contains(spell.english) then
Go to the full post


    2 replies to this topic

    #1 thecuriousorange

    thecuriousorange

      Member

    • Members
    • PipPip
    • 11 posts

      Posted 29 January 2014 - 01:39 PM

      I'm having difficulty with the lua addon "Gearswap", or to be specific my Gearswap script.

       

      http://pastebin.com/nbHfEaep

       

      It insists on swapping in my atonement set for every weaponskill inspite the rules saying otherwise. I've been learning as I go, but as far as I can tell... what I've written should work.

      I don't know what I've done wrong, but it's driving me insane. please please please help me fix this.

      WS sets start at line 66. The precast function starts at line 325. the add_to_chat messages in the precast and midcast functions are there for my own debugging benefit.

       

      thanks in advance^^

       



      #2 Arcon

      Arcon

        Advanced Member

      • Windower Staff
      • 1189 posts
      • LocationMunich, Germany

      Posted 29 January 2014 - 02:51 PM   Best Answer

      if spell.english == 'Atonement' or 'Burning Blade' or 'Red Lotus Blade' or 'Shining Blade' or 'Seraph Blade' or 'Spirits Within' or 'Sanguine Blade' then

       

      This won't work. It has to be this:

       

      if spell.english == 'Atonement' or spell.english == 'Burning Blade' or spell.english == 'Red Lotus Blade' or spell.english == 'Shining Blade' or spell.english == 'Seraph Blade' or spell.english == 'Spirits Within' or spell.english == 'Sanguine Blade' then

       

      If you wanna make it simpler, define this somewhere at the top of your file:
       

      magic_ws = S{'Atonement', 'Burning Blade', 'Red Lotus Blade', 'Shining Blade', 'Seraph Blade', 'Spirits Within', 'Sanguine Blade'}

       

      And similar for the other WS types. Then, later on, use it like this:

       

      if magic_ws:contains(spell.english) then


      #3 thecuriousorange

      thecuriousorange

        Member

      • Members
      • PipPip
      • 11 posts

        Posted 29 January 2014 - 07:36 PM

        This works =D

        thankyou thankyou thankyou thankyou =D







        Also tagged with one or more of these keywords: gearswap

        1 user(s) are reading this topic

        0 members, 1 guests, 0 anonymous users