by Munlyness26 » Fri Jun 09, 2006 9:47 pm
Alias:
get_end_cc {
if ($prop == bold) return $iif($calc($count($$1,) % 2),$true,$null)
if ($prop == underline) return $iif($calc($count($$1,) % 2),$true,$null)
if ($prop == reverse) return $iif($calc($count($$1,) % 2),$true,$null)
var %re = /(\d{1,2}(?:,\d{1,2})*)(?:[^]*)$/
!.echo -q $regex(get_last,$$1,%re)
return $iif($regml(get_last,1),$ifmatch,$null)
}
Remote:
on *:input:*: {
; Rennir Cut Script v2.5
;
; What's New:
; - Color coded text support
;
; Author: Rennir Ivarsson
; Date: Friday, March 05, 2004
;
; Please backup your old script before using and always test this script
; before you decided to use it in live chat.
;
; USE AT YOUR OWN RISK Don't blame me if things blow up, I tried.
;
; Note: This script requires the get_end_cc script in your alias section
; to work, if it is NOT there, it will not work.
if ( ( $left($1,1) != / ) || ( $1 == /me ) ) {
;
; Customize these to your liking. Note, your custom markers may need the
; '01,00' color codes as well.
;
var %next = $chr(3) $+ 10<-next->
var %continue = $chr(3) $+ 10<-cont->
var %done = $chr(3) $+ 10<-end->
var %more = $chr(3) $+ 10<-more->
;
; Default colors, change if you must but for nearly everyone, don't touch.
var %emote_c =
var %say_c =
;
var %textlen = $len($1-)
;
if (%textlen > 400) {
var %pos = 1
var %text = $mid($1-, %pos, 400)
var %firsttime = 1
var %lastcolor = $null
var %nextcolor = $null
while ( %text != $null ) {
if ( $len($deltok(%text, -1, 32)) < 370 ) {
%text = $left(%text, 370)
inc %pos 370
}
else {
%text = $deltok(%text,-1,32)
inc %pos $len(%text)
inc %pos
}
var %outtext = %text
%text = $mid($1-, %pos, 400)
if (%firsttime == 1) {
%lastcolor = $get_end_cc(%outtext)
if ($gettok(%outtext, 1, 32) == /me) {
%outtext %next
if (%lastcolor == $null) {
%lastcolor = %emote_c
}
}
else {
say %outtext %next
if (%lastcolor == $null) {
%lastcolor = %say_c
}
}
%firsttime = 0
}
else {
var %newcolor = $chr(3) $+ %lastcolor
if (%text != $null) {
say %continue $+ %newcolor %outtext %next
}
else {
if (%textlen <= 945) {
say %continue $+ %newcolor %outtext %done
}
else {
say %continue $+ %newcolor %outtext %more
}
}
%nextcolor = $get_end_cc(%outtext)
if (%nextcolor != $null) {
%lastcolor = %nextcolor
}
}
}
halt
}
}
-------------------------------------------------------------
This is what I -was- using. (Figured it might be helpful) I brought this issue up before, like.. a year ago, but I've had to reformat since then. I tried putting the one in alias in several different places in alias and every time I do Invision goes bizerk. As for the remotes part, that seems to work just fine. I know this because when I put the alias part in alias the script works, but I keep getting really odd other msg's because apparently I'm putting it in a bad place on that page or something. Help?
"Don't open that! It's an alien planet! Is there air?! You don't know!"