mIRC Home    About    Download    Register    News    Help

Print Thread
#216795 03/12/09 02:38 AM
Joined: Dec 2009
Posts: 7
P
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Dec 2009
Posts: 7
I'm needing help on making a onjoin script where ti will serve a drink upon welcuming a nick to the channel.

Drinks in a text file will be great.

Drinks will be randomly served to the nick.

Please help. mIRC scripts is not my specialty.

Pauls74462

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Code:
on *:join:#yourchannel: {
  if ($nick != $me) { msg $chan Here $nick $+ ! Have a $read(Drinks.txt) $+ . }
}


Put Drinks.txt with drinks (one per line) in your mIRC dir alone with the script and you're set.


Invision Support
#Invision on irc.irchighway.net
Joined: Dec 2009
Posts: 7
P
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Dec 2009
Posts: 7
Originally Posted By: Riamus2
Code:
on *:join:#yourchannel: {
  if ($nick != $me) { msg $chan Here $nick $+ ! Have a $read(Drinks.txt) $+ . }
}


Put Drinks.txt with drinks (one per line) in your mIRC dir alone with the script and you're set.


Thanks it works great.

It shows up as:

[22:14] <Pauls74462> Here Grult! Have a Jade Isle.

I like it to show up as:

* Pauls74462 offers Johnl8374 a Jade Isle & and toasts #Channel IRC!

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
replace msg with describe

Joined: Dec 2009
Posts: 7
P
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Dec 2009
Posts: 7
Thanks all who had input, it's working.

BTW: when I go out I'm the designated drinker! hehehe


Pauls74462

Last edited by pauls74462; 03/12/09 05:52 AM.
Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
Originally Posted By: Riamus2
Code:
on *:join:#yourchannel: {
  if ($nick != $me) { msg $chan Here $nick $+ ! Have a $read(Drinks.txt) $+ . }
}

Maybe some constructive criticism, as found in /help Event Prefixes ?
Code:
on !*:JOIN:#yourchannel: describe $chan Here $nick $+ ! Have a $read(Drinks.txt) $+ .

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
They're the same difference, except an if statement is omitted.

Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
Originally Posted By: Tomao
They're the same difference, except an if statement is omitted.

That's my whole point. ;-)
A shorter script is a happy script.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Thanks. I knew there was a prefix, but I'm at work and don't have access to the help file to remember it and it's not a check I normally have to do in my scripts, so I never remember what it is. smile


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard