Cut Script. What about it? Need one.

General Help Questions and Answers

Moderators: L|B, cryoa, Riamus, XMog

Cut Script. What about it? Need one.

Postby Munlyness » Wed Jul 14, 2004 9:01 pm

Munlyness
Member
Member
 
Posts: 2
Joined: Wed Jul 14, 2004 8:44 pm

Explain

Postby Riamus » Thu Jul 15, 2004 8:27 am

You can find me at #Invision on irc.irchighway.net or #OldGames on irc.undernet.org if you need me for anything.
User avatar
Riamus
Global Moderator
Global Moderator
 
Posts: 1783
Joined: Fri May 03, 2002 9:01 pm
Location: Massachusetts, USA

Postby Munlyness » Fri Jul 16, 2004 1:27 am

I suppose that would help wouldn't it. lol. *shifty gaze* I'll just c/p it here and you can take a gander. :oops:

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
}
}

--------------------------------------------------------------------------

I know it's long, but I'm adicted to this script like a fiend on crack. Is there anyway I can fix it?
Munlyness
Member
Member
 
Posts: 2
Joined: Wed Jul 14, 2004 8:44 pm

Ok

Postby Riamus » Fri Jul 16, 2004 7:55 am

Ok, I'll look at this. Just to check... you did put the alias part in your alias tab rather than the remote tab, right?

I may end up rewriting this script if I don't see why it's not working. If so, what specifically do you want it to do. Just split long lines onto new lines while keeping colors and bold/underline when splitting? Or is there something else you want it to do? I haven't looked at it fully, so haven't seen exactly what it is doing yet.
You can find me at #Invision on irc.irchighway.net or #OldGames on irc.undernet.org if you need me for anything.
User avatar
Riamus
Global Moderator
Global Moderator
 
Posts: 1783
Joined: Fri May 03, 2002 9:01 pm
Location: Massachusetts, USA


Return to General Help

Who is online

Users browsing this forum: Bing [Bot] and 29 guests

cron