Jump to content
xisto Community
Sign in to follow this  
imacul8

Few Mirc Snippets I Have Scripted

Recommended Posts

Just a few things that may come in handy <_<

Backwards text snippet : will revers the text u input

bck {  var %x = 1,%bck  while (%x <= $len($1-)) { %bck = $mid($1-,%x,1) $+ %bck | inc %x }  return %bck}

Usage: $bck(text) ie. //echo -a $bck(hello everyone)
Returns: enoyreve olleh

Random letter/number generator : creates a random letter/number combo for the length specified.

rx {  if ($1 == $null) { echo -a ERROR: You must specify a value for N | halt }  if ($1 !isnum) { echo -a ERROR: The value of N can only be numbers | halt }  if ($1 != $null) {	var %i = $1	while (%i > 0) {	  dec %i	  if ($r(1,3) == 3) { var %r = %r $+ $r(1,9) }	  elseif ($r(1,3) == 2) { var %r = %r $+ $r(A,Z) }	  else { var %r = %r $+ $r(a,z) }	}	return %r  }}

Usage: $rx(N) ie. //echo -a $rx(5)
Returns: w34ci, 7kag1, cxhqx, 15i62

RGB to Hex converter: converts rgb color values into hex color values

toHex {  var %hexChars = 0123456789ABCDEF  var %r.i = $dremain($1,16)  var %g.i = $dremain($2,16)  var %b.i = $dremain($3,16)  var %r.j = $calc((($1 - %r.i) / 16) + 2)  var %g.j = $calc((($2 - %g.i) / 16) + 2)  var %b.j = $calc((($3 - %b.i) / 16) + 2)  return $chr(35) $+ $chrat(%hexchars,%r.j) $+ $chrat(%hexchars,%r.i) $+ $chrat(%hexchars,%g.j) $+ $chrat(%hexchars,%g.i) $+ $chrat(%hexchars,%b.j) $+ $chrat(%hexchars,%b.i)}chrat {  return $mid($1,$2,1)}

Usage $tohex(red,green,blue) ie. //echo -a $tohex(255,255,255)
Returns: #FFFFFF

And thats all from me at the moment, hope these come in handy to somebody :ph34r:

Notice from mayank:
Dont forget to add the code in code tags.

Share this post


Link to post
Share on other sites

you can just do //say $bck(hello everyone)

or add a on input event to your remotes section. and add a popup to enable,disable it from activating.

#bck onON *:INPUT:#: {if ($left($1,1) != /) {msg $active $bck($1-)halt   }} #bck endmenu channel {  &Backwards Text On:.enable bck  &Backwards Text Off:.disable bck}

This should do the job nicely!! :)
Edited by imacul8 (see edit history)

Share this post


Link to post
Share on other sites

you can just do //say $bck(hello everyone)
or add a on input event to your remotes section. and add a popup to enable,disable it from activating.

#bck onON *:INPUT:#: {if ($left($1,1) != /) {msg $active $bck($1-)halt   }} #bck endmenu channel {  &Backwards Text On:.enable bck  &Backwards Text Off:.disable bck}

This should do the job nicely!! :)

Really huh

* /msg: insufficient parameters (line 4, script13.ini)

I think you need to learn a little more and yet //say $bck(TEXT) dosn't work * /say: insufficient parameters

Share this post


Link to post
Share on other sites

you could also do something like

bck {  var %x = 1,%bck  while (%x <= $len($1-)) { %bck = $mid($1-,%x,1) $+ %bck | inc %x }  if ($isid) return %bck  else msg $active %bck}

also you havent added the $dremain alias anywhere.

 

 

Edit

Tractor - the only reason what he posted wouldnt work is if you deleted, or incorectly added the bck alias. If it doesn't work it is through no fault of his.

Edited by Urza (see edit history)

Share this post


Link to post
Share on other sites

good stuff imacul8, thanks for posting

if you dont mind my contribution, i have a useful snippet to post as well, this will kick/ban a user in all channels you have access in.

alias gban {  var %i = 0  while (%i < $chan(0)) {	inc %i	ban $iif($1 ison $chan(%i),-k) $chan(%i) $1 2 $2-  }}

Usage- /gb <nick> [Reason]

also, just for fun-
alias maybe { return $($+($,$r(1,$0)),2) }

Usage- $maybe(yes,no,maybe)
will return either yes, no, or maybe

Share this post


Link to post
Share on other sites

Lol alt did you just get that from when you made it for me today. ^^^ Very good script^^^ I love it somone gets on y nerves im just like /gb HAHAHA Lol its quite fun. And for the alises whats it do?

Share this post


Link to post
Share on other sites

here is a remake of standard mirc alias, amsg

alias amsg {  var %i = 0,%x = 0  while (%i < $chan(0)) {	inc %i	msg $chan(%i) $1-  }  while (%x < $query(0)) {	inc %x	msg $query(%x) $1-  }}

This will msg all channels as well as all queries for the current connection.

Share this post


Link to post
Share on other sites

why on earth would he be posting an alias for it if its a standard mirc identifier lol. :)


Hmm because he wants to? :P


here is a remake of standard mirc alias, amsg

alias amsg {  var %i = 0,%x = 0  while (%i < $chan(0)) {	inc %i	msg $chan(%i) $1-  }  while (%x < $query(0)) {	inc %x	msg $query(%x) $1-  }}

This will msg all channels as well as all queries for the current connection.

So messages all the channels sounds like a normal /amsg whats the dif?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.