mIRC Home    About    Download    Register    News    Help

Print Thread
#141487 10/02/06 05:22 AM
Joined: Jan 2006
Posts: 40
D
DjJax Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Jan 2006
Posts: 40
on ^1:text:*como:#: {
set %resp $rand(1,10)
echo -a %resp
if $1 == como && %resp == 1 { .echo -a 07 Bienvenido al Canal }
if $1 == como && %resp == 2 { .echo -a 07 bien y vos }
if $1 == como && %resp == 3 { .echo -a 07 tu familia? }
if $1 == como && %resp == 4 { .echo -a 07 gracias ,bien y vos }
if $1 == como && %resp == 5 { .echo -a 07 te parto en ocho }
if $1 == como && %resp == 6 { .echo -a 07 cague }
}



what is wrong pals , thnx

#141488 10/02/06 05:35 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
For future reference, please use the Code Tags

For your script:
Problem #1 is the fact that your on text event requires the entry to END with como, not necessarily to start with it, which is what the first part of your IF lines requires.

Problem #2 is that the random number can be between 1 & 10 (inclusive), yet you only check for 6

Here's a suggestion for a corrected code
Code:
on 1:text:como:#:{
var %resp = $r(1,6)
if (%resp == 1) { .echo -a 07 Bienvenido al Canal }
elseif (%resp == 2) { .echo -a 07 bien y vos }
elseif (%resp == 3) { .echo -a 07 tu familia? }
elseif (%resp == 4) { .echo -a 07 gracias ,bien y vos }
elseif (%resp == 5) { .echo -a 07 te parto en ocho }
else .echo -a 07 cague
}  

#141489 10/02/06 06:17 AM
Joined: Jan 2006
Posts: 40
D
DjJax Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Jan 2006
Posts: 40
doesnt work

#141490 10/02/06 06:24 AM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Quote:
Problem #1 is the fact that your on text event requires the entry to END with como, not necessarily to start with it, which is what the first part of your IF lines requires.


I fail to see how that's a problem. Maybe he wants to match "como welcomo", for example.

Happy birthday btw smile

#141491 10/02/06 07:05 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Thanks for the birthday greetings, hixxy..and while I see your point about the problem mentioned, if that's what they want then they should use a match text of como*como not *como

#141492 10/02/06 07:10 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Make sure you don't have any other on text events that match that one. The code works perfectly in my testing. If it's not working for you, I need to know what it is that you are or aren't seeing that indicates that the script isn't working.

Also remember that if you're running the code, then someone else has to issue the command.


Link Copied to Clipboard