getFileKeywords(file, keywords [, requireAll])

Discussion in 'Mods & Lua Functions' started by Static_, Dec 10, 2016.

  1. Static_

    Static_ Well-Known Member

    Joined:
    Feb 14, 2015
    Messages:
    3,140
    Likes Received:
    1,357
    Best Answers:
    188
    useless function but i got bored, maybe someone will find a use for it

    args:
    file = file directory
    keywords = table with keywords {keyword, index}, example:
    Code (Text):
    1.  
    2. {
    3.     {keyword = 'name', index = 'monster'},
    4.     {keyword = 'file', index = 'script'}
    5. }
    index is what the table index will be named when the file is processed for keywords
    requireAll = if this argument is true, all keywords must be found within each line

    lib:
    http://pastebin.com/DtQsYE6Y

    i made a chatchannel to test it out here:
    http://pastebin.com/tvCH6JGJ

    register the chatchannel with
    Code (Text):
    1. <channel id="11" name="keychan" script="keychan.lua"/>
    use the chatchannel like this:
    file [, requireAll]
     
  2. HeberPcL

    HeberPcL [PowerOT.com.br]

    Joined:
    Aug 21, 2007
    Messages:
    1,275
    Likes Received:
    39
    Best Answers:
    0
    Great job!
     

Share This Page

Loading...