mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
#205673 28/10/08 10:25 AM
Joined: Nov 2003
Posts: 102
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Nov 2003
Posts: 102
Hey, Needing a small script that will simply say Hello to all the users as they join the channel and also ask age. A feature to add them to a list of approved people would be fantastic but also not required

So basicly on join would get a reply like

Hello USER , Welcome to #CHAN . May we have your age Please ?

Would like to add users to the list and maybe even be able to setup custom welcome messages for Known users?
And if all possible...all the commands in a pop window including the part involving custom messages maybe??

Take your time . Hope to get some good results on this


Rock and Metal Music videos ON DEMAND!
<<<<<< http://www.tormented.tv >>>>>>
ToRmEnTeD #205677 28/10/08 01:44 PM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Code:
on ^*:join:#channel: {
.msg $nick Hello $nick $+ , Welcome to #channel . May we have your age Please ?
}

Change #channel to your channel name, and place it in remote in your mirc. ALT + R will open up the script editor/remote.

you can also use:
Code:
on ^*:join:#channel: {
if ($nick == moo) .msg moo Hello $nick $+ , you are moo.
elseif ($nick == foo) .msg $nick hello $nick $+ , you aren't moo.
elseif ($nick == baa) .msg $nick hello $nick $+ , you aren't foo or moo.
else {
 .msg $nick Hello $nick $+ , Welcome to #channel . May we have your age Please ?
}
}


the . hide the message from you, not fun watch all messages sent if you are on active channel.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
sparta #205680 28/10/08 02:34 PM
Joined: Nov 2003
Posts: 102
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Nov 2003
Posts: 102
Hey thanks for the reply. I am having issues. I use 2 scripts. I use invision to chat with and i use PNP as my bot sort of speak. This code you gave me works well with invision but i cant get it to work on PNP ....Thats where i am wanting it...any ideas as to why it wouldnt work ?

This is the code as its sitting on my script at the moment
Code:
 


on ^*:join:#chat18+: {
.msg $nick Hello $nick $+ , Welcome to #chat18+ . May we have your age Please ?
}


Last edited by ToRmEnTeD; 28/10/08 03:08 PM.

