This is an update of my script 'Sky's Script'.
Acknowledgments:
Changelog:
Overall list of Functions:
Instructions on Installing and Configuring:
1) Copy the code.
2) Press Alt + R.
3) Goto File > New.
4) Paste the code.
5) Press Ok.
6) Goto Right Click > Sky's Script on a channel or private message window.
7) Follow the instructions provided in the dialog from there on.
raw *:*:{
if ($event isin $readini(skyscript.ini, data, Numeric_Event_Blocker)) { halt }
}
on >=*:KICK:#: {
if ($knick == $me) && ($readini(skyscript.ini, status, Rejoin_if_Kicked) == 1) { join $chan }
}
on >=*:BAN:#: {
if ($readini(skyscript.ini, status, Auto-Unban) == 1) {
if ($remove($banmask,*!*@) isin $address($me,2) || $replace($ip,.,-) isin $banmask || $me $+ ! isin $banmask) { skyscript ban }
}
}
on *:ACTION:*:#:{
if ($readini(skyscript.ini, status, Action_Revenge) == 1) && ($me isin $1-) {
inc -u2 %sky.action.spam
if (%sky.action.spam < 2) { describe $chan $replace($1-,$me,$nick) }
}
}
on *:INVITE:#:{
if ($readini(skyscript.ini, status, Join_on_Invite) == 1) { join $chan }
if ($readini(skyscript.ini, status, Thank_Inviters) == 1) && ($readini(skyscript.ini, data, Thank_Inviters) != $null) { notice $nick $readini(skyscript.ini, data, Thank_Inviters) }
}
on *:DEVOICE:#:{ if ($readini(skyscript.ini, status, Re-Promote) == 1 && $vnick == $me) { msg ChanServ voice $chan $me } }
on *:DEHELP:#:{ if ($readini(skyscript.ini, status, Re-Promote) == 1 && $hnick == $me) { msg ChanServ halfop $chan $me } }
on *:DEOP:#:{ if ($readini(skyscript.ini, status, Re-Promote) == 1 && $opnick == $me) { msg ChanServ op $chan $me } }
on *:JOIN:#:{
if ($nick == $me && $readini(skyscript.ini, status, Channel_Greeting) == 1) && ($readini(skyscript.ini, data, Channel_Greeting) != $null) { msg $chan $readini(skyscript.ini, data, Channel_Greeting) }
elseif ($readini(skyscript.ini, status, Auto-Voice) == 1) && ($wildtok($readini(skyscript.ini, data, Auto-Voice), $chan, 0, 32) > 0) { mode $chan +v $nick }
}
on *:TEXT:*:#:{
if ($readini(skyscript.ini, status, Name_Alert) == 1 && $chan != $active && $chan != $null && $me isin $1-) {
echo -a 5 $+ $nick said your name in $chan -> (Original Message: $1- $+ )
beep
}
}
menu Channel,Query {
Pastebin { run notepad.exe scripts/pastebin.txt }
Sky's Script { dialog -m ssii ssii }
}
dialog ssii {
title "Sky's Script"
size -1 -1 125 150
option dbu
text "Double click an item on the menu below to modify the settings for that feature." 1,5 5 115 20
combo 2,5 25 115 120, vsbar
button "Menu" 3, 46 136 25 12
button "Ok" 4, 72 136 25 12
button "Cancel" 5, 98 136 25 12
text "Description" 6, 5 5 115 40
box "Enable Feature" 7, 5 45 115 25
button "On" 8, 10 55 30 10
button "Off" 9, 40 55 30 10
box "..." 10, 5 75 115 25
edit "..." 11, 10 85 105 10, %sky.data
}
on *:dialog:ssii:*:*: {
var %sky.edit = Thank Inviters Channel Greeting Numeric Event Blocker Auto-Voice
if ($devent == init) {
didtok $dname 2 44 Auto-Unban,Revenge Ban,Name Alert,CTCP Blocker,Re-Promote,Thank Inviters,Rejoin if Kicked,Join on Invite,Channel Greeting,Action Revenge,Numeric Event Blocker,Auto-Voice,--------------------,About this Script
did -h ssii 3,4,5,6,7,8,9,10,11
}
if ($devent == sclick) {
if ($did == 3) { dialog -c ssii ssii | dialog -m ssii ssii }
if ($did == 8) { set %sky.dialog 1 | did -e ssii 9 | did -b ssii 8 }
if ($did == 9) { set %sky.dialog 0 | did -e ssii 8 | did -b ssii 9 }
if ($did == 4) {
if (%sky.dialog != $null) {
if ($did(ssii,2) == CTCP Blocker) {
writeini skyscript.ini status $replace($did(ssii,2),$chr(32),$chr(95)) %sky.dialog
unset %sky.dialog
dialog -c ssii ssii
$iif($readini(skyscript.ini, status, CTCP_Blocker) == 1,/ignore -t *!*@,/ignore -r *!*@)
}
else {
set %sky.feat $did(ssii,2)
writeini skyscript.ini status $replace($did(ssii,2),$chr(32),$chr(95)) %sky.dialog
dialog -c ssii ssii
writeini skyscript.ini data $replace(%sky.feat,$chr(32),$chr(95)) %sky.data
unset %sky.dialog %sky.feat %sky.data
}
dialog -m ssii ssii
}
else { dialog -c ssii ssii }
}
if ($did == 5) { unset %sky.dialog | dialog -c ssii ssii }
}
if ($devent == close) { unset %sky.dialog }
if ($devent == dclick) {
if ($readini(skyscript.ini,status,$replace($did(ssii,2),$chr(32),$chr(95))) == $null) { writeini skyscript.ini status $replace($did(ssii,2),$chr(32),$chr(95)) 0 }
if ($did(ssii,2) != $null && $did(ssii,2) != --------------------) {
dialog -t ssii $did(ssii,2) $iif($did(ssii,2) == About this Script,$null,Settings)
did -h ssii 1,2
did -v ssii 3,4,5,6,7,8,9
$iif($readini(skyscript.ini,status,$replace($did(ssii,2),$chr(32),$chr(95))) == 1,/set %sky.dialog 1,/set %sky.dialog 0)
$iif($readini(skyscript.ini,status,$replace($did(ssii,2),$chr(32),$chr(95))) == 1,/did -b ssii 8,/did -b ssii 9)
}
if ($did(ssii,2) isin %sky.edit) { did -v ssii 10,11 }
if ($did(ssii,2) == Auto-Unban) { did -a ssii 6 The 'Auto-Unban' feature will unban you if you are banned (assuming you have the power to unban yourself). }
if ($did(ssii,2) == Revenge Ban) { did -a ssii 6 The 'Revenge Ban' feature will ban the person who banned you if you are banned (assuming you have the power to do so). *Note: 'Auto-Unban' must be enabled. }
if ($did(ssii,2) == Name Alert) { did -a ssii 6 The 'Name Alert' feature will alert you with a message and beeping when somebody says your name. *Note: No alert will be given if your name was said in a query window or the channel you are viewing. }
if ($did(ssii,2) == CTCP Blocker) { did -a ssii 6 The 'CTCP Blocker' will tell mIRC not to send a reply when somebody sends a CTCP ping, version, time, or finger. *Note: This requires your ignore list to be enabled. }
if ($did(ssii,2) == Re-Promote) { did -a ssii 6 The 'Re-Promote' feature will ask ChanServ to promote you if your status is removed, e.g. operator status. *Note: ChanServ must exist on the network you are on and have the commands VOICE, HALFOP, and OP. }
if ($did(ssii,2) == Thank Inviters) { did -a ssii 6 The 'Thank Inviters' feature will thank users that invite you to a channel. | did -a ssii 10 Enter Your 'Thank You' Message | did -o ssii 11 1 $readini(skyscript.ini, data, Thank_Inviters) }
if ($did(ssii,2) == Rejoin if Kicked) { did -a ssii 6 The 'Rejoin if Kicked' feature will make you rejoin any channels you have been kicked from. *Note: This may infuriate some channel operators who will use this as a reason for a ban. }
if ($did(ssii,2) == Join on Invite) { did -a ssii 6 The 'Join on Invite' feature will make you join any channels you are invited to. }
if ($did(ssii,2) == Channel Greeting) { did -a ssii 6 The 'Channel Greeting' feature will send your custom greeting when you enter any channels. | did -a ssii 10 Enter Your Custom Greeting | did -o ssii 11 1 $readini(skyscript.ini, data, Channel_Greeting) }
if ($did(ssii,2) == Action Revenge) { did -a ssii 6 The 'Action Revenge' feature will reply whenever somebody does an action using your name. }
if ($did(ssii,2) == Numeric Event Blocker) { did -a ssii 6 The 'Numeric Event Blocker' is an advanced feature that allows you to block server messages by their number. *Note: Please seperate the numbers by a space, e.g. "311 378 318". | did -a ssii 10 Enter Numberic Events Here | did -o ssii 11 1 $readini(skyscript.ini, data, Numeric_Event_Blocker) }
if ($did(ssii,2) == Auto-Voice) { did -a ssii 6 The 'Auto-Voice' feature will automatically voice any users that enter the channels you specify below. *Note: Seperate all channel names with a space. | did -a ssii 10 Enter Channels Here | did -o ssii 11 1 $readini(skyscript.ini, data, Auto-Voice) }
if ($did(ssii,2) == About this Script) { did -h ssii 7,8,9 | did -b ssii 5 | did -a ssii 6 Sky's Script II by vSkyzv (November 29, 2008) }
}
}
alias skyscript {
if ($1 == $null) { echo -a No SKYSCRIPT parameters specified. }
elseif ($1 == ban) { $iif($readini(skyscript.ini, status, Revenge_Ban) == 1,$iif($address($nick,2) != $address($me,2),/mode $chan -b+bb $banmask $nick $address($nick,2),/mode $chan -b $banmask),/mode $chan -b $banmask) }
else { echo -a $+ $1 $+ is an invalid SKYSCRIPT command. }
}
any reason for the huge dialog? are you going to be adding more to it?
on this
did -a config 1 Ban: Unban when Banned
did -a config 1 Ban: Revenge Ban
did -a config 1 Join: Rejoin when Kicked
did -a config 1 Join: Auto-join when Invited
did -a config 1 Auto-Promote: Re-promote when Demoted
did -a config 1 Alert: Notice if My Name is Said
did -a config 1 Greetings: Display Greeting when Entering a Channel
did -a config 1 Auto-Reply: Action Revenge
did -a config 1 Auto-Reply: Give a 'Thank You' when Invited
you can shorten it up with didtok
didtok $dname 1 44 Ban: Unban when Banned,Ban: Revenge Ban,Join: Rejoin when Kicked,Join: Auto-join when Invited,Auto-Promote: Re-promote when Demoted,Alert: Notice if My Name is Said,Greetings: Display Greeting when Entering a Channel,Auto-Reply: Action Revenge,Auto-Reply: Give a 'Thank You' when Invited
as well on this
did -h config 10
did -h config 9
did -h config 7
could be
did -h config 7,9,10
also maybe add some error check's as well