Author Topic: Requesting this script to have a timer inserted into it.  (Read 2984 times)

Fevix

  • Newbie
  • *
  • Posts: 7
Requesting this script to have a timer inserted into it.
« 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

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Requesting this script to have a timer inserted into it.
« Reply #1 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.
The IceChat God

Fevix

  • Newbie
  • *
  • Posts: 7
Re: Requesting this script to have a timer inserted into it.
« Reply #2 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.

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Requesting this script to have a timer inserted into it.
« Reply #3 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.
The IceChat God

Fevix

  • Newbie
  • *
  • Posts: 7
Re: Requesting this script to have a timer inserted into it.
« Reply #4 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.

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Requesting this script to have a timer inserted into it.
« Reply #5 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.
The IceChat God