Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function parseOnlineCharacterData(_, rawData)
- enemyList = {"Arcanis",
- "Cauthorn",
- "Ceana",
- "Ixion",
- "Izekeal",
- "Munsia",
- "Revan",
- "Thalkros"
- }
- if not rawData:find("raw_who_list.dat", 1, true) then
- return
- end
- io.input(rawData)
- local charFile = io.read("*a")
- local totalPlayers = charFile:match("Current Players Online: </strong>(%d+)")
- onlineCharacters = {}
- for name in string.gmatch(charFile, "lookup=(%w+)") do
- name = name:title()
- table.insert(onlineCharacters, name)
- end
- io.input():close()
- os.remove(rawData)
- local displayChars = table.concat(onlineCharacters, ", ")
- sysEcho("online now", displayChars)
- echo("\n")
- sysEcho("info", "total players online: <yellow>" .. totalPlayers)
- local checkEnemies = {}
- for i, v in ipairs(onlineCharacters) do
- if table.contains(enemyList, v) then
- table.insert(checkEnemies, v)
- end
- end
- sysEcho("alert", "possible fights with: <red>" .. table.concat(checkEnemies, ", "))
- end
Add Comment
Please, Sign In to add comment