|
|
Joined: Feb 2004
Posts: 33
Ameglian cow
|
OP
Ameglian cow
Joined: Feb 2004
Posts: 33 |
Ok, I'm trying to build a new away system for my mIRC script. And I have run into some problems here. Everytime I use the change status command on it, it just says ( ) unknown command. Here is the code.
menu status,menubar {
Away System
.Status ( $+ %AwayStatus $+ ) : /AwayStatus
.Reason ( $+ %AwayReason $+ ) :/AwayReason $$?="Reason:"
}
alias AwayReason {
set -n %AwayReason $$1
echo **Away Reason Set
}
alias AwayStatus {
if (%AwayStatus == 0) {
set %AwayStatus 1
echo **You are now set as away! }
elseif (%AwayStatus == 1) {
set %AwayStatus 0
echo **You are not set as away! }
}
on *:TEXT:$me:#: {
if (%AwayStatus == 1)
me is away! Reason: %AwayReason
} WTF is wrong here?
Adrenaline starts to flow, thrashing all around, acting like a maniac, WHIPLASH!!!
|
|
|
|
Joined: Dec 2002
Posts: 1,541
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,541 |
How about using:
menu status,menubar {
Away System
.Status $chr(40) $+ %AwayStatus $+ $chr(41):/AwayStatus
.Reason $chr(40) $+ %AwayReason $+ $chr(41):/AwayReason $$?="Reason:"
}
Using the following script:
menu status,menubar {
Away System
.Status1 $chr(40) $+ %AwayStatus $+ $chr(41):/AwayStatus
.Reason1 $chr(40) $+ %AwayReason $+ $chr(41):/AwayReason $$?="Reason:"
}
menu status,menubar {
Away System
.Status2 ( $+ %AwayStatus $+ ):/AwayStatus
.Reason2 ( $+ %AwayReason $+ ):/AwayReason $$?="Reason:"
}
I show (bad ASCII art to follow): Away System > Status1 () Reason1 () ----------------------- Status2 () Reason2 () ----------------------- <- denotes a menu separator So I see both of the above just fine
Those who fail history are doomed to repeat it
|
|
|
|
Joined: Feb 2004
Posts: 33
Ameglian cow
|
OP
Ameglian cow
Joined: Feb 2004
Posts: 33 |
WTF?!?! Why would I need two reasons? And it still doesn't work.
Adrenaline starts to flow, thrashing all around, acting like a maniac, WHIPLASH!!!
|
|
|
|
Joined: Dec 2002
Posts: 1,541
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,541 |
I did it like that to test it both ways using the standard braces as well as their $chr equivalent. By doing it with both at the same time, you can check which one does NOT work easier.
Those who fail history are doomed to repeat it
|
|
|
|
Joined: Feb 2004
Posts: 33
Ameglian cow
|
OP
Ameglian cow
Joined: Feb 2004
Posts: 33 |
Well, I just tried both. Still no results!
Adrenaline starts to flow, thrashing all around, acting like a maniac, WHIPLASH!!!
|
|
|
|
Joined: Dec 2003
Posts: 261
Fjord artisan
|
Fjord artisan
Joined: Dec 2003
Posts: 261 |
Everytime I use the change status command on it This part of your post I don't understand. What change status command? On what? Sorry for my pure english.
velicha dusha moja Gospoda
|
|
|
|
Joined: Feb 2004
Posts: 33
Ameglian cow
|
OP
Ameglian cow
Joined: Feb 2004
Posts: 33 |
I mean when I press the change status on it's menu.
Adrenaline starts to flow, thrashing all around, acting like a maniac, WHIPLASH!!!
|
|
|
|
Joined: Dec 2003
Posts: 261
Fjord artisan
|
Fjord artisan
Joined: Dec 2003
Posts: 261 |
The only thing I see wrong is this: on *:TEXT:[color:red]*[/color]:#: {
if [color:red]($1- == $me) &&[/color] (%AwayStatus == 1) me is away! Reason: %AwayReason
}
Last edited by milosh; 07/04/04 02:11 AM.
velicha dusha moja Gospoda
|
|
|
|
Joined: Feb 2004
Posts: 33
Ameglian cow
|
OP
Ameglian cow
Joined: Feb 2004
Posts: 33 |
Hmm. That didnt fix it. It just won't change the status to 1.
Adrenaline starts to flow, thrashing all around, acting like a maniac, WHIPLASH!!!
|
|
|
|
Joined: Dec 2002
Posts: 774
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 774 |
menu status,menubar { Away System .Status ( $+ %AwayStatus $+ ) : /AwayStatus .Reason ( $+ %AwayReason $+ ) :/AwayReason $$?="Reason:" }
alias AwayReason { set -n %AwayReason $$1 echo **Away Reason Set }
alias AwayStatus { if (!%AwayStatus) { set %AwayStatus 1 echo **You are now set as away! } else { set %AwayStatus 0 echo **You are not set as away! } }
on *:TEXT:$($+(*,$me,*)):#: { if (%AwayStatus) me is away! Reason: %AwayReason }
//if ( khaled isgod ) echo yes | else echo no
|
|
|
|
Joined: Feb 2004
Posts: 33
Ameglian cow
|
OP
Ameglian cow
Joined: Feb 2004
Posts: 33 |
Ok, I got that working. But now I want it to show the amount of time from when i set the status to 1 and back to 0. I have tried idle but that just returns in seconds and doesn't use a hh:mm:ss style which is what i need. Can you recommend any methods of doing that?
Adrenaline starts to flow, thrashing all around, acting like a maniac, WHIPLASH!!!
|
|
|
|
Joined: Dec 2002
Posts: 102
Vogon poet
|
Vogon poet
Joined: Dec 2002
Posts: 102 |
Try using: $duration(N,3) where N is your duration in seconds.
- MIMP
|
|
|
|
|
|