This script should print the information reported in the GameTooltip created in this way. Specifically, it should print
—› Rank 5
—› 30 yd range
Lua Code:
local f = CreateFrame("GameTooltip", "MyGameTooltip", UIParent, "GameTooltipTemplate")
f:SetOwner(UIParent, "ANCHOR_NONE")
f:SetSpellByID(27217) -- Drain Soul
local n = 1
while _G["MyGameTooltipTextRight"..n]:GetText() do
local text = _G["MyGameTooltipTextRight"..n]:GetText()
print(text)
n = n + 1
end