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