View Single Post
06-11-06, 01:07 PM   #2
ZeroKnowledge
A Defias Bandit
Join Date: Feb 2006
Posts: 3
You can use the "TRADE_SHOW"-Event. The name of the player who is trading with you is UnitName("NPC").

Code:
function WhoIsTrading_OnLoad()
  this->RegisterEvent("TRADE_SHOW");
end

function WhoIsTrading_OnEvent()
  if(event == "TRADE_SHOW") then
    DEFAULT_CHAT_FRAME:AddMessage("Trader: " .. UnitName("NPC"));
  end
end

Last edited by ZeroKnowledge : 06-16-06 at 06:24 AM.
  Reply With Quote