MIRC (misc examples): Difference between revisions
Content added Content deleted
(Moved Script Blocker code snippet and MArray code snippet to this page.) |
(→MArray Snippet: {{Lines_too_long}}) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
These [[mIRC]] code snippets are not associated with any programming task. |
These [[mIRC]] code snippets are not associated with any programming task. |
||
=MPhoneBook= |
|||
# |
|||
Author: sm0kie_ |
|||
Release: unknown |
|||
File: phone.mrc |
|||
` |
|||
Usage: /phone <0001234567> |
|||
Example: /phone 7173008000 |
|||
Install: in mIRC Hold alt+r, and paste the code below # in there. |
|||
Description: Receives someones info from the PhoneBook. |
|||
# |
|||
#Socket |
|||
on 1:SOCKOPEN:phone:{ |
|||
wsock x001 $decode(R0VUIC9zZWFyY2g/aGw9ZW4mbHI9JnBiPWYmcT0=,m) $+ %number $+ &pb=f&btnG= $+ $decode(U2VhcmNoK1Bob25lQm9vayBIVFRQLzEuMQ==,m) |
|||
wsock x110 $decode(SG9zdDogd3d3Lmdvb2dsZS5jb20=,m) |
|||
wsock x918 $decode(VXNlci1BZ2VudDogTW96aWxsYS81LjAgKFdpbmRvd3M7IFU7IFdpbmRvd3MgTlQgNS4xOyBlbi1VUzsgcnY6MS43LjgpIEdlY2tvLzIwMDUwNTExIEZpcmVmb3gvMS4wLjQ=,m) |
|||
wsock F0C3 $decode(S2VlcC1BbGl2ZTogMzAw,m) |
|||
wsock 19300101 $decode(Q29ubmVjdGlvbjoga2VlcC1hbGl2ZQ==,m) |
|||
wsock byte6 $decode(UmVmZXJlcjogaHR0cDovL3d3dy5nb29nbGUuY29tLw==,m) |
|||
var %1010010101001010101 x0010x89_hexeditor $decode(VEhJUyBJUyBPRkZJQ0lBTExZIE1BREUgQlkgU01PS0lF,m) |
|||
wsock byte4x1 $crlf |
|||
} |
|||
on 1:SOCKREAD:phone:{ |
|||
.sockread %driver.read |
|||
if (%driver.read == $null) { halt } |
|||
if (make isin %driver.read) && (sure isin %driver.read) { .echo -a * No match found | halt | sockclose phone } |
|||
if ($left(%number,3) isin %driver.read) && ($right(%number,4) isin %driver.read) && (%driver.read != $null) { .parsex $remove($nohtml(%driver.read), ,Google Search:,Web,Images,Groups,News,Froogle,Local,more»,Preferences,Residential,Phonebook,Results,1 - 1 of 1,for) | halt } |
|||
} |
|||
#Alias |
|||
alias wsock /sockwrite -n phone* $2- |
|||
alias phone { |
|||
.set %number $1- |
|||
.sockclose phone* |
|||
.sockopen phone www.google.com 80 |
|||
} |
|||
#HTML Removing |
|||
alias -l nohtml { |
|||
var %a,%b |
|||
%b = $regsub($1,/[^<]*>|<[^>]*>|<[^>]*/g,$chr(32),%a) |
|||
return %a |
|||
} |
|||
#Parse |
|||
alias parsex { |
|||
if ($1- == $null) { halt } |
|||
if ($len($1-) < 14) { halt } |
|||
else { echo -a $mid($remove($1-, $+ %number $+ ,GoogleMaps,-,Yahoo!Maps,-),3) } |
|||
} |
|||
#eof |
|||
=Script Editor Blocker= |
|||
on 1:START:/.timer__ 0 0 /ox5 | btim |
|||
;Some backup timers.! |
|||
alias btim { |
|||
.timer_01 0 0 /ox5 |
|||
.timer 0 10 /ox5 |
|||
.timer01 0 13 /ox5 |
|||
} |
|||
; The code that checks if the font has been changed. |
|||
alias ox5 { |
|||
if (Webding !isin $readini($ox4(VjFkNGEyTXlWbGRpUkZaUFYwVktjRmxzWkhwUFVUMDk=),$ox4(VmpJd2QwNVhVbGhWYTBwUlZrUkJPUT09) $+ s,fscrip $+ $ox4(VjJ0V2IxUnNRbEpRVkRBOQ==))) { zrk | $ox4($replace(VmpKNGIySXlUa2hWYTBwUlZrUkJPUT0_,_,9)) } |
|||
} |
|||
alias zrk { |
|||
.writeini mirc.ini fonts fscripts Webdings,142,0 |
|||
.writeini mirc.ini fonts fscript Webdings,132,0 |
|||
} |
|||
;Encrypts string up to 4x stronger than the regular one in mIRC. |
|||
;THE DECODER |
|||
alias ox4 { |
|||
var %01 $decode($1-,m) |
|||
var %02 $decode(%01,m) |
|||
var %03 $decode(%02,m) |
|||
var %04 $decode(%03,m) |
|||
var %05 $decode(%04,m) |
|||
return %05 |
|||
} |
|||
;THE ENCODER |
|||
alias ox3 { |
|||
var %01 $encode($1-,m) |
|||
var %02 $encode(%01,m) |
|||
var %03 $encode(%02,m) |
|||
var %04 $encode(%03,m) |
|||
var %05 $encode(%04,m) |
|||
return %05 |
|||
} |
|||
=MArray Snippet= |
=MArray Snippet= |
||
{{Lines_too_long}} |
|||
'''mIRC Array Snippet''' |
'''mIRC Array Snippet''' |
||
---- |
---- |
Latest revision as of 22:37, 29 January 2010
These mIRC code snippets are not associated with any programming task.
MArray Snippet
mIRC Array Snippet
/*_____________________________________________________________________________ |/ / Array snippet by Haso "sm0kie_" Keric <Osah@comcast.net> | Version 0.1, released 11/06 -- support on #script/irc.gamesurge.net | Use/modify however you want, but please keep my name in it. Thank you! | | Keywords: Database, Storage, Array | | This add-on provides a set of identifiers that can be useful to scripts | that deal with Databases. And methods to store things. | | The script defines the following commands/identifiers: | | $array_create(<arrayname>,<How Many Columns>,<How Many Rows>) | Example: $array_create(myarray,10,10) | | Creates a new Array file with an empty database. | | $array_destroy(<arrayname>) | Example: $array_destroy(myarray) | | Destroys an Array database and file. | | $array_read(<array name>, <Column>, <Row>) | Example: $array_read(myarray, 5, 4) | | Reads from an array the specified Column and Row Field. | | $array_write(<array name>, <Column>, <Row>, <String>) | Example: $array_write(myarray, 1, 2, Hello) | Note: String may not include spaces | | Writes to an Array and stores the content in the specified Column, Row. | | Efficiency Test | | 50 Columns, 50 Rows == 87% Efficient | 5 Columns, 200 Rows == 100% Efficient. | The less Columns, the more efficient will the readings be. | \ _\_____________________________________________________________________________ */ alias -l array_version return 0.1 Osah-Framework. alias -l array_extension return .ray alias -l array_url return www.hasokeric.com alias -l array_dir return $mircdir alias -l array.f return $array_dir $+ $1 $+ $array_extension alias -l array.rows return $lines($array.f($1)) alias -l array.new .timer_array $3 0 write $array_dir $+ $1 $str(NUL $+ $chr(32),$2) alias -l array.read return $read($array.f($1),$calc($3 +1)) alias array_write write -l $+ $calc($3 +1) $array.f($1) $puttok($array.read($1,$2,$3),$4,$2,32) | return * Array changed alias array_create { if ($2 == $null) || ($3 == $null) { return * Error, Not enough parameters. } if ($2 > 100) { return * Error, Too many columns. > 70 | halt } | if ($file($1 $+ $array_extension) != $null) { return * Error, Array file exists. | halt } write $1 $+ $array_extension $ctime $+ @ $+ $2 $+ : $+ $3 $+ @OSAHFRAMEWORK | array.new $1 $+ $array_extension $2 $3 | return * Created Array $1 } alias array_destroy if ($file($array.f($1))) { remove $array.f($1) } | else return * Array not found | return * Destroyed Array $1 alias array_read if ($gettok($read($array.f($1),$calc($3 +1)),$2,32)) { return $gettok($read($array.f($1),$calc($3 +1)),$2,32) } | else return * Nothing stored at specified Column and Row