Bot Greet Code

By slacker on Apr 01, 2009

This is to let users add there own greet per channel the bot is on. So users can have different greets in different channels.

copy and paste the code in a new remote of a bot.

The Bot must be +o in the channel. If not you can remove the " @ " here -> on $@:TEXT: and here -> on @:JOIN:#:
then right click either in the channel or ur menubar to turn on/off

to add a greet type " @addgreet " in the channel you want that greet to be displayed.

to delete a greet type " @delgreet " in the channel that you have the greet you want to delete.

Enjoy....

#Greet on
on $@*:TEXT:/^@((add|del)?greet)?(.+)/iS:#: {
  if (addgreet = $regml(1) && $regml(3)) { if ($hget(Greet,$+($wildsite,.,#))) { .notice $nick 4 $nick 14you all ready have a greet. Delete it first !delgreet } | else { .hadd -m Greet $+($wildsite,.,#) $regml(3) | .notice $nick $+(4,$nick,$chr(44)) Your Personal Greet Has Been Set To: $+(14,$regml(3),.)  } }
  elseif (delgreet = $regml(1) && !$regml(3)) { if ($hget(Greet,$+($wildsite,.,#))) { .hdel Greet $+($wildsite,.,#) | .notice $nick 4 $nick 14Ur Personal Greet has been deleted. } }
}
on @*:JOIN:#: { if ($hget(Greet,$+($wildsite,.,#))) {  msg # $+(14[4,$nick,14],$chr(32),",$v1,")  } }
#Greet End
on *:disconnect:{ .hsave Greet $qt($scriptdirGreet.hsh) } 
on *:exit:{ .hsave Greet $qt($scriptdirGreet.hsh) }
on *:start:{ if (!$hget(Greet)) { .hmake Greet 10 | .hload Greet $qt($scriptdirGreet.hsh) } }
on *:load:{ if (!$hget(Greet)) { .hmake Greet 10 | .hload Greet $qt($scriptdirGreet.hsh) } }
menu Channel,menubar {
  .Turn Greet $iif($group(#Greet).status = On,Off,On): $iif($group(#Greet).status = On,.disable,.enable) #Greet
}

Comments

Sign in to comment.
napa182   -  Oct 26, 2010

Sir_Poeta Said:

quiero llegar a saber tanto de IRC Scripting como todos ustedes jaja

@Sir_Poeta just keep learning and playing with mirc codes and you will be.

 Respond  
Sir_Poeta   -  Oct 26, 2010

quiero llegar a saber tanto de IRC Scripting como todos ustedes jaja

 Respond  
slacker   -  May 15, 2009

yeah i changed it to use $wildsite so it will go by addy.

 Respond  
greenlanter420   -  Apr 03, 2009

what about making it off address so it follows the person no matter what nickname they use?

 Respond  
slacker   -  Apr 01, 2009

Thank you Kirby.

 Respond  
Kirby   -  Apr 01, 2009

Ah, finally slacker posts a snippet. :|
But I finally found what I was looking for, a greeting system that uses hash tables. :>
Looks good slacker.

 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.