ReapTheChaos commented on a Page, Insult Script (Random Insult Generator)  -  Jan 15, 2011

Works pretty well, but if its going to count total insults, it should be nickname specific, so if someone types a nickname that’s not on the channel its rejects it. As it is now you can type in any random name and it will insult it. People typically call one another by shortened versions of their nick, or even by their first name, the count isn’t going to be accurate unless you make it so they have to type in the full nick.

Also line 4 has $2- at the end. The - after the $2 allows you to enter a random number after the nick, that number will then be added onto the total insults.

Replace the first section of the code with this to correct both issues:

Code:

on 1:TEXT:!insult*:#: {
if ($2 == $null) { notice $nick Please add a nickname after !insult | halt }
if ($2 ison #) {
sockopen insulter www.randominsults.net 80
if ($rand(1,10) == 1) set %insultee $nick
elseif ($2) set %insultee $2
elseif set %insultee $nick }
else { msg $chan $nick Do you see $2 in here anywhere? Try again! | halt }
set %insulterchan $chan
writeini insult.ini insults %insultee $calc($readini(insult.ini,insults,%insultee) + $chr(49))
set %timesinsul $readini(insult.ini,insults,%insultee)
}

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.