mIRC Home    About    Download    Register    News    Help

Print Thread
#142190 16/02/06 03:04 PM
Joined: Feb 2006
Posts: 95
B
blk Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Feb 2006
Posts: 95
Ok.. This is the final warned script...
Code:
on *:TEXT:!warn *:*:{
  if ($nick == %logged.in.nick) {
    set %warned.1 $2
    set %reason $4-
    TIMERwarner 1 $3 .ban -ku $+ 30 $chan $2 $4-
    .msg $chan 4 $2 2is being warned because they're3 %reason 2,they need to say 7sorry 2or they will be kbed for 30 secs in10 $3 seconds...
    .notice %warned.1 2You better say 7sorry 2, or you will be kicked...
  }
}
on *:NICK:{
  if ($nick == %warned.1) {
    set %warned.1 $newnick
    .notice %warned.1 2If that was to get out of this, it didn't work...
  }
}
on *:TEXT:sorry:#:{
  if ($nick == %warned.1) {
    TIMERwarner off
    .msg $chan 4 %warned.1 2says they're sorry for3 %reason
    .notice %warned.1 2 You were warned because you were3 %reason 2, dont do it again...
    .notice %warned.1 2Next time there will be no warning... Just a KB!
  }
}

Is there anyway to unset %warned.1 without messing up the them saying sorry part?

Last edited by blk; 16/02/06 03:07 PM.

-blk-
#142191 16/02/06 03:09 PM
Joined: Feb 2006
Posts: 95
B
blk Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Feb 2006
Posts: 95
Hmm... I just tested it.. sumwhere the nick change is messed up..

[edit]My bad, it works, just had a typo...

Last edited by blk; 16/02/06 03:13 PM.

-blk-
#142192 16/02/06 03:14 PM
Joined: Feb 2006
Posts: 31
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Feb 2006
Posts: 31
it wont work on my bot confused

if i say !warn he does nothing

Last edited by shadow007; 16/02/06 03:15 PM.

if someone has some nice scrips send them to
Triforce-wisdome@hotmail.com
#142193 16/02/06 03:16 PM
Joined: Feb 2006
Posts: 95
B
blk Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Feb 2006
Posts: 95
you have to type !warn <nick> <time to be warned> <reason>


-blk-
#142194 16/02/06 03:19 PM
Joined: Feb 2006
Posts: 95
B
blk Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Feb 2006
Posts: 95
Ok, now that that typo's fixed it works grin
But I need to get %warned.1 unset
Everytime that %warned.1 changes their name after the warning, they get the on *:NICK: message...


-blk-
#142195 16/02/06 03:24 PM
Joined: Feb 2006
Posts: 31
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Feb 2006
Posts: 31
if i type on my bot !warn shadow 30 test it wont work
if i type on shadow !warn !warn mirc 30 test it wont work
if i type on shadow !warn shadow 30 test it wont work



mirc is my bot name
shadow is my name
c is a channel bot


if someone has some nice scrips send them to
Triforce-wisdome@hotmail.com
#142196 16/02/06 04:28 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Code:
alias doban {
  ban -ku30 $1-2 $3-
  unset %warned.1
}


Now in the script you would use:

TIMERwarner 1 $3 doban $chan $2 $4-

You could also unset %warned.1 in the part where they say sorry.

#142197 16/02/06 05:05 PM
Joined: Feb 2006
Posts: 95
B
blk Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Feb 2006
Posts: 95
With that I get-
DOBAN Unknown command


-blk-
#142198 16/02/06 05:08 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Did you put the code within the code tags into remote?

#142199 16/02/06 05:08 PM
Joined: Feb 2006
Posts: 95
B
blk Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Feb 2006
Posts: 95
Opps.. forgot to get rid of the alias part..
Thanks grin


-blk-
#142200 17/02/06 12:06 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
You had a logic problem in the script, changing nicks would infact defeat the script, as the timer was using the contents of $2 the passed nick, and not the current contents of %warned.1 at the time the timer went off.

This code should work.

Code:
on *:TEXT:!warn *:*:{
  if ($nick == %logged.in.nick) {
    set %warned.1 $2
    set %reason $4-
    TIMERwarner 1 $3 .ban -ku $+ 30 $chan [color:blue]$(%warned.1,)[/color] $4- [color:blue]$(| unset %warned.1,)[/color]
    .msg $chan 4 $2 2is being warned because they're3 %reason 2,they need to say 7sorry 2or they will be kbed for 30 secs in10 $3 seconds...
    .notice %warned.1 2You better say 7sorry 2, or you will be kicked...
  }
}
on *:NICK:{
  if ($nick == %warned.1) {
    set %warned.1 $newnick
    .notice %warned.1 2If that was to get out of this, it didn't work...
  }
}
on *:TEXT:sorry:#:{
  if ($nick == %warned.1) {
    TIMERwarner off
    .msg $chan 4 %warned.1 2says they're sorry for3 %reason
    .notice %warned.1 2 You were warned because you were3 %reason 2, dont do it again...
    .notice %warned.1 2Next time there will be no warning... Just a KB!
     [color:blue]unset %warned.1[/color]
  }
}


The first blue section replaces $2 with the $(%warned.1,) this is so the timer has the variable %warned.1 in there not the contents of $2 since changing nick would bet $2, being that it is the old nick. The $(<text>,) is needed to tell mirc, DONT evaluate <text> (in this case dont get the contents of %warned.1) but just leave it as "%warned.1".

The second blue section adds a second command to the timer "| unset %warned.1" command sepertor and unset command, both are incased in another $(<text>,) to tell mirc this is still part of the timer command, and to not cause %warned.1 to be evaluated, as it might have been

The 3rd blue bit is just unsetting the %warned.1 in the sorry section.

#142201 18/02/06 09:46 PM
Joined: Oct 2003
Posts: 9
S
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
S
Joined: Oct 2003
Posts: 9
What if this person says sorry with a smiley?:
<nick> Sorry :-(
by adding a * after the word sorry, this someone can say more than just sorry, and it still works smile

Code:
on *:TEXT:sorry*:#:{
  if ($nick == %warned.1) {
    TIMERwarner off
    .msg $chan 4 %warned.1 2says they're sorry for3 %reason
    .notice %warned.1 2 You were warned because you were3 %reason 2, dont do it again...
    .notice %warned.1 2Next time there will be no warning... Just a KB!
     unset %warned.1
  }
} 


or by adding a * in front, they can say:
<nick> I am so very sorry :-(
Code:
on *:TEXT:*sorry*:#:{
  if ($nick == %warned.1) {
    TIMERwarner off
    .msg $chan 4 %warned.1 2says they're sorry for3 %reason
    .notice %warned.1 2 You were warned because you were3 %reason 2, dont do it again...
    .notice %warned.1 2Next time there will be no warning... Just a KB!
     unset %warned.1
  }
}


But on the other hand, then they can also say:
<nick> I'm not going to say sorry! :-P
..so this have to be up to you to figure out how to get this right wink
Maybe add a line like:
Code:
if (sorry isin $1-) &amp;&amp; (not isin $1-) { kick $chan %warned.1 Appology not accepted! | halt }


--==> Wizard Suntop <==--

Link Copied to Clipboard