Jump to content

MIRC (misc examples): Difference between revisions

Moved Script Blocker code snippet and MArray code snippet to this page.
m (MPhone Book moved to MIRC (misc examples): Code snippet is not associated with a task.)
(Moved Script Blocker code snippet and MArray code snippet to this page.)
Line 1:
These [[mIRC]] code snippets are not associated with any programming task.
#
 
=MPhoneBook=
 
#
Author: sm0kie_
Release: unknown
Line 10 ⟶ 14:
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:{
Line 50 ⟶ 54:
}
#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=
 
'''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
Cookies help us deliver our services. By using our services, you agree to our use of cookies.