automatic messages and timing
 
Post new topic   Reply to topic    Hawkee.com Forum Index -> mIRC Scripting
 
amclay  -  Tue Jul 10, 2012 2:49 am Reply with quote
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 Reply with quote
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 Reply with quote

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:

Code

 

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 Reply with quote

Code

 
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 Reply with quote
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 Reply with quote
You might as well use the ping event to do this, which I told you about in the beginning:

Code

 
the code sends out the ad when your chat server pings you.
Fossa  -  Thu Jul 19, 2012 4:24 pm Reply with quote
Vulnerable (:
Jethro  -  Fri Jul 20, 2012 10:09 am Reply with quote
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.
blackvenomm666  -  Fri Jul 20, 2012 3:27 pm Reply with quote
+1 jethro you tell him
Display posts from previous:   
Post new topic   Reply to topic    Hawkee.com Forum Index -> mIRC Scripting All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.