mIRC Home    About    Download    Register    News    Help

Print Thread
#99014 28/09/04 02:34 PM
Joined: Sep 2004
Posts: 10
D
devve Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Sep 2004
Posts: 10
When a person write this msg in a channel:
orange apple pear'd 6am
i have this in my script:
(pear'd 5am isin $1-) || (pear'd 6am isin $1-) || (pear'd 7am isin $1-)
but it doesnt work, whats wrong? does the ' [censored] the isin up or have I write it differnt in script?

#99015 28/09/04 02:39 PM
Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
That should work just fine, i.e.

alias testme {
if (pear'd 5am isin $1-) || (pear'd 6am isin $1-) || (pear'd 7am isin $1-) {
echo woo
}
}

syntax; /testme orange apple pear'd 6am

Something might be interfering with it.

Eamonn.;

#99016 28/09/04 03:04 PM
Joined: Sep 2004
Posts: 10
D
devve Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Sep 2004
Posts: 10
forgot to tell that I have also this in my line:
(orange isin $1-) && (apple isin $1-) && (pear'd 5am isin $1-) || (pear'd 6am isin $1-) || (pear'd 7am isin $1-)

is that why it dont wrk? im using this in remote

Last edited by devve; 28/09/04 03:13 PM.
#99017 28/09/04 03:11 PM
Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
Firstly, your missing the 'isin' in the apple/orange statements.. however mixing || and &&'s will get confusing the line you most likely want is;

if (((orange isin $1-) && (apple isin $1-)) && ((pear'd 5am isin $1-) || (pear'd 6am isin $1-) || (pear'd 7am isin $1-))) {

Eamonn.

#99018 28/09/04 03:33 PM
Joined: Sep 2004
Posts: 10
D
devve Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Sep 2004
Posts: 10
ye tested that now too but it still doesnt wrk, that u gave me in alias wrk but not in remote, really strange

#99019 28/09/04 04:39 PM
Joined: Sep 2004
Posts: 10
D
devve Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Sep 2004
Posts: 10
isnt it possible to make some identifier that have 6,7,8 and return those number in
if (pear'd $identifieram isin $1-)
so that line is both
pear'd 6am
pear'd 7am
pear'd 8am

#99020 28/09/04 05:01 PM
Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
if ((*pear'd* iswm $1-) && ($istok(6 7 8,$remove($wildtok($1-,?am,1,32),am),32))) {
[color:red]commands

}
[/color]
maybe a solution, if you want an overview of what it does;

It checks if pear'd iswm the sentence (wildcard string v1 matches string v2), after that it finds a word that matches wildtok, '?am' (? stands for a single character, any character), followed by 'am', seperated by spaces, if its found, it removes 'am' leaving just the first character, checks if that character is 6 7 8.

Eamonn.


Link Copied to Clipboard