The basics of the request would be (as a macro, intended for retail client):
Lua Code:
/run if TooltipDataProcessor then TooltipDataProcessor.AddTooltipPostCall(TooltipDataProcessor.AllTypes, function(self, data) self:AddLine("\nHello World!\n") end) end
To turn it into an addon that runs automatically when you login you can copy/paste everything but the
/run to the website
addon.bool.no. You can inspect your new addon the see what makes the basics of creating an addon, specifically the name of the folder and the name (same as the folder) and contents of the
.toc file
To extend this, possibly look at
idTip That adds various item/spell etc. ids to the game tooltip
In essence there are many types of addons and most have more than one way to be achieved so being clear about what you want to do makes looking for a starting point easier. Also, there are differencesa in the API between game clients (Classic, WoTK and Retail) so one answer may not fit all, hence the
if TooltipDataProcessor