mIRC Home    About    Download    Register    News    Help

Print Thread
Help me pleaseee.. #44742 29/08/03 10:25 AM
Joined: Mar 2003
Posts: 49
S
SnakeRulez Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Mar 2003
Posts: 49
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(

Re: Help me pleaseee.. #44743 29/08/03 10:37 AM
Joined: Aug 2003
Posts: 136
MrPeepers Offline
Vogon poet
Offline
Vogon poet
Joined: Aug 2003
Posts: 136
Try $duration($awaytime) instead that should work


In Virginia, chickens cannot lay eggs before 8:00 a.m., and must be done before 4:00 p.m.
Re: Help me pleaseee.. #44744 29/08/03 10:41 AM
Joined: Mar 2003
Posts: 49
S
SnakeRulez Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Mar 2003
Posts: 49
Not working, its still 0secs
);::

Re: Help me pleaseee.. #44745 29/08/03 05:34 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
$duration($calc($awaytime))

Re: Help me pleaseee.. #44746 29/08/03 06:08 PM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
$awaytime must be used before returning from away..

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

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


-KingTomato
Re: Help me pleaseee.. #44747 29/08/03 08:52 PM
Joined: Mar 2003
Posts: 49
S
SnakeRulez Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Mar 2003
Posts: 49
thank you sladerkraven its working great!!!!!!!!! smile smile

Re: Help me pleaseee.. #44748 30/08/03 09:32 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
You're welcome. smile