Rock and Metal Music videos ON DEMAND!
<<<<<< http://www.tormented.tv >>>>>>
ToRmEnTeD #205681 28/10/08 03:11 PM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Code:
on *@:join:#: {
  if ($chan == #chat18+) {
    if ($nick == moo) { .msg moo Hello $nick $+ , you are moo. }
    elseif ($nick == foo) { .msg $nick hello $nick $+ , you aren't moo. }
    elseif ($nick == boo) { .msg $nick hello $nick $+ , you aren't foo or moo. }
    else {
      .msg $nick Hello $nick $+ , Welcome to $chan $+ . May we have your age Please ?
    }
  }
}

try this one then, tested and working for me, make sure you don't have any other on *:join: abow this code.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
sparta #205684 28/10/08 04:44 PM
Joined: Nov 2003
Posts: 102
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Nov 2003
Posts: 102
Thanks still dont work on PNP but im thinking that maybe its because i already have an onjoin event being used on that script..I have it set to auto whois on join ..not on the same files ,the 2 scripts but they are both onjoin events from the same bot/script. I am just going to host it on the Invision client. However i have another smaller problem. I dont see anything on Invision when it sends the greet to a user that just joined....How would i go about see it?


Rock and Metal Music videos ON DEMAND!
<<<<<< http://www.tormented.tv >>>>>>
ToRmEnTeD #205687 28/10/08 05:58 PM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
You could put sparta's code in a new remote file or combine it with another onjoin event you already have.

Tomao #205688 28/10/08 06:04 PM
Joined: Nov 2003
Posts: 102
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Nov 2003
Posts: 102
I am ok with the code...Just having to use it on antother script than i had planed...but all im wanting to know now is how do i change that script so i can see when my script greets someone that enters.....I dont see anything the way it is. everyone else sees it but me . I know it might be nice to know how to have it the way it is right now but for right now i would like to see it saying it


Rock and Metal Music videos ON DEMAND!
<<<<<< http://www.tormented.tv >>>>>>
ToRmEnTeD #205689 28/10/08 06:42 PM
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
To see the messages in the sending client itself, remove all the dots in front of the "msg" commands (msg <something> instead of .msg <something>).

Horstl #205691 28/10/08 07:43 PM
Joined: Nov 2003
Posts: 102
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Nov 2003
Posts: 102
Ahh ok ...and I think that was already kinda told to me but i didnt get it .Thanks for clearing that up. Works fine. Still cant figure out why its not working on PNP...I have other Onjoin scripts running like a whois onjoin and a peak users script...But they are all seperate scripts frown

Anyways thanks to all of you. Another good script smile


Rock and Metal Music videos ON DEMAND!
<<<<<< http://www.tormented.tv >>>>>>
ToRmEnTeD #205693 28/10/08 08:11 PM
Joined: Nov 2003
Posts: 102
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Nov 2003
Posts: 102
been sitting here messing with this trying to get the text it sends to channel to be ACTION/ME text. ..Cant seem to get anything to work trying it. Any thing i need to do other than change the MSG to ME or ACTION ? I even tried /ME and it didnt do anything.
Still works fine using msg tho


Rock and Metal Music videos ON DEMAND!
<<<<<< http://www.tormented.tv >>>>>>
ToRmEnTeD #205694 28/10/08 08:34 PM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
You can try /describe

/describe <nick|channel> <message>

Tomao #205696 28/10/08 09:50 PM
Joined: Nov 2003
Posts: 102
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Nov 2003
Posts: 102
Yup that worked perfect smile Thanks a million


Rock and Metal Music videos ON DEMAND!
<<<<<< http://www.tormented.tv >>>>>>
ToRmEnTeD #205761 31/10/08 10:12 AM
Joined: Nov 2003
Posts: 102
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Nov 2003
Posts: 102
Ahh im back again...Ok this script is working great for the most part... I basicly just have 2 msgs...the one asking for age and then one i have for known people that i have added. So my code is this...

Code:



on *@:join:#: {
  if ($chan == #chat18+) {
    if ($nick == AnTiSoCiaL) { /describe $chan Hey $nick $+ , Welcome Back :) }
    elseif ($nick == Zule) { /describe $Chan Hey $nick $+ , Welcome Back. :)    }
    elseif ($nick == Bad_Idea) { /describe $nick Hey $nick $+ , Welcome back :) }
    elseif ($nick == SloFlyer) { /describe $nick Hey $nick $+ , Welcome back :) }
    elseif ($nick == Merkin_Man) { /describe $nick Hey $nick $+ , Welcome back :) }
    elseif ($nick == AKASHA) { /describe $nick Hey $nick $+ , Welcome back :) }
    else {
      /describe $chan Hello $nick $+ , Welcome to $chan $+ . May we have your age Please ?
    }
  }
}



 


My problem is that when "at least" the users Bad_idea joins my script sends her a /msg instead of a /describe msg
Noone wants a PM everytime you join. It dont do it to my client "Antisocial" It seems to work fine. Anything wrong with the code that would cause this? Also a HUGE question...Could somone make this into a pop-up so i could just right click on someones nick and add them to the known list so the would get the welcome back msg and not the age question? right now im adding them by hand ...ok but kinda pain


Rock and Metal Music videos ON DEMAND!
<<<<<< http://www.tormented.tv >>>>>>
ToRmEnTeD #205762 31/10/08 12:20 PM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
How do you store the nick? in a text file or variable ?

PS
/ aren't needed in a remote script, so you don't need /describe smile

Last edited by sparta; 31/10/08 12:20 PM.

if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
ToRmEnTeD #205763 31/10/08 12:23 PM
Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Look at your code. Once you get to 'Bad Idea' you switch to /describe $nick instead of describe $chan.

Also, look u have the same command over and over.

What you want to do is create a list of nicks then if the nick is in the list, welcome them back. Otherwise ask for age.

I have to leave for work otherwise I'd write something for you. If it isn't done when I get home I'll do it, but most likely this will be taken care of.

