|
Joined: Mar 2006
Posts: 10
Pikka bird
|
OP
Pikka bird
Joined: Mar 2006
Posts: 10 |
Okay, well I am a n00b at this scripting stuff(started today). I have little knowledge, but ive looked all over the internet and I cannot find what i need.
Basically, I want to make my own uptime script, so i can see my best uptime, aswell as my current uptime and the time set and date. This is what I got so far.. -------------------------- ALIASES ----------------------- ;UPTIME /up //say 3Habib's cool computer has been up for 7.7:7. $uptime(system,1) 3set on $fulldate 7.7:7. - The time is $time
Can anyone sugesst what I can do to improve to to do what I want it to do..Any help will be great. I really want to understand this program.
Last edited by Massari; 10/03/06 12:44 PM.
|
|
|
|
Joined: Oct 2005
Posts: 1,741
Hoopy frood
|
Hoopy frood
Joined: Oct 2005
Posts: 1,741 |
The $uptime identifier only shows your current uptime. You could store your record uptime in a global variable and then include that in your message.
/up {
if ($uptime(system) > $iif($gettok(%uprecord,1,46),$ifmatch,0)) {
say Uptime: $uptime(system,1) (RECORD) set today, $asctime($ctime,H:nn:ss dd/mm/yy)
set %uprecord $+($uptime(system),.,$ctime)
}
else {
say Uptime: $uptime(system,1) Best Uptime: $duration($gettok(%uprecord,1,46)) set on $asctime($gettok(%uprecord,2,46),H:nn:ss dd/mm/yy)
}
}
Check out that code, and see if you can determine how it works. That should help you learn more about mIRC scripting. -genius_at_work
|
|
|
|
Joined: Mar 2006
Posts: 10
Pikka bird
|
OP
Pikka bird
Joined: Mar 2006
Posts: 10 |
Hey, thanks for the response, but I got some questions still. Best Uptime: $duration($gettok(%uprecord,1,46)) set on $asctime($gettok(%uprecord,2,46),H:nn:ss dd/mm/yy) Okay, for that line, that stores the record uptime. but how? what does 1,46 mean? what does $duration, $gettok mean? and also whats the 2,6 :P Thanks
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
try the help
/help $duration /help $gettok
1,46 means the 1st token(chunk) in the string passed, chunks defined by slicing the string up using $chr(46) "." fullstop, example $gettok(qwe.rty.uio,1,46) = qwe 2,46 means 2nd token in the string passed, example $gettok(qwe.rty.uio,2,46) = rty
|
|
|
|
|