mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2004
Posts: 45
B
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Jun 2004
Posts: 45
Okay im trying to add a command where when you type !list you get a message PM'd to you of w/e I put in the !list text document in my bots mirc directory here is what I have on it so far..

Code:
on *:text:911 *:#chi: {
  var %u = $nick($chan,0)
  while (%u) {
    set %n $iif(%n == $null,$nick($chan,%u) $+ $chr(44),$+(%n,$nick($chan,%u),$chr(44)))
    dec %u
    if ($gettok(%n,0,44) > 9) {
      .msg $+(%n,#chi) $+(4,$2,5) Is invading our country!!
      unset %n
    }
  }
  .msg $+(%n,#chi) $+(4,$2,5) Is invading our country!!
  unset %n
}
on *:join:#CHI:/msg #CHI $+(15,$mid($nick,1,1),14,$mid($nick,2),15's) 2assets now belong to 14CHI


now keeping in mind what I said at the start of this thread I tried to add this

Code:
on *:text:*:#C.H.I: {
  if (!list isin $1) .play $nick !list.txt 2000
}


It will not work, I have a text file named !list and I even put that last code in a new remote file still no dice can anyone help? confused

Joined: Jun 2004
Posts: 45
B
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Jun 2004
Posts: 45
Sorry guys early in the morn for me my problem was with the channel its #CHI not C.H.I as in the 2nd script blush

admins feel free 2 delete

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Try just using:

Code:
on *:text:!list*:#chan: {
  [i]commands[/i] 
}


Remember that you can't trigger your own script unless you use on input.


Invision Support
#Invision on irc.irchighway.net
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
smile

Btw, my italics failed to work... forum bug?


Invision Support
#Invision on irc.irchighway.net
Joined: Sep 2004
Posts: 200
I
Fjord artisan
Offline
Fjord artisan
I
Joined: Sep 2004
Posts: 200
No, its the (code) :tongue:

Joined: Sep 2004
Posts: 200
I
Fjord artisan
Offline
Fjord artisan
I
Joined: Sep 2004
Posts: 200
you can use:
Code:
on *:text:*:#chi: {
  if ($1 == 911) && ($2 != $null) {
    var %u = $nick($chan,0)
    while (%u) {
      set %n $iif(%n == $null,$nick($chan,%u) $+ $chr(44),$+(%n,$nick($chan,%u),$chr(44)))
      dec %u
      if ($gettok(%n,0,44) > 9) {
        .msg $+(%n,#chi) $+(4,$2,5) Is invading our country!!
        unset %n
      }
    }
    .msg $+(%n,#chi) $+(4,$2,5) Is invading our country!!
    unset %n
  }
  if ($1 == !list) /.play $nick !list.txt 2000
}
on *:join:#CHI:/msg #CHI $+(15,$mid($nick,1,1),14,$mid($nick,2),15's) 2assets now belong to 14C15H14I

smile

Last edited by IR_n00b; 14/06/05 01:22 AM.
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Im sure It is faster to use matchtext matched events, since a * event will match all text to * and then those texted must be processed, were you would assume most dont match anything.

Code:
on *:join:#chi:{ $+(.timer.,$chan,[color:blue].,$nick,[/color].join.msg) 1 1 msg $chan $+(15,$mid($nick,1,1),14,$mid($nick,2),15's 2assets now belong to 14,$upper($mid($chan,2)),CHI) }
on *:text:911 *:#chi: {
  if (!$($+(%,911.,$chan,.,$nick),2)) {
    set -u90 $+(%,911.,$chan,.,$nick) $true
    var %n
    var %u = $nick($chan,0)
    while (%u) {
      var %n = $addtok(%n,$nick($chan,%u),44)
      dec %u
      if ($numtok(%n,44) > 9) || (!%u) {
        .msg $addtok(%n,$chan,44) $+(4,$2,5) Is invading our country!!
        var %n
      }
    }
  }
}
on *:text:!list:#chi: { .play -m1 $nick !list.txt 2000 }

* remove the blue section to protect against netsplit rejoin flooding also.

Joined: Sep 2004
Posts: 200
I
Fjord artisan
Offline
Fjord artisan
I
Joined: Sep 2004
Posts: 200
You made a mistake in that.
if ($numtok(%n,44) > 9) || (!%u) {
.msg $addtok(%n,$chan,44) $+(4,$2,5) Is invading our country!!
var %n
}

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Did I? Would you like to tell me where, becuase I cant see it.


Link Copied to Clipboard