A text file is easy for this sort of thing, but I don't like using them. I'd probably make this an ini file seperating the nicks by channel or something.





ToRmEnTeD #205764 31/10/08 12:36 PM
Joined: Jul 2008
Posts: 12
M
mOX Offline
Pikka bird
Offline
Pikka bird
M
Joined: Jul 2008
Posts: 12
Code:
on *@:join:#chat18+: {
 if $istok(AnTiSoCiaL Zule Bad_Idea SloFlyer Merkin_Man AKASHA,$nick,32) { describe $chan Hey $nick $+ , Welcome Back :) }
 else { describe $chan Hello $nick $+ , Welcome to $chan $+ . May we have your age Please ? }
}

Sorry for my short explanation, but not mastered the English blush

Last edited by mOX; 31/10/08 12:54 PM.
ToRmEnTeD #205765 31/10/08 01:00 PM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I made this for you, if i understand right you want to ask any new user there age, and if they have been on the channel 1 time before, then you just want to great them with a welcome message? here we go:
Code:
on *:join:#: {
  if ($nick != $me) && ($chan == #chat18+) {
    if (!$isfile($+(join.txt))) { write join.txt }
    if ($nick isin $read(join.txt, w, $+(*,$nick,*))) { describe $Chan Hey $nick $+ , Welcome Back. :)    }
    else {
      describe $chan Hello $nick $+ , Welcome to $chan $+ . May we have your age Please ?
      write join.txt $nick
    }
  }
}

This will create the file join.txt first time someone join the channel, then it will add the nick to the txt file, and after that it will scan the file, if a nick is in the text file. then it will just great the user, if a user are new, then it will add the user and ask for the age, and next time he join it will be a great with welcome. hope this is what you looking for.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
sparta #205769 31/10/08 02:17 PM
Joined: Nov 2003
Posts: 102
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Nov 2003
Posts: 102
Almost i am wanting a script that i can kinda just add them as we get to know them. 1 time visit could be tricked by just a quick join and part... Its really important that we be able to add them only after we are trusting of them.lots of idiots on our server


Rock and Metal Music videos ON DEMAND!
<<<<<< http://www.tormented.tv >>>>>>
ToRmEnTeD #205770 31/10/08 02:23 PM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Then remove the "write join.txt $nick" part from the script, then use this one to manual adding:
Code:
menu nicklist {
Add user:{ write join.txt $1 }
}


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
sparta #205777 31/10/08 07:22 PM
Joined: Nov 2003
Posts: 102
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Nov 2003
Posts: 102
Hi and thanks for your help. I am still very new. I think i did what you said? I removed the line and replaced it with the second bit you gave me ...Code looks like
such but i am pretty sure its my fault lol

Do you see what i did?

Code:
 


on *:join:#: {
  if ($nick != $me) && ($chan == #chat18+) {
    if (!$isfile($+(join.txt))) { write join.txt }
    if ($nick isin $read(join.txt, w, $+(*,$nick,*))) { describe $Chan Hey $nick $+ , Welcome Back. :)    }
    else {
      describe $chan Hello $nick $+ , Welcome to $chan $+ . May we have your age Please ?
      menu nicklist {
Add user:{ write join.txt $1 }
}

    }
  }
}





This is what i get in my status window...


Code:
 


[3:13pm] gazer3 (ewcflash@ewc-0f0ecf17.dsl.as9105.com) has joined. «10 people»
[3:13pm] * @ToRmEnTeD Hello gazer3, Welcome to #chat18+. May we have your age Please ?
[3:13pm] ERROR > 421: Unknown command: MENU
[3:13pm] ERROR > 421: Unknown command: ADD
[3:13pm] <@KrazyKitty> yea
[3:13pm] gazer3 (ewcflash@ewc-0f0ecf17.dsl.as9105.com) has parted. «9 people»


Rock and Metal Music videos ON DEMAND!
<<<<<< http://www.tormented.tv >>>>>>
Page 1 of 2 1 2

Link Copied to Clipboard