1. #1

    WeakAuras - PVP Un-Flag Timer

    Hey all,

    After moving my UI around a bit and having custom fades made up on pitbull I notice that now I can't see my PVP unflag timer (5mins one) without unfading the ui.

    Sadly Pitbull's Faders won't let me keep my unitframes visible if pvp flagged (then fade if not) so I wanted to make a quick and small WeakAura's timer bar to show the 5 mins CD.

    I've tried about 5/6 different way but I just can't get it to work sadly. Any help would be appreciated.

  2. #2
    Code:
    d4ZXdaGEuf19au7cH2McSpuvzMOQ0JvOzRu3wjTir8lcW3aKCAH2jHyVQ2nr7hAuiyyI04iOoRcYqPudM0WbvhevjNcrogOCoqyHeKLIQGftaTCuEOcQNkzzespxWLiqnvKmzKA6sDraPUkQkEgi66kAJeiBfKSzuz7a8ruf5Zanne13rvvhwuxMQrRenEqQtIQq3cqCnuL68kHvsj)MI)sO(Wo1R1x0VOp1loJSRip7xerH9IogGVZlOCO7xcE814m0Mvkh6(f3uo2rJKaj0cvurf1TzmVrn4JOcmQR5EjrUTXWiWtEBdLnvC1zeijayPPPKqlurfvu3MX8g11aiQaJkbPPrLpYyZJbBOSjKaFNx4SesKqnlPrnziZe1mZrvAAu52zqqNgvoddvBOStq1WqfTqfvurLqWhbgyitHHAwsJAYqMjQzMJkCNTMbc3odc60OYzyOAdLDcQggQOfQOIkQOIkQOMmKzYq1gkBu52zqu5VNzbunCCOgLOMqKiHGpYVbPOML0OUM7Le52gdJqWhfWGusejMG6AuoBpGAcQggQjjKisKqWhf8GusejMGAWhns6qcj0cvurfvM3tMKWAaKeA5sA0cTql0cTql0cTql06fZbJgj1c4(R2HUFLPPJD0iZBXnlcc6SWPUiWo1RMfbbD2PEfMc0b4Y2M5CrOFv2anF57REbC)vOZ9m8kmfOdWLDn54Iq)s8W8QOexu8IhOEnLoax2VYZ28AgCXWbaNBNbbD6l0RPm2VGVZlC2lhGl7xdBK0XoAKHxZGlEkJ9f69RPSzrqqNDQ3VF)QzrqqNDQx9c4(RqN7z41m4I3oaFFHEnLoax2VYZ28A7a8TydCNLBd7f)a(LdWL9l(iJnQdVmZYJTZIHoogEndU4Pm2xOxBhGVFb79l(hP7LxqdGqyYPqimKqmG3PKthq(CaHm5xY5kflcc6SWfr0xl9i4Y(cI3qalfcGsuihajzYPWev4ZbeYc)ABY0N6fZS9t9ADU74PE)(9Ri9lBa2OsfxD27xHxmitFb4IaJmS03)


    Basically, I made a new WeakAura Text frame and copied the code from wowpedia(dot)org/API_GetPVPTimer and changed the example script at the bottom to work with WeakAuras. I can try and make a timer if you REALLY want that, but here's something for now at least.


    EDIT: I made this one quick and dirty, I now realize how annoying it might be to have the text up all the time and am working on a better idea.
    EDIT2: Now hides if not PvP flagged. No luck with a progress bar yet though. Haven't been able to find a combat log even for entering/exiting PvP status.
    Last edited by aranduh; 2014-01-01 at 05:01 PM.

  3. #3
    You might find: PLAYER_REGEN_DISABLED and PLAYER_REGEN_ENABLED do what you're looking for wrt. combat state.

    EDIT, though you can become flagged without entering combat: for example if you res. somebody that was in combat. You might also like UNIT_FACTION
    Last edited by evn; 2014-01-01 at 05:17 PM.
    A new UI series for 5.2Steal my old UILearn about WeakAuras • Nobody to raid with right now so no PVE videos.

  4. #4
    Code:
    d8ZndaqBICAv5WOQDPQuTnIQoVeAMqsnxifZgfz(qsAzIk3sk5Bk4zeYorrTxKDtQ9t9tiL(lk04efMgkzOemyWWjkhuu0PqLoMcDovvluvjTuiblgsLLd1dHe1tv5Xq8CfnrivnvsmzsA6cxKOIxPQexwPRlPnkkzRsWMLOTJc(OOQzbjYNrfJIqnsiHgMumAuQXRQuoPOuNLOsxtvX9KsTsr(Tu9AijMgjf6KOtLovsHUVH2YY5guwT(miA4FK14qowSA(mipv2Ifl6c8JdNftk0ffLT0HuNrxIoK6m6smgfLT0nd(OoPdPoJUe6Ry(4110vw1iXRRfZ1jdgmyaVrfRnK7)hLmmdECiuqWWxmK7)3PvRs3YWQJjDcOot5khuGXSqDM5pgrzumtMZlh0thc7fbvORktLpw6qQZOlrxzvJeVUwmxNmyWGHxPH8Biuqq5jTyXCnyuTTbrnJnnngc2R2GtgmyWGbdgmmdECiuqWqBdZGhhcfem0XgYVHYtAfZ1jdgmyWGbdgWBuXAdbUUozWGbdRw1PvR6Kto5Kto5eDi1z0LyK9tDPdPoJUef0v1b(XHZIjf6qQZOlrxzvJeVUwmxNmyWGHxPH8Biuqq5jTyXCn0UTbrnJnnngc2R2GtgmyWGbdgmmdECiuqWqBd53q5jTI56KbdgmyWGbd4nQyTHaxxNmyWGHvR60QvDYjNCYjNCIc6yQZRsk0H7mTKcDsvMIhPqbfuqh79XHDqzniAq(brJ)FYq(brSAYGkBX6NoDvsb)4WzXtI5r64RrNqhD4LZRRvkkBPJVI5rhpMUNkDcmiy4R8y6kI2YY5geZIg((FUpdzmM7dDQVPmM4lMnsxtx26yXL8ilAYgPRNOrgdYqQy8Qrk2IDx3XTy3XQlf0nPdN7NogiMhzn2qbra

    "PLAYER_FLAGS_CHANGED" triggers when you change flags but it won't seem to work with WA unless you track the state since the timer always starts at 301000 when triggered on or off (so we need some kind of delay or timing function). I just put it on all frames for now, that should do the trick.
    Last edited by suprep; 2014-01-01 at 05:26 PM.
    DarkStorm 25man - http://www.darkstormguild.com
    Suprea - Protection Warrior (Main)
    Suprep - Restoration Shaman

  5. #5
    Quote Originally Posted by suprep View Post
    Code:
    d8ZndaqBICAv5WOQDPQuTnIQoVeAMqsnxifZgfz(qsAzIk3sk5Bk4zeYorrTxKDtQ9t9tiL(lk04efMgkzOemyWWjkhuu0PqLoMcDovvluvjTuiblgsLLd1dHe1tv5Xq8CfnrivnvsmzsA6cxKOIxPQexwPRlPnkkzRsWMLOTJc(OOQzbjYNrfJIqnsiHgMumAuQXRQuoPOuNLOsxtvX9KsTsr(Tu9AijMgjf6KOtLovsHUVH2YY5guwT(miA4FK14qowSA(mipv2Ifl6c8JdNftk0ffLT0HuNrxIoK6m6smgfLT0nd(OoPdPoJUe6Ry(4110vw1iXRRfZ1jdgmyaVrfRnK7)hLmmdECiuqWWxmK7)3PvRs3YWQJjDcOot5khuGXSqDM5pgrzumtMZlh0thc7fbvORktLpw6qQZOlrxzvJeVUwmxNmyWGHxPH8Biuqq5jTyXCnyuTTbrnJnnngc2R2GtgmyWGbdgmmdECiuqWqBdZGhhcfem0XgYVHYtAfZ1jdgmyWGbdgWBuXAdbUUozWGbdRw1PvR6Kto5Kto5eDi1z0LyK9tDPdPoJUef0v1b(XHZIjf6qQZOlrxzvJeVUwmxNmyWGHxPH8Biuqq5jTyXCn0UTbrnJnnngc2R2GtgmyWGbdgmmdECiuqWqBd53q5jTI56KbdgmyWGbd4nQyTHaxxNmyWGHvR60QvDYjNCYjNCIc6yQZRsk0H7mTKcDsvMIhPqbfuqh79XHDqzniAq(brJ)FYq(brSAYGkBX6NoDvsb)4WzXtI5r64RrNqhD4LZRRvkkBPJVI5rhpMUNkDcmiy4R8y6kI2YY5geZIg((FUpdzmM7dDQVPmM4lMnsxtx26yXL8ilAYgPRNOrgdYqQy8Qrk2IDx3XTy3XQlf0nPdN7NogiMhzn2qbra

    "PLAYER_FLAGS_CHANGED" triggers when you change flags but it won't seem to work with WA unless you track the state since the timer always starts at 301000 when triggered on or off (so we need some kind of delay or timing function). I just put it on all frames for now, that should do the trick.
    Yeah, yours is about 2 seconds ahead of the actual time, but that seems to be close enough. I'm still pretty new to WA custom functions and LUA in general and your example has helped me learn a bit about how to do things in a different way.

  6. #6
    Just change the duration trigger to 298 and it should do the trick.

    Edit: I read behind instead of ahead, I just put in a static 299 in the duration field (you can also plug in the current time by using the API function instead of the static value)
    Last edited by suprep; 2014-01-01 at 05:53 PM.
    DarkStorm 25man - http://www.darkstormguild.com
    Suprea - Protection Warrior (Main)
    Suprep - Restoration Shaman

  7. #7
    Quote Originally Posted by suprep View Post
    Just change the duration trigger to 298 and it should do the trick.

    Edit: I read behind instead of ahead, I just put in a static 299 in the duration field (you can also plug in the current time by using the API function instead of the static value)
    What I meant was, if the actual timer is 3 mins 20 secs, yours reads 3 mins 18 secs. Wouldn't you just change the duration trigger to 301 then? 299+2=301

  8. #8
    Quote Originally Posted by aranduh View Post
    What I meant was, if the actual timer is 3 mins 20 secs, yours reads 3 mins 18 secs. Wouldn't you just change the duration trigger to 301 then? 299+2=301
    Yeah seems right, however I did check in-game for the full 5 minutes and my PvP flag disappeared bang on with 299 seconds so I'm not sure why the actual API function starts at 301.
    DarkStorm 25man - http://www.darkstormguild.com
    Suprea - Protection Warrior (Main)
    Suprep - Restoration Shaman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •