mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2003
Posts: 7
R
rtil Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: May 2003
Posts: 7
a {
timer1 1 1 /amsg 14rtil15 is 14away: $2
If ( $1 == hw ) { nick rtil[a|hw] }
ElseIf ( $1 == draw ) { nick rtil[a|drawing] }
Else { nick rtil[a] }
away $2
timer2 0 1 /inc %time 1
timer3 0 60 set %time 0
timer4 0 60 /inc %mtime 1
timer5 0 3600 /set %mtime 0
timer6 0 3600 /inc %htime 1
}
b {
nick rtil
amsg 14rtil15 is 14back ... 14and was 15gone14 for4 %htime 14hours,4 %mtime 14minutes, and4 %time 14seconds.
timer2 off
timer3 off
timer4 off
timer5 off
timer6 off
set %mtime 0
set %htime 0
set %time 0
away
}

Any comments suggestions improvements welcome. I'm new with mirc code.

Joined: Apr 2003
Posts: 24
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Apr 2003
Posts: 24
ok im no scripting guru and have to be honest and say I didnt read through your script much frown but i would say maybe add scon in there.
eg
timer 1 1 /scon -a amsg

also your timers dont need to be numbered timer1 timer2 etc mirc will do that for you. Im sure there are others out there with better ideas than me but I hope this helps at least.

Actually now ive looked at it a little more you can lose a lot of the timers by simply setting a variable say %away_time
so
set %away_time $ctime

and on return

set %back $duration($calc($ctime - %away_ctime))

I was away %back

im sure others can add more and explain this better as i said im no guru hope it helps though and good luck

Last edited by ShavedApe; 31/05/03 02:19 AM.
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
Basically the script couldn't be worse:
1) timers
You're using those in wrong places, /timer1 is useless, timers 2-6 should be replaced with shavedapes suggestion, if you need to know the awaytime. The timers are also named badly.
2) ame
Are you absolutely sure that everyone is interested in knowing that you're away?
3) awaynicks
= just lame
4) colors
= CRAP

let's see what's left:
/a away $1-

then you just use "/a reason" to go away and "/a" to come back... And not a single person is annoyed, and the world is a better place and stuff... But this is of course just my opinion...




Code:
//if ( khaled isgod ) echo yes | else echo no
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
alias a {
/set -u0 %reason $iif($1 = =$null, I am away, $1)
/scon -a /away %reason
/scon -a /nick $+($me,$chr(124),$remove(%reason, $chr(32)))
/scon -a /amsg Away: %reason - Left At: $asctime(HH:nn:ss)
.timerawaymsg 0 3600 /a.ad
}

alias a.ad {
/scon -a /amsg Away: $awaymsg - Time Away: $duration($awaytime)
}

alias b {
/scon -a /nick $remove($me, $+($chr(124),$remove($awaymsg, $chr(32))))
/scon -a /amsg Back: $awaymsg - Time Away $duration($awaytime)
/scon -a /away
}


-KingTomato

Link Copied to Clipboard