mIRC Home    About    Download    Register    News    Help

Print Thread
D
Dunsparth
Dunsparth
D
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 ^_^

Joined: Mar 2004
Posts: 342
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Mar 2004
Posts: 342
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.)


D
Dunsparth
Dunsparth
D
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.
Joined: Dec 2008
Posts: 1,483
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,483
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)


Link Copied to Clipboard