mIRC Home    About    Download    Register    News    Help

Print Thread
#191751 15/12/07 09:58 AM
Joined: Dec 2007
Posts: 5
W
woof Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
W
Joined: Dec 2007
Posts: 5
I made a short script, but it didnt work, I wanted it so when someone types .rape meow
The bot would respond accordingly,

Test: .rape meow
Bot: This may hurt a little ...
Bot: /me rams a huge dildo in and out of meow

I want it so 'meow' or 'nick' can be anyone, i've never got it to work, and i'm not excellent at variables.

Joined: May 2007
Posts: 89
T
Babel fish
Offline
Babel fish
T
Joined: May 2007
Posts: 89
Something like this would do it.

Code:
; Declaring an 'on text' event matching on a [i]regular expression[/i]. \S+ is the nickname entered and is captured in $regml(2).
On $*:Text:/^(\.rape\s(\S+))$/Si:#channelname:{

  ; An antiflood variable is verified if inexistant here
  If !%isbusy {
    
    ; Verifying if the $2 entered is really a nickname on the channel where the event took place.
    If ($regml(2) isreg #) {

      ; Messaging 2 delayed messages now ...
      .Timer 1 1 MSG # This may hurt a little...
      .Timer 1 3 Describe # rams a huge dildo in and out of $regml(2)
      
      ; Setting the %isbusy antiflood variable to 'active' status.
      ; Whilst this variable will exist, the bot will not reply to anyone. The -z5 switch makes that it will active for 5 seconds before unsetting itself.
      Set -z5 %isbusy processing already...
    }

    ; This need no explanation
    Else { .Timer 1 1 Notice $nick $2 not found on # }
  }
  
  ; This also need no explanation :)
  Else { .Timer 1 1 Notice $nick %isbusy please wait. }
}


Just modify #channelname and that's it.

Cordialement,


tropnul
Joined: Dec 2007
Posts: 5
W
woof Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
W
Joined: Dec 2007
Posts: 5
<User04> .rape woof
-woof- woof not found on #wellofsouls
<User04> .rape meow
-woof- meow not found on #wellofsouls

I did what you said, replace channelname with my channel.

but it keeps saying those nicknames arent in the channel when they are.

Thanks.

Last edited by woof; 15/12/07 11:10 AM.
Joined: May 2007
Posts: 89
T
Babel fish
Offline
Babel fish
T
Joined: May 2007
Posts: 89
That's bizarre because the regexp seems to be correct.

Try again by replacing this line
Code:
If ($regml(2) isreg #) {

with
Code:
If ($2 ison #) {


If this edit functions, then it's the regexp which is at fault.
And I still can't find/explain why :s.


tropnul
Joined: Dec 2007
Posts: 5
W
woof Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
W
Joined: Dec 2007
Posts: 5
It didn't work either, but thanks. Fixed it myself :P


Link Copied to Clipboard