mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2015
Posts: 84
F
Babel fish
OP Offline
Babel fish
F
Joined: Jun 2015
Posts: 84
So the goal is to make a "timed" click-to-tweet, but instead of it being an actual timer running and outputting every hour (can become spammy on Twitch channels with few/no viewers) it would instead output after a certain number of lines defined (hard coded to 35, but may change to an adjustable variable).

Code:
on *:text:*:#fonic_artes: {
  if (%cttlines < 35) {
    inc %cttlines
  }
  if (%cttlines = 35) {
    msg # (CTT_MESSAGE) %tweeturl
    set var %cttlines = 0
  }
}

alias cttlines {
  var %cttlines = 0
}


I was thinking setting an alias would work, but I may be thinking backwards on it.

Joined: Jun 2014
Posts: 248
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
Was that a question?

Joined: Jun 2015
Posts: 84
F
Babel fish
OP Offline
Babel fish
F
Joined: Jun 2015
Posts: 84
Yes, I was unable to actually get it trigger, and I was hoping if there was an actual issue with the code if it could be pointed out or help point me in the right direction.

Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
You need double "=" in if-condition to make it work. Alias can be deleted, no use for it. "set var %blabla = 0" should be "set %blabla 0".
p.s. when you create %x in alias with /var command - it will be unseted when alias is over, thats another reason to delete your alias.

Last edited by splinny; 08/06/15 05:15 AM.

Dont give a fish - teach to fish!
Joined: Jun 2015
Posts: 84
F
Babel fish
OP Offline
Babel fish
F
Joined: Jun 2015
Posts: 84
Thanks, I appreciate the help in fixing the code. I ended up making some simple mistakes with missing the "==" part.

With this, I can use this in a nice thing later on.

Cheers.


Link Copied to Clipboard