mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2004
Posts: 423
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
hey guys,

been a while since i put down my irc hat, so i'm a bit rusty..

i'm trying to do an on text trigger ... i have vars set from the trigger.

Code:
ON *:TEXT:*blah*:#:{
  var %name = $strip($6)
  var %section = $strip($3)


then i have a IF statement to check for a specific match for section. but, i also want it to make a second match in the %name var from a list IE: if item in the list match txt in %name then do stuff .... so in effect its two conditions:

Code:
if ( %section == BLAH ){
 if ( list isin  %name ) {


then do stuff but not sure how to go about it..

heres what the goto loop looks like..

Code:
:race
  var %apple = blah
  var %pears = blah
  var %passionfruit = blah

  var %cherries = %blah
  var %plums  = blah

  /window -zk0 @blah | /aline -p @blah some text and vars here

  ; Line
  some  code here
} 


any help would be appreciated... thanks



Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
You've got about 99% of the work already done (if I'm understanding correctly)
Code:
on *:text:*blah*:#:{
  var %name = $strip($$6), %section = $strip($$3)
  if %section == BLAH {
    if list isin %name {
      var %apple = blah, %pears = blah, %passionfruit = blah, %cherries = %blah, %plums  = blah
      /window -zk0 @blah
      /aline -p @blah some text and vars here
      ; Line
      ;some  code here
      }
    } 
  }
}


That's the best I can do with what you provided. Hopefully it'll be enough. Suggested reading /help if/elseif/else

Joined: Aug 2004
Posts: 423
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
hmmm... ok good to know i wasn't that far off... one of my issues was how to make the list... like maybe 20-25 entries... and have it match from that..?

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
I read your original post and I have no friggin idea what you're asking for, but the words "match" and "20-25 entries" make me automatically suggest one of the following:

$read on a text file (best for single match)?
/filter on a text file (good for many matches, especially in conjunction with /play)?
$findtok on a %var (best for single match)?
$hfind on a hash table (best for single match) (loaded from an ini file maybe?)?

I apologize if none of those help, that's my automatic figure-out-what-the-user-wants mode switching on.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Link Copied to Clipboard