IceChat Cut Script

Useful items for all visitors - virus warnings, firewalls, IRC scripts etc

Moderators: Ehlanna, Twerlinger

IceChat Cut Script

Postby Lilly Essor on Thu Dec 03, 2009 9:06 pm

So, I wanted a cut script for IceChat Client users, and the only one that I knew of -- pointed out to me by Krarktel -- was very, very limited as far as I could tell. So, I took it upon myself to write a cutscript that no-one can complain about ;-)

Alright, first off, the explanation:
1- copy the text in the code box and save it in a notepad file as a .ice filetype. This is to make sure that the file saves in Ice V.5 format -- those of you with Ice V.7 will want to save this as .ics . Don't do it. Save the file in the location *\AppData\Local\IceChat\Scripts\ . If you need to, open the Icechat editor window -- the big blue star in your toolbar, click over to scripts and do file-->load-->this
2- customization: you can change the stuff sent at the beginning and end of the lines by changing the value of "moreend", "morestart", and "theend".

V 1.1 Edit : For whatever reason I was looping through the text backwards. This could cause some issues with lastcol, making the cut posts begin with strange colors. It is fixed now, with reviews code below.

V 1.2 Edit : I forgot that color codes can be 2 characters (10 and over, duh) and I believe I've fixed this for lastcol. Before, if you used 10 or higher for your speach color, it would default to just 1 in the next post.

Lilly's Icechat Cut Script V 1.2
Code: Select all
Function OUTTEXT(OutGoingText)
Dim text, num, fired, pos, part1, lc1, lc2, lastcol, colpos
Dim moreend, morestart, theend
Dim sc1, sc2

moreend = " 4<--"
morestart = "4--> "
theend = " 3<<--"

text = OutGoingText
num = 0
fired = 0
lastcol = "6"
Do While Len(text) > 420
   colpos = 0
   fired = fired + 1
   pos = Instr(390,text, " ")
   part1 = Left(text, pos)
   text = Mid(text, pos)
   If num < 1 then
      If left(lcase(part1),3)="/me" then
         SendCommand "/me " & mid(part1,4) & moreend
      Else
         SendCommand "/say " & part1 & moreend
      End If
      num = 1
   Else
      SendCommand "/me " & morestart & "" & lastcol & part1 & moreend
   End If
   Do While colpos+1 < Len(part1)
      lc1 = Left(part1, colpos)
      lc2 = Right(lc1, 1)
      If lc2 = "" then
         lc1 = Left(part1, colpos+1)
         lc2 = Right(lc1, 1)
         lastcol = lc2
         If lastcol = "1" then
            If Not colpos+2 > Len(part1) then
               sc1 = Left(part1, colpos+2)
               sc2 = Right(sc1, 1)
               If IsNumeric(sc2) then
                  lastcol = lc2 + sc2
               End If
            End If
         End If
      End If
      colpos = colpos + 1
   Loop
Loop
If fired < 1 then
   OutText = OutGoingText
Else
   SendCommand "/me " & morestart & "" & lastcol & text & theend
   OutText = ""
End If
End Function
Image
User avatar
Lilly Essor
Novice
Novice
 
Posts: 2
Joined: Thu Dec 03, 2009 11:28 am
Location: East Coast, USA

Re: IceChat Cut Script

Postby Lilly Essor on Thu Dec 03, 2009 9:10 pm

And if you're wondering, the  is the symbol for color, that you get from control+k. It should copy over correctly if you do a select all + paste.
Image
User avatar
Lilly Essor
Novice
Novice
 
Posts: 2
Joined: Thu Dec 03, 2009 11:28 am
Location: East Coast, USA

Re: IceChat Cut Script

Postby Dante_Ambrogio on Sun May 10, 2020 5:01 am

hmmm... I can't get this to work for some reason. Using Ice Chat 7

EDIT: I'm just an idiot.
Loves bite is eternal, welcome or otherwise. Once bitten it twines with your very soul and can never be forgotten

Player of: Dante Ambrogio, Victus Ambrogio|Naut|, Kat`ryn Quel`dalre, Elizabeth Graesyn, Vex Windstrider, Valithren Caradoc, Daelmaron Fyresong, Morgran Fireforge, Feindhara Ingolfr, Gashan Nakajima,
Dante_Ambrogio
Expert
Expert
 
Posts: 147
Joined: Sat May 09, 2020 7:11 am


Return to Public Service

Who is online

Users browsing this forum: No registered users and 1 guest


cron