Top

Word changer


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  4.4 (of 5 scores)
Date Added  Mar 11, 2006
Last Updated  Mar 11, 2006
Tags  alias  change  changer  word 

Introduction

just type /change word word2 and everytime you type word it will
show it as word2 (only an example..)

Grab the Code

alias change { if ($1) && ($2) { set %word.b $1 | set %word.g $2 } }
on *:INPUT:*: { if ($left($1,1) != /) { msg $active $replace($1-,%word.b,%word.g) | haltdef } }
 

Comments

  (8)  RSS
KuTsuM
Comments: 141
 
mIRC Snippet:  Word changer
Posted on Mar 11, 2006 6:33 pm
The code won't work, simply because of the input event
Your code:
on *:INPUT*:
Correct code:
on *:INPUT:*:

Also, these kind of codes are much more efficient, and usefull, if your store the information in a way that you can replace more than one word.
KuTsuM
Comments: 141
 
mIRC Snippet:  Word changer
Posted on Mar 11, 2006 6:36 pm
Oh yeah, and a cleaner code tip:

If you want to evaluate 2 parameters, it's better not to check if both $1 and $2 exist, when you can evaluate $2 and see if it exists, if it doesn't, it'll do the same exact thing you just did
IE: if ($2) { //code }

Just a tip :)
Scruffy
Comments: 77
 
mIRC Snippet:  Word changer
Posted on Mar 11, 2006 8:16 pm
bah oops fixed o.o
Tool
Comments: 8
 
mIRC Snippet:  Word changer
Posted on Mar 12, 2006 7:57 pm
dont really get it...
biase
Comments: 5
 
mIRC Snippet:  Word changer
Posted on Mar 15, 2006 6:31 pm
Just A Tip: in case you want to have many/multiply words to change.

alias change { if ($2) { set %word.bg. [ $+ [ $1 ] ] $2 } }

on *:INPUT:*: {
if ($left($1,1) != /) {
var %i = 1 , %t = $1-
while ($gettok(%t,%i,32)) {
if (%word.bg. [ $+ [ $v1 ] ]) %t = $reptok(%t,$gettok(%t,%i,32),$v1,1,32)
}
msg $active %t
haltdef
}
}

Another Tip: just another idea, this little codes is use to see how many words to change in %variables and what the words are.

;usage
; $words return total words you have set with /change in %variables
; /words will echo all the words at your status window
alias words {
if ($isid) return $var(%word.bg.*,0)
var %i = 1
while ($var(%word.bg.*,%i)) {
echo -s $gettok($v1,3,46) == %word.bg. [ $+ [ $gettok($v1,3,46) ] ]
inc %i
}
}
`Kazuma
Comments: 254
 
mIRC Snippet:  Word changer
Posted on Mar 16, 2006 8:04 am
Gj.
KuTsuM
Comments: 141
 
mIRC Snippet:  Word changer
Posted on Mar 16, 2006 5:07 pm
Tool.. this script works like a talker, it will replace whatever word you specify with another word
Scruffy
Comments: 77
 
mIRC Snippet:  Word changer
Posted on Mar 17, 2006 4:34 pm
and you can make fun of people with it! :D

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom