Guess I'll be a nice guy. This is a basic google script I made.

It's triggered with !g (search stuff)
You can trigger the script yourself
You can also use /g (search stuff) and it will echo the results to only you
It only returns 1 result, it doesn't do math or any extra features the google website does, it only does basic results
create a variable %chan_whitelist with a list of chans separated by spaces for chans you wish to have the script work in, Ex: %chan_whitelist #pball #lladq
If you want it to work in all chans remove the line "if (!$istok(%chan_whitelist,$chan,32)) halt"
There is a limit of 1 search every 5 seconds for spam protection, that can be changed in this line "else set -u5 %googlespam 1" by editing -u# to a different number

Code:
/*
[Addon]
Script=google.com
Version=
Author=pball
Desc=
For=Mirc
Date=10-05-11

[script]
*/
on *:TEXT:!g *:#: google_start $chan $$2-

on *:input:*: if (!$ctrlenter) && (!$inpaste) && ($left($1,1) != $readini(mirc.ini,text,commandchar) || $1 != /msg || $1 != /me) && ($1 == !g) google_start $chan $$2-

alias g {
  google_start nchan $$1-
}

alias google_start {
  if (!$istok(%chan_whitelist,$chan,32)) return
  if (%googlespam) halt 
  else set -u5 %googlespam 1
  if ($1 != nchan) set %google.chan $v1
  set %google.url /custom?hl=en&client=pub-4099951843714863&cof=FORID%3A1%3BGL%3A1%3BS%3Ahttp%3A%2F%2Fwww.hyperwords.net%2F%3BL%3Ahttp%3A%2F%2Fwww.hyperwords.net%2Fhy-for-google.gif%3BLH%3A100%3BLW%3A100%3BLBGC%3AFFFFFF%3BLP%3A1%3BLC%3A%230033cc%3BVLC%3A%23333333%3BGALT%3A%23999999%3B&q= $+ $web_input($2-) $+ &btnG=Search
  sockopen google www.google.com 80
}

on *:SOCKOPEN:google:{
  sockwrite -nt $sockname GET %google.url HTTP/1.1
  sockwrite -nt $sockname HOST: www.google.com
  sockwrite -n $sockname
}

on *:SOCKREAD:google: {
  if ($sockerr > 0) { echo -a Error while reading from $sockname $+ . | echo -a Error # $+ $sockerr occurred. | return }
  sockread %google.read
  while ($sockbr) {
    if ($regex(g,%google.read,/<a class="l" href="(.*?)".*?">(.*?)</a></h2>.*?<span class="s">(.*?)</span><br>/)) {
      $iif(%google.chan,msg $v1,echo -a) 7Result: $parsehtml($regml(g,2)) 7Link: $parsehtml($regml(g,1))
      $iif(%google.chan,msg $v1,echo -a) 7Description: $parsehtml($regml(g,3))
      set -l %done 1
    }
    sockread %google.read
    if (%done) { sockclose google | unset %google.* }
  }
}

alias -l web_input { return $replacex($1-,?,$+(%,3F),@,$+(%,40),#,$+(%,23),$,$+(%,24),%,$+(%,25),^,$+(%,5E),&,$+(%,26),+,$+(%,2B),=,$+(%,3D),`,$+(%,60),[,$+(%,5B),],$+(%,5D),\,$+(%,5C),$chr(123),$+(%,7B),$chr(125),$+(%,7D),|,$+(%,7C),$chr(59),$+(%,3B),',$+(%,27),:,$+(%,3A),",$+(%,22),$chr(44),$+(%,2C),/,$+(%,2F),<,$+(%,3C),>,$+(%3E),$chr(32),$+(%,20)) }

alias -l parsehtml {
  set -l %temp $regsubex($1,/<[^>]+[>$]>?/g,)
  while (($regex(%temp,/&#(\d+);/)) && ($regml(1) isnum 32-255)) set -l %temp $replacex(%temp,$+(&#,$regml(1),;),$chr($regml(1)))
  while (($regex(%temp,/&#x(.*?);/)) && ($base($regml(1),16,10) isnum 32-255)) set -l %temp $replacex(%temp,$+(&#x,$regml(1),;),$chr($base($regml(1),16,10)))
  set -l %finished $replacex(%temp,&nbsp;,$chr(160),&quot;,",&middot;,,&lt;,<,&gt;,>,&amp;,&,&ndash;,,&eacute;,$chr(233))
  return %finished
}


No guarantees on this working forever, but with the particular method this uses it shouldn't change and stop working much hopefully. Just message me here if the script stops working.

Last edited by pball; 08/11/11 08:03 PM.

http://scripting.pball.win
My personal site with some scripts I've released.