mIRC Homepage
Posted By: blk Announce Power - 09/02/06 09:03 AM
I was making a bunch of scripts about announcing power
to the room (like Op) i came up with a bunch, but I was wondering if theres a way to do them all in one script...

and i also dont know how to do halfop

Example of Op code..
Code:
 on @1:OP:#:if ($opnick == $me) { .msg $chan wow, Oped! } 
Posted By: RusselB Re: Announce Power - 09/02/06 10:42 AM
Your example would work fine in most situations.
For half-op, use ON HELP rather than ON OP
For voices ON VOICE

If you also have code for the removal, then you want ON DEOP, ON DEHELP, and ON DEVOICE.

Also, don't forget that if the server ops someone in the channel, the ON OP command won't catch it. You have to use ON SERVEROP for those
Posted By: blk Re: Announce Power - 09/02/06 11:54 AM
Ok, i came up with 6 scripts
Code:
on @1:OP:#:if ($opnick == $me) { .msg $chan wow, Oped! }
on @1:DEOP:#:if ($deopnick == $me) { .msg $chan man, DeOped! }
on @1:HELP:#:if ($hnick == $me) { .msg $chan wow, HalfOped! }
on @1:DEHELP:#:if ($dehnick == $me) { .msg $chan man, DeHalfOped! }
on @1:VOICE:#:if ($vnick == $me) { .msg $chan wow, Voiced! }
on @1:DEVOICE:#:if ($devnick == $me) { .msg $chan man, DeVoiced! }
 

When i get the powers, it says the message, but it seems I have to be Oped...
and the DePowers dont leave a message...
Posted By: bwr30060 Re: Announce Power - 09/02/06 04:10 PM
I haven't tested this, but maybe it's because this script is told only to perform if you're opped. Maybe change it to this.
Code:
on 1:OP:#:if ($opnick == $me) { .msg $chan wow, Oped! }
on 1:DEOP:#:if ($deopnick == $me) { .msg $chan man, DeOped! }
on 1:HELP:#:if ($hnick == $me) { .msg $chan wow, HalfOped! }
on 1:DEHELP:#:if ($dehnick == $me) { .msg $chan man, DeHalfOped! }
on 1:VOICE:#:if ($vnick == $me) { .msg $chan wow, Voiced! }
on 1:DEVOICE:#:if ($devnick == $me) { .msg $chan man, DeVoiced! }
 
Posted By: blk Re: Announce Power - 09/02/06 04:22 PM
Ya, im an idiot...
That works but the DePowers don't work still...

for reference:
Code:
on 1:OP:#:if ($opnick == $me) { .msg $chan wow, Oped! }
on 1:DEOP:#:if ($deopnick == $me) { .msg $chan man, DeOped! }
on 1:HELP:#:if ($hnick == $me) { .msg $chan wow, Half-Oped! }
on 1:DEHELP:#:if ($dehnick == $me) { .msg $chan man, DeHalf-Oped! }
on 1:VOICE:#:if ($vnick == $me) { .msg $chan wow, Voiced! }
on 1:DEVOICE:#:if ($devnick == $me) { .msg $chan man, DeVoiced! } 
Posted By: bwr30060 Re: Announce Power - 09/02/06 04:51 PM
Code:
on 1:OP:#:if ($opnick == $me) { .msg $chan wow, Oped! }
on 1:DEOP:#:if ($opnick == $me) { .msg $chan man, DeOped! }
on 1:HELP:#:if ($hnick == $me) { .msg $chan wow, Half-Oped! }
on 1:DEHELP:#:if ($hnick == $me) { .msg $chan man, DeHalf-Oped! }
on 1:VOICE:#:if ($vnick == $me) { .msg $chan wow, Voiced! }
on 1:DEVOICE:#:if ($vnick == $me) { .msg $chan man, DeVoiced! } 
Posted By: Jigsy Re: Announce Power - 09/02/06 05:37 PM
Since people like to flood these scripts off ...

Code:
on 1:OP:#:if (!%antiflood) { if ($opnick == $me) { .msg $chan wow, Opped! | set -u7 %antiflood } }
on 1:DEOP:#:if (!%antiflood) { if ($opnick == $me) { .msg $chan man, DeOpped! | set -u7 %antiflood } }
on 1:HELP:#:if (!%antiflood) { if ($hnick == $me) { .msg $chan wow, Half-Opped! | set -u7 %antiflood } }
on 1:DEHELP:#:if (!%antiflood) { if ($hnick == $me) { .msg $chan man, DeHalf-Opped! | set -u7 %antiflood } }
on 1:VOICE:#:if (!%antiflood) { if ($vnick == $me) { .msg $chan wow, Voiced! | set -u7 %antiflood } }
on 1:DEVOICE:#:if (!%antiflood) { if ($vnick == $me) { .msg $chan man, DeVoiced! | set -u7 %antiflood } }
Posted By: schaefer31 Re: Announce Power - 09/02/06 07:22 PM
WIth that code, !%antiflood will always be null, making the initial check useless. You need to assign some value (other than 0) to %antiflood in order for it to work properly.
Posted By: Jigsy Re: Announce Power - 09/02/06 09:19 PM
Simple typo :x

and I can't edit the post now smirk
Posted By: blk Re: Announce Power - 09/02/06 09:22 PM
Ok, sweet....
© mIRC Discussion Forums