mIRC Home    About    Download    Register    News    Help

Print Thread
ON:TEXT case sensetive #36163 14/07/03 01:15 AM
Joined: Mar 2003
Posts: 8
static6x9 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: Mar 2003
Posts: 8
I've searched countless sites and this message board, I just can't get it right. I'm trying to right a script that will recognize a word and then play the sound, but I'd like the word case sensative I know it has to do with If-Then-Else commands but I'm clueless.

Re: ON:TEXT case sensetive #36164 14/07/03 01:21 AM
Joined: Dec 2002
Posts: 2,985
Watchdog Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
Use 'isincs' instead of 'isin'
Code:
ON *:TEXT:*:#: {
  if (WaTcHdoG isincs $1) {
    splay bark.wav
  }
}
If someone calls me by matching the case used in the script then the sound will play. If they use all lower or all upper case then it won't.

Re: ON:TEXT case sensetive #36165 14/07/03 01:26 AM
Joined: Mar 2003
Posts: 8
static6x9 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: Mar 2003
Posts: 8
Sorry that didnt work, it just sent my mirc into a endless loop that killed it, thx tho

Re: ON:TEXT case sensetive #36166 14/07/03 01:33 AM
Joined: Dec 2002
Posts: 2,985
Watchdog Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
It's tested code so you must have left out a closing brace. Try it in it's own remote file.

Re: ON:TEXT case sensetive #36167 14/07/03 01:43 AM
Joined: Mar 2003
Posts: 8
static6x9 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: Mar 2003
Posts: 8
ON *:TEXT:*:#: { if (WakeUP isincs $1) { splay C:\WINDOWS\MEDIA\Robotz Default.wav }}
I can't see it

Re: ON:TEXT case sensetive #36168 14/07/03 01:47 AM
Joined: Dec 2002
Posts: 2,985
Watchdog Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
Hmmm, you shouldn't have to for splay but try putting the filepath in inverted commas.
Code:
ON *:TEXT:*:#: {
 if (WakeUP isincs $1) {
   splay [color:red]"[/color]C:\WINDOWS\MEDIA\Robotz Default.wav[color:red]"[/color]
 }
}

Re: ON:TEXT case sensetive #36169 14/07/03 01:49 AM
Joined: Mar 2003
Posts: 8
static6x9 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: Mar 2003
Posts: 8
IM getting /if: close bracket not found in my status, to me it looks like they are all closed

Re: ON:TEXT case sensetive #36170 14/07/03 01:54 AM
Joined: Dec 2002
Posts: 2,985
Watchdog Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
How are you formatting the script? If you are doing it on a single line I would remove the outer set of braces but leave everything else. If it is over four lines then it should work as-is.

Re: ON:TEXT case sensetive #36171 14/07/03 02:01 AM
Joined: Mar 2003
Posts: 8
static6x9 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: Mar 2003
Posts: 8
Its all a straight line, I dropped the outta brackets no errors now, but no sound either I know the path is correct I tried with the "..." and adding the splay command of -w for wav I'm sorry to be a bother But hankyou for the help

Re: ON:TEXT case sensetive #36172 14/07/03 02:17 AM
Joined: Dec 2002
Posts: 2,985
Watchdog Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
It should work without the -w. There must be something else in your script that may be interfering. Make sure that there is only one ON TEXT event in each script file otherwise they will clash, usually resulting in only the first one working.

Re: ON:TEXT case sensetive #36173 14/07/03 02:23 AM
Joined: Mar 2003
Posts: 8
static6x9 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: Mar 2003
Posts: 8
All my scripts are in working order frown Thanks for your help, Ill search the net some more

Re: ON:TEXT case sensetive #36174 14/07/03 09:49 AM
Joined: Dec 2002
Posts: 1,321
H
Hammer Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
on *:TEXT:*:#: if ($1 === WakeUP) splay "C:\WINDOWS\MEDIA\Robotz Default.wav"


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Re: ON:TEXT case sensetive #36175 14/07/03 04:50 PM
Joined: Feb 2003
Posts: 282
S
saragani Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Feb 2003
Posts: 282
He wrote:

ON *:TEXT:*:#: { if (WakeUP isincs $1) { splay C:\WINDOWS\MEDIA\Robotz Default.wav }}
I can't see it


He has }}

to closing backets which doesn't have space betweek them. I think that will make his script not to work.

Re: ON:TEXT case sensetive #36176 14/07/03 06:00 PM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
WakeUp? that remins me of the old Multiplayer server MPlayer for games. You'd type it in a channel, and a wierd voice would yell "Wake up!".. Ahh, those were the days >:S


-KingTomato