Language:
Lua     Change language:
Pastebin: 95534
Author: foxlit
Subject: parseMacro
Created: 2008-09-07 11:43:37
Download and save
Toggle line numbers
1local function parseMacro(text) 
2  if type(text) ~= "string" then return; end 
3    local cl = text:match("^#show ([^\n]+)") or text:match("^#showtooltip ([^\n]+)") or text:match("/cast ([^\n]+)") or text:match("/use ([^\n]+)"); 
4    if cl then 
5        cl = SecureCmdOptionParse(cl); 
6        if not cl then return; end 
7        return GetSpellInfo(cl) and "spell" or "item", cl; 
8    end 
9end 
Thread:
[95534] parseMacro by foxlit at 2008-09-07 11:43:37
Tip: Click the line numbers to toggle highliting on that line.

Paste followup:

Language:
Author:
Subject:


    Tabstop:     bigger biggest
Note: You can prefix a line with "@@@" to highlight it.