mIRC Home    About    Download    Register    News    Help

Print Thread
Can someone help me maker a uptime script? #243533 25/11/13 03:23 PM
Joined: Nov 2013
Posts: 19
D
Dunsparth Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Nov 2013
Posts: 19
Hello i am fairly new to mIRC and it's scripting language, i have only been doing this for a day but have been working on making a chat bot for my live stream, i have alot of it built and working already and now understand the language a little bit.

I want am posting here because i want to make a script so that if someone types !uptime in my stream, it shows them how long i have been streaming for.

So for example something like this.

on *:TEXT:!uptime:#: {
if $nick {
msg $chan the stream has currently been up for [[ .timer however long the stream has been live for.. ]]
}
}

Now i don't really know how to make a timer thru mIRC script editor.
And i dont know if there is a way that it can automaticly recognize when i go live, or if ill have to type a command like !uptimestart too start the timer so if someone types !uptime it tells them the time, if thats the case i don't mind, i hope i was able too give enough details for someone to help me ^_^

Re: Can someone help me maker a uptime script? [Re: Dunsparth] #243538 25/11/13 08:25 PM
Joined: Mar 2004
Posts: 526
HorseC Offline
Fjord artisan
Offline
Fjord artisan
Joined: Mar 2004
Posts: 526
you can use mirc's built in timer, which can be set to either total connect time for the client running OR current connect time (use that option)...
then use this:

; uptime response
on *:input:#mirc: {
if ($1 == !uptime) {
/timeruptime 1 04 //say my current session connect time: $duration($online)
}
}

I put a little delay in the say just to make it look like something was being processed (though the response could be
immediate.

Remember since its on text someone else will have to test it your doing !uptime will NOT be processed (you could do an on input too, if you wanted to use it.)



Help others! It makes the world a better place, Makes you feel good, and makes you Healthy!
Re: Can someone help me maker a uptime script? [Re: HorseC] #243541 25/11/13 10:47 PM
Joined: Nov 2013
Posts: 19
D
Dunsparth Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Nov 2013
Posts: 19
Originally Posted By: HorseC
you can use mirc's built in timer, which can be set to either total connect time for the client running OR current connect time (use that option)...
then use this:

; uptime response
on *:input:#mirc: {
if ($1 == !uptime) {
/timeruptime 1 04 //say my current session connect time: $duration($online)
}
}

I put a little delay in the say just to make it look like something was being processed (though the response could be
immediate.

Remember since its on text someone else will have to test it your doing !uptime will NOT be processed (you could do an on input too, if you wanted to use it.)



Thank you very much i appreciate it smile
i also have a quick question how would i make a $nick capital ?
So there nickname is capitalized.

Last edited by Dunsparth; 25/11/13 11:49 PM.
Re: Can someone help me maker a uptime script? [Re: Dunsparth] #243543 26/11/13 08:47 AM
Joined: Dec 2008
Posts: 1,512
westor Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,512
Originally Posted By: Dunsparth
Originally Posted By: HorseC
you can use mirc's built in timer, which can be set to either total connect time for the client running OR current connect time (use that option)...
then use this:

; uptime response
on *:input:#mirc: {
if ($1 == !uptime) {
/timeruptime 1 04 //say my current session connect time: $duration($online)
}
}

I put a little delay in the say just to make it look like something was being processed (though the response could be
immediate.

Remember since its on text someone else will have to test it your doing !uptime will NOT be processed (you could do an on input too, if you wanted to use it.)



Thank you very much i appreciate it smile
i also have a quick question how would i make a $nick capital ?
So there nickname is capitalized.


try use $upper($nick)


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-