Insult Bot [LUA]

shockli

Contributor
Jan 29, 2016
243
194
111
I seriously do not see why this was done before. But anyways, here it is. Easy to modify and add/remove more insults.

  • Shut up - you will never be the man your mother is.
  • You must have been born on a highway because that is where most accidents happen.
  • You are a failed abortion whose birth certificate is an apology from the condom factory.
  • It looks like your face caught on fire and someone tried to put it out with a fork.
  • Your family tree is a cactus because everybody on it is a prick.
  • You are so ugly Hello Kitty said goodbye to you.
  • You are so ugly that when your mama dropped you off at school she got a fine for littering.
  • If you were twice as smart you would still be stupid.
  • Do you have to leave so soon I was just about to poison the tea.
  • You are so ugly when you popped out the doctor said aww what a treasure and your mom said yeah lets bury it
  • I know you are but what am I
  • If I wanted to kill myself
  • I would climb up your ego and jump down to your IQ level.
  • You sir are an oxygen thief
  • You are about as useful as a knitted condom.
  • I am jealous of people that don’t know you
  • I admire you because I Have never had the courage to tell someone I hate them.
  • Your mothers armpits are so hairy it looks like she had Buckwheat in a headlock.
  • If you want my comeback you will have to scrape it off the back of your mothers teeth.
  • I saved your mothers life today... I killed a shit eating dog on the way over.
  • It is better to let someone think you are an Idiot than to open your mouth and prove it.

Add your own insult:
  • Edit the "insults.lua" file
  • Add to the array (search for "open your mouth and prove it.'")
  • Put an extra , after the '
  • Put another '
  • <enter your insult there>
  • Put another '
  • Eg. 'It is better to let someone think you are an Idiot than to open your mouth and prove it.','Your face'
I will add new insults upon request. Post them here!

Custom Ignore Insult:

Change the name from "shock" to your name if you want.

Installation Instructions:

  • Download the lua script (below)
  • Go to your installation directory's plugins/lua_plugin folder
  • Extract the folder "insulted" into the directory mentioned above (if there is no insulted folder create one and copy "init.lua" and "events.lua" into there)

Command: !insult <username>
New Download Link, Source Included: Here
Download V1.1: Here
Download: Here


Credits:

BlueScream for making it user-friendly
 
Last edited:

Bluscream

Retired Staff
Contributor
May 8, 2015
967
934
211
I don't want to annoy u but i always have some suggestions ;P

init.lua - a "loaded" message helps ppl to know if it's working ^^
Code:
-- shock's insalted plugin

-- hackery provided by daurnimator
-- package.path = "/opt/teamspeak3/plugins/lua_plugin/?.lua;/usr/share/lua/5.2/?.lua;/usr/share/lua/5.2/?/init.lua;/usr/lib/lua/5.2/?.lua;/usr/lib/lua/5.2/?/init.lua;./?.lua"; package.cpath = "/usr/lib/lua/5.2/?.so;/usr/lib/lua/5.2/loadall.so;./?.so"

require("ts3init")
require("insulted/events")

local registeredEvents = {
    onTextMessageEvent = insulted_events.onTextMessageEvent
}
ts3RegisterModule("insulted", registeredEvents)
ts3.printMessageToCurrentTab('insulted loaded.')

events.lua - you should use #arrayname to get the length of the array instead of letting the user type it ^^
Code:
-- shock's insult plugin
require("insulted/insults")

