Krazyito 521 Report post Posted October 24, 2015 How can I get the distance between me and my healers? Example: https://youtu.be/Vx6ipbVOWvY?t=1m54s I can make you something specific for your healers, but you would have to hard code the names of the people you want in. I don't think I could make it generic enough. Share this post Link to post Share on other sites
Krazyito 521 Report post Posted October 24, 2015 How can I get the distance between me and my healers? Example: https://youtu.be/Vx6ipbVOWvY?t=1m54s http://pastebin.com/xsZvf4ts Here you go. Edit the 'Display' custom code and put the names of the people you want to track distance to. Share this post Link to post Share on other sites
Guest Report post Posted October 25, 2015 How can I get the distance between me and my healers? Example: https://youtu.be/Vx6ipbVOWvY?t=1m54s http://pastebin.com/xsZvf4ts Here you go. Edit the 'Display' custom code and put the names of the people you want to track distance to. This is great! Is it possible to displayed rounded values (45 instead of 45.21 for example) and possibly change color when the value is greater than a certain number such as 40 yards? Thank you for your help! Share this post Link to post Share on other sites
Krazyito 521 Report post Posted October 25, 2015 Yes. Give me specific options to start, then I'll try to make it generic enough for you to change as you wish. It's 3am for me atm, I'll try tommorw or Monday. Share this post Link to post Share on other sites
Serafim1991 0 Report post Posted October 25, 2015 Think, normal options will be: 1. Green when range <40 2. Red when range >40 I have a question about added third and fourth healer: in Display I added only third healer like this function()-- Change name of healer you want to track here.if aura_env.HealerOne == nil or aura_env.HealerTwo == nil or aura_env.HealerThree == nil then aura_env.HealerOne = "Хорошаяидея" aura_env.HealerTwo = "Квистя" aura_env.HealerThree = "Круська"end local healer1dist = aura_env.DistanceBetweenUnits("player", aura_env.HealerOne) local healer2dist = aura_env.DistanceBetweenUnits("player", aura_env.HealerTwo) local healer3dist = aura_env.DistanceBetweenUnits("player", aura_env.HealerThree) if healer1dist == nil then healer1dist = 0 end if healer2dist == nil then healer2dist = 0 end if healer3dist == nil then healer3dist = 0 endlocal returnString = string.format("%s: %.1f\n%s: %.1f\n%s: %.1f", aura_env.HealerOne, healer1dist, aura_env.HealerTwo, healer2dist, aura_env.HealerThree, healer3dist)return returnStringend and in Actions aura_env.DistanceBetweenUnits = function(unitA, unitB, unitC)unitA = unitA or 'player'unitB = unitB or 'player'unitC = unitC or 'player'local ax, ay = UnitPosition(unitA)local bx, by = UnitPosition(unitB)local cx, cy = UnitPosition(unitC)if ax and bx and cx thenlocal dx = ax - bxlocal dy = ay - byreturn (dx * dx + dy * dy) ^ 0.5endreturn nilend All code I added - red color Try on random group in garrison - seems working, but i'm not sure about Actions section. Can you tell me where i make a mistake? Share this post Link to post Share on other sites
Krazyito 521 Report post Posted October 25, 2015 Think, normal options will be: 1. Green when range <40 2. Red when range >40 I have a question about added third and fourth healer: in Display I added only third healer like this function() -- Change name of healer you want to track here. if aura_env.HealerOne == nil or aura_env.HealerTwo == nil or aura_env.HealerThree == nil then aura_env.HealerOne = "Хорошаяидея" aura_env.HealerTwo = "Квистя" aura_env.HealerThree = "Круська" end local healer1dist = aura_env.DistanceBetweenUnits("player", aura_env.HealerOne) local healer2dist = aura_env.DistanceBetweenUnits("player", aura_env.HealerTwo) local healer3dist = aura_env.DistanceBetweenUnits("player", aura_env.HealerThree) if healer1dist == nil then healer1dist = 0 end if healer2dist == nil then healer2dist = 0 end if healer3dist == nil then healer3dist = 0 end local returnString = string.format("%s: %.1f\n%s: %.1f\n%s: %.1f", aura_env.HealerOne, healer1dist, aura_env.HealerTwo, healer2dist, aura_env.HealerThree, healer3dist) return returnString end and in Actions aura_env.DistanceBetweenUnits = function(unitA, unitB, unitC) unitA = unitA or 'player' unitB = unitB or 'player' unitC = unitC or 'player' local ax, ay = UnitPosition(unitA) local bx, by = UnitPosition(unitB) local cx, cy = UnitPosition(unitC) if ax and bx and cx then local dx = ax - bx local dy = ay - by return (dx * dx + dy * dy) ^ 0.5 end return nil end All code I added - red color Try on random group in garrison - seems working, but i'm not sure about Actions section. Can you tell me where i make a mistake? Do not edit actions. 1 Share this post Link to post Share on other sites
Krazyito 521 Report post Posted October 25, 2015 How can I get the distance between me and my healers? Example: https://youtu.be/Vx6ipbVOWvY?t=1m54s http://pastebin.com/xsZvf4ts Here you go. Edit the 'Display' custom code and put the names of the people you want to track distance to. This is great! Is it possible to displayed rounded values (45 instead of 45.21 for example) and possibly change color when the value is greater than a certain number such as 40 yards? Thank you for your help! Updated the original pastebin link. http://pastebin.com/xsZvf4ts Right now it only turns from white to red when greater than 40, if you want something more specific let me know. Share this post Link to post Share on other sites
Krazyito 521 Report post Posted October 25, 2015 Ok I re did the aura a little i found i had a bug in the new one I made and decided to add support to EASILY add new people that you want to track. Same pastebin link: http://pastebin.com/xsZvf4ts Old code. Updating it to be a loop of a table instead so oyu can add as many people as you want. New code: 1 Share this post Link to post Share on other sites
Guest Report post Posted October 26, 2015 Ok I re did the aura a little i found i had a bug in the new one I made and decided to add support to EASILY add new people that you want to track. Same pastebin link: http://pastebin.com/xsZvf4ts Old code. Updating it to be a loop of a table instead so oyu can add as many people as you want. New code: Just got home to test this out and it works perfectly!! Thank you so much! Share this post Link to post Share on other sites
Serafim1991 0 Report post Posted October 26, 2015 Krazyito, what about Gorefiend's Grasp announcement in chat? Share this post Link to post Share on other sites
Krazyito 521 Report post Posted October 26, 2015 Krazyito, what about Gorefiend's Grasp announcement in chat? http://pastebin.com/qDvFC7YJ 1 Share this post Link to post Share on other sites
Pandacho 286 Report post Posted October 26, 2015 I added a line to your Healers range WA, Krazyito, that colors distance number in green if it's < 40 yards. Many times you just check in (green) / out (red) of range rather than exact numbers. --Coloring if minRedColor ~= 0 then -- If it is NOT 0, then color. if dist >= minRedColor then --If the distance is less than the minimum dist = string.format("%d", dist) --Rounding to non decimal and convert to string dist = "|cFFFF0000"..dist.."|r" --Color the number else dist = string.format("%d", dist) --Rounding to non decimal and convert to string dist = "|cFF00FF00"..dist.."|r" --Color the number if distance is less than 40 y end else dist = string.format("%d", dist) --Rounding to non decimal and convert to string end 1 Share this post Link to post Share on other sites
Sambal 0 Report post Posted October 27, 2015 (edited) http://pastebin.com/38PhVCxA Here you go. Basically, we needed to add a custom duration to the aura to account for the GCD and also test against the spell ID of the GCD. I got most of the code from a friend who already did it for me, so I'm not ENTIRELY sure how it works, i just know it does now. Thank you! This did work. Sorry I didn't get back to this thread until now, been kind of busy. Yeah it's confusing I would be curious if anybody could explain if it is an inconsistency in Blizzard's programming or if it's working as intended. Edited October 27, 2015 by Sambal Share this post Link to post Share on other sites
Serafim1991 0 Report post Posted October 27, 2015 How to learn how to write a functions for weakauras? Uncomfortable have to ask other people to do something for me. In what direction I must go(manuals, guides, etc.)? And second: is it possible to choose only healers with this function for this weakauras. Have a thought that is not haunted, is it possible to automatically choose healers in random raid and show the distance to them? Share this post Link to post Share on other sites
Krazyito 521 Report post Posted October 27, 2015 I would say it's working as intended, kinda. It's probably more a weak auras problem than a blizzard one, in the sense that weak auras wouldn't have expected to have to account for the global cooldown of a spell as its 'cooldown' (let alone one on its own seperate GCD). The reason I say this is because they way we finally got it to work, we had to check the spell heroic strike against the 'cooldown' of the spellid for the GCD (if this makes sense). But that doesn't really make weak auras actually do the animation, we technically coded the 'duration' of the GCD ourselves (using its spellid). TL;DR: I don't think it's a 'bug' per se, more of a small feature overlooked by weak auras. Share this post Link to post Share on other sites
Krazyito 521 Report post Posted October 27, 2015 How to learn how to write a functions for weakauras? Uncomfortable have to ask other people to do something for me. In what direction I must go(manuals, guides, etc.)? And second: is it possible to choose only healers with this function for this weakauras. Have a thought that is not haunted, is it possible to automatically choose healers in random raid and show the distance to them? The problem with that function is that they have to be set as a healer in the raid frames / raid group. So they can be wrong sometimes. But Yea, assuming it's correct you can incorporate that. Share this post Link to post Share on other sites
Krazyito 521 Report post Posted October 28, 2015 Sorry, I'm not home and it's hard for me to write full answers on my phone. Basically, if you have some basic programming experience, I would be glad to show you a few things privately over Skype. I'd you don't have any experience, I could still help but it would be much slower. My Skype is in my profile if you want to take that up, but be warned, you're still going to be asking for help for a while, I still learn new techniques when reading other peoples code. You could also learn some basic programming using the Python class on Code Academy. It can get you the basics on a scripting language like Lua, (though they are not the same language and you would have to learn the seperate quirks, which is easy with Google searches) Share this post Link to post Share on other sites
Serafim1991 0 Report post Posted October 29, 2015 I really feeling quite uncomfortable and don't really want to bother you with questions on Skype(know myself - it will be a lot of small and stupid question), so continue writting on the forum. If you want (or if you can) - you can help me. So, about UnitGroupRoleAssigned. Have 2 variants how to choose a healers in random raid: 1. Use variant that you offered, but for playerTable use something like table.insert(looking LUA manuals, try it, but in WoW it doesn't work. I think, this function have a different name) 2. Use something like local isTank, isHeal, isDPS = UnitGroupRolesAssigned("player")local groupSize = 40if isHeal then for i = 1, groupSize do isTank, isHeal, isDPS = UnitGroupRolesAssigned("party" .. i) if isHeal then local dist = aura_env.DistanceBetweenUnits("player", player) if dist == nil then dist = 0 end if minRedColor ~= 0 then if dist >= minRedColor then dist = string.format("%d", dist) dist = "|cFFFF0000"..dist.."|r" else dist = string.format("%d", dist) dist = "|cFF00FF00"..dist.."|r" end else dist = string.format("%d", dist) end returnString = returnString .. string.format("%s: %s\n", player, dist) return returnString end endend It is don't work, just example what I'm talking about I think that the first variants wiil be more easier than the second, but i don't know how added people with "healer" role in table "playerTable". Can you help, i want to understand how it must be do? Share this post Link to post Share on other sites
Krazyito 521 Report post Posted October 29, 2015 Tbh Skype will be easier for small questions. I won't mind. And if I don't answer, I might eventually =P. Currently at work, will respond to the rest later (about 2-3 hours). Feel free to add me on Skype still. (or let me know of another program you may use, maybe Google hangouts if that's easier) Share this post Link to post Share on other sites
Krazyito 521 Report post Posted October 29, 2015 I really feeling quite uncomfortable and don't really want to bother you with questions on Skype(know myself - it will be a lot of small and stupid question), so continue writting on the forum. If you want (or if you can) - you can help me. So, about UnitGroupRoleAssigned. Have 2 variants how to choose a healers in random raid: 1. Use variant that you offered, but for playerTable use something like table.insert(looking LUA manuals, try it, but in WoW it doesn't work. I think, this function have a different name) 2. Use something like local isTank, isHeal, isDPS = UnitGroupRolesAssigned("player")local groupSize = 40if isHeal then for i = 1, groupSize do isTank, isHeal, isDPS = UnitGroupRolesAssigned("party" .. i) if isHeal then local dist = aura_env.DistanceBetweenUnits("player", player) if dist == nil then dist = 0 end if minRedColor ~= 0 then if dist >= minRedColor then dist = string.format("%d", dist) dist = "|cFFFF0000"..dist.."|r" else dist = string.format("%d", dist) dist = "|cFF00FF00"..dist.."|r" end else dist = string.format("%d", dist) end returnString = returnString .. string.format("%s: %s\n", player, dist) return returnString end endend It is don't work, just example what I'm talking about I think that the first variants wiil be more easier than the second, but i don't know how added people with "healer" role in table "playerTable". Can you help, i want to understand how it must be do? Ok so I implemented your 'auto add' feature using the function you found. Normally, I would have been lasy and only asssumed that you would use this in a raid group, but in your 'example' code you mentioned party, so I kind of HAD to also include party checks. Which made things a little bit difficult, luckily I had already done this code in the past so it was just a matter of finding it and then making sure I did my checks right. I didn't change any of the code from the original pastebin, all I did was add checks for party and checks for if 'HEALER'. New pastebin link: http://pastebin.com/RpUgWysE (I kept the old aura in a separate pastebin thats still on my account) You can also easily edit out the part about "player" because that is only for yourself, and it would be kinda redundant to track distance to yourself. I kinda just did it out of habit for checking for *everything* Share this post Link to post Share on other sites
Woopza 1 Report post Posted October 29, 2015 Is there a way to have Weak Auras fade after a short time? More specific in this case i want the trigger to be Status - Item Equipped but for it to fade after "x" seconds. Share this post Link to post Share on other sites
Krazyito 521 Report post Posted October 29, 2015 Is there a way to have Weak Auras fade after a short time? More specific in this case i want the trigger to be Status - Item Equipped but for it to fade after "x" seconds. I went to go try to do it and it seems to be more complicated. The only thing I can think of is maybe doing some kind of custom trigger but I don't think it will work correctly because the 'item equipped' trigger will always return true, and I have no way of knowing when Just thought of something else, I can probably make one aura that detects when the aura becomes active, and then use that information to turn it back on itself to only activate when it first triggers. This is a bit more complicated than needed I think, and not really worth doing. Share this post Link to post Share on other sites
Serafim1991 0 Report post Posted October 30, 2015 (edited) Thanks a lot. About party check and my code with "group" - I write it just for example. Not actually need group checking but also thanks. First 30 minutes I couldn't understand why it is doesn't work. I found random group from another realm and try to configure it but nothing happend. Then i found few people from my realm and whit them it works well. I do something wrong or it shouldn't work with different realm?(just question, not need to do it) And about myself. Ashamed to admit but I can't do this. Try GetUnitName("self.unit") and UnitName("self.unit") functions(6 or 7 variants I think that will be work) Works only one variant: if UName == "MyNick" then table.remove(playerTable) end It work. BUT when I wrote this post - it stopped working. Don't understand why, I don't change anything(sitting afk). And ofcourse this variant not universal(for each character who healer need change "MyNick"). I understand that I must use UnitName("unit") or UnitName("self.unit") but don't understand how to do it correctly. My logic is(using par of code which is already): 1. Add new variable (for example local PName = name("self")) 2. Compare UName and PName (if UName == PName then) 3. If true - remove UName(which equal PName) from playerTable ( table.remove(playerTable) ) 4. End At this moment first point don't work. Is my logic right or I something missing? P.S. don't write in skype - at this moment it is a last problem with configure this weakauras. When have new questions - write on Skype Edited October 30, 2015 by Serafim1991 Share this post Link to post Share on other sites
Holypalaswe 0 Report post Posted November 1, 2015 I've been trying to make a progressbar in Weakauras but my limited knowledge is preventing me from doing this simple task. :) What I want is to start a custom timer, when a buff is applied to any target, and if there are multiple applications of the specified buff, I want multiple bars. For my testing I've been using Sacred Shield and a custom timer of 10seconds. (So what I want is during my testing is, every time anyone (friendly/hostile) gains Sacred Shield, a progressbar will start with 10seconds duration). I tested with a Event trigger type of Spell, Aura Applied and adding Sacred Shield but that doesn't create multiple bars, just the single one that refreshes if Sacred Shield is applied to any target. I've also been testing simply using a Aura trigger with Multi-target unit but I am not able to get this to make anything but a simple buff-tracker, not with the custom timer I want. Is there anyone more knowledgeable that can help me? Share this post Link to post Share on other sites
Krazyito 521 Report post Posted November 1, 2015 I've been trying to make a progressbar in Weakauras but my limited knowledge is preventing me from doing this simple task. What I want is to start a custom timer, when a buff is applied to any target, and if there are multiple applications of the specified buff, I want multiple bars. For my testing I've been using Sacred Shield and a custom timer of 10seconds. (So what I want is during my testing is, every time anyone (friendly/hostile) gains Sacred Shield, a progressbar will start with 10seconds duration). I tested with a Event trigger type of Spell, Aura Applied and adding Sacred Shield but that doesn't create multiple bars, just the single one that refreshes if Sacred Shield is applied to any target. I've also been testing simply using a Aura trigger with Multi-target unit but I am not able to get this to make anything but a simple buff-tracker, not with the custom timer I want. Is there anyone more knowledgeable that can help me? I have to work on this for a bit. Cant today, maybe sometime this week before blizzcon. The problem I'll have is getting that custom timer, which if I make a second trigger, I could possibly get it working. Share this post Link to post Share on other sites