mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
#138792 07/01/06 03:11 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Try this
Code:
on *:text:Bartender*:#:{
  if (cola isin $1-) || (7-up isin $1-) || (RootBeer isin $1-) || (wine isin $1-) {
    drinks $chan $v1 $2-
  }
}
alias drinks {
  var %nicknum = $nick($1,0), %nick1 = 1
  while (%nicknum >= %nick1) {
    if ($nick($1,%nick1) isin $3-) {
      var %nicklijst = $addtok(%nicklijst,$nick($chan,%nick1),32)
    }
    inc %nick1
  }
  var %file = $iif((I isin $3-) || (me isin $3-) || (myself isin $3-),ik,$iif(%nicklijst,ijst))
  $read($+(bar\,$2,%file,.txt),t)
}
  


NOTE: needs files named appropriately for the different drinks.

#138793 07/01/06 03:35 PM
Joined: Feb 2005
Posts: 344
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Feb 2005
Posts: 344
nicely done but on my last post i had 3 different txt files per drink.
This is for the 3 different ways people can order.
example:
1- a person orders a drink for himself.
2- a person orders a drink for himself and for some friends
3- a person orders a drink only for his friends

a person ordering for himself doesn't want a respond witch is for ordering drinks for his friends.
Every file contains multiple responds.
In the txt file I start the lines with msg $chan or describe $chan so your option can be done but then I have to add $iif's to the responds if i'm not mistaking.

Page 2 of 2 1 2

Link Copied to Clipboard