Jump to content


Photo

Auto return on KO


    2 replies to this topic

    #1 momoka

    momoka

      Newbie

    • Members
    • Pip
    • 6 posts

      Posted 07 December 2015 - 06:26 PM

      Hi hi!

       

      I'm trying something new out! Auto returning on KO for specific zones since I have to multi box. I'm doing a lot of 128+ Unity fights that involve one shot zerg attempts.

       

      I'm not sure if 2 is the right status id for death or if I need to require a certain lua file in the code. I couldn't find a list of id's except the ones in res/statuses.lua. 

      I couldn't tell from the wiki talking about statuses which one is which either http://dev.windower....pi:events:start

       

      Would using vitals be easier?

       

      I tried something like this but it isn't working out so far. I'm still learning what I can >_<; any help on this would be awesomely appreciated ^^

       

       

      windower.register_event('addon command', function(name)
          if world.area:contains("Uleguerand Range", "Behemoth's Dominion") and self.status == 2 then 
              windower.send_command('pause 3;setkey enter down;pause 0.1;setkey enter up;pause 2;setkey left down;pause 0.1;setkey left up;pause 2;setkey enter down;pause 0.1;setkey enter up;')
          end
      end)
       


      #2 Iryoku

      Iryoku

        Advanced Member

      • Windower Staff
      • 488 posts

        Posted 08 December 2015 - 06:16 PM

        Mob status is probably the best choice for this, most other values such as HP can occasionally get out of sync. However, you should know that status can take on two values at death, 2 or 3, depending on if your weapon is drawn when you die. As for why it's not working, you never set self to anything. Try this:

        windower.register_event('addon command', function(name)
            local self = windower.ffxi.get_mob_by_target('me')
            if world.area:contains("Uleguerand Range", "Behemoth's Dominion") and self.status == 2 then 
                windower.send_command('pause 3;setkey enter down;pause 0.1;setkey enter up;pause 2;setkey left down;pause 0.1;setkey left up;pause 2;setkey enter down;pause 0.1;setkey enter up;')
            end
        end)

        Moving forward from this you may want to try injecting the packet for return instead of sending key presses.



        #3 trv

        trv

          Advanced Member

        • Members
        • PipPipPip
        • 34 posts

          Posted 09 December 2015 - 03:02 AM

          Is this part of a gearswap file? The world table doesn't exist for all addons. Additionally, the contains method usually only accepts one parameter.






          1 user(s) are reading this topic

          0 members, 1 guests, 0 anonymous users