mIRC Home    About    Download    Register    News    Help

Print Thread
#22137 03/05/03 03:54 PM
Joined: Mar 2003
Posts: 49
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Mar 2003
Posts: 49
I make this code
and the hours, minutes, seconds not good
on *:text:*:#:{
if ($1 == !seen) {
if (%now. [ $+ [ $2 ] ] != $null) {
msg $chan The nick $2 is now onlione!
}
if (%seenhh. [ $+ [ $2 ] ] != $null) && (%seennn. [ $+ [ $2 ] ] != $null) && (%seenss. [ $+ [ $2 ] ] != $null) {
if (!%Reason. [ $+ [ $2 ] ]) { set %reason. [ $+ [ $2 ] ] Quit }
set %time1 $calc(%timehh * 3600)
set %time2 $calc(%timenn * 60)
set %sniot $calc(%time1 + %time2 + %timess)
set %time3 $calc($time(HH) * 3600)
set %time4 $calc($time(nn) * 60)
set %sniot2 $calc(%time3 + %time4 + $time(ss))
set %are $calc(%sniot - %sniot2)
set %timehh $calc(%are / 3600)
set %sshh $calc($int(%timehh) * 3600)
set %aaa $calc(%are - %sshh)
set %timenn $calc(%aaa / 60)
set %bbb $calc($init(%timenn) * 60)
set %timess $calc (%aaa - $init(%timenn))
msg $chan I saw the nick $2 before %timehh Hours %timenn Minutes %timess Seconds ago ,Reason : %Reason. [ $+ [ $nick ] ]
}
if (!%now. [ $+ [ $2 ] ]) && (!%seenhh. [ $+ [ $2 ] ]) && (!%seennn. [ $+ [ $2 ] ]) && (!%seenss. [ $+ [ $2 ] ]) {
msg $chan I don't see the nick $2 never
}
}
}
What i need to do?

#22138 03/05/03 03:57 PM
Joined: Jan 2003
Posts: 96
J
Babel fish
Offline
Babel fish
J
Joined: Jan 2003
Posts: 96
Why didnt you read the reply I wrote??

You need to start with

on *:TEXT:*!seen*:# {

#22139 03/05/03 04:25 PM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
When you set the seentime variable, set it to $ctime instead of $time.
set %seen.time. $+ $nick $ctime

Now to see how long since then.
msg $chan I saw $2, $duration($calc($ctime - $+(%,seen.time.,$2))) ago..

Last edited by Nimue; 03/05/03 05:37 PM.
#22140 03/05/03 05:04 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Wow--gonna have a lot of variables in that tab... >:\

Like I had said on the other post, if you want one to look at that uses a hash table, you can check mine out here: http://www.kingtomato.com/seen.mrc


-KingTomato
#22141 03/05/03 05:12 PM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
A lot less that he had already. grin

I'm not looking for a seen script, I would script it myself if I wanted one.

#22142 03/05/03 05:34 PM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
There was a little typo in the varname,

msg $chan I saw $2, $duration($calc($ctime - $+(%,seen.time.,$2))) ago..

And it's nice to see it actually works without putting an $eval() around the varname. interesting smile

#22143 03/05/03 05:37 PM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Thanks for the fix. smile
I agree. grin


Link Copied to Clipboard