mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2006
Posts: 95
B
blk Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Feb 2006
Posts: 95
Its used - !warn <nick> <warn time> <reason>
Code:
on *:TEXT:!warn *:*:{
  if ($nick == %logged.in.nick) set %warned.1 $2
  set %reason $4-
  /timer1 1 $3 .ban -ku $+ 30 $chan $2 $4-
  .msg $chan $2 is being warned because of %reason,they need to say sorry or they will be kbed for 30 secs in $3 seconds...
  .notice $2 you better say sorry, or you will be kicked...
}
on *:TEXT:sorry:#:{
  if ($nick == %warned.1) /timer1 off
  .msg $chan %warned.1 says they're sorry for %reason
  .notice %warned.1 Next time there will be no warning... Just a KB!
}

I made that warned kick thing.. simple...
But anybody can use it mad
Wats wrong with it confused
The %logged.in.nick is set too crazy


-blk-
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Your forgot the braces

Code:
 on *:TEXT:!warn *:*:{
  if ($nick == %logged.in.nick) [color:red]{[/color] 
  set %warned.1 $2
  set %reason $4-
  /timer1 1 $3 .ban -ku $+ 30 $chan $2 $4-
  .msg $chan $2 is being warned because of %reason,they need to say sorry or they will be kbed for 30 secs in $3 seconds...
  .notice $2 you better say sorry, or you will be kicked...
[color:red]}[/color] 
}
on *:TEXT:sorry:#:{
  if ($nick == %warned.1) [color:red]{[/color] 
   /timer1 off
  .msg $chan %warned.1 says they're sorry for %reason
  .notice %warned.1 Next time there will be no warning... Just a KB!
 [color:red]}[/color] 
} 


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
Yep, I already explained that for a similar problem you had here: https://forums.mirc.com/s...p;page=0#149376

I'm guessing you didn't read it yet :tongue:

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Quote:
/timer1 1 $3 .ban -ku $+ 30 $chan $2 $4-
/timer1 off


Two things here,
The first is simply that you dont need / or // within a script. Simply put mirc always treats every command in a script as if it is //
The second thing, far more important is it is incredibly BADFORM to use a number as a timer name, doubly so to use "1" since this well overwrite the first unnamed timer in your system. name a timer anything but just a number, as there are also access problems to timers named as numbers when useing $timer(). I Suggest ....
TIMERwarner 1 $3 .ban -ku $+ 30 $chan $2 $4-
TIMERwarner off

Joined: Feb 2006
Posts: 95
B
blk Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Feb 2006
Posts: 95
Oh, Im new to timers...
Thanks...
and still getting used to scripting with ifs..


-blk-

Link Copied to Clipboard