mIRC Home    About    Download    Register    News    Help

Print Thread
#23088 07/05/03 11:43 PM
Joined: May 2003
Posts: 25
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: May 2003
Posts: 25
Ok i made this script so when some one says lol it says laughing out loud but it dont work to good

on *:INPUT:*:{
if ( $1 == lol ) {
msg $active 4L12a4u12g4h12i4n12g 4O12u4t 12L4o12u4d12 $2-
halt
}

when i type lol it work but i cant say any thing after lol, So if you can help me out then thats cool.


Hmm.....IRC! www.warriorsouls.com
#23089 08/05/03 06:20 AM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
sure, just use $replace.
ex.
on *:INPUT:*:{
if (/* !iswm $1) {
say $replace($1-,lol,4L12a4u12g4h12i4n12g 4O12u4t 12L4o12u4d12)
halt
}
}
if (/* !iswm $1) means that what u type is not start with a "/" (is not a command)


#23090 08/05/03 07:54 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
alias acronym {
/unset %finmsg
/set -u0 %l 1
while (%l <= $len($$1-)) {
if ($mid($$1-, %l, 1) == $chr(32)) { /set -u0 %finmsg $+(%finmsg,<s>) }
if (2 // %l) { /set -u0 %finmsg $+(%finmsg,12,$mid($$1-, %l, 1)) }
else { /set -u0 %finmsg $+(%finmsg,4,$mid($$1-, %l, 1)) }
/inc -u0 %l
}
return $replace(%finmsg, <s>, $chr(32))
}

on *:INPUT:*: {
; voice out commands
if ($left($$1, 1) != $readini($mircini, text, commandchar)) {
/set %mymsg $$1-
/set %mymsg $replace(%mymsg, lol, $acronym(Laughing out loud))
/set %mymsg $replace(%mysql, rofl, $acronym(Rolling on Floor Laughing))
; ...
; More Replacements
; ...
/msg $active %mymsg
; Kill Variable (Leave Things Tidy
/unset %mymsg
; stop the double talk
/halt
}
}

All I did was just add the command char reference, so in the event it's changed in the options dialog, this will carry over. Also, to save you some time when making the acronyms, I made a simple alias to convert them to the over-other-color theme you can going on.


-KingTomato
#23091 10/05/03 04:04 AM
Joined: May 2003
Posts: 25
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: May 2003
Posts: 25
Thanks for your help:)


Hmm.....IRC! www.warriorsouls.com
#23092 10/05/03 06:15 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
No problem. >:D


-KingTomato

Link Copied to Clipboard