mIRC Homepage

Can someone help me maker a uptime script?

Posted By: Dunsparth

Can someone help me maker a uptime script? - 25/11/13 03:23 PM

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 ^_^
Posted By: HorseC

Re: Can someone help me maker a uptime script? - 25/11/13 08:25 PM

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.)

Posted By: Dunsparth

Re: Can someone help me maker a uptime script? - 25/11/13 10:47 PM

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.
Posted By: westor

Re: Can someone help me maker a uptime script? - 26/11/13 08:47 AM

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)
© 2022 mIRC Discussion Forums