Advertisement
Guest User

Untitled

a guest
Jan 19th, 2018
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.75 KB | None | 0 0
  1. -- updates the list of people who are
  2. -- <= 11, >11 and <= 27, or >27 yards away.
  3. rcheck_make_list {
  4.  
  5. -- IMPORTANT: clear the entries of the "check", "scan" and "skip" arrays before starting this command!!!
  6.  
  7. y = 1
  8. -- numberOfPlayersInTheRaid is what vanilla wow returns. if it does not return a thing, use 40 instead
  9. while (y <= numberOfPlayersInTheRaid)
  10. {
  11. -- getrange can be found below
  12. -- checks if player is further away than 27y
  13. if (getrange(raidPlayer(y)) = 0)
  14. {
  15. -- adds the player to a list of people who are further than 27y away
  16. addcheck playerName(y)
  17. }
  18.  
  19. else if (getrange(raidPlayer(y) = 27)
  20. {
  21. -- adds the player to a list of people who are >11 but <= 27 yards away and
  22. -- who can scan their 11 yards surrounding for additional players
  23. addscan playerName(y)
  24. }
  25. else if (getrange(raidPlayer(y) = 11)
  26. {
  27. -- adds the player to a list of people who are within 11 yards range and
  28. -- need not to be scanned later on.
  29. addskip playerName(y)
  30. }
  31.  
  32. y = y +1
  33. }
  34.  
  35. -- request the 11 y range check of all people within the "scan" array
  36. request_sync_data
  37. }
  38.  
  39. -- usage: request_sync_data
  40. -- requests those people who are in your "scan" array (within 27 yards of you but further than 11 yards)
  41. -- to do a range check and send you their player names within 11 yards.
  42. request_sync_data {
  43. y = 1
  44. while (y <= number of entries in the "scan" array)
  45. {
  46. -- here needs to be a command to send entry y in your "scan" array a request for his 11 yards range check
  47.  
  48. y = y +1
  49. }
  50. }
  51.  
  52.  
  53. -- event which checks the incoming "request_sync_data" info from other players (who is within their 11 yards range).
  54. -- not sure if you should get an array of names or just each name one by one (the array version is much more practical)
  55. event incoming_sync_data {
  56. y = 1
  57. while (y <= incomingArrayEntries)
  58. {
  59.  
  60. -- now check if the entry y of the incoming array is within your "check" array. If so, remove
  61. -- the entry from your "check" array.
  62. -- I don't know how to do that, but here needs to stand the command for it.
  63.  
  64. y = y+1
  65. }
  66.  
  67. -- @vnm: now comes the command you use in your range check macro, but only for people still remaining within the "check" array.
  68. range_check_by_healing_vnm_command
  69. }
  70.  
  71. -- event when somebody else requests the 11 yard range check data from you.
  72. event range_request {
  73. rcheck_make_list
  74. -- send requester the array with people within the 11 yards range (the array is called "skip")
  75. }
  76.  
  77. -- basically executes the vnm 40y range check on all people remaining in the "check" array
  78. -- and updates luna afterwards
  79. range_check_by_healing_vnm_command {
  80.  
  81. -- bladida command, loop, whatever
  82. -- again, names who are within the 40y healing range determined by your macro are deleted from the "check" array
  83.  
  84. -- final command to update luna (only people left in the "check" array will be displayed as > 40y)
  85. update_luna
  86.  
  87. }
  88.  
  89. -- usage: getrange(playerName)
  90. getrange {
  91. if (playerWithin27yards(playerName) == true)
  92. {
  93. -- range between 0 and 11
  94. if (playerWithin11yards(playerName) == true) return 11
  95. -- range between 11 and 27
  96. else return 27
  97. }
  98. -- over 27y range
  99. else return 0
  100. }
  101.  
  102. -- usage: addcheck(playerName)
  103. addcheck {
  104. -- I have no clue how to make arrays, but this command should create the array "check" and if this array is already created,
  105. -- add a player name to it.
  106. }
  107.  
  108. -- usage: addscan(playerName)
  109. addscan {
  110. -- I have no clue how to make arrays, but this command should create the array "scan" and if this array is already created,
  111. -- add a player name to it.
  112. }
  113.  
  114. -- usage: addskip(playerName)
  115. addskip {
  116. -- I have no clue how to make arrays, but this command should create the array "skip" and if this array is already created,
  117. -- add a player name to it.
  118.  
  119. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement