mIRC Homepage

finnial ?

Posted By: tyler22

finnial ? - 26/06/05 01:44 AM

i have one more ? its not big and it uses timers....if lets say someone said !kill and was an op the bot would kick them but would first let them read some text so how would i get it to give an amount of time before the bot kicks them.

thanx
Posted By: MikeChat

Re: finnial ? - 26/06/05 02:41 AM

on *:TEXT:!kill:#yourchan:{
if ($nick isop $chan) {
.play $nick kill.txt
.timerkill 1 35 kick $chan $nick
}
}
set the time delay by changing the 35
Posted By: tyler22

Re: finnial ? - 26/06/05 06:36 AM

thanks wat if u wanted only half ops to do something only they could do...something funny in the msg and kick to
Posted By: MikeChat

Re: finnial ? - 26/06/05 09:09 AM

I would look up the operator for it in the mIRC help files and add it in the code you were given
Quote:

If-then-else statements

The If-then-else statement allows you to compare values and execute different parts of a script based on that comparison.

Basic format

if (v1 operator v2) { commands }
elseif (v1 operator v2) { commands }
else { commands }

The ( ) brackets enclose comparisons, whereas the { } brackets enclose the commands you want to be performed if a comparison is true. You must make sure that the number of ( ) and { } brackets match to make sure that the correct comparisons are made, and that the correct commands are executed.

Using brackets speeds up processing. If an alias uses too few brackets then the statement might be ambiguous and the alias will take longer to parse, might be parsed incorrectly, or might not be parsed at all.

You can nest as many if-then-else statements as you want inside each other.



ison nickname v1 is on channel v2
isop nickname v1 is an op on channel v2
ishop nickname v1 is a halfop on channel v2
isvoice nickname v1 has a voice on channel v2
isreg nickname v1 is a normal nick on channel v2


/help ishop
Posted By: tyler22

Re: finnial ? - 26/06/05 06:44 PM

thanks ill get to work on it
© 2021 mIRC Discussion Forums