Is there a way to count how many times something has been done i.e:
var %scount = 0
inc %scount
And increase it everytime someone joins a channel. I'd like to know how to make it so that I can count and reset how many people join each day to my channel. I don't mind it being ini either. I'm using MIRC.
@Yawhatnever: Could you please, give me an example so for ex:
on !*:join:#:
{
var %jcount = 0
inc $jcount
msg $chan Welcome to the chat $1, you're visitor %jcount today!
}
I'm not sure how to do my code, but hold on; @Yawhatnever
on 1:connect:
/set %jcount 0
}
on *:join:#:
{
inc %jcount
msg # Visitor %jcount
}
on *:TEXT:!resetjoin:#:
{
if($nick isop)
{
unset %scount
/set $jcount 0
}
}
Is this right?
No, there are a lot of issues with those little snippets. I'd recommend heading to http://en.wikichip.org/wiki/mirc/introduction and reading through as many of the articles as you can sit through in the basics category in the navigation pane.
Here's a little piece for resetting the count that would go with the exampe join script I posted earlier:
on *:text:!resetjoin:#:{
if ($nick isop $chan) {
unset %scount
}
}
All you need is
inc %scount
. This will automatically create a global variable that persists (if it doesn't exist) and will increment it by 1.