MIRC Scripting

From SHellium Wiki
Jump to: navigation, search
Geographylogo.png In other languages: English | Afrikaans | Albanian | Arabic | Brazilian | Bulgarian | Catalan | Chinese | Croatian | Czech | Danish | Dutch | Esperanto | Estonian | Filipino | Finnish | Flemish | French | German | Greek | Hebrew | Hindi | Hungarian | Indonesian | Italian | Japanese | Latvian | Lithuanian | Macedonian | Malay | Malayalam | Norwegian (Bokmål) | Norwegian (Nynorsk) | Persian | Polish | Portuguese | Romanian | Russian | Serbian | Slovak | Slovenian | Spanish | Swedish | Turkish | Ukrainian | Urdu

mIRC scripts editor (built-in)

The mIRC scripting language, abbreviated as MSL, is the scripting language embedded in mIRC, a popular IRC client for Windows.

Contents

Primary uses

  • Channel and personal protection against any types of attacks (flooding, spamming, CTCP floods, etc)
  • Dialog windows can be created in mIRC to better serve user-compatibility.
    • Popular mIRC dialog extensions include MDX (Mirc Dialog Extension) and DCX (Dialog Control Extension) There are also a few versions of mdx.dll and dcx.dll modded by irc hackers.
  • Bots that provide automated IRC channel management, trivia or other games, and other desired functions for chatters
  • Commands that save typing or otherwise simplify life on IRC (such as automatically identifying as the owner of a nickname)

Script storage

Scripts are stored as either plain text files, usually with a .mrc file extension, or as INI files. They however can be stored with any extension. It can be: .exe, .script, etc. Multiple script files can be loaded at one time, although in some cases, one script will conflict with another and cause one or both of them to no longer work properly.

Language features

