| |
|
| amclay - Tue Jul 10, 2012 2:49 am |
|
|
| I want to post an automated advertisement every 30 minutes, but not have it keep repeating once the chat has quieted down. Is there a fairly easy way of doing this? Something like a variable that counts up per message, and every X messages it posts the advertisement? Thanks for your help! |
|
|
|
| Jethro - Tue Jul 10, 2012 9:34 am |
|
|
| You could use the on ping event so when the server pings you, you trigger it to send the advertisement. How often does your chat server ping you? |
|
|
|
| amclay - Tue Jul 10, 2012 12:53 pm |
|
|
Jethro wrote You could use the on ping event so when the server pings you, you trigger it to send the advertisement. How often does your chat server ping you?
uhhhhhhhhhh can you explain this a little more? This is what I have right now:
The chat servers I am using are a bit...unstable to say the least. I'd rather have it have a variable store the # of lines sent, and if it reaches a certain # of lines, send the ad, and reset the variable.
here's some pseduo code
on text:#chan {
variable++;
if ( variable > 40 { msg ad , reset variable }
Jethro, you're awesome btw, you have been super helpful! I know you must get it a lot, but holy crap you are amazing <3 |
|
|
|
| Jethro - Mon Jul 16, 2012 7:41 am |
|
|
| the snippet will count the lines of text in a channel, and if the channel reaches more than 40 lines, the code sends the advertisement. If you haven't sent any advertisement within 20 minutes, which means the channel has become silent, the advertisement will stop. |
|
|
|
| amclay - Tue Jul 17, 2012 8:30 pm |
|
|
| Is there an easy way to make sure it doesn't post it too often if the channel becomes super busy? So based on # of lines AND time? |
|
|
|
| Jethro - Wed Jul 18, 2012 8:43 am |
|
|
| You might as well use the ping event to do this, which I told you about in the beginning:the code sends out the ad when your chat server pings you. |
|
|
|
| Fossa - Thu Jul 19, 2012 4:24 pm |
|
|
| Vulnerable (: |
|
|
|
| Jethro - Fri Jul 20, 2012 10:09 am |
|
|
| Fossa, is that a sarcasm or answer? Tell me what's the meaning of your post at this help forum? Be a helpful, humble member and don't act like a stuck-up prick please. |
|
|
|
|
|
|