mIRC Home    About    Download    Register    News    Help

Print Thread
#209799 23/02/09 07:41 PM
Joined: Mar 2008
Posts: 33
S
starr Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Mar 2008
Posts: 33
I have the following in my bot: on *:text:!Beach:#: {
msg $chan 0,12The bartender sees that you have ordered a ~Sex On The Beach~ and takes a highball glass and fills it 1/2 full of ice, then adds 1 1/4 ounces of vodka and one ounce of strawberry schapps and fills to near top with orange ju1/4 ounce of cream and stirs...be careful where you get that sand, $nick !
} This works fine, but I want to be able to "give the drink" to another chatter, not just myself. I think the code is msg $active, but not sure and can't seem to make it work. Any help would be appreciated...thank you

starr #209800 23/02/09 08:58 PM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
The syntax is: !beach <the nick of whom he or she wishes to give the drink to>
Code:
on *:TEXT:*:#: {
  if (!$2) { msg # please type !beach <nick here> }
  elseif ($1 == !beach) {
    msg # 0,12The bartender sees that you have ordered a ~Sex On The Beach~ and takes a highball glass and fills it 1/2 full of ice, then adds 1 1/4 ounces of vodka and one ounce of strawberry schapps and fills to near top with orange ju1/4 ounce of cream and stirs...be careful where you get that sand, $2 $+ !
  } 
}

Tomao #209804 23/02/09 10:30 PM
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Uhm:
Code:
on *:TEXT:*:#: {
  if (!$2) { msg # please type !beach <nick here> }
  ...
}
...makes the script reply to every single word, like "hello".

Code:
on *:text:*:#: {
  if ($1 == !beach) {
    msg $chan The bartender [...] where you get that sand, $iif(($2 ison $chan),$2,$nick) $+ !
  }
}
With $iif(($2 ison $chan),$2,$nick) you will address the nickname given as 2nd word if provided and being a valid nick, else address the triggering nickname.

Horstl #209810 23/02/09 10:57 PM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Ouch, my bad. Thanks Horstl for the revision. So the correct one should look like this:
Code:
on *:text:*:#: {
  if ($1 == !beach) {
    msg # 0,12The bartender sees that you have ordered a ~Sex On The Beach~ and takes a highball glass and fills it 1/2 full of ice, then adds 1 1/4 ounces of vodka and one ounce of strawberry schapps and fills to near top with orange ju1/4 ounce of cream and stirs...be careful where you get that sand, $iif($2,$v1,$nick) $+ !
  } 
}


Link Copied to Clipboard