Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- updates the list of people who are
- -- <= 11, >11 and <= 27, or >27 yards away.
- rcheck_make_list {
- -- IMPORTANT: clear the entries of the "check", "scan" and "skip" arrays before starting this command!!!
- y = 1
- -- numberOfPlayersInTheRaid is what vanilla wow returns. if it does not return a thing, use 40 instead
- while (y <= numberOfPlayersInTheRaid)
- {
- -- getrange can be found below
- -- checks if player is further away than 27y
- if (getrange(raidPlayer(y)) = 0)
- {
- -- adds the player to a list of people who are further than 27y away
- addcheck playerName(y)
- }
- else if (getrange(raidPlayer(y) = 27)
- {
- -- adds the player to a list of people who are >11 but <= 27 yards away and
- -- who can scan their 11 yards surrounding for additional players
- addscan playerName(y)
- }
- else if (getrange(raidPlayer(y) = 11)
- {
- -- adds the player to a list of people who are within 11 yards range and
- -- need not to be scanned later on.
- addskip playerName(y)
- }
- y = y +1
- }
- -- request the 11 y range check of all people within the "scan" array
- request_sync_data
- }
- -- usage: request_sync_data
- -- requests those people who are in your "scan" array (within 27 yards of you but further than 11 yards)
- -- to do a range check and send you their player names within 11 yards.
- request_sync_data {
- y = 1
- while (y <= number of entries in the "scan" array)
- {
- -- here needs to be a command to send entry y in your "scan" array a request for his 11 yards range check
- y = y +1
- }
- }
- -- event which checks the incoming "request_sync_data" info from other players (who is within their 11 yards range).
- -- not sure if you should get an array of names or just each name one by one (the array version is much more practical)
- event incoming_sync_data {
- y = 1
- while (y <= incomingArrayEntries)
- {
- -- now check if the entry y of the incoming array is within your "check" array. If so, remove
- -- the entry from your "check" array.
- -- I don't know how to do that, but here needs to stand the command for it.
- y = y+1
- }
- -- @vnm: now comes the command you use in your range check macro, but only for people still remaining within the "check" array.
- range_check_by_healing_vnm_command
- }
- -- event when somebody else requests the 11 yard range check data from you.
- event range_request {
- rcheck_make_list
- -- send requester the array with people within the 11 yards range (the array is called "skip")
- }
- -- basically executes the vnm 40y range check on all people remaining in the "check" array
- -- and updates luna afterwards
- range_check_by_healing_vnm_command {
- -- bladida command, loop, whatever
- -- again, names who are within the 40y healing range determined by your macro are deleted from the "check" array
- -- final command to update luna (only people left in the "check" array will be displayed as > 40y)
- update_luna
- }
- -- usage: getrange(playerName)
- getrange {
- if (playerWithin27yards(playerName) == true)
- {
- -- range between 0 and 11
- if (playerWithin11yards(playerName) == true) return 11
- -- range between 11 and 27
- else return 27
- }
- -- over 27y range
- else return 0
- }
- -- usage: addcheck(playerName)
- addcheck {
- -- I have no clue how to make arrays, but this command should create the array "check" and if this array is already created,
- -- add a player name to it.
- }
- -- usage: addscan(playerName)
- addscan {
- -- I have no clue how to make arrays, but this command should create the array "scan" and if this array is already created,
- -- add a player name to it.
- }
- -- usage: addskip(playerName)
- addskip {
- -- I have no clue how to make arrays, but this command should create the array "skip" and if this array is already created,
- -- add a player name to it.
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement