Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_name(id)
- if(id <= 30000)then
- local name = GetIndexById(id).Name
- if (name == nil)then
- name = "Out of Range"
- end
- local index = "others"
- for i=0 ,AshitaCore:GetDataManager():GetParty():GetAllianceParty0Count()-1,1 do
- if(AshitaCore:GetDataManager():GetParty():GetPartyMemberName(i) == name)then
- if(i == 0)then
- index = "self"
- else
- index = "p" .. i
- end
- end
- end
- for i=0 ,AshitaCore:GetDataManager():GetParty():GetAllianceParty1Count()-1,1 do
- if(AshitaCore:GetDataManager():GetParty():GetPartyMemberName(i+6) == name)then
- index = "a1" .. (i)
- end
- end
- for i=0 ,AshitaCore:GetDataManager():GetParty():GetAllianceParty2Count()-1,1 do
- if(AshitaCore:GetDataManager():GetParty():GetPartyMemberName(i+12) == name)then
- index = "a2" .. (i)
- end
- end
- return color(name,pcolors[index])
- elseif(bit.band(id,0x0FFF) >= 1792)then
- local name = AshitaCore:GetDataManager():GetEntity():GetName(bit.band(id,0x0FFF))
- if (name == nil)then
- name = "Out of Range"
- end
- local index = "ppet" -- opet
- local peto = AshitaCore:GetDataManager():GetEntity():GetPetOwnerID(bit.band(id,0x0FFF))
- if(peto == AshitaCore:GetDataManager():GetParty():GetPartyMemberID(0))then
- index = "ppet"
- end
- for i=1 ,AshitaCore:GetDataManager():GetParty():GetAllianceParty0Count()-1,1 do
- if(AshitaCore:GetDataManager():GetParty():GetPartyMemberID(i) == peto)then
- index = "ppet"
- end
- end
- for i=0 ,AshitaCore:GetDataManager():GetParty():GetAllianceParty1Count()-1,1 do
- if(AshitaCore:GetDataManager():GetParty():GetPartyMemberID(i+6) == peto)then
- index = "ppet"
- end
- end
- for i=0 ,AshitaCore:GetDataManager():GetParty():GetAllianceParty2Count()-1,1 do
- if(AshitaCore:GetDataManager():GetParty():GetPartyMemberID(i+6) == peto)then
- index = "ppet"
- end
- end
- return color(name,colors[index])
- else
- local name = AshitaCore:GetDataManager():GetEntity():GetName(bit.band(id,0x0FFF))
- if (name == nil)then
- name = "Out of Range"
- end
- local index = "mob"
- local mobT = AshitaCore:GetDataManager():GetEntity():GetClaimID(bit.band(id,0x0FFF))
- if(mobT == AshitaCore:GetDataManager():GetParty():GetPartyMemberID(0))then
- index = "mymob"
- end
- for i=1 ,AshitaCore:GetDataManager():GetParty():GetAllianceParty0Count()-1,1 do
- if(AshitaCore:GetDataManager():GetParty():GetPartyMemberID(i) == mobT)then
- index = "pmob"
- end
- end
- for i=0 ,AshitaCore:GetDataManager():GetParty():GetAllianceParty1Count()-1,1 do
- if(AshitaCore:GetDataManager():GetParty():GetPartyMemberID(i+6) == mobT)then
- index = "amob"
- end
- end
- for i=0 ,AshitaCore:GetDataManager():GetParty():GetAllianceParty2Count()-1,1 do
- if(AshitaCore:GetDataManager():GetParty():GetPartyMemberID(i+6) == mobT)then
- index = "amob"
- end
- end
- return color(name,colors[index])
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement