IceChat Forums

IceChat 7 => IceChat 7 Scripts => Topic started by: Fevix on November 27, 2011, 03:08:51 PM

Title: Requesting this script to have a timer inserted into it.
Post by: Fevix on November 27, 2011, 03:08:51 PM
It works perfectly, so long as you don't have any self-flood protection enabled.  I just want this script made to only post one line per second, to prevent insanely long RP posts from getting the user booted for flood, and to make it post properly with self-flood protection enabled. (Currently, the last part will post after the first, then the second posts, then so on until the second-to-last part)

Code: [Select]
Function OUTTEXT(OutGoingText)
If Len(OutGoingtext) > 420 then
Do
pos = Instr(390,OutGoingText, " ")
part = left(OutGoingText,pos)
Sendcommand part & " [c]"
OutGoingText = Replace(OutGoingText,part,"")
Loop while len(outgoingtext) > 390
sendcommand "/say " & outgoingtext & " [e]"
Else
    OutText = OutGoingText
End if
End Function
Title: Re: Requesting this script to have a timer inserted into it.
Post by: Snerf on November 28, 2011, 12:42:41 PM
The instead of issuing a /say command, issue a /timer command instead.

SendCommand "/timer 1 1 1 /say " & outgoingtext &  "[e]"

Just change the timer command for the delay (3rd value) so it will delay the command accordingly.
Title: Re: Requesting this script to have a timer inserted into it.
Post by: Fevix on November 28, 2011, 06:43:21 PM
But then it'll send it 1 second after the first one, meaning that that would only solve for triple-buffer posts. I'm trying to get the "Do ...... Loop" area to only send one message per second.
Title: Re: Requesting this script to have a timer inserted into it.
Post by: Snerf on November 28, 2011, 09:05:56 PM
Change the delay on the timer.

Read the documentation or type /timer on its own, to see what options the timer command has.
Title: Re: Requesting this script to have a timer inserted into it.
Post by: Fevix on November 29, 2011, 04:39:41 AM
But any timer here would mean that any low-buffer posts will have a longer delay, and any high-buffer posts will be out of order.
Title: Re: Requesting this script to have a timer inserted into it.
Post by: Snerf on November 29, 2011, 03:23:13 PM
Well, thats the nature of the beast.

Don't paste in such long messages, problem solved, lol.

IceChat 7 does not really have a way to parse out these long messages, as it should be the users responsibility as to what he/she is pasting in a channel.

It kind of sucks, as a timer doesnt really work if you are doing it multiple times, you need to build up some kind of a queue system then to add the commands to, and make it parse through the queue.