Google Images searcher

By blodix on Feb 07, 2010

It describes itself.. Simply type: !image

Example:
[22:08] <@blodix> !image epic fail
[22:08] -BlodBot- Image: http://www.images.google.com/images?q=epic%20fail

###################
###################
###Blodix Script###
###################
###################

ON *:TEXT:!image*:#: {
  notice $nick Image: http://www.images.google.com/images?q= $+ $htmlfrm($2-)
}
alias htmlfrm {
  var %i = 1,%r
  while (%i <= $len($1-)) {
    if ($mid($1-,%i,1) isalnum) { %r = %r $+ $ifmatch }
    else { %r = %r $+ % $+ $base($asc($mid($1-,%i,1)),10,16,2) }
    inc %i
  }
  return %r
}
ON *:TEXT:!about:#: {
  notice $nick Created by blodix
}

Comments

Sign in to comment.
Pangaea   -  Feb 08, 2010

hello there blodix

nice simple script, these are the ones I like, easy to customise.. anyway, as a small thank you, here are a few variations I have made that might come in handy:

www.discogs.com ... how about a socket napa / ford ;)

ON *:TEXT:!discogs*:#: {
  msg $chan Discogs: http://www.discogs.com/search?q= $+ $htmlfrm($2-)

google maps, this works surprisingly well

ON *:TEXT:!gmap*:#: {
  msg $chan Map: http://maps.google.com/maps?q= $+ $htmlfrm($2-)

google video, a ;long forgotten source for long videos

ON *:TEXT:!gvid*:#: {
  msg $chan Video: http://video.google.com/videosearch?q= $+ $htmlfrm($2-)

ebay.com, chage your region if needs be

ON *:TEXT:!ebay*:#: {
  msg $chan Ebay: http://shop.ebay.com/?_from=R40&_trksid=p3907.m38.l1313&_nkw= $+ $htmlfrm($2-)

amazon.com much requested

ON *:TEXT:!amazon*:#: {
  msg $chan Amazon: http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords= $+ $htmlfrm($2-)

and here is an example of one that searches my own forum

ON *:TEXT:!pan*:#: {
  msg $chan Forum Search: http://www.fractalscapes.net/forum/phpBB3/search.php?keywords= $+ $htmlfrm($2-)

, this one is easy to customise yourself, just get up your fave website that has a search engine, search for an example word, then look at the address, and take the what you need.

example

i went to amazon, did a search for "example" , then looked at the address bar
http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=example&x=0&y=0

look, for the word, in most cases there will be an = before it, so for this link the search address for the script would be "http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords="

"also note you can do more specific searches by grabbing the link from a specific category in what ever site you want to use"

have fun
regards
pan

 Respond  
sunslayer   -  Feb 07, 2010

it actually looks quite similar to yours
instead of using a while loop for your $htmlfrm you can use $regsubex for faster results

alias htmlfrm return $regsubex($1-,/(\W)/g,$+(%,$base($asc(\1),10,16)))
 Respond  
#Warizardworks   -  Feb 07, 2010

Nice snippet. The code is similar to BM88's and my google search script which seems to be a nice method for general web searching scripts. =]
~ Wariopower

 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.