/me sends a WERE[ANIMAL] after [YOU]!

By Kirby on Feb 27, 2009

Everyday, I am abused by many Hawkee users on IRC (cough Eugene cough Nemesis cough NIGathan), so I have decided to take their idea and use it against them - a protection script to ward off these evil people.

  • @Nemesis sends his legion OF KILLER WERERATS after Kirby »~(,,^-> »~(,,^-> »~(,,^->
  • @KublaiKhan sends his legion OF KILLER WERERATS after Kirby »~(,,^-> »~(,,^-> »~(,,^->
  • @NIGathan sends his legion OF KILLER WERERATS after Kirby »~(,,^-> »~(,,^-> »~(,,^->
  • @NIGathan sends his legion OF KILLER WERERATS after Kirby »~(,,^-> »~(,,^-> »~(,,^->
  • @KublaiKhan sends his legion OF KILLER WEREMICE after Kirby »~(,,^-> »~(,,^-> »~(,,^->
  • @NIGathan sends his legion OF KILLER WEREMICE after Kirby »~(,,^-> »~(,,^-> »~(,,^->
  • @KublaiKhan sends his legion OF KILLER WEREMICE after Kirby »~(,,^-> »~(,,^-> »~(,,^->
  • @NIGathan sends his legion OF KILLER WEREMICE after Kirby »~(,,^-> »~(,,^-> »~(,,^-> :(

Behold! /animal!

  • @Kirby sends his KILLER WEREWOODCHUCK after KublaiKhan
  • @Kirby sends his KILLER WEREFROG after NIGathan
  • @Kirby sends his KILLER WEREKOALA after NIGathan
  • @Kirby sends his KILLER WEREIBEX after Nemesis
  • @Kirby sends his KILLER WEREORYX after KublaiKhan
  • @Kirby sends his KILLER WEREIGUANA after KublaiKhan
  • @Kirby sends his KILLER WEREELK after Nemesis
  • @Kirby sends his KILLER WEREALPACA after Nemesis

This script basically takes a random animal from http://www.rickwalton.com/curricul/lanimals.htm and then basically capitalizes it and adds 'WERE' to it.
Then, the script either takes a random nick from an active channel, the nick from an active query, or a nick that you desire by adding a second parameter to the alias.

Syntax: /animal <nick (optional)>

Enjoy attacking your Nemesis.

alias animal { if (!$sock(animals)) { sockopen animals www.rickwalton.com 80 | sockmark animals $active $iif($1,$1,$iif($chan,$nick($v1,$r(1,$nick($v1,0))),$active)) $r(1,183) } }
alias -l htmlfree { var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&nbsp;) | return %x }
on *:sockopen:animals: { sockwrite -n $sockname GET /curricul/lanimals.htm HTTP/1.0 | sockwrite -n $sockname Host: www.rickwalton.com $+ $crlf $+ $crlf }
on *:sockread:animals: { if ($sockerr) { echo -a * There was a problem retrieving data from the website. Please try again. } | else { sockread %animals | tokenize 32 $sock($sockname).mark | if (<td width=25%> isin %animals) { inc %animal } | if (%animal == $3) { describe $1 sends a KILLER $+(WERE,$upper($htmlfree(%animals))) after $+($2,!) | unset %animal* | sockclose animals } } }

Comments

Sign in to comment.
b0sse   -  Sep 05, 2012

This script is no longer working due to the site "http://rickcreation.com/rickwalton/index.htm/curricul/lanimals.htm" not existing anymore.

 Respond  
Kirby   -  Mar 16, 2009

knoeki, here is an expanded version of the script if you are interested. :>
http://nopaste.com/p/a7YxCd7Wb

 Respond  
knoeki   -  Mar 16, 2009

hehe, that's basically what I meant :_)

 Respond  
Kirby   -  Mar 16, 2009

Well knoeki, I thought that this was a real compact snippet, so I didn't feel the need to "stretch" it out too much; of course, if it's a huge piece of code, then I would just lay it out normally.

isn't part of the purpose of the snippets here learning? ...I think readable code is easier to understand... and it makes sure you learn good coding practices (such as indenting).Well, reading and interpreting already-made scripts can help the learning process of mIRC scripting, but you shouldn't 100% rely on them. Although, non-compressed code does make it softer on the eyes to debug and everything.

 Respond  
knoeki   -  Mar 16, 2009

I have to agree with Jonesey44 here... imho it's better to have readable code rather than compact code, unless you have extremely timing critcal stuff where 1% speed gain matters...

It's also fine if you still prefer compressed code, but... isn't part of the purpose of the snippets here learning? ...I think readable code is easier to understand... and it makes sure you learn good coding practices (such as indenting). I'm not saying you have to, but it's still important to know.

tl;dr: compact code is cool, as long as you can also write readable code ;_)

 Respond  
Kirby   -  Mar 01, 2009

Ah, I see where you're getting at.

 Respond  
Jonesy44   -  Mar 01, 2009

It's a bit non-understandable, i spose since the script works perfectly there's no worries, but if yu're trying to decode it or redo it, it's not an easy job :P

 Respond  
Eugenio   -  Feb 28, 2009

roflmfao
smh

 Respond  
Prelude   -  Feb 27, 2009

Everyday, I am abused by many Hawkee users on IRC (cough Eugene cough Nemesis cough NIGathan)

ROFL pansy;p

 Respond  
Reezy   -  Feb 27, 2009

Great... idk why everytime i comment on a good snippet i only say 1 word but.... great

 Respond  
Kirby   -  Feb 27, 2009

What makes you think it's tooo compressed?

 Respond  
Jonesy44   -  Feb 27, 2009

Effort ;) i like the compressed script, perhaps it's a little bit tooo compressed though?

7/10

 Respond  
Eugenio   -  Feb 27, 2009

abused by many Hawkee users on irc
roflmfao
/me rates 10

 Respond  
Kirby   -  Feb 27, 2009

I had fun making/editing this.
This was initially Blitzjager's idea but I took it farther and used the power of /tokenize, along with /sockmark.
They both can minimize your use of variables in a socket script.

 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.