//Get the opiumlist item
ref opiumlist;
string client="";
//TODO: do this trough translate string
string booktext="";
makeref(opiumlist,Items[GetItemIndex("opiumlist")]);
//Make a nice list
aref Clients; makearef(Clients,pchar.quest.smuggling_guild.people.OpiumBuyers);
for(i=0;i<GetAttributesNum(Clients);i++)
{
//TODO: add a check to see if the buyer is to close to the opium den and exclude that from the list.
client = GetAttributeName(GetAttributeN(Clients,i));
booktext += "Name: "+pchar.quest.smuggling_guild.people.OpiumBuyers.(client).name+GlobalStringConvert("newline");
booktext += "Location: "+pchar.quest.smuggling_guild.people.OpiumBuyers.(client).location+GlobalStringConvert("newline");
booktext += "Island: "+pchar.quest.smuggling_guild.people.OpiumBuyers.(client).island+GlobalStringConvert("newline");
booktext += GlobalStringConvert("newline");
}
//Add the text to the book
opiumlist.OpiumList = booktext;