Advertisement
Guest User

Untitled

a guest
May 25th, 2018
643
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.47 KB | None | 0 0
  1. function get_name(id)
  2. if(id <= 30000)then
  3. local name = GetIndexById(id).Name
  4. if (name == nil)then
  5. name = "Out of Range"
  6. end
  7. local index = "others"
  8. for i=0 ,AshitaCore:GetDataManager():GetParty():GetAllianceParty0Count()-1,1 do
  9. if(AshitaCore:GetDataManager():GetParty():GetPartyMemberName(i) == name)then
  10. if(i == 0)then
  11. index = "self"
  12. else
  13. index = "p" .. i
  14. end
  15. end
  16. end
  17. for i=0 ,AshitaCore:GetDataManager():GetParty():GetAllianceParty1Count()-1,1 do
  18. if(AshitaCore:GetDataManager():GetParty():GetPartyMemberName(i+6) == name)then
  19. index = "a1" .. (i)
  20. end
  21. end
  22. for i=0 ,AshitaCore:GetDataManager():GetParty():GetAllianceParty2Count()-1,1 do
  23. if(AshitaCore:GetDataManager():GetParty():GetPartyMemberName(i+12) == name)then
  24. index = "a2" .. (i)
  25. end
  26. end
  27. return color(name,pcolors[index])
  28. elseif(bit.band(id,0x0FFF) >= 1792)then
  29. local name = AshitaCore:GetDataManager():GetEntity():GetName(bit.band(id,0x0FFF))
  30. if (name == nil)then
  31. name = "Out of Range"
  32. end
  33. local index = "ppet" -- opet
  34. local peto = AshitaCore:GetDataManager():GetEntity():GetPetOwnerID(bit.band(id,0x0FFF))
  35. if(peto == AshitaCore:GetDataManager():GetParty():GetPartyMemberID(0))then
  36. index = "ppet"
  37. end
  38. for i=1 ,AshitaCore:GetDataManager():GetParty():GetAllianceParty0Count()-1,1 do
  39. if(AshitaCore:GetDataManager():GetParty():GetPartyMemberID(i) == peto)then
  40. index = "ppet"
  41. end
  42. end
  43. for i=0 ,AshitaCore:GetDataManager():GetParty():GetAllianceParty1Count()-1,1 do
  44. if(AshitaCore:GetDataManager():GetParty():GetPartyMemberID(i+6) == peto)then
  45. index = "ppet"
  46. end
  47. end
  48. for i=0 ,AshitaCore:GetDataManager():GetParty():GetAllianceParty2Count()-1,1 do
  49. if(AshitaCore:GetDataManager():GetParty():GetPartyMemberID(i+6) == peto)then
  50. index = "ppet"
  51. end
  52. end
  53. return color(name,colors[index])
  54. else
  55. local name = AshitaCore:GetDataManager():GetEntity():GetName(bit.band(id,0x0FFF))
  56. if (name == nil)then
  57. name = "Out of Range"
  58. end
  59. local index = "mob"
  60. local mobT = AshitaCore:GetDataManager():GetEntity():GetClaimID(bit.band(id,0x0FFF))
  61. if(mobT == AshitaCore:GetDataManager():GetParty():GetPartyMemberID(0))then
  62. index = "mymob"
  63. end
  64. for i=1 ,AshitaCore:GetDataManager():GetParty():GetAllianceParty0Count()-1,1 do
  65. if(AshitaCore:GetDataManager():GetParty():GetPartyMemberID(i) == mobT)then
  66. index = "pmob"
  67. end
  68. end
  69. for i=0 ,AshitaCore:GetDataManager():GetParty():GetAllianceParty1Count()-1,1 do
  70. if(AshitaCore:GetDataManager():GetParty():GetPartyMemberID(i+6) == mobT)then
  71. index = "amob"
  72. end
  73. end
  74. for i=0 ,AshitaCore:GetDataManager():GetParty():GetAllianceParty2Count()-1,1 do
  75. if(AshitaCore:GetDataManager():GetParty():GetPartyMemberID(i+6) == mobT)then
  76. index = "amob"
  77. end
  78. end
  79. return color(name,colors[index])
  80. end
  81.  
  82. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement