Jump to content


Photo

how to create a delay

delaygearswaplua

    5 replies to this topic

    #1 Need2LearnMore

    Need2LearnMore

      Newbie

    • Members
    • Pip
    • 5 posts

      Posted 04 November 2014 - 11:07 PM

      I am often kneeling to locate VNM's, each time i do this my gearswap is thinking that i am resting.  Is there a way to insert a delay before changing to resting set?  Using Mote-Include that is writen as

       

            elseif status == 'Resting' then

                 equip(get_current_resting_set()

       

      I want to seperate resting(healing) and the kneel and stand up.



      #2 sdahlka

      sdahlka

        Advanced Member

      • Members
      • PipPipPip
      • 324 posts

        Posted 04 November 2014 - 11:56 PM

        I am often kneeling to locate VNM's, each time i do this my gearswap is thinking that i am resting.  Is there a way to insert a delay before changing to resting set?  Using Mote-Include that is writen as

         

              elseif status == 'Resting' then

                   equip(get_current_resting_set()

         

        I want to seperate resting(healing) and the kneel and stand up.

        the thing is no mater what you try to do /heal on is used to get the data for vnm's and to start healing

        that being said you could try this

         

        elseif status == 'Resting' then
            if player.hpp > 74 then
                coroutine.schedule(vnm_stand, .5)
            else
                equip(get_current_resting_set)
            end
            
            
        function vnm_stand()
            send_command('input /heal off')
        end
         


        #3 Arcon

        Arcon

          Advanced Member

        • Windower Staff
        • 1189 posts
        • LocationMunich, Germany

        Posted 05 November 2014 - 07:10 AM

        You could check if you're still resting two seconds from then, and if so, change gear. Otherwise leave the same equipment on:

            elseif status == 'Resting' then
                coroutine.schedule(resting_check, 2)
            end
        

         

        Somewhere else in your file you would need this:

         

        resting_check = function()
            if player.status == 'Resting' then
                equip(get_current_resting_set())
            end
        end


        #4 Need2LearnMore

        Need2LearnMore

          Newbie

        • Members
        • Pip
        • 5 posts

          Posted 06 November 2014 - 12:14 AM

          You could check if you're still resting two seconds from then, and if so, change gear. Otherwise leave the same equipment on:

              elseif status == 'Resting' then
                  coroutine.schedule(resting_check, 2)
              end
          

           

          Somewhere else in your file you would need this:

           

          resting_check = function()
              if player.status == 'Resting' then
                  equip(get_current_resting_set())
              end
          end

          Thank you.  I will give these ideas a try.



          #5 Need2LearnMore

          Need2LearnMore

            Newbie

          • Members
          • Pip
          • 5 posts

            Posted 06 November 2014 - 02:44 AM

            ok, I have tried both types of entries.  I even went as far as to change the 2 seconds to 60 seconds. both ways when i kneel, my gearswaps to resting  gear.

             

            These entries that are driving the resting swap, resides within mote-include.lua

             

            It appears that this is the 1st instance that if resting the functions are called.  what if anything am i over looking?



            #6 sdahlka

            sdahlka

              Advanced Member

            • Members
            • PipPipPip
            • 324 posts

              Posted 06 November 2014 - 03:47 AM

              ok, I have tried both types of entries.  I even went as far as to change the 2 seconds to 60 seconds. both ways when i kneel, my gearswaps to resting  gear.

               

              These entries that are driving the resting swap, resides within mote-include.lua

               

              It appears that this is the 1st instance that if resting the functions are called.  what if anything am i over looking?

              mots inclued might have an equip before it gets to your file you will have to ask mote about that







              Also tagged with one or more of these keywords: delay, gearswap, lua

              1 user(s) are reading this topic

              0 members, 1 guests, 0 anonymous users