mIRC Home    About    Download    Register    News    Help

Print Thread
the winner is #187885 14/10/07 05:23 PM
Joined: Feb 2007
Posts: 91
S
spermis Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Feb 2007
Posts: 91
I need a pretty small script.

so if user who is OP writes !win Batman it will msg user with nick Spiderman this - The winner is Batman.

and if OP writes !win anyotherwthing it will msg user with nick Spiderman - The winner is anyotherwthing.

i think it is very easy

Re: the winner is [Re: spermis] #187887 14/10/07 05:33 PM
Joined: Aug 2005
Posts: 525
S
schaefer31 Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
Code:
on *:TEXT:!win &:#YourChannelGoesHere:{
  if ($nick isop #) && (Spiderman ison #) {
    msg $v1 The winner is $2
  }
}

Re: the winner is [Re: schaefer31] #187889 14/10/07 07:03 PM
Joined: Aug 2005
Posts: 1,052
L
Lpfix5 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Originally Posted By: schaefer31
Code:
on *:TEXT:!win &:#YourChannelGoesHere:{
  if ($nick isop #) && (Spiderman ison #) {
    msg $v1 The winner is $2
  }
}


if ($nick isop #) is not needed

on @:TEXT:!win*:#yourchannel:{ if spiderman ison # msg $v1 The winner is $2 }


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Re: the winner is [Re: Lpfix5] #187891 14/10/07 07:29 PM
Joined: Aug 2005
Posts: 525
S
schaefer31 Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
It is needed and the @ prefix is not a substitute for it. Read the first post a little closer. Also "!win &" instead of "!win*" is more appropriate in this case.

Re: the winner is [Re: Lpfix5] #187898 14/10/07 08:29 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
As schaefer mentioned, @ isn't a substitute for "if ($nick isop $chan)". @ is a substitute for "if ($me isop $chan)".


Invision Support
#Invision on irc.irchighway.net
Re: the winner is [Re: Riamus2] #187913 15/10/07 12:51 AM
Joined: Aug 2005
Posts: 1,052
L
Lpfix5 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Hmph I should get on the ball of on text events back again huh


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Re: the winner is [Re: Lpfix5] #187959 15/10/07 07:20 PM
Joined: Feb 2007
Posts: 91
S
spermis Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Feb 2007
Posts: 91
thanks everyone.