Invision Cut Script

General Help Questions and Answers

Moderators: L|B, cryoa, Riamus, XMog

Invision Cut Script

Postby Munlyness26 » Fri Jun 09, 2006 9:13 pm

I have been trying to find a cut script that will work for Invision but have come up empty handed. My old script that I could use on mIRC worked just fine, tried to bring it over to Invision and it didn't work. Can someone tell me what I'm doing wrong, or post to me a cut script that -will- work with Invision. I tend to be a verbose poster and need the help. Thanks.
"Don't open that! It's an alien planet! Is there air?! You don't know!"
Munlyness26
Member
Member
 
Posts: 3
Joined: Fri Jun 09, 2006 9:11 pm
Location: California

Postby 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!"
Munlyness26
Member
Member
 
Posts: 3
Joined: Fri Jun 09, 2006 9:11 pm
Location: California

Postby Riamus » Sat Jun 10, 2006 5:07 am

Anytime you're adding scripts to Invision (or any other script), do not add them to the current script files... Go into aliases or remotes and select File > New. Then put the script it.


Note that you can also include your alias right in the remotes with the rest of your script by just sticking the word alias in front of the first line:

alias get_end_cc {
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 Munlyness26 » Sat Jun 10, 2006 7:42 am

You know, that was so simple that I -never- would have thought of that... ><

It's working just fine now! Thank you much.
"Don't open that! It's an alien planet! Is there air?! You don't know!"
Munlyness26
Member
Member
 
Posts: 3
Joined: Fri Jun 09, 2006 9:11 pm
Location: California


Return to General Help

Who is online

Users browsing this forum: No registered users and 51 guests

cron