local function onTextMessageEvent(serverConnectionHandlerID, targetMode, toID, fromID, fromName, fromUniqueIdentifier, message, ffIgnored)
    local channel = ts3.getChannelOfClient(serverConnectionHandlerID, fromID)
 
    -- cheat at random
    randomNum = math.random(1,#insult)

    -- insult
    if string.match(message, "!insult") then
        print ("Running test for:", message)
        sendMsg = string.gsub( message, "!insult", "" )
        sendMsg = sendMsg .. ", " .. insult[randomNum]
        ts3.requestSendChannelTextMsg(serverConnectionHandlerID, sendMsg, channel)
    end

    if string.match(message, "!insult shock") then
        print ("Running test for:", message)
        sendMsg = string.gsub( message, "!insult", "" )
        sendMsg = fromName .. " sucks shock's dick."
        ts3.requestSendChannelTextMsg(serverConnectionHandlerID, sendMsg, channel)
    end
end

insulted_events = {
    onTextMessageEvent = onTextMessageEvent
}

insults.lua - i would save the insults in a different file and use linebreaks so the user can add insults more easy ^^
Code:
insult = {
    'Shut up - you will never be the man your mother is.',
    'You must have been born on a highway, because that is where most accidents happen.',
    'You are a failed abortion whose birth certificate is an apology from the condom factory.',
    'It looks like your face caught on fire and someone tried to put it out with a fork.',
    'Your family tree is a cactus, because everybody on it is a prick.',
    'You are so ugly Hello Kitty said goodbye to you.',
    'You are so ugly that when your mama dropped you off at school she got a fine for littering.',
    'If you were twice as smart, you would still be stupid.',
    'Do you have to leave so soon I was just about to poison the tea.',
    'You are so ugly when you popped out the doctor said aww what a treasure and your mom said yeah lets bury it',
    'I know you are but what am I',
    'If I wanted to kill myself, I would climb up your ego and jump down to your IQ level.',
    'You, sir, are an oxygen thief','You are about as useful as a knitted condom.',
    'I am jealous of people that don’t know you',
    ' I admire you because I Have never had the courage to tell someone I hate them.',
    'Your mothers armpits are so hairy it looks like she had Buckwheat in a headlock.',
    'If you want my comeback, you will have to scrape it off the back of your mothers teeth.',
    'I saved your mothers life today... I killed a shit eating dog on the way over.',
    'It is better to let someone think you are an Idiot than to open your mouth and prove it.',
}
 

shockli

Contributor
Jan 29, 2016
243
194
111
I don't want to annoy u but i always have some suggestions ;P
First of all i would save the insults in a different file and use linebreaks so the user can add insults more easy ^^
Also you should use #arrayname to get the length of the array instead of letting the user type it ^^
Last but not least a "loaded" message helps ppl to know if it's working ^^

CODE:

init.lua
Code:
-- shock's insalted plugin

-- hackery provided by daurnimator
-- package.path = "/opt/teamspeak3/plugins/lua_plugin/?.lua;/usr/share/lua/5.2/?.lua;/usr/share/lua/5.2/?/init.lua;/usr/lib/lua/5.2/?.lua;/usr/lib/lua/5.2/?/init.lua;./?.lua"; package.cpath = "/usr/lib/lua/5.2/?.so;/usr/lib/lua/5.2/loadall.so;./?.so"

require("ts3init")
require("insulted/events")

local registeredEvents = {
    onTextMessageEvent = insulted_events.onTextMessageEvent
}
ts3RegisterModule("insulted", registeredEvents)
ts3.printMessageToCurrentTab('insulted loaded.')

events.lua
Code:
-- shock's insult plugin
require("insulted/insults")

local function onTextMessageEvent(serverConnectionHandlerID, targetMode, toID, fromID, fromName, fromUniqueIdentifier, message, ffIgnored)
    local channel = ts3.getChannelOfClient(serverConnectionHandlerID, fromID)
 
    -- cheat at random
    randomNum = math.random(1,#insult)

    -- insult
    if string.match(message, "!insult") then
        print ("Running test for:", message)
        sendMsg = string.gsub( message, "!insult", "" )
        sendMsg = sendMsg .. ", " .. insult[randomNum]
        ts3.requestSendChannelTextMsg(serverConnectionHandlerID, sendMsg, channel)
    end

    if string.match(message, "!insult shock") then
        print ("Running test for:", message)
        sendMsg = string.gsub( message, "!insult", "" )
        sendMsg = fromName .. " sucks shock's dick."
        ts3.requestSendChannelTextMsg(serverConnectionHandlerID, sendMsg, channel)
    end
end

insulted_events = {
    onTextMessageEvent = onTextMessageEvent
}

insults.lua
Code:
insult = {
    'Shut up - you will never be the man your mother is.',
    'You must have been born on a highway, because that is where most accidents happen.',
    'You are a failed abortion whose birth certificate is an apology from the condom factory.',
    'It looks like your face caught on fire and someone tried to put it out with a fork.',
    'Your family tree is a cactus, because everybody on it is a prick.',
    'You are so ugly Hello Kitty said goodbye to you.',
    'You are so ugly that when your mama dropped you off at school she got a fine for littering.',
    'If you were twice as smart, you would still be stupid.',
    'Do you have to leave so soon I was just about to poison the tea.',
    'You are so ugly when you popped out the doctor said aww what a treasure and your mom said yeah lets bury it',
    'I know you are but what am I',
    'If I wanted to kill myself, I would climb up your ego and jump down to your IQ level.',
    'You, sir, are an oxygen thief','You are about as useful as a knitted condom.',
    'I am jealous of people that don’t know you',
    ' I admire you because I Have never had the courage to tell someone I hate them.',
    'Your mothers armpits are so hairy it looks like she had Buckwheat in a headlock.',
    'If you want my comeback, you will have to scrape it off the back of your mothers teeth.',
    'I saved your mothers life today... I killed a shit eating dog on the way over.',
    'It is better to let someone think you are an Idiot than to open your mouth and prove it.',
}
As usual you fix my laziness. Still learning to consider every user an idiot ;). I will add your changes tomorrow (gmt +2)

Thanks!
 
Top