mIRC Homepage
Posted By: SnakeRulez Help me pleaseee.. - 29/08/03 10:25 AM
I doing :
on *:dialog:aw:*click:1:{
set %aw on
set %aw.1 $ctime
set %aw.reason $did(aw,7).text
away %aw.reason
set %aw.nnick $did(aw,5).text
set %aw.onick $me
set %aw.since $time
ame 12Is now away, Reason :4 %aw.reason $+  %logo
.timer1 0 %aw.time /ame 12Is still away, Reason :4 %aw.reason $+ 12, I was away for4 $duration($calc($ctime - %aw.1)) 12, since4 %aw.since $+  %logo
nick %aw.nnick
dialog -x aw
}
alias aw.back {
if (%aw == on) {
ame 12Is back from4 %aw.reason 12for4 $duration($calc($ctime - %aw.1)) 12, since4 %aw.since $+  %logo
.away
.timer1 off
nick %aw.onick
set %aw off
}
}
alias aw.back {
if (%aw == on) {
ame 12Is back from4 %aw.reason 12for4 $duration($calc($ctime - %aw.1)) 12, since4 %aw.since $+  %logo
.away
.timer1 off
nick %aw.onick
set %aw off
}
}
and

this is the messages in channel
when i away :
[13:21:52] * SnakeRulez Is now away, Reason : lol [F]REES [S]cript
when i still away :
[13:22:52] * SnakeRulez-Away Is still away, Reason : lol, I was away for 0secs , since 13:21:52 [F]REES [S]cript
when i back :
[13:22:57] * SnakeRulez-Away Is back from lol for 1min 5secs , since 13:21:52 [F]REES [S]cript
and the problem is when i still away, this wrote 0secs
and the code of still away and back from away is :
$duration($calc($ctime - %aw.1))

so what the problem?

help me please why this wrote 0secs
frown(
Posted By: MrPeepers Re: Help me pleaseee.. - 29/08/03 10:37 AM
Try $duration($awaytime) instead that should work
Posted By: SnakeRulez Re: Help me pleaseee.. - 29/08/03 10:41 AM
Not working, its still 0secs
);::
Posted By: SladeKraven Re: Help me pleaseee.. - 29/08/03 05:34 PM
Code:
$duration($calc($awaytime))
Posted By: KingTomato Re: Help me pleaseee.. - 29/08/03 06:08 PM
$awaytime must be used before returning from away..

Good:
I have been away $duration($awaytime)
/away

Bad:
/away
I have been away $duration($awaytime)
Posted By: SnakeRulez Re: Help me pleaseee.. - 29/08/03 08:52 PM
thank you sladerkraven its working great!!!!!!!!! smile smile
Posted By: SladeKraven Re: Help me pleaseee.. - 30/08/03 09:32 AM
You're welcome. smile
© mIRC Discussion Forums