This site makes extensive use of JavaScript.
Please enable JavaScript in your browser.
Live
PTR
10.2.7
PTR
10.2.6
Beta
Coding if 3 grp members are <80% and in range?
Post Reply
Return to board index
Post by
mikar
Greetings,
I play a resto druid and was wondering if its possible to code (using lua) something like this:
IF
(any party member A is within 40 yards of me)
AND
(atleast 3 party members are within 15 yards of A (including A self) and below 80% hp)
AND
(Wildgrowth is not on cd)
THEN
{highlight the WG button and highlight that party member)
I am unsure if it would be really usefull but I am curious if its possible :)
Post by
164227
This post was from a user who has deleted their account.
Post by
Coldkil
Not possible etc etc it's a bot.
Post by
22686
This post was from a user who has deleted their account.
Post by
Ketho
(any party member A is within 40 yards of me) AND (atleast 3 party members are within 15 yards of A (including A self)holy crap, is it even possible to check if any random player B is in range of player A? or just everything in range of player A?
Post by
164227
This post was from a user who has deleted their account.
Post by
mikar
Thanks for the replies. I definitely dont intend to make a bot using this (thanks to Manutavast for noticing) - infact I am not even sure I would want to use it even to highlight. Rather, I was curious if its doable because I want to know whats possible and whats not with the wow lua.
As Ketho points out one of the hard spots is checking ranges between other players. I wonder though if there is a way to get the loc of a player and then use a math (Pythagoras) function to calculate the range yourself.
As it goes I dont consider the pseodo code I suggested terribly complex - it was more of an opening question to test the waters.
I guess I will need to look into the lua myself to find out :)
Post by
164227
This post was from a user who has deleted their account.
Post by
Amemir
As Ketho points out one of the hard spots is checking ranges between other players. I wonder though if there is a way to get the loc of a player and then use a math (Pythagoras) function to calculate the range yourself.
There is the
GetPlayerMapPosition
function which returns the coords of players in your party/raid which would be a place to start.
As far as I'm aware, even though all the maps have x,y coords 0-100 (displayed by the GetPlayerMapPosition function as 0-1) the actual map sizes differ so, in theory at least, if you can find out the actual sizes of the maps in yards it shouldn't be too hard.
Post Reply
You are not logged in. Please
log in
to post a reply or
register
if you don't already have an account.