phrases

By Dark| on Oct 29, 2010

This works I found it kinda funny.
Ill add more phrases later on 100 or so then repost

on *:TEXT:!phrase*:#:{
  var %p = $rand(1,16)
  if (%p == 1) .timer 1 2 msg $chan Be nice to your kids. They'll choose your nursing home
  if (%p == 2) .timer 1 2 msg $chan Diplomacy - the art of letting someone have your way.
  if (%p == 3) .timer 1 2 msg $chan Every man should marry. After all, happiness is not the only thing in life
  if (%p == 4) .timer 1 2 msg $chan If you are born ugly blame your parents, if you died ugly blame your doctor.
  if (%p == 5) .timer 1 2 msg $chan They've got a picture of her at the hospital - it saves using the stomach pump
  if (%p == 6) .timer 1 2 msg $chan Computers make very fast, very accurate mistakes.
  if (%p == 7) .timer 1 2 msg $chan There is an exception to every rule, except this one.
  if (%p == 8) .timer 1 2 msg $chan I am planning to be more spontaneous in the future.
  if (%p == 9) .timer 1 2 msg $chan Success is a relative term. It brings so many relatives
  if (%p == 10) .timer 1 2 msg $chan The wise never marry, and when they marry they become otherwise.
  if (%p == 11) .timer 1 2 msg $chan When you are working late, the boss will never be around. When you are surfing the net the boss will always drop by.
  if (%p == 12) .timer 1 2 msg $chan Love is photogenic, It needs darkness to develop.
  if (%p == 13) .timer 1 2 msg $chan Before you borrow money from a friend, decide which you need more
  if (%p == 14) .timer 1 2 msg $chan Every morning is the dawn of a new error.
  if (%p == 15) .timer 1 2 msg $chan Press any key to continue or any other key to quit...
  if (%p == 16) .timer 1 2 msg $chan There is an exception to every rule, except this one.

}

Comments

Sign in to comment.
Dark|   -  Oct 31, 2010

Everything in MSL as i think has a use no matter what it does from my *funcommands which got alot of bad comments...it has a use on my server, but then again its not ment to have mIRC users on it

 Respond  
xbox_gamer1   -  Oct 31, 2010

:P

 Respond  
Jethro   -  Oct 31, 2010

Oh well, not everything is perfect. Every method in MSL shares their good and bad.

 Respond  
Dark|   -  Oct 31, 2010

lol

 Respond  
napalm`   -  Oct 31, 2010

lol speaking of which, i just fixed my /slap snippet :$

 Respond  
FordLawnmower   -  Oct 31, 2010

I'll just end with my original point. A majority of the broken scripts on this site are socket based. A text based script will still be working years after ALL of the socket based scripts on this site have broken.

 Respond  
napalm`   -  Oct 31, 2010

lol, we can argue about this for days. If you want to use mIRC properly, you'll do it some justice and learn the code and use it towards efficient coding.

Another thing, if you want to $read(file.txt) for random lines of wtfever, then do it. Most people don't want 200MB .txt files hosted locally.

 Respond  
Dark|   -  Oct 31, 2010

@napalm` i took your snippet and im kinda editing to and trying different phrase sites to get a idea for sockets :P Thanks for the socket thingy even tho its not finished

 Respond  
FordLawnmower   -  Oct 31, 2010

@Dark| Windows named them -->> http://en.wikipedia.org/wiki/Winsock

@napalm` You should try tackling a real page like google or wikipedia and then see if you change your tune. There are only a handfull of scripters who have the time, patience and skill to parse these pages.

What you are saying is ridiculous. Just because you can paste a script into a remote doesn't mean that you can script at a high level and parse html pages.

 Respond  
napalm`   -  Oct 31, 2010

Well, it is time they learn. If you are going to pick up a hobby, then you should be willing to learn every facet of it's ability to serve you. Repairing a few sockets (at the very most monthly) is nothing. If anything, it always gave me an excuse to even open the scripts editor.

 Respond  
Dark|   -  Oct 30, 2010

Sockets - why do they name them sockets? ;P

 Respond  
LadySorien   -  Oct 30, 2010

Yep they are a pain in the ass, just had to complete redo one of mine.

 Respond  
FordLawnmower   -  Oct 30, 2010

Most mIRC users aren't 'socket skilled' napalm`
I maintain several hundred socket scripts. Trust me it's a pain in the ass.

 Respond  
napalm`   -  Oct 30, 2010

.

 Respond  
napalm`   -  Oct 30, 2010

A due sacrifice for efficiency. Using sockets requires competency and thereby updating the method used for extracting data from the source when the source is changed, shouldn't be a problem for a 'socket skilled' mIRC user.

 Respond  
MatthewsTech   -  Oct 30, 2010

Ford, you have a point. Websites are constantly changing their databases, especially websites like smartphrase.com.

 Respond  
Jethro   -  Oct 30, 2010

I'll second that, Ford. I fail to consider that possibility as the pitfall of a socket. :>

 Respond  
FordLawnmower   -  Oct 30, 2010

Something to consider Jethro_ , is that a text based script will stand the test of time where a socket based one will not.
I love socket scripts but they are dependent on the website and require constant maintenance. I have to fix at least one of mine every week ;/

 Respond  
Jethro   -  Oct 30, 2010

I'm 100% standing by napalm's use of socket. By using the manual add of phases, you have to enter them one at a time, and then you're gonna add more if you want to increase the number of them. Over time, you'll see your remote get bigger and bigger...the script response time is thus getting slower. That, in conclusion, is not really an efficient way of going about it.

 Respond  
napalm`   -  Oct 30, 2010

Just an example of how to use sockets to return phrases. This is in NO way a finished product.

on *:TEXT:!phrase:#:{
  if (%phrase.f) { set -u3 %phrase.f 1 | return }
  phrase # | set -u3 %phrase.f 1
}
alias phrase {
  sockopen phrase www.smartphrase.com 80
  sockmark phrase $1-
}
on 1:sockopen:phrase:{
  if ($sockerr) echo $color(kick) -s PHRASE SOCKOPEN ERROR: $sock($1).wsmsg 
  sockwrite -n $sockname POST $+(/cgi-bin/randomphrase.cgi?spanish&,$gettok(serious:humorous,$r(1,2),58),&normal) HTTP/1.1
  sockwrite -n $sockname Host: www.smartphrase.com
  sockwrite -n $sockname $crlf
}
on 1:sockread:phrase:{
  var %r | sockread %r
  if ($sockerr) echo $color(kick) -s PHRASE SOCKREAD ERROR: $sock($1).wsmsg 
  elseif ($regex(%r,<HTML>)) set -u10 %phrase.c 0
  elseif (%r == <TD ALIGN="center" WIDTH=420 BGCOLOR="#DCDCFF">) {
    sockread %r | inc %phrase.c
    if (%phrase.c == 2) $iif($sock($sockname).mark ischan,msg $v1,echo $color(info) -a PHRASE:) $regsubex(%r,.+<P>(.+),\1)
  }
  elseif ($regex(%r,<.HTML>)) { unset %phrase.c | sockclose $sockname }
}
 Respond  
napalm`   -  Oct 30, 2010

/me lulz

 Respond  
Dark|   -  Oct 29, 2010

haha, im on my server playing trivia ill pop in greekshed for a bit

 Respond  
MatthewsTech   -  Oct 29, 2010

Dark| Im chatting to ford right now! Geekshed #script-help

 Respond  
Dark|   -  Oct 29, 2010

O.o the only thing i know about sockets is you can make them go to websites and post stuff i have a few of fords :P

 Respond  
MatthewsTech   -  Oct 29, 2010

I have no idea where to start when it comes to sockets

 Respond  
Jethro   -  Oct 29, 2010

Dark|, Don't be shy. You can post what you've achieved in mirc sockets here. This way you get people's attention in order to learn and improve.

 Respond  
Dark|   -  Oct 29, 2010

... I was gonna make it into a socket then said fuck it, Sockets are hard for me {Prob because i havent made many scripts only edit ones that pm for my server} >_>

 Respond  
Jethro   -  Oct 29, 2010

Dark| wrote:

Ill add more phrases later on 100 or so then repostAh, 16 isn't enough? You wanna go 100? :/ lol

 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.