mIRC Home    About    Download    Register    News    Help

Print Thread
#163397 29/10/06 03:07 PM
Joined: Oct 2006
Posts: 60
M
moshkin Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Oct 2006
Posts: 60
ON *:TEXT:!milk *:#:{ msg $chan bot hands $2 a glass of milk}

Someone please explain what ive done wrong?

#163398 29/10/06 03:35 PM
Joined: Apr 2006
Posts: 400
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
Quote:
ON *:TEXT:!milk *:#:{ msg $chan bot hands $2 a glass of milk}

Someone please explain what ive done wrong?


you didn't put a space after milk and before } so it should be:
Code:
on *:TEXT:!milk *:#: {
  msg $chan bot hands $2 a glass of milk
}

Activated by: !milk nick
you also might want to look at describe in this case, instead of msg, Ie:
'describe $chan hands $2 a glass of milk'

Last edited by Kurdish_Assass1n; 29/10/06 03:37 PM.

-Kurdish_Assass1n
#163399 29/10/06 03:45 PM
Joined: Oct 2006
Posts: 60
M
moshkin Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Oct 2006
Posts: 60
thnx, it works now =]

#163400 29/10/06 03:46 PM
Joined: Oct 2006
Posts: 60
M
moshkin Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Oct 2006
Posts: 60
that doesnt go how i want it to, i want it to be that u say !milk
then the reply should be, [botname] hands $2 a glass of cool milk

#163401 29/10/06 04:04 PM
Joined: Apr 2006
Posts: 400
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
use $me or the actual bots name

Last edited by Kurdish_Assass1n; 29/10/06 04:04 PM.

-Kurdish_Assass1n
#163402 29/10/06 04:18 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
try this
on *:text:!milk:#:say hands $nick a cool glass of milk.

if you are planning on having many drinks added you wont want to do it quite like that
Code:
on *:text:!drink *:#:{ msg $chan hands $nick a refreshing glass of $2 $+ . }

more optional:

on *:text:!drink *:#:{
  if ($2 == buy) {
    msg $chan here is a refreshing $4 $+ $chr(44) $3 $+ . On $nick $+ s tab.
  }
  else {
    msg $chan hands $nick a refreshing glass of $2 $+ . 
  }
}

that will respond to !drink buy name drink
like !drink buy sue cola
resonds
<botsname> here is a refreshing cola, Sue. On mmoshkins tab.
or
!drink beer
<botsname> hands moshkin a refreshing beer.

#163403 29/10/06 04:31 PM
Joined: Oct 2006
Posts: 60
M
moshkin Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Oct 2006
Posts: 60
that owns, thanks :P

#163404 29/10/06 05:12 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
an improved version that will allow a nick to make 2 requests before blocking for 5 seconds
Code:
on *:text:!bartender *:#:{
  if ($eval($+(%,floodstop.,$nick),2) &gt; 1) { return }
  else {
    if ($eval($+(%,floodstop.,$nick),2) == $null) {
      set [color:red]-u5[/color] %floodstop. $+ $nick 1
    }
    else { 
      set [color:red]-u5[/color] %floodstop. $+ $nick 2
    }
    :bartender
    if ($2 == buy) {
      describe $chan serves a refreshing $4- to $3 $+ . On $nick $+ s tab.
    }
    else {
      describe $chan serves $nick a refreshing $2- $+ . 
    }
  }
}


Change the -u5 to a higher number if you need to

#163405 29/10/06 05:17 PM
Joined: Oct 2006
Posts: 60
M
moshkin Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Oct 2006
Posts: 60
you couldnt give me an example to make it simple could you?

like

!bartender....

#163406 29/10/06 05:38 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
the functional part is the same as what i posted before

I changed !drink to !bartender otherwise the request is the same

!bartender hot coffee

!bartender buy Sue a hot tea with lemon

#163407 29/10/06 05:50 PM
Joined: Oct 2006
Posts: 60
M
moshkin Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Oct 2006
Posts: 60
thnx, that clears it up, super.


Link Copied to Clipboard