mIRC scripting involves a peculiar nomenclature that is not entirely consistent with most of the rest of the programming world. (Most notably, the term identifier—which in most languages refers to the name of a variable or function (whether it returns a value or not)—in mIRC refers specifically to a value returning function.)

  • Built-in functions are termed commands or, if they return a value, identifiers.
  • Custom scripted functions are called aliases. Aliases that return a value are known as custom identifiers. Both are called from the command line or other parts of a script in the same ways as built-in commands and identifiers (and can even supersede them).
  • Popups are scripted context menu items. Popups are called when they are selected by the user. The term originally referred to the menus—which pop up upon a right click. It is still used this way in the manual. But the user community (who tend not to read scripting manuals) took to calling the individual items popups—perhaps thinking of the colourful novelty actions that are popular with many users as pages of a popup book.
  • Remotes are event-handling scripts. Remotes are called when the event they handle occurs. (Rule #1 for remotes are, if the 1st script in your remotes does not work, then none of the ones after that will either, so delete it if it doesn't work)
  • All variables are dynamically typed.
  • mIRC scripts make use of sigils. Identifiers (whether custom or built-in) are preceded by $, binary variables are preceded by &, and other variables (whether local or global) are preceded by %. Commands and aliases are not preceded by any particular character (although when entered from a window's command line they must be preceded by the command prefix, usually /).

File handling

  • Scripts can read from and write to files [$read(file,[args]) | /write ]

The above is intended for singular access to the file. Because each time you issue $read or /write you open and close the file for access. Multiple accesses, during a loop for instance, is best handled through /fopen, /fwrite and /fclose. Since this opens the file only once. In some cases /filter and /savebuf is an even more efficient (non scripted loop) method.

  • Scripts can also copy and delete files. [/copy | /remove]

Binary variables

  • Contain unlimited (8192 bytes prior to mIRC 6.1) raw data
  • Globally accessible via commands and identifiers
  • Automatically unset when script returns control to mIRC (and not to another part of a script)
  • Prefixed with & (eg. &Variable)
  • Cannot be accessed other than by /bread and /bwrite, so these variables cannot be passed onto other parts of the script

Hash tables

  • May contain unlimited binary data or up to 4,150 (950 prior to mIRC 6.32) bytes of plain text. This limit is imposed by mIRC's scripting parser's own line length limitation (unless assigning a binary variable)
  • Globally accessible via commands and identifiers
  • Automatically unset when exiting mIRC as they are only stored in memory
  • Can be saved for later use
  • Not prefixed
  • Faster than accessing from a file, as hash tables are stored in memory rather than the hard disk
  • Size limited only by the computer's memory limits.
  • Allows any bucket size to be used

Global variables

  • May contain up to 4,150 (950 prior to mIRC 6.32) bytes of data including its name (however due to line-length limitations in mIRC's scripting parser, a maximum of 4,146 bytes can be assigned explicitly using /set or /var — this number decreasing as the variable's name grows longer)
  • Cannot store NUL (ASCII 0) or trailing spaces
  • Globally accessible
  • Do not automatically unset unless a switch is used (stored automatically in a mIRC initialization file)
  • Prefixed with % (eg. %Variable)
  • Created using the set command or var -g or %Variable = value notation

Local variables

  • May contain up to 4,150 (950 prior to mIRC 6.32) bytes of data including the variable name (however due to line-length limitations in mIRC's scripting parser, a maximum of 4,146 bytes can be assigned explicitly using the /set or /var commands — this number decreasing as the variable's name grows longer)
  • Can store NUL (ASCII 0) or trailing spaces
  • Are destroyed when the triggered alias or event ends
  • Prefixed with % (eg. %Variable)
  • Created using the var command. var is merely an internal alias for set -l but var poses the means to declare multiple local variables on a single line (e.g. var %a = 1, %b, %c = 2)

Limitations

  • mIRC's scripting parser only supports a maximum of 4,150 (950 prior to mIRC 6.32) characters per line (not including newlines or indentation).
  • Strings are not syntactically enclosed, creating ambiguities in code where characters meant as literal strings are treated as part of the language's syntax.
  • Each line of code is broken down into a set of space-delimited tokens. As mIRC's parser does not support null tokens and the language doesn't provide a syntax to clearly differentiate literal strings from code; Prior to mIRC version 6.2 it was impossible to pass multiple consecutive spaces to any command or alias. However, this was fixed with the introduction of the returnex command which allows the preservation of spaces.

Scripts

Add your scripts below here

Pvt blocker

This is Pvt blocker.. to get him you need to put this code below in remote (alt + R) nad go to File >> New!!

on *:load:{ 
  if ($version < 5.91) echo -a � $+ $colour(info2) $+ *** This addon will not work properly with mIRC $version $+ , you need latest mirc in order to use this addon. | beep 
  echo -a   �4Please type: �/secure.query� on channel to open configuration..
}
;[read write data/setting.ini]
alias _vr {
  if ($exists(data\setting.ini) == $false) { mkdir data | write -c data\setting.ini }
  return $readini data\setting.ini $$1 $$2 
}
alias _vw {
  if ($exists(data\setting.ini) == $false) { mkdir data | write -c data\setting.ini }
  writeini data\setting.ini $$1 $$2 $$3-
}
alias _vrem {
  if ($exists(data\setting.ini) == $false) { mkdir data | write -c data\setting.ini }
  remini data\setting.ini $$1 $$2 
}

alias -l sqo { 
  if ($_vr(querycon,switch) == on) { return [x] }
  else { return  }
}
alias -l sqf { 
  if ($_vr(querycon,switch) == off) { return [x] }
  else { return }
}
alias secure.query {
  if ($version < 5.91) { echo -a ��4This addon will not work properly with mIRC $version $+ , please upgrade to latest mIRC www.mirc.com | beep | halt }
  if ($dialog(querycon) == $null) { dialog -m querycon querycon } 
}
alias secure.query.nick {
  if ($version < 5.91) { echo -a ��4This addon will not work properly with mIRC $version $+ , please upgrade to latest mIRC www.mirc.com | beep | halt }
  dialog -m $_vr(querycon,query.nick) querycon1
  _vrem querycon lastmsg
}
dialog querycon1 {
  title "PVT blocker "
  size -1 -1 218 98
  option dbu
  box "", 33, 7 14 202 62
  button "Accept", 28, 8 82 37 10, disable default ok
  button "Ignore", 26, 49 82 32 10, disable
  button "Decline", 27, 85 82 32 10, disable
  edit "", 1, 72 22 119 14, read autohs
  edit "", 30, 72 40 119 14, read autohs
  edit "", 29, 72 57 119 14, read autohs
  check " Turn on PVT blocker", 31, 10 6 70 7
  button "Setup", 2, 121 83 39 8
  button "Give access", 3, 164 83 47 8, disable
  box "", 4, 4 76 210 18
  text "Nick", 5, 29 25 39 8
  text "Address (ip)", 6, 28 44 42 8
  text "Message", 7, 28 60 42 9
  text "", 8, 129 5 27 8, right
  text "", 9, 74 5 53 8, right
}
dialog querycon {
  title "PVT blocker "
  size -1 -1 232 130
  option dbu
  button "ok", 12, 102 114 25 10, default ok
  tab "Configuration", 2, 3 0 226 125
  edit "", 3, 5 41 220 11, tab 2 autohs
  text "Standard msg", 13, 6 32 61 8, tab 2
  edit "", 4, 5 61 220 10, tab 2 autohs
  check "Enable", 15, 67 82 32 20, tab 2
  button "Find any sound", 16, 103 83 40 20, tab 2
  box "Alarm at query", 17, 64 74 82 32, tab 2
  edit "", 208, 165 79 20 12, tab 2
  button "-", 206, 154 81 9 9, tab 2
  text "Secs", 210, 199 81 20 12, tab 2
  box "Auto-close after", 209, 147 72 79 34, tab 2
  button "+", 207, 187 81 9 9, tab 2
  text "decline msg", 14, 6 54 44 7, tab 2
  check "Turn on PVT blocker", 33, 12 20 81 10, tab 2
  check "Notify usesr have access?", 49, 127 19 96 10, tab 2
  check "Enable auto-close", 50, 148 94 77 10, tab 2
  box "", 51, 7 14 218 18, tab 2
  tab "Log files", 11
  list 34, 8 19 56 50, tab 11 sort size hsbar
  button "Erase", 35, 8 72 34 13, tab 11
  button "Copy", 39, 176 72 45 11, tab 11
  check "Log msg's on query?", 43, 8 111 91 10, tab 11
  edit "", 52, 100 81 74 10, tab 11 autohs
  button "Give access", 53, 119 91 37 11, tab 11
  edit "", 64, 67 19 156 51, tab 11 read multi vsbar
  button "Erase all", 65, 8 86 34 12, tab 11
  text "nick!ident@hostmask", 1, 44 82 53 8, tab 11
  tab "Protection", 32
  radio "universal mask *!*@*", 211, 12 28 62 12, tab 32
  radio "host mask ignore", 212, 12 43 62 9, tab 32
  box "Type of pvt Ignore", 213, 7 17 74 37, tab 32
  edit "", 214, 123 40 10 10, tab 32
  check "Enable", 219, 89 28 40 10, tab 32
  box "Protection from PVt flood", 216, 85 17 111 37, tab 32
  edit "", 217, 178 41 15 10, tab 32
  text "msg's", 215, 88 41 32 8, tab 32
  text "secs", 218, 135 41 40 9, tab 32
  tab "Accees", 40
  list 41, 12 41 208 50, tab 40 sort size hsbar
  button "Erase", 42, 13 93 41 14, disable tab 40
  text "List of users with access", 44, 13 33 79 8, tab 40
  edit "", 45, 38 18 124 15, tab 40 autohs
  button "Add", 46, 165 18 48 15, disable tab 40
  text "Address (ip)", 47, 5 20 33 9, tab 40
  tab "About", 5
  text "This addon is writed for shellium.org (free psybnc ,eggdrop)  ", 6, 40 20 146 10, tab 5
  link "www.shellium.org", 7, 55 32 44 8, tab 5
  text "Go to", 8, 40 32 15 8, tab 5
  text "and get account..", 9, 100 32 86 8, tab 5
  text "---------------------------------------------- About Author ----------------------------------------------", 10, 7 46 220 8, tab 5
  text "-Author: mikkssa                                                                                                                                                                                                                                                                           -E-mail: mikkssa92le@yahoo.com                                                                                                                                                                                                                                                  - ", 18, 7 57 220 21, tab 5
  link "www.movies4you.co.nr", 19, 53 83 59 8, tab 5
  text "Authors Web site:", 20, 7 83 45 8, tab 5
  text "That is all", 21, 6 99 25 8, tab 5
}

on *:dialog:*:init:*:{ 
  if ($dialog(querycon) == $dname) {
    if ($_vr(querycon,switch) == on) { did -c querycon 33 } 
    elseif ($_vr(querycon,switch) == $null) { _vw querycon switch on | did -c querycon 33 }
    if ($_vr(querycon,ignore.host) == $null) { _vw querycon ignore.host on | _vw querycon ignore.uni off }
    if ($_vr(querycon,decline) == $null) { _vw querycon decline You are declined .. Try later }
    if ($_vr(querycon,ignore.uni) == on) && ($_vr(querycon,ignore.host) == off) { did -c querycon 211 1 }
    else  did -c querycon 212 1
    did -o querycon 3 1 $_vr(querycon,standby)
    did -o querycon 4 1 $_vr(querycon,decline)
    if ($_vr(querycon,soundswitch) == on) { did -c querycon 15 }
    if ($_vr(querycon,timer) == $null) { _vw querycon timer 240 }
    did -o querycon 208 1 $_vr(querycon,timer) 
    if ($_vr(querycon,max.query) == $null) { _vw querycon max.query 5 | did -o querycon 214 1 $_vr(querycon,max.query) }
    else  did -o querycon 214 1 $_vr(querycon,max.query) 
    if ($_vr(querycon,max.query.sec) == $null) {  _vw querycon max.query.sec 20 | did -o querycon 217 1 $_vr(querycon,max.query.sec) }
    else did -o querycon 217 1 $_vr(querycon,max.query.sec) 
    if ($_vr(querycon,netflood) == on) did -c querycon 219
    else did -b querycon 211,217,212,214
    if ($_vr(querycon,log) == on) { did -c querycon 43 }
    elseif ($_vr(querycon,log) == $null) { _vw querycon log on | did -c querycon 43 }
    if ($_vr(querycon,notifyaccess) == on) { did -c querycon 49 }
    elseif ($_vr(querycon,notifyaccess) == $null) { _vw querycon notifyaccess on | did -c querycon 49 }
    if ($_vr(querycon,auto-close) == on) { did -c querycon 50 }
    did -b querycon 46,42 
    nick.list 
    s.levels
    did -z querycon 34
  }
  if ($dialog($dname) == $_vr(querycon,query.nick)) { 
    if ($_vr(querycon,auto-close) == on) { %qs.nick = $_vr(querycon,query.nick) | .timer 1 $sq_t close.qw }
  }
}
on *:dialog:querycon:edit:*:{ 
  if ($did == 3) { 
    if ($did(querycon,3).text != $null) {    
      _vw querycon standby $did(querycon,3).text 
    }
  }
  if ($did == 4) { 
    if ($did(querycon,4).text != $null) {    
      _vw querycon decline $did(querycon,4).text 
    }
  }
  if ($did == 45) { 
    if ($did(querycon,45).text != $null) { did -e querycon 46 }
    elseif ($did(querycon,45).text == $null) { did -b querycon 46 }
  }
  if ($did == 208) { 
    if ($did(querycon,208).text != $null) {    
      _vw querycon timer $did(querycon,208).text 
    }
  }
  if ($did == 214) { 
    if ($did(querycon,214).text != $null) {  
      _vw querycon max.query $did(querycon,214).text 
    }  
  }
  if ($did == 217) { 
    if ($did(querycon,217).text != $null) {  
      _vw querycon max.query.sec $did(querycon,217).text 
    }
  }
}

on *:dialog:*:sclick:*:{ 
  if (Query request $dname == $dialog($dname).title) { 
    if ($did == 2) { secure.query }   
    if ($did == 3) {
      auser -a securequery $address($did(1,$did(1)),3) $did(1,$did(1)) | did -b $did(1,$did(1)) 3 
      if ($_vr(querycon,notifyaccess) == on) { if ($server != $null) { .msg $did(1,$did(1))   Dodati ste na moju access listu. Uzivajte u chat-u } }
    }   
    if ($did == 27) { .ignore -pu180 $did(30,$did(30)) | .msg $did(1,$did(1)) $_vr(querycon,decline)  |  dialog -x $did(1,$did(1)) }
    if ($did == 28) {  
      .ignore -r $address($did(1,$did(1)),2) | query $did(1,$did(1)) | .timer -m 1 1 echo $did(1,$did(1)) < $+ $did(1,$did(1)) $+ > $did(29,$did(29)) |  _vrem querycon lastmsg 
      if ($server != $null) { .msg $did(1,$did(1)) }
      dialog -x $did(1,$did(1))
    }
    if ($did == 26) { .ignore -p $address($did(1,$did(1)),3) | dialog -x $did(1,$did(1)) }
    if ($did == 31) {
      if ($_vr(querycon,switch) != on) { _vw querycon switch on }
      else { _vw querycon switch off  }
    }
  }
  if ($dialog(querycon) ==  $dname) { 
    if ($did == 15) { 
      if ($_vr(querycon,soundswitch) != on) {  _vw querycon soundswitch on | did -c querycon 15 }
      else { _vw querycon soundswitch off | did -u querycon 15 }
    }
    if ($did == 16) { setquerysound }
    if ($did == 206) { if (%timer > 0) { dec %timer 1 | did -o querycon 208 1 %timer | _vw querycon timer %timer } }
    if ($did == 207) { inc %timer 1 | did -o querycon 208 1 %timer | _vw querycon timer %timer }

    if ($did == 39) { clipboard < $+ $did(34,$did(34).sel) $+ > $sr($did(34,$did(34).sel),msg) }
    if ($did == 34) { did -r querycon 64 | did -a querycon 64 $chr(91) $+ $sr($did(34,$did(34).sel),date) $+ $chr(93) | did -a querycon 64 $crlf $sr($did(34,$did(34).sel),msg) | did -o querycon 52 1 $_vr(securequery,$did(34,$did(34).sel))) }
    if ($did == 33) {
      if ($_vr(querycon,switch) != on) { _vw querycon switch on }
      else { _vw querycon switch off }
    }
    if ($did == 35) { write -ds $+ $did(34,$did(34).sel) securequery\names.txt | _vrem securequery $did(34,$did(34).sel)) | .timer -m 1 1 nick.list }
    if ($did == 41) { did -e querycon 42,46 | did -o querycon 45 1 $did(41,$did(41).sel)) }
    if ($did == 42) { ruser $did(41,$did(41).sel) | s.levels }
    if ($did == 43) { 
      if ($_vr(querycon,log) != on) { _vw querycon log on | did -c querycon 43 }
      else { _vw querycon log off }
    }  
    if ($did == 50) { 
      if ($_vr(querycon,auto-close) != on) { _vw querycon auto-close on | did -c querycon 50 }
      else { _vw querycon auto-close off }
    }
    if ($did == 53) { 
      if ($did(querycon,52).text != $null) {    
        .auser -a  securequery $did(querycon,52).text | did -r querycon 52 
      }
    }
    if ($did == 49) { 
      if ($_vr(querycon,notifyaccess) != on) { _vw querycon notifyaccess on | did -c querycon 49 }
      else { _vw querycon notifyaccess off }
    }
    if ($did == 46) { 
      if ($did(querycon,45).text != $null) {    
        .auser -a  securequery $did(querycon,45).text | did -r querycon 45 | s.levels
      }
    }
    if ($did == 65) { .remove securequery\names.txt | .remove securequery\logs.ini | did -r querycon 64,34,52 }    
    if ($did == 211) {
      if ($_vr(querycon,ignore.uni) == off) { _vw querycon ignore.uni on | _vw querycon ignore.host off | did -c querycon 211 | did -u querycon 212 }
      else { _vw querycon ignore.uni off | _vw querycon ignore.host on | did -u querycon 211 | did -c querycon 212 }
    }
    if ($did == 212) {
      if ($_vr(querycon,ignore.host) == off) { _vw querycon ignore.host on | _vw querycon ignore.uni off | did -c querycon 212 | did -u querycon 211 }
      else { _vw querycon ignore.host off | _vw querycon ignore.uni on | did -u querycon 212 | did -c querycon 211 }
    }
    if ($did == 219) {
      if ($_vr(querycon,netflood) == off) { _vw querycon netflood on | did -c querycon 219 | did -e querycon 211,217,212,214 }
      else { _vw querycon netflood off | did -u querycon 219 | did -b querycon 211,217,212,214 }
    }
  }
}
alias -l sr {
  if ($exists(securequery\logs.ini) == $false) { mkdir securequery | write -c securequery\logs.ini }
  return $readini securequery\logs.ini $$1 $$2 
}
alias -l sw {
  if ($exists(securequery\logs.ini) == $false) { mkdir securequery | write -c securequery\logs.ini }
  writeini securequery\logs.ini $$1 $$2 $$3-
}
alias -l srem {
  if ($exists(securequery\logs.ini) == $false) { mkdir securequery | write -c  securequery\logs.ini }
  remini securequery\logs.ini $$1 $$2 
}
on ^*:open:?: {
  if ($_vr(querycon,switch) == $null) { _vw querycon switch on }
  if ($finddir($mircdir\,securequery*,1) == $null) { mkdir securequery }
  if ($_vr(querycon,netflood) != on) {
    inc %upflood15 1  
    if (%upflood15 > $_vr(querycon,max.query)) { 
      if ($_vr(querycon,ignore.uni) == on) { .ignore -pu $+ $_vr(querycon,max.query.sec) *!*@* }
      else { .ignore -pu $+ $_vr(querycon,max.query.sec) $wildsite }
      echo -a �4[ ALERT ]� $nick is �Query Flooding�. User ( $+ $wildsite $+ ) now ignored for $_vr(querycon,max.query.sec) secs.
    } 
    .timer 1 60 unset %upflood15     
  }
  if ($_vr(querycon,standby) == $null) { _vw querycon standby ..::[auto mesage]::.. If i want to answer you i will answer .. if not you will be ignored. ! }
  if ($level($address($nick,3)) == securequery) { goto end }
  if ($network == WonderNet) && ($nick == Global) { goto end } 
  if ($network == WonderNet) && ($nick == Nickserv) { goto end } 
  if ($network == WonderNet) && ($nick == Chanserv) { goto end } 
  if ($network == WonderNet) && ($nick == Memoserv) { goto end } 
  if ($_vr(querycon,switch) == on) {
    if ($_vr(querycon,soundswitch) == on) { if ($_vr(querycon,sound) != $null) { splay $_vr(querycon,sound) } }
    echo -a � $+ $colour(notice) $+ �0�Nick�15 (� $+ �14 $nick �15 $+ �)�0 Want's to talk with you $me 
    if ($_vr(querycon,log) == on) { 
      if ($read(securequery\names.txt, w, $nick) == $nick) { write -ds $+ $nick securequery\names.txt }
      sw $nick date $asctime(h:nn:sstt m/d) | sw $nick msg $strip($1-,burc) | write securequery/names.txt $nick | _vw securequery $nick $wildsite | nick.list
    }
    .msg $nick  $_vr(querycon,standby) 
    _vw  querycon query.nick $nick
    if ($dialog($nick) == $null) { secure.query.nick }
    dialog -t $_vr(querycon,query.nick) Query request $nick
    did -o $nick 1 1 $_vr(querycon,query.nick)
    .ignore -pu120 $wildsite    
    whosqial $nick  
    did -o $nick 9 1 ( $+ $network $+ )  
    did -o $nick 30 1 updating... 
    did -o $nick 29 1 $strip($1-,burc)
    did -o $nick 8 1 $asctime(hh:nntt)

    if ($_vr(querycon,switch) == on) { did -c $nick 31 }
    haltdef
    :end 
  }  
}
#sqialud off
raw 352:*: {
  if ($dialog($6) != $null) { did -o $6 30 1 *!* $+ $3 $+ @ $+ $4  | did -e $6 26,28,3,27 | .timer 1 5 .disable #sqialud | haltdef }
  else { if ($dialog($6) != $null) { did -e $6 26,28,3,27 | .timer 1 5 .disable #sqialud | halt } }
  halt
}
raw 315:*: {
  halt
} 
#sqialud end
alias -l whosqial { .enable #sqialud | .who $$1 } 
alias -l secure.dir {
  mkdir  " $+ $mircdirsecurequery $+ \ $+ " 
  return securequery $+ \ 
}
alias -l sq_t { 
  return $_vr(querycon,timer) 
}

alias -l nick.list {
  if ($dialog(querycon) != $null) { 
    did -r querycon 64,34,52 
    var %fst = $lines(securequery\names.txt)   
    var %f = 1
    while (%f <= %fst) { did -a querycon 34 $read(securequery\names.txt,%f) | inc %f 1 }
  }
}
alias -l s.levels {
  did -r querycon 41
  var %s.l = $ulist(*,securequery,0)
  if (%s.l == 0) { did -b querycon 42 | return }
  else  did -e querycon 42
  var %s.w = 0
  :loop
  inc %s.w
  if (%s.w <= %s.l) { did -a querycon 41  $ulist(*,securequery,%s.w) | goto loop }
  else return
}
alias -l close.qw { if ($dialog(%qs.nick) != $null) dialog -x %qs.nick }
alias -l setquerysound {
  _vw querycon sound $$dir="Choose a wav:" $mircdir*.wav;*mp3;*.mid 
}

Welcome notice

Put this code below in remote (alt + R) and go to File >> New

on ^*:join:# {
  if ($nick != $me) {
    /notice $nick  Welcome on channel $chan .. Enjoy in chat
  }
}

Part notice

Put this code below in remote (alt + R) and go to File >> New

on ^*:part:# {
  if ($nick != $me) {
    /notice $nick  Have a nice day .. and back to as again.. 
  }
}

Windows XP Control Panel

Put this code below in remote (alt + R) and go to File >> New

dialog windows {
  title "Windows XP"
  size -1 -1 339 191
  option dbu
  button "Regional and Language Options", 4, 84 101 86 18, flat
  button "System Properties", 5, 17 50 54 18, flat
  button "Display Properties", 6, 17 76 54 18, flat
  button "User Accounts", 7, 99 76 54 18, flat
  button "Date and Time Properties", 8, 92 50 70 18, flat
  button Add Remove Programs, 9, 14 113 62 18, flat
  button "Network Connections", 11, 183 76 54 18, flat
  button "Internet Properties", 12, 183 51 54 18, flat
  box "", 16, 177 45 66 58
  box "", 17, 12 104 66 34
  box "", 18, 82 44 90 82
  box "", 20, 12 44 66 58
  box "", 19, 251 46 74 82
  button "Keyboard Properties", 21, 260 52 54 18, flat
  button "Mouse Properties", 22, 260 78 54 18, flat
  button "Game Controllers", 23, 260 103 54 18, flat
  button "Sounds and Audio Devices Properties", 1, 19 15 94 18, flat
  button "Accessibility Options", 2, 261 15 54 18, flat
  button "Add Hardware Wizard", 3, 193 15 62 18, flat
  button "Power Options Properties", 10, 118 15 70 18, flat
  box "", 13, 13 6 314 34
  button ".::. Ok .::.", 25, 287 170 46 18, flat ok
  button ".::.About .::.", 26, 237 170 46 18, flat
  edit ".::. Windows XP Control Panel .::.", 24, 8 174 90 10, read center
  edit ".::. Coded by Mikkssa .::.", 27, 114 174 90 10, read center
  button "Turn of XP", 28, 182 111 54 26, flat
  box "Ugasi Windows", 29, 177 103 66 42
}
on *:Dialog:windows:sclick:*: {
  if ($did == 4) { echo -a .::. Info.::.Regional and Language Options .::. | .timer 1 1 /run intl.cpl }
  if ($did == 5) { echo -a [Status] Opening System Properties.. | .timer 1 1 /run sysdm.cpl }
  if ($did == 6) { echo -a [Status] Display Properties .::. | .timer 1 1 /run control desktop }
  if ($did == 7) { echo -a [Status] Opening User Accounts .::. | .timer 1 1 /run nusrmgr.cpl }
  if ($did == 8) { echo -a [Status] Opening Date and Time Properties.::. | .timer 1 1 /run timedate.cpl }
  if ($did == 9) { echo -a [Status] Opening Add Remove Programs .::. | .timer 1 1 /run appwiz.cpl }
  if ($did == 11) { echo -a [Status]. Opening Network Connections .::. | .timer 1 1 run ncpa.cpl }
  if ($did == 12) { echo -a [Status] Opening Internet Properties .::. | .timer 1 1 /run inetcpl.cpl }
  if ($did == 21) { echo -a [Status] Opening Keyboard Properties .::. | .timer 1 1 /run control keyboard }
  if ($did == 22) { echo -a [Status] Opening Mouse Properties .::. | .timer 1 1 /run control mouse }
  if ($did == 23) { echo -a [Status] Opening Game Controllers .::. | .timer 1 1 /run joy.cpl }
  if ($did == 1) { echo -a [Status] Opening Sounds and Audio Devices Properties .::. | .timer 1 1 /run mmsys.cpl }
  if ($did == 2) { echo -a [Status] Opening Accessibility Options .::. | .timer 1 1 /run access.cpl }
  if ($did == 3) { echo -a [Status] Opening Add Hardware Wizard .::. | .timer 1 1 /run hdwwiz.cpl }
  if ($did == 10) { echo -a [Status] Opening Power Options Properties .::.  | .timer 1 1 /run powercfg.cpl }
  if ($did == 25) { echo -a [Status] Closing Windows XP Control Panel .::. }
  if ($did == 26) { echo -a [Status] OpeningAbout Windows XP Control Panel .::. | .timer 1 1 /dialog -m winabout winabout }
  if ($did == 28) { echo -a [Status] Turning off Windows Xp .::.  | .timer 1 1 /dialog -m turn turn }
}
on *:Dialog:windows:mouse:*: {
  did -r $dname 14
  if ($did == 1) did -a $dname 14 Otvorit ` cu   Sounds and Audio Devices Properties...
  elseif ($did == 2) did -a $dname 14 Zatvorit` cu   Accessibility Options.....
  elseif ($did == 3) did -a $dname 14 Otvorit` cu    Add Hardware Wizard....
  elseif ($did == 4) did -a $dname 14  Otvorit` cu   Regional and Language Options..
  elseif ($did == 5) did -a $dname 14 Otvorit` cu   System Properties..
  elseif ($did == 6) did -a $dname 14 Otvorit` cu   Display Properties...
  elseif ($did == 7) did -a $dname 14 Otvorit` cu   User Accounts...
  elseif ($did == 8) did -a $dname 14 Otvorit ` cu   Date and Time Properties...
  elseif ($did == 9) did -a $dname 14 Zatvorit` cu   Add Remove Programs..
  elseif ($did == 10) did -a $dname 14 Otvorit` cu   Power Options Properties..
  elseif ($did == 11) did -a $dname 14 Otvorit` cu   Network Connections....
  elseif ($did == 12) did -a $dname 14 Otvorit` cu   Internet Properties...
  elseif ($did == 25) did -a $dname 14 Zatvorit` cu   Windows XP Control Panel...
  elseif ($did == 26) did -a $dname 14 Otvorit ` cu   About Windows XP Control Panel ..
  elseif ($did == 28) did -a $dname 14 Gasim Windows Xp....
}
on *:Dialog:windows:mouse:*: {
  did -r $dname 14
  elseif ($did == 21) did -a $dname 14 Otvorit` cu  Keyboard Properties...
  elseif ($did == 22) did -a $dname 14 Otvorit` cu  Mouse Properties..
  elseif ($did == 23) did -a $dname 14 Otvorit` cu  Game Controllers..
}
dialog turn {
  title "Turning off Windows XP"
  size -1 -1 106 41
  option dbu
  button "Ok", 1, 15 23 30 10, flat
  button "Cancel", 2, 56 23 30 10, flat cancel
  text "Are you sure?", 3, 11 2 81 16, center
}
on *:Dialog:turn:sclick:*: {
  if ($did == 1) { echo -a .::. Info.::. Gasim za........3 | .timer 1 1 echo -a 2.... | .timer 1 2 echo -a 1...... | .timer 1 3 /run shutdown -s -t 01 | .timer 1 4 /exit  }
}
dialog winabout {
  title "About"
  size -1 -1 138 91
  option dbu
  button ".::.::. OK .::.::.", 1, 27 74 78 10, flat ok
  text "Windows Xp Control Panel", 2, 32 5 65 8
  text "Author :", 3, 10 23 25 8
  text "WebSite :", 4, 10 36 25 8
  text "E-mail :", 5, 10 48 25 8
  edit "Mikkssa", 6, 44 22 74 10, read
  edit "www.shellium.org", 7, 44 35 74 10, read
  edit "mikkssa92@yahoo.com", 8, 44 47 74 10, read
  edit "Coded by Mikkssa", 9, 9 61 114 10, read center
}

menu menubar,channel {
  -
  .-
  .Win XP cPanel:{ /dialog -m windows windows }
}

Ident/Join Scripts (By Apocalypse)

Below are some useful mIRC scripts for IRC networks.

1. To access the Script Editor using mIRC, click on the "Script Editor" Icon in the tool bar (the icon with a scroll and green dot.) Once it's opened, click on the "Remotes" tab. Or, you can also just press ALT+R to access the "Remote" section of the Script Editor.

2. Create a new file: File->New, or use a new line in the current file and insert the following:

on *:connect: if ($network == NETWORK) { .msg NickServ identify PASSWORD }

NETWORK = Insert the IRC network you want this script to function on. (ie freenode or SHellium)

PASSWORD = Insert the Password you registered your Nick with.

-Example:

on *:connect: if ($network == freenode) { .msg NickServ identify password123 }


3. To only have this script work on a specific nick, use:

on *:connect: if ($network == NETWORK) && ($me == NICK) { .msg NickServ identify PASSWORD }

NICK = Insert the nickname you want the script to work on.

-Example:

on *:connect: if ($network == freenode) && ($me == Apocalypse) { .msg NickServ identify password123 }


4. You may also have the script join channels after identifying, shown below.

on *:connect: if ($network == NETWORK) { .msg NickServ identify PASSWORD | .join #channel,#channel2,#channel3,#etc }

-Example:

on *:connect: if ($network == freenode) { .msg NickServ identify password123 | .join #shellium,#shellium.nl }

NOTE: To join only one channel, just only specify #channel


5. Here's a script that is using everything shown above:

on *:connect: if ($network == NETWORK) && ($me == NICK) { .msg NickServ identify PASSWORD | .join #channel,#channel2,#channel3,#etc }

-Example:

on *:connect: if ($network == freenode) && ($me == Apocalypse) { .msg NickServ identify password123 | .join #shellium,#shellium.nl }

6. After you have finished editing the script and it is all set up to your liking, click "Ok" to save the script, or File->Save (Save As.. if you wish to name it other than the default script#.ini)

NOTE: The script must be loaded in order for it to work. To load a script via the text box, use: /load -rs scriptname.ini. Else, load it via the Script Editor: File->Load (Select file name) and if you can't get your remote scripts to work make sure you type /remote on.


These scripts may be simple; however, are quite useful so that you don't have to manually identify/join channels each time you connect. New users to mIRC may find these useful ;)

TarBar (Fixed by Apocalypse)

The following scripts are usefull but are not recommended for you to use on #shellium as they can be used to spam and may annoy users.

I'm going to teach you some basic Remotes

on *:TEXT:!Commands:#: { $msg $chan My Commands are as followed: .... }

With this when someone types !commands it messages the channel that someone typed !Commands the text: My commands are as followed: .... You can change for example the !Commands bit to anything you want such as .info >info or anything it doesn't have to have a ! in front of it. The ! is just a common trigger. if you go along and see the :#: bit you may notice that there is a # followed by nothing. The hash indicates that it will listen in for !Commands on any channel but it can be changed to only listen on certain channels. For example you may have on*:TEXT:!Commands:#bots,#homechan,#english:{ ... and it will only listen for !Commands on #bots,#homechan,#english. It is important that you have the comers and the : at the end of the channels that you want. If you want it to listen in for !Commands when someone queries you, you simply would need to have on *:TEXT:!Commands:?: { ... Finally you can change the text the bot outputs by simply changing it such as on *:TEXT:!info:#: { $msg $chan I am a bot } This will message the channel you guessed it: I am a bot. Hopefully you can make sense of that i have made it as simplified as i possibly can :)

Auto-Unban Self Script (By Apocalypse)

Essentially, this script will automatically unban you once someone does so. On occasion, it may also unban before a kick is initiated (depends on the speed of your client). It's quite useful for mIRC users that would prefer to remain off the banlist.

on *:Ban:#: { if ($me isop $chan) || ($me ishop $chan) { if ($banmask iswm $address($me,5)) { .mode $chan -b $banmask } } }

Just paste this into a remote script file (Press ALT+R) and make sure the script is loaded.

Auto Join & Auto Rejoin Channel (By Pasbar Team)

This script will automatically join if you connect to server and if you is kicked by someone in channel.

Tools -> Scripts Editor (ALT+R) -> Remote. Then put this code:

 on 1:CONNECT: { join #shellium }
 on 1:Kick:#: { if ( $knick == $me ) { join $chan } }

Slap Protection (By Pasbar Team)

if someone slap you, he/she will be kicked by your scripts. Tools -> Scripts Editor (ALT+R) -> Remote. put this code in remote script:

on *:ACTION:$(*slaps $me $+ *):*: { 
  if ($nick == $me) { kick # $nick Don't slap me }
}

Auto message if someone left in channel (By Pasbar Team)

This script will automatically send a message if someone part in our channel.

on 1:PART:#:/msg $nick Don't forget this channel, My friend. 

Fastkey Menu (By Pasbar Team)

This script is used for fast button in your mIRC Software.

Tools -> Scripts Editor (ALT+R) -> Aliases. put this code in aliases script:

/fastkey
F2 /msg nickserv identify $?*"Enter Nick Password:"
F3 /timer 1 1 /remote on | .echo Remote is ON 
F4 /timer 1 1 /remote off | .echo Remote is OFF 
F5 /nickserv GHOST $?"Nick Ghost:" $?*"Enter Nick Password:"

and save.

INFO:

  • Button F2 is used Identify Nick
  • Button F3 is used Remote ON
  • Button F4 is used Remote OFF
  • Button F5 is used Remote Nick Ghost
Personal tools
Namespaces

Variants
Actions
Navigation
Indexes
SHellium Sites
Toolbox