Public paste
For you Tattoo (K)
By: Scriptjes | Date: Aug 30 2009 07:51 | Format: None | Expires: never | Size: 3.41 KB | Hits: 906

  1. ===Youtube Finder===
  2. alias logo return 11[[ $1- ]]12
  3. alias htmlfree {
  4.   var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&nbsp;)
  5.   return %x
  6. }
  7. on $*:TEXT:/^[!@.](yt|youtube)/Si:#: {
  8.   if (!$2) { $iif($left($1,1) == @,msg #,.notice $nick) $logo(Youtube Search) 11Please specify something to search for. | halt }
  9.   else {
  10.     set %yt.search $2-
  11.     set %yt.way $iif($left($1,1) == @,msg #,.notice $nick)
  12.     sockopen yt www.youtube.com 80
  13.   }
  14. }
  15. on *:sockopen:yt: {
  16.   sockwrite -nt $sockname GET $+(/results?search_type=&search_query=,$replace(%yt.search,$chr(32),+),&aq=f) HTTP/1.1
  17.   sockwrite -nt $sockname Host: www.youtube.com
  18.   sockwrite -nt $sockname $crlf
  19. }
  20. on *:sockread:yt: {
  21.   if ($sockerr) halt
  22.   else {
  23.     var %yt.read
  24.     sockread %yt.read
  25.     if (*No videos found* iswm %yt.read) {      
  26.       %yt.way $logo(Youtube Search) 12 No videos found for11 %yt.search 
  27.       sockclose $sockname
  28.     }
  29.     if (*<div class="video-main-content* iswm %yt.read) {
  30.       noop $regex(%yt.read,/id="video-main-content-(.+?)"/i)
  31.       set %yt.url 11URL -12 $+(www.youtube.com/watch?v=,$regml(1))
  32.     }
  33.     if (*<a id="video-short-title-* iswm %yt.read) {
  34.       set %yt.vidname 11Name:12 $htmlentities($replace($htmlfree(%yt.read),$chr(9),,&quot;,"))
  35.     }
  36.     if (*<button class="master-sprite ratingVS ratingVS-*" title="*"></button>* iswm %yt.read) {
  37.       noop $regex(%yt.read,/title="(.+?)"/i)
  38.       set %yt.rate 11Rating:12 $regml(1)
  39.     }
  40.     if (*<span id="video-num-views-* iswm %yt.read) {
  41.       set %yt.views 11Views:12 $remove($htmlfree(%yt.read),$chr(9))
  42.       %yt.way $logo(Youtube Search) 12 $+ %yt.search - %yt.vidname - $iif(%yt.rate,$v1,No Rating) - %yt.views - %yt.url
  43.       sockclose $sockname
  44.     }
  45.   }
  46. }
  47. alias htmlentities {
  48.   var %i = $1, %a = 1
  49.   while $regex(*,%i,/(&#(d+?);)/) {
  50.     if $regml(*,1).pos < %a { return %i }
  51.     %i = $replace(%i,$regml(*,1),$chr($regml(*,2)))
  52.     inc %a
  53.   }
  54.   return %i
  55. }
  56.  
  57. ===Spin the Bottle===
  58. on *:text:!spin*:#:{
  59.   :nickpick
  60.   var %nick = $nick(#,$r(1,$nick(#,0)))
  61.   if (%nick == $nick) || (%nick == $me) { goto nickpick }
  62.   else { goto rest }
  63.   :rest
  64.   describe $chan 12spins the bottle...
  65.   timer 1 3 msg $chan 11The bottle is slowing down...
  66.   timer 1 5 msg $chan 12The bottle has stopped...
  67.   timer 1 7 msg $chan 11It Landed on...
  68.   timer 1 9 msg $chan 12 %nick $+ !
  69.   var %item = $rand(1,10)
  70.   if (%item == 1) timer 1 11 msg $chan 11 $nick must Sexually touch %nick $+ !
  71.   if (%item == 2) timer 1 11 msg $chan 11 $nick must Touch chest of %nick $+ !
  72.   if (%item == 3) timer 1 11 msg $chan 11 $nick must Kiss %nick $+ !
  73.   if (%item == 4) timer 1 11 msg $chan 11 $nick must Feel ass of %nick $+ !
  74.   if (%item == 5) timer 1 11 msg $chan 11 $nick must Make out with %nick $+ !
  75.   if (%item == 6) timer 1 11 msg $chan 11 $nick must Striptease for %nick $+ !
  76.   if (%item == 7) timer 1 11 msg $chan 11 $nick must Grab %nick $+ !
  77.   if (%item == 8) timer 1 11 msg $chan 11 $nick must Spank %nick $+ !
  78.   if (%item == 9) timer 1 11 msg $chan 11 $nick must Go in the closet with %nick $+ !
  79.   if (%item == 10) timer 1 11 msg $chan 11 $nick must Feel up %nick $+ !
  80. }
  81.  
  82. ===Shoot===
  83. on *:TEXT:!shoot:#: { msg # $+(11,$nick) 12 $+ zet iedereen op een rijtje en richt met het pistool waar 11 $+ $nick(#,0)12 kogels in zitten! | msg # 11 $+ $nick(#,$r(1,$nick(#,0))) 12is neergeknalt! RIP! }