Top

Mr. Obvious Google Search Script


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  9.0 (of 1 scores)
Date Added  Nov 06, 2009
Last Updated  Nov 06, 2009
Tags  google  lmgtfy.com  obvious 

Introduction

I stumbled on the lmgtfy.com Smart As* link the other day, so I decided to script it for cases when people are Obviously just to lazy to use their own Google.
Syntax is !Obvious search words here.
The trigger is on by default. You can turn it off from the Status or Channel window.
Halfops or higher to use the trigger.

To see what it does click HERE

Grab the Code

;Mr Obvious Google Search Script by Ford_Lawnmower -- irc.mindforge.org #USA-Chat
menu Channel,Status {
  .$iif($group(#Obvious) == On,$style(1)) Mr. Obvious Trigger
  ..$iif($group(#Obvious) == On,$style(2)) On: .enable #Obvious
  ..$iif($group(#Obvious) == Off,$style(2)) Off: .disable #Obvious
}
#Obvious on
On *:Text:!Obvious *:#: {
  if ($regex($nick($chan,$nick).pnick,/(!|~|&|@|%)/)) {
    if (!$timer($+(Obvious,$network,$nick))) {
      .timer $+ $+(Obvious,$network,$nick) 1 4 noop
      .msg $chan You will find the answer here: $+(,http://lmgtfy.com/?q=,$replace($2-,$chr(32),+))
    }
  }
}
#Obvious end

Comments

  (12)  RSS
Ghost-writer
Comments: 255
 
mIRC Snippet:  Mr. Obvious Google Search Script
Posted on Nov 6, 2009 4:19 pm
lol :| nice.
GrimReaper
Comments: 10
 
mIRC Snippet:  Mr. Obvious Google Search Script
Posted on Nov 6, 2009 5:04 pm
Good work as usual FordLawnmower.

I'll most cartainly use this.

9/10 :D
WorldDMT
Comments: 171
 
mIRC Snippet:  Mr. Obvious Google Search Script
Posted on Nov 6, 2009 5:27 pm
good job ford :)

but i think u can replace the timer by set -u4 like that

Code:
if !%var {
  .msg # You will find the answer here: $+(.....)
  set -u4 %var 1
}
FordLawnmower
Comments: 411
 
mIRC Snippet:  Mr. Obvious Google Search Script
Posted on Nov 6, 2009 9:20 pm
Thanks GrimReaper & Ghost-writer :)

Thanks WorldDMT :) Good to see you back.

I like the timer method that I use, although I would consider changing it if there were a convincing resource usage argument. I don't know that there is much difference in memory usage for a timer v/s a timed variable.
Mine does execute the noop command but a timed variable has to unset itself, so I think that is a wash.
I also don't think there is a difference between "if (!%var)" and "if ($timer(timername))".
I could be wrong though. I don't really know quite as much as I should about the inner workings of mIRC's Scripting engine.

After looking at this the last few minutes, I did realize that there was no reason for the { return } crap. So I changed it to if (!$timer(timername)) { }
3nigmat1c
Comments: 15
 
mIRC Snippet:  Mr. Obvious Google Search Script
Posted on Nov 7, 2009 4:13 am
I swear there is something wrong with my mIRC, none of these scripts work for me.
lg84
Comments: 8
 
mIRC Snippet:  Mr. Obvious Google Search Script
Posted on Nov 7, 2009 9:29 am
thats cause these are ment for other clients i.e bots mirc can't trigger your own on text
3nigmat1c
Comments: 15
 
mIRC Snippet:  Mr. Obvious Google Search Script
Posted on Nov 8, 2009 4:43 am
I have chatzilla as my accoung (lamb-chop) and then an mIRC account with my bot (lambchopisawesome) Now I think the thing is: I don't know how to load them, what I do is make a .txt file that's .mcr.txt then save it with the script. Then go on lambchopisawesome and say /load -rs (script).mcr.txt. Is this the wrong way of doing it?
TriNetLabs
Comments: 8
 
mIRC Snippet:  Mr. Obvious Google Search Script
Posted on Nov 8, 2009 5:39 pm
Save the script in a .mrc file in your mIRC directory. To get your directory, type //run $mircdir in your mIRC window. After you save it in there, on your mIRC, type //load -rs script.mrc.
blitzz
Comments: 122
 
mIRC Snippet:  Mr. Obvious Google Search Script
Posted on Nov 8, 2009 7:12 pm
"Mr. Obvious" is getting popular :}
sunslayer
Comments: 266
 
mIRC Snippet:  Mr. Obvious Google Search Script
Posted on Nov 8, 2009 11:00 pm
@3nigmat1c the easiest way to do it is to hit alt+r, file>new, paste the code, click ok
that will automatically load the file so you dont need to /load -rs it
RicJames
Comments: 26
 
mIRC Snippet:  Mr. Obvious Google Search Script
Posted on Nov 9, 2009 7:39 am
Great script as usual :) One thing though is there any way to cloak the link with tinyurl like the site allows?
FordLawnmower
Comments: 411
 
mIRC Snippet:  Mr. Obvious Google Search Script
Posted on Nov 9, 2009 1:39 pm
Sure RicJames, I'll try and edit it a little later today.

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom