What happens when people say 'Hi, Hello, Hey'

By iProTopia on Jun 21, 2011

--Hello--
[18:11:47] <+iAnything1096> hello
[18:11:49] <~Justin> Hello iAnything1096 you can say hello all you want... Do you want an cookie now? Yes or No
[18:11:52] <+iAnything1096> yes
[18:11:54] <~Justin> TO BAD! You should have manners now say Please
[18:11:58] <+iAnything1096> please
[18:11:59] <~Justin> Ummm... Okay
[18:11:59] Justin Gives iAnything1096 a cookie
--Hey--
[18:12:39] <&The_Middleman> Hey.
[18:12:40] <~Justin> Hi The_Middleman you can say hi all you want... Do you want a cookie now? Yes or No
[18:12:39] <&The_Middleman> Yes.
[18:12:40] <~Justin> TO BAD! You should have manners now say Please
[18:12:49] <&The_Middleman> Please.
[18:12:50] <~Justin> Ummm... Okay
[18:12:50] Justin Gives The_Middleman a cookie
--Hi--
[18:14:00] <+iAnything1096> Hi
[18:14:01] <~Justin> Hi iAnything1096 you can say hi all you want... Do you want a cookie now? Yes or No
[18:14:04] <+iAnything1096> yes
[18:14:06] <~Justin> TO BAD! You should have manners now say Please
[18:14:09] <+iAnything1096> please
[18:14:11] <~Justin> Ummm... Okay
[18:14:11] Justin Gives iAnything1096 a cookie

on *:text:*hello*:#: { .msg $chan Hello $nick you can say hello all you want... Do you want an cookie now? Yes or No }
on *:text:*hey*:#: { .msg $chan Hey $nick you can say hey all you want... Do you want a cookie now? Yes or No }
on *:text:*hi*:#: { .msg $chan Hi $nick you can say hi all you want... Do you want a cookie now? Yes or No }
on *:text:*yes*:#: { .msg $chan TO BAD! You should have manners now say Please }
on *:text:*no:#: { .msg $chan I wasn't going to give you one any way... }
on *:text:*please*:#: { .msg $chan Ummm... Okay
describe $chan Gives $nick a cookie }

Comments

Sign in to comment.
blackvenomm666   -  Jun 21, 2011

O_O i completely agree with both napa and jethro but i'll give you small pointers anyways

on *:text:*please*:#: 

ok in an on text for something like this you do NOT want to use wildcard matches for the word the dual 's need to go. if your trying to strip color with them which idk if you are or not but if you are you can do it a better way

on *:text:*:#: {
tokenize 32 $strip($1-)
 if ($1 == please) {
commandshere

furthermore you can easily combine all these on text statements into one making it look nicer

on *:text:*:#: {
  tokenize32 $strip($1-)
  if ($1 == hello) {
    .msg $chan Hello $nick you can say hello all you want... Do you want an cookie now? Yes or No 
  }
  elseif ($1 == hey) {
    .msg $chan Hey $nick you can say hey all you want... Do you want a cookie now? Yes or No 
  }
  elseif ($1 == hi) {
    .msg $chan Hi $nick you can say hi all you want... Do you want a cookie now? Yes or No 
  }
  elseif ($1 == yes) {
    .msg $chan TO BAD! You should have manners now say Please 
  }
  elseif ($1 == no {
    .msg $chan I wasn't going to give you one any way...
  }
  elseif ($1 == please) { .
    msg $chan Ummm... Okay
    .describe $chan Gives $nick a cookie 
  }
}

but again i completely agree with napa and jethro. and as napa said this snippet is a good way to get you banned. but at least in the version i posted above it won't go off if someone says hi or hello or please in the middle of a sentence. only if its the first word

 Respond  
Jethro   -  Jun 21, 2011

I can imagine someone out there has published a crappy tutorial called "MSL for Newbies" somewhere, and in it, you can find literally every junk exists. Don't be a victim to read up on it!

As you can see, every once in a while, we see newcomers submit this type of snippets over and over and over and over...and seriously they're getting old and dull.

 Respond  
napa182   -  Jun 21, 2011

=/
You do know you can take some time in thinking/making a code that would be worth sharing. Or at lest make it so it don't just trigger on anything that is said within someones text, cause this snippet would get you banned for being annoying.

Also this could flood you out.

 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.