mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2014
Posts: 42
K
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Aug 2014
Posts: 42
Hey all smile
iam looking for a solution that my bot checks every 5 min. the userlist and when he find a Name ($nick) who is written into the "User.ini" he starts a timer other users who arent in the ini are ignored.

The timer:
Code:
$+(.timer.,$nick) 0 60 MinuteAlias $+($nick)


Would be awesome when someone can help me out smile

Last edited by Krawalli; 07/04/15 11:42 AM.
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Your description is unclear to me. Please elaborate.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Aug 2014
Posts: 42
K
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Aug 2014
Posts: 42
Sorry im not a engl. native speaker smirk

I try to explain it this way:
- bot checks every 5 min. the complete user list
- when the bot find a user who is also written in the "User.ini" he start the timer i wrote into the first post (important is that the bot check the COMPLETE userlist)


Last edited by Krawalli; 07/04/15 11:53 AM.
Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
This will start a timer when you join a specific channel, which will check if the users on that specific channel are inside your users list and if so, run the timer you mentioned.

Note: do not attempt to edit the code to make it working on any channel, if you want to do that, just say it (it's not as simple as changing #channel to #)


Code:
on me:*:join:#channel:.timercheck_users 0 300 check_users #channel
alias check_users {
  var %a 1,%v
  while ($nick($1,%a)) {
   %v = $v1
   if ($ulist(%v)) && (!$timer(. $+ %v)) $+(.timer.,%v) 0 60 MinuteAlias $nick
   inc %a
  }
}


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Aug 2014
Posts: 42
K
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Aug 2014
Posts: 42
Hey Wims, thanks a lot for your Help!
I try to explain it correctly what i need!

Sometimes my bot is disconnecting from the channel, all timers getting canceld, thats a big problem because i have a point per minute system running.

So i need a script that checks every 5 min all connected users to my chat and reload the timer for everyone who is "registred" into my Point System.

I have 2 ini Files:
User.ini and SpecialUser.ini

In the User.ini is everyone stored who is registred to the Point System. In the SpecialUser.ini are some ppl extra registred so they get more coins per minute.

So when the user is ONLY in the User.ini it have to execute this timer for him:
Code:
$+(.timer.coins.,$nick) 0 60 MinuteAlias $+($nick)


But when the User is in the User.ini AND SpecialUser.ini a other timer has to be executed:
Code:
$+(.timer.coins.,$nick) 0 60 MinuteSpecialAlias $+($nick)



I hope you understand what i need.


tl:dr
Sometimes my bot disconnects, all timers are shutting down. My bot needs to check every 5min all connected users and when they are registred into my .ini files the timer must be activated.

Last edited by Krawalli; 07/04/15 08:07 PM.

Link Copied to Clipboard