My random insult bot, its very simple to use. Load it in your remote (Alt R). And then make another person type @Insult To message the channel or ./!Insult to notice the person. It comes with flood control allowing one insult per every 9 seconds and every insult it updates its internal insult list.
«(09:37:34)» {- +Blanker -} @insult
«(09:37:35)» {- +Co0kiebot -} ¤Insult¤ 2 You're so stupid, when you saw an NC-17 (under 17 not admitted) sign at the movie theatre, you went home and found 16 friends.
«(09:37:43)» {- +Blanker -} LOL.
«(09:38:59)» {- +Blanker -} @insult 3
«(09:39:00)» {- +DissBot -} ¤Insult¤ 3 You must be an experiment in Artificial Stupidity.
«(09:39:19)» {- +Blanker -} @insult 999
«(09:39:20)» -Dissbot- The insult you have requested does not exist! There are currently 4 insults!
on *:load:insult
on $*:TEXT:/^[.!@](Insult|Diss)/Si:#: {
if (!$timer(insult $+ $nick)) {
if ($2) && (!$read(insult.txt, $2)) { notice $nick The insult you have requested does not exist! There are currently $lines(insult.txt) insults! | halt }
.timerinsult $+ $nick 1 9 noop
insult
var %x $iif($2,$v1,$rand(1,$lines(insult.txt)))
$iif(@* iswm $1,Msg $chan,notice $nick) 7¤4Insult7¤15 $+(12«15,%x,12»,14) $read(insult.txt, %x)
}
}
alias insult {
if ($sock(Insult)) sockclose insult
sockopen Insult www.randominsults.net 80
}
on *:sockopen:Insult: {
sockwrite -nt $sockname GET / HTTP/1.1
sockwrite -nt $sockname Host: www.randominsults.net
sockwrite -nt $sockname $crlf
}
on *:sockread:insult: {
if (!$sockerr) {
sockread %insult
if (<i> isin %insult) {
write insult.txt $remove(%insult,<i>,</i>)
echo -a %insult
sockclose $sockname
}
}
else echo -a Socket error: $sockerr
}
i am making one of these right now for twitch and heres my idea of it
on *:TEXT:!insult*:#: {
;check for != not equal, if anyone else but you they get flood.
if ($nick != botownernamehere) {
if ((%flood!insult) || ($($+(%,flood!insult.,$nick),2))) { return }
set -u5 %flood!insult On
set -u15 %flood!insult. $+ $nick On
}
if ($0 < 2) {
msg $chan The proper way to use this bot is !insult <#> <user>
}
else {
if ($2 <= $lines(insults.txt)) {
; this is checking to see if request is not less than 0
if ($2 > 0 ) {
set %user $3
set %messsageline $2
set %message $read(insults.txt, n, %messsageline)
set %spot $calc($pos(%message, *) - 1 )
if (%spot = -1) {
;no * found so full message is ok. and no need to check vs white list.
set %message $read(insults.txt, n, %messsageline)
}
else {
set %leftmessage $left(%message, %spot)
set %rightmessage $right(%message, $calc($len(%message) - $calc(%spot + 1)))
if ($3 = $ulist(%user,whitelist,1)) {
;user on white list fix message to $nick not what they wanted.
set %message %leftmessage $nick %rightmessage
}
else {
;name not on white list ok to display as requested.
set %message %leftmessage $3 %rightmessage
}
}
; send message to chat.
msg $chan %message
}
else {
msg $chan You cannot input negative numbers
}
}
; this is if they pick a request larger than the total number of insults.
else {
msg $chan You exceeded the total number of insults of $lines(insults.txt) $+ .
}
}
}