mIRC Homepage
hey everyone. i was wondering if anyone knows how to setup bot commands so they interact with another nick such as

instead of what i have right now:

on 1:text:!hug:#tristansroom : { describe $chan hugs $nick tightly }

which is:
gary:!hugs
bot hugs gary

it can do this:

gary:!hugs tristan
gary goes and hugs tristan tight

really grateful for any help :-) thanks. tristan
Something like this?

Code:
on *:text:*:#tristansroom: {
  if ($1 == !hug) {
    if ($2 == $null) { .notice $nick Command incomplete. Syntax: !hug <Username>.  | halt }
    if ($2 !== $null) {
      if ($2 !ison $chan) { .notice $nick Sorry but user $2 is not in $chan  | halt }
      else { .msg $chan $nick goes and hugs $2 tight! | halt }
    }
  }
}

You dont need two = in this one. !==

one = is enough. !=

And if $2 is null, then it will halt the rest of the code, so no need for != $null since it will never go there as long as $2 is $null.
Code:
on *:text:*:#tristansroom: {
  if ($1 == !hug) && ($2 != $null){ 
  .notice $nick Command incomplete. Syntax: !hug <Username>.
  if ($2 !== $null) {
    if ($2 !ison $chan) { .notice $nick Sorry but user $2 is not in $chan }
    else { .msg $chan $nick goes and hugs $2 tight! }
  }
}

Untested, but i think it will work.
when i tried it every single word said it would respond by every user. it went crazy lol

so i tried lot of words like
:text:!hug:
:text:!h:

etc and nothing worked then. didnt react to anything

am i doing it wrong or missing something?

thanks for your help its really appreciated :-)
-------------
on *:text:!hug:#tristansroom : {
if ($1 == !hug) && ($2 ison $chan) { .msg $chan $nick goes and hugs $2 tight! | halt }
if ($2 == $null) { .msg $chan $nick you must select a nickname to hug E.g. !hug $me | halt }
if ($2 !ison $chan) { .msg $chan Sorry $nick but $2 is not in this channel | halt }
}

-----------
if ($1 == !hug) && ($2 != $null)

$1 is the trigger. $2 is the nick, if you dont give a nick, then it will not work.
im typing

!hug greg

and nothing happens. nothing shows up. idk why. thanks for your help, must be me doing it wrong or something. tristan
You type? You dont type true the bot? If you do you need on input and not on text, and this greg need to be on the channel #tristansroom ..
© mIRC Discussion Forums