• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

getFileKeywords(file, keywords [, requireAll])

Infernum

Senator
Joined
Feb 14, 2015
Messages
5,643
Solutions
559
Reaction score
3,949
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:
{
    {keyword = 'name', index = 'monster'},
    {keyword = 'file', index = 'script'}
}
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:
<channel id="11" name="keychan" script="keychan.lua"/>

use the chatchannel like this:
file [, requireAll]
 
Back
Top