Advertisement
makimaki

nth Con

Jun 26th, 2010
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 10.64 KB | None | 0 0
  1. ; #******Startup*********#
  2.  
  3. on *:start:{ initmainhash | .timestamp -f 1hh10:1nn10:1ss | xtitle | echo -sa 1nth Multi Network Connection. | echo -sa 1Ready to join Networks and rooms, Type /ehelp  at any time. For help using this script. }
  4. on *:exit: { closemainhash }
  5. ;Hashtable
  6. alias initmainhash { if (!$hget(nth)) { hmake nth | if ($exists(data\ $+ nth.dat)) { hload nth data\ $+ nth.dat } } }
  7. alias closemainhash { if ($hget(nth)) { hsave nth data\ $+ nth.dat | hfree nth } }
  8. ;Titlebar
  9. alias xtitle { .dll dll\Titleicon.dll SetIcon -m icons\F.ico | .dll dll\Titletext.dll SetMainTitleBar Fibonacci Multi Server Script - By MakiMaki & serapHim ((nth Connection)) }
  10.  
  11. ; #******LOGON TYPE******#
  12.  
  13. ;Buzzen
  14. on ^*:logon:*: {
  15.   var %ep $hget(nth, ep) | var %e $hget(nth, $+(email,%ep)) | var %p $hget(nth, $+(pw,%ep))
  16.   if (%ep == $null) { setup }
  17.   if (%multi == on) && ($server == irc.buzzen.net) { .raw authtype $+(ircwx1,$crlf,user) $me $me $me $+(:,anon) | .raw nick nth | .raw loginh %email $md5(%pw) | unset %multi | halt }
  18.   if ($server == irc.buzzen.net) { .raw authtype $+(ircwx1,$crlf,user) $me $me $me $+(:,anon) | .raw nick nth | .raw loginh %e %p }
  19. }
  20. ;Most Servers
  21. on *:connect: {
  22.   if ($network == PhreikNET) { mode $me +c | if (%activeaccount == $null) { setup } | /account %activeaccount  | halt }
  23.   var %nw $hget(nth, $network) | var %n $hget(nth, $+(nick,%nw)) | var %e $hget(nth, $+(email,%nw)) | var %p $hget(nth, $+(pw,%nw))
  24.   if ($network != Buzzen) {
  25.     if (%nw == $null) { setup }
  26.     if (%n != $null) { nick %n }
  27.     if (%e != $null) { /NickServ IDENTIFY %e %p | halt }
  28.     if (%p != $null) { /NickServ IDENTIFY %p | halt }
  29.   }
  30. }
  31. alias setup {
  32.   if ($network == PhreikNET) { var %user $$?="Enter User Name:" | var %pass $$?="Enter Password:" | %activeaccount = %user %pass | if ($sock(cookie)) sockclose cookie | cookie update %user %pass | halt  }
  33.   if ($network == Buzzen) { if (!$hget(nth, ep)) { hadd nth ep 0 } | var %ep $hget(nth, ep) | if (!$hget(nth, $+(email,%ep))) { hadd nth $+(email,%ep) $$?="Enter email address:" } | if (!$hget(nth, $+(pw,%ep))) { hadd nth $+(pw,%ep) $md5($$?="Enter password:") | halt } }
  34.   if (!$hget(nth, $network)) { hadd nth $network $network } | var %nw $hget(nth, $network) | if (!$hget(nth, $+(nick,%nw))) { hadd nth $+(nick,%nw) $$?="Enter nick:" } | if (!$hget(nth, $+(email,%nw))) { hadd nth $+(email,%nw) $$?="Enter email address:(if none leave blank)" } | if (!$hget(nth, $+(pw,%nw))) { hadd nth $+(pw,%nw) $$?="Enter password:(if none leave blank)"  }
  35. }
  36.  
  37. ;PhreikNet Account Cookie Grabber
  38. alias cookie { if ($1 == update) sockopen cookie www.phreik.net 80 }
  39. on *:SOCKOPEN:cookie:{
  40.   tokenize 32 %activeaccount
  41.   var %x = cookiegrabber.php?u= $+ $1 $+ &p= $+ $2
  42.   sockwrite -n $sockname GET /noht/ $+ %x HTTP/1.1 $+ $crlf $+  Accept: */* $+ $crlf $+ Accept-Language: en-au $+ $crlf $+ Accept-Encoding: gzip, deflate $+ $crlf $+ User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322) $+ $crlf $+ Host: www.phreik.net $+ $crlf $+ Connection: close $+ $crlf $+ $crlf
  43. }
  44. on *:SOCKREAD:cookie:{
  45.   if ($sockerr > 0) return
  46.   var %t | sockread %t
  47.   while ($sockbr > 0) {
  48.     tokenize 32 %t
  49.     if ($1 == TICKET:) {
  50.       if ($2 == VALID:) {  echo -a $chr(3) $+ 12 * Account Cookie $4- | set %activeaccount $4- | /account %activeaccount }
  51.       else echo -a Error Grabbing Cookie Please Re Enter Your User Name And Password | setup
  52.     }
  53.     return
  54.   }
  55.   sockread %t
  56. }
  57.  
  58. ; #********ALIAS*********#
  59.  
  60. ;Debug & Info
  61. alias debug { debug -pt @ $+ $network }
  62. alias cc { if ($1 isnum) { var %i $comchan($snicks, $v1) | return %i : window -a %i } }
  63. alias ehelp { run readme.txt }
  64. alias restart { disconnect | /run mirc.exe | exit }
  65. ;Aways
  66. alias away { .raw away # $1- [br] }
  67. alias ga { var %i $chan(0) |  while (%i) { .raw away $chan(%i) $1- [br] | dec %i } }
  68. alias back  { .raw away # }
  69. alias gb  { var %i $chan(0) |  while (%i) { .raw away $chan(%i) | dec %i } }
  70. ;Notices
  71. alias notice { .raw NOTICE $1- | echo $chan $timestamp 5* $me Notice sent to $$2 : $3- }
  72. alias gn {  NOTICE # # $1- }
  73. alias sn { var %i $numtok($snicks,44) | while (%i) { notice $active $gettok($snicks,%i,44) $1- | dec %i } }
  74. ;Channel Joins and List
  75. alias list { if ($network == Buzzen) { /dialog -m chan chan | halt } | else { list } }
  76. alias join { set -u10 %lastjoin $1- | if ($network == Buzzen) { join $chr(37) $+ $remove($1-,$chr(37)) | halt } | else { join $1- } }
  77. alias -l joinkeyask { var %i $?=" $1 has a key to join.  Enter it now:" | if (%i) { hadd -m jKey $1 %i | .raw join $1 %i } }
  78. ;Webchat Joiner
  79. alias profile { PROP $gettok($hget(nicknames,tempselected),1,32) PUID | set -u10 %prolook on }
  80. alias webchat {
  81.   echo -a * $chan link is12 $weburl | window -apdk0w0  @ $+ # $+ [WebChat]- $+ ( $+ $network $+ )
  82.   .noop -a $dll(dll\nHTMLn_2.95.dll,attach,$window(@ $+ # $+ [WebChat]- $+ ( $+ $network $+ )).hwnd) | .noop -a $dll(dll\nHTMLn_2.95.dll,navigate,$weburl)
  83.   halt
  84. }
  85. alias weburl { if ($network == Buzzen) { return http://www.buzzen.net/chatui.aspx?rm= $+ $replace($remove(#, $chr(37) $+ $chr(35)), \b, $chr(37) $+ 5cb) } }
  86.  
  87. ; #*********RAWS*********#
  88.  
  89. ;Buzzen Whisper work around thanks err0r & extremity
  90. raw whisper:*:{
  91.   var %b =  $regsubex($3-, /\[(?:style\x20.*?|/style)\]/gi,$null) |  var %text  $remove(%b,[br])
  92.   if (!$window($nick)) { /query -n $nick } | set %buzzenwhisper. $+ $nick $1 | echo -t $nick $nick $+ : %text | haltdef
  93. }
  94. alias pv {
  95.   if ($network == Sparkpea.Net) { return http://www.sparkpea.net/profile.php?epuid=  }
  96.   elseif ($network == PhreikNET) { return http://www.phreik.net/profile.msnw?epuid=   }
  97.   elseif ($network == Buzzen) { return http://www.buzzen.net/profile.aspx?pid= }
  98. }
  99. on *:CLOSE:?: { if (%buzzenwhisper. [ $+ [ $target ] ]) { unset %buzzenwhisper. [ $+ [ $target ] ] } }
  100. ;Mostly Buzzen Based  RAWS add what you need
  101. raw *:*: {
  102.   if ($2 = PID) {
  103.     echo -a * $3  Profile Link is12 $pv $+ $4-
  104.     window -apdk0w0  @ $+ $3 $+ 's[Profile] iconfile $mircdiricons\eXx.ico
  105.     .noop -a $dll(dll\nHTMLn_2.95.dll,attach,$window(@ $+ $3 $+ 's[Profile]).hwnd))
  106.     .noop -a $dll(dll\nHTMLn_2.95.dll,navigate, $pv $+ $4- )
  107.     halt
  108.   }
  109.   if ($numeric == 818) {
  110.     if ($3 == PUID) {
  111.       echo -a * $2  Profile Link is12 $pv $+ $4-
  112.       window -apdk0w0  @ $+ $2 $+ 's[Profile] iconfile $mircdiricons\eXx.ico
  113.       .noop -a $dll(dll\nHTMLn_2.95.dll,attach,$window(@ $+ $2 $+ 's[Profile]).hwnd))
  114.       .noop -a $dll(dll\nHTMLn_2.95.dll,navigate, $pv $+ $4- )
  115.       halt
  116.     }
  117.   }
  118.   if ($numeric == 821) { var %n $mid($gettok($rawmsg,1,33),2-) | echo $1 15 $time  %n is back. | cline -m 1 $1 %n | .halt }
  119.   if ($numeric == 822) { var %n $mid($gettok($rawmsg,1,33),2-) | echo $1 15 $time  %n is away.  $remove($2-,[br])  | cline -m 14 $1 %n | .halt }
  120.   if ($numeric == 353) { halt } | if ($numeric == 366) { halt }
  121.   if ($numeric == 803) { halt } | if ($numeric == 804) { halt } | if ($numeric == 805) { halt }
  122.   if ($numeric == 332) { var %m = $regsubex($3-, /\[(?:style\x20.*?|/style)\]/gi,$null) | echo -a 3* Topic : $remove(%m,[br]) | haltdef }
  123.   if ($numeric == 818) { if ($3 == OWNERKEY) { hadd qKey $2 $4 } | elseif ($3 == HOSTKEY) { hadd oKey $2 $4 } }
  124.   if ($numeric == 475) {
  125.     set $2 $2
  126.     if ($hget(jkey,$2)) {
  127.       if (%jkey) { echo -sat Could not join $2 with key of $hget(jkey,$2) $+ . | hdel jkey $2 | halt }
  128.       if (!%jkey) { set -u2 %jkey 1 }
  129.       .raw join $2 $hget(jkey,$2)
  130.     }
  131.     else { .timer -m 1 1 joinkeyask $2 }
  132.     halt
  133.   }
  134.   if ($numeric == 999) {
  135.     var %i $scon(0)
  136.     while (%i) {
  137.       scon %i
  138.       if ($chan(0) < 11) { join %lastjoin | halt }
  139.       dec %i
  140.     }
  141.     server -m $server -j %lastjoin | halt
  142.   }
  143.   if ($1 == $me) && ($left($2,2) == $chr(37) $+ $chr(35)) && ($3- === No such channel) { .timer 1 2 .raw create $2 }
  144. }
  145.  
  146. ; #********THEME*********#
  147.  
  148. on *:INPUT:#: {
  149.   if ((/* !iswm $1) || (/me == $1)) { var %p = $left($nick($chan,$me).pnick,1) | if (%p == $left($me,1)) unset %p
  150.     if (/me != $1) {
  151.       var %i $upper($left($1-,1)) $+ $right($1-,-1)
  152.       echo  -ti2 $chan 1 $+ $me $+ : %i
  153.       if ($network == buzzen) {  privmsg $active %style %i [/style] | halt }
  154.       else { privmsg $active %i }
  155.       halt
  156.     }
  157.   }
  158. }
  159. on *:INPUT:?: {
  160.   echo  -ti2 $chan 1 $+ $me $+ : $1-
  161.   if ($network == Buzzen) && ($left($1-,1) != /) && ($comchan($active,0) > 0) {
  162.     .raw WHISPER $comchan($active,1) $active $+(:,$1-,)
  163.     halt
  164.   }
  165.   else { privmsg $active $1-  | halt }
  166. }
  167. on ^*:TEXT:*:#: {
  168.   if ($$1 != ^) {
  169.     var %b =  $regsubex($1-, /\[(?:style\x20.*?|/style)\]/gi,$null) |  var %cc = $regsubex(%b, /^##\*.*\*##/,$null) | var %text  $remove(%CC,[br])
  170.     if ($chr(37) isin $nick) { echo $chan $timestamp %text  | haltdef }
  171.     else { echo  -ti2 $chan 1 $nick $+ : %text |  halt }
  172.   }
  173. }
  174. on *:MODE:#: {  if ($1 == +k) { hadd -m jKey # $2- } }
  175. on ^*:ACTION:*:#: { var %b =  $regsubex($1-, /\[(?:style\x20.*?|/style)\]/gi,$null) |  var %cc = $regsubex(%b, /^##\*.*\*##/,$null) | var %text  $remove(%CC,[br]) | var %nick = $remove($nick,>) | echo  -ti2 $chan 6* %nick %text |  halt }
  176. on ^*:NOTICE:*:*: {  
  177.   if ($nick != MemoServ) {
  178.     if ($nick === NeoStats) {  echo -a 12* Server Notice 01: $1- | halt } | if ($nick === StatServ) {  echo -a 12* Server Notice 01: $1- | halt }
  179.     if ($nick === ConnectServ) {  echo -a 12* Server Notice 01: $1-  | halt } | if ($nick === SecureServ) {  echo -a 12* Server Notice 01: $1-  | halt }
  180.     if ($nick === opsb) {  echo $chan 12* Server Notice 01: $1- | halt }  | if ($nick == ChanServ) { echo $chan  14* Channel Message3: 14 $2-  | halt }
  181.     if ($nick == Global) && ($4 != from) { echo -s 12* Global Message from $network : 1 $1- | halt }  | if ($nick == NickServ) { echo -s 12* Notice  from  $nick 1: $1- | halt }
  182.   }
  183.   tokenize 32 $Rawmsg
  184.   echo $chan $timestamp 5* Notice From $nick : $remove($$5,:) $6- | haltdef
  185. }
  186. on ^*:JOIN:#: {
  187.   if ($nick == $me) { if (% isin #) { set # # }  
  188.   echo $chan 9 $+ $time You have joined # as $me $date | halt } | echo $chan 3 $+ $time $nick Gate:( $+ $address $+ ) has joined # $date | var %a = $readini(data\nicklog.ini,Nicklog,$address($nick,1))
  189.   if (!%a) { writeini -n data\nicklog.ini Nicklog $address($nick,1) $+($chr(44),$nick) } | if (%a) && ($nick !isin %a) { writeini -n data\nicklog.ini Nicklog $address($nick,1) $+(%a,$chr(44),$nick) } | if ($nick isin %a) { echo $chan $numtok(%a,44) entries for %a }
  190.   halt
  191. }
  192. on ^*:PART:#: {
  193.   if ($nick == $me) && ($network == Buzzen) { unset # # | halt }
  194.   else { echo $chan 5 $+ $time $nick ( $+ $address $+ ) has left # $+ . $date
  195.     halt
  196.   }
  197. }
  198. on ^*:SNOTICE:*: { echo -st $timestamp * Server Notice: $1- | halt }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement