Here's a quick and dirty addon that's more like Masunasu's but actually only checks the incoming chat packet, has some modes added, and is easier to add other strings.
Code
_addon.name = '***'
_addon.version = '0.10'
_addon.author = 'Chiaia (Asura)'
_addon.commands = {'***','fo'} --Won't do anything atm.
packets = require('packets')
local blackListedUsers = T{'TotallyABotOne','TotallyABotTwo','TotallyABotThree',} -- Want to block all messages from X user then added there name(s) here.
-- I could do a general digit check on JP instead of set 500/2100 values but atm I feel it's not needed. Will see if they change thier tactics.
-- If you want to learn more about "Magical Characters" or Patterns in Lua: https://riptutorial.com/lua/example/20315/lua-pattern-matching
local blackListedWords = T{string.char(0x81,0x99),string.char(0x81,0x9A),'1%-99','Job Point.*2100','Job Point.*500','JP.*2100','JP.*500','Capacity Point.*2100','Capacity Point.*500','CP.*2100','CP.*500',} -- First two are '☆' and '★' symbols.
windower.register_event('incoming chunk', function(id,data)
if id == 0x017 then -- 0x017 Is incoming chat.
local chat = packets.parse('incoming', data)
local cleaned = windower.convert_auto_trans(chat['Message']):lower()
if blackListedUsers:contains(chat['Sender Name']) then -- Blocks any message from X user in any chat mode.
return true
elseif (chat['Mode'] == 3 or chat['Mode'] == 1 or chat['Mode'] == 26) then -- RMT checks in tell, shouts, and yells. Years ago they use to use tells to be more stealthy about gil selling.
for k,v in ipairs(blackListedWords) do
if cleaned:match(v:lower()) then
return true
end
end
end
end
end)
Here's a quick and dirty addon that's more like Masunasu's but actually only checks the incoming chat packet, has some modes added, and is easier to add other strings.
Code
_addon.name = '***'
_addon.version = '0.10'
_addon.author = 'Chiaia (Asura)'
_addon.commands = {'***','fo'} --Won't do anything atm.
packets = require('packets')
local blackListedUsers = T{'TotallyABotOne','TotallyABotTwo','TotallyABotThree',} -- Want to block all messages from X user then added there name(s) here.
-- I could do a general digit check on JP instead of set 500/2100 values but atm I feel it's not needed. Will see if they change thier tactics.
-- If you want to learn more about "Magical Characters" or Patterns in Lua: https://riptutorial.com/lua/example/20315/lua-pattern-matching
local blackListedWords = T{string.char(0x81,0x99),string.char(0x81,0x9A),'1%-99','Job Point.*2100','Job Point.*500','JP.*2100','JP.*500','Capacity Point.*2100','Capacity Point.*500','CP.*2100','CP.*500',} -- First two are '☆' and '★' symbols.
windower.register_event('incoming chunk', function(id,data)
if id == 0x017 then -- 0x017 Is incoming chat.
local chat = packets.parse('incoming', data)
local cleaned = windower.convert_auto_trans(chat['Message']):lower()
if blackListedUsers:contains(chat['Sender Name']) then -- Blocks any message from X user in any chat mode.
return true
elseif (chat['Mode'] == 3 or chat['Mode'] == 1 or chat['Mode'] == 26) then -- RMT checks in tell, shouts, and yells. Years ago they use to use tells to be more stealthy about gil selling.
for k,v in ipairs(blackListedWords) do
if cleaned:match(v:lower()) then
return true
end
end
end
end
end)
So I nicknamed the thing stars.lua and put it in the add-ons folder in a folder names "stars". Any idea where I would add a line to auto-load it because I must have mucked up somewhere. I just have to type:
//lua load stars
every time I have my character logged in. It works when I do that. It lasts an entire playthrough, but I have to do it ever time. I'm sure I'm just dumb with .lua stuff and could use a hand-hold. Thanks.
So in addition to the above stuff, can anyone add something to catch the auto-translated word "ballista" (because seriously *** that spam) and whatever this person is saying that is getting through as well, please:
I was trying to add "buy?99" and "ballista" into that code in the spoiler'd text in my last post using notepad++ and saving it as a .lua. When I try to load it in windower, the message I get is:
stars: Lua syntax error: stars/stars.lua:1: unexpected symbol near '?'
and the '?' at the end is a question mark in a box (not the question mark plainly like I put there. It seems to have ruined the .lua somehow. I remove everything I entered and save it, then try to load it, and still get the error. I make an entirely new .lua with the copy-pasted code from my post above and it works.
Thoughts or help, please? I'm a lua n00b. I just want a code to block out all the stupid JP sellers and ballista spammers on Asura. I can handle the ***-talking. The spammers just gots-ta-go. Thanks in advance.
if blackListedUsers:contains(chat['Sender Name']) then -- Blocks any message from X user in any chat mode.
return true
You don't edit that line for blocking users. That's where it compares blocked users to the person who sent the message and see if it should block it. You change:
Code
local blackListedUsers = T{'TotallyABotOne','TotallyABotTwo','TotallyABotThree',} -- Want to block all messages from X user then added there name(s) here.
Still one of the most important things for trying to remain sane on Asura through the JP bot selling yell spam from multiple different yellers. Bumping for that reason.
Here's a quick and dirty addon that's more like Masunasu's but actually only checks the incoming chat packet, has some modes added, and is easier to add other strings.
Code
_addon.name = '***'
_addon.version = '0.10'
_addon.author = 'Chiaia (Asura)'
_addon.commands = {'***','fo'} --Won't do anything atm.
packets = require('packets')
local blackListedUsers = T{'TotallyABotOne','TotallyABotTwo','TotallyABotThree',} -- Want to block all messages from X user then added there name(s) here.
-- I could do a general digit check on JP instead of set 500/2100 values but atm I feel it's not needed. Will see if they change thier tactics.
-- If you want to learn more about "Magical Characters" or Patterns in Lua: https://riptutorial.com/lua/example/20315/lua-pattern-matching
local blackListedWords = T{string.char(0x81,0x99),string.char(0x81,0x9A),'1%-99','Job Point.*2100','Job Point.*500','JP.*2100','JP.*500','Capacity Point.*2100','Capacity Point.*500','CP.*2100','CP.*500',} -- First two are '☆' and '★' symbols.
windower.register_event('incoming chunk', function(id,data)
if id == 0x017 then -- 0x017 Is incoming chat.
local chat = packets.parse('incoming', data)
local cleaned = windower.convert_auto_trans(chat['Message']):lower()
if blackListedUsers:contains(chat['Sender Name']) then -- Blocks any message from X user in any chat mode.
return true
elseif (chat['Mode'] == 3 or chat['Mode'] == 1 or chat['Mode'] == 26) then -- RMT checks in tell, shouts, and yells. Years ago they use to use tells to be more stealthy about gil selling.
for k,v in ipairs(blackListedWords) do
if cleaned:match(v:lower()) then
return true
end
end
end
end
end)
Yeah. Yell is still cancer if you don't block out the JP vendors. Thankfully, they normally stick to the same players to yell so you could just blacklist them, but unfortunately the blacklist has to load every time you zone so messages will still get through unless you use the above code or block yell entirely.
Adding "Discord" to my list because like I want to listen to a bunch of other FFXI players with bad mics try to organize Ambuscade runs for their job that isn't geared nor suitable for VDV1 or to hear players beg people to come to do dead content (Ballista) with them.
The stars RMT sites put in their yells. If there was a way to make anything with a star like that not show up in my chat window, that would knock out a big % of RMT yells I seem to see. Also, maybe the same idea could be used to remove any yell that has the number "2100" in it as that is just scammers trying to bot JP (or flat out steal gil for saying they're going to get you some JP).
The frequency of these yells is simply too much to keep up with via blocklist. If there was some setting in Windower that someone could guide me to, that would be splendid. I'm not really familiar with coding stuff, but if I was pointed in the right direction, I could try. Thanks in advance.