View Full Version : Little help with that script
Hi, GG and Strem need your help :D
that script which you both done well what I want to know is
a)
alias a {
if ($away) {
echo -a You're Already Away
halt
}
else {
set %left $ctime
scid -a ame is away - $+ $chr(91) $$1- $chr(93) $+ - at - $+ $chr(91) $asctime(hh:nn) $chr(93) $+ -
scid -a away $$1-
%away = $$1-
}
}
alias b {
if ($away) {
scid -a ame is back from - $+ $chr(91) %away $chr(93) $+ - gone for - $+ $chr(91) $duration($calc($ctime - %left)) $chr(93) $+ -
scid -a away
unset %away %left
}
else {
echo -a You're Not Away.
}
}
menu channel {
Away Script
.$iif($away,$style(2)) Set Away
..BRB: a BRB
..Food: a Food
..Sleep: a Sleep
..Custom: a $$?"Enter an away message:"
.$iif(!$away,$style(2)) Set Back: b
}
where are the bits that I can change the style of it, like when I set away instad of having Jynxeh is away [ reason - [ time ] I can change it to something new, could u hightlight the sections please.
b)
how can I add them little set aways like BRB etc? also is there away to set my away name auto? so It saves me typing it.
GameGuru
02-04-2002, 22:39
alias a {
if ($away) {
echo -a You're Already Away
halt
}
else {
%nick = $me
nick $me $+ |away
set %left $ctime
scid -a ame is away - $+ $chr(91) $$1- $chr(93) $+ - at - $+ $chr(91) $asctime(hh:nn) $chr(93) $+ -
scid -a away $$1-
%away = $$1-
}
}
alias b {
if ($away) {
nick %nick
scid -a ame is back from - $+ $chr(91) %away $chr(93) $+ - gone for - $+ $chr(91) $duration($calc($ctime - %left)) $chr(93) $+ -
scid -a away
unset %away %left %nick
}
else {
echo -a You're Not Away.
}
}
menu channel {
Away Script
.$iif($away,$style(2)) Set Away
..BRB: a BRB
..newreason: a <enter reason here>
..Food: a Food
..Sleep: a Sleep
..Custom: a $$?"Enter an away message:"
.$iif(!$away,$style(2)) Set Back: b
}
The red code contains the Jynxeh is away and is back lines. The italiced line is one you can edit to add your own away reason. The underlined sections are added to auto change your nick.
However the auto nick change is a bit pants, but u should know me by now, I'm lazy :)
where are the [ ?? :confused: cause I would like to change it maybe from [ to (
GameGuru
02-04-2002, 23:22
I'll let you work it out for yourself, although here is a helping hand, if you copy the away line, and press tab on the words with $ at the beginning you might find it quickly ;)
Well, I'm a dumbass, I can't find where to change the [ :{
GameGuru
05-04-2002, 12:03
ok, I'll put you out of your misery :)
if you were to press tab on $chr(91) you would notice it becomes a [ and if you press tab on $chr(93) you would notice it becomes a ]
If you want ( and ) instead replace the 91 with 40 and 93 with 41
ok, what about if I wanted to do like -: blah :- etc
Strembles
06-04-2002, 01:12
Change
scid -a ame is away - $+ $chr(91) $$1- $chr(93) $+ - at - $+ $chr(91) $asctime(hh:nn) $chr(93) $+ -
to
scid -a ame is away -: $$1- :- at -: $asctime(hh:nn) :-
you could always do
is away $chr(45) $+ $chr(58) $$1- $chr(58) $+ $chr(45) at -$chr(45) $+ $chr(58) $asctime(hh:nn) $chr(58) $+ $chr(45)
if you can really be arsed :P
P.S. not actually tested that :/
so if it doesn't work......blame GG :D
what about the back bit? what do I change for that.. :|
Strembles
08-04-2002, 21:41
The bits shown in red....
alias a {
if ($away) {
echo -a You're Already Away
halt
}
else {
%nick = $me
nick $me $+ |away
set %left $ctime
scid -a ame is away -: $$1- :- at -: $asctime(hh:nn) :- scid -a away $$1-
%away = $$1-
}
}
alias b {
if ($away) {
nick %nick
scid -a ame is back from -: %away :- gone for -: $duration($calc($ctime - %left)) :-
scid -a away
unset %away %left %nick
}
else {
echo -a You're Not Away.
}
}
menu channel {
Away Script
.$iif($away,$style(2)) Set Away
..BRB: a BRB
..newreason: a <enter reason here>
..Food: a Food
..Sleep: a Sleep
..Custom: a $$?"Enter an away message:"
.$iif(!$away,$style(2)) Set Back: b
}
ah, got nowt better to do, I've changed it for you....
all that above code should do the job :)
there seems to be a prob :{ when I set away I can't set back.
Strembles
09-04-2002, 19:30
hmmm
/me investigates
I'll try it out in a minute, and have a look.
Strembles
09-04-2002, 19:35
alias a {
if ($away) {
echo -a You're Already Away
halt
}
else {
%nick = $me
nick $me $+ |away
set %left $ctime
scid -a ame is away -: $$1- :- at -: $asctime(hh:nn) :-
scid -a away $$1-
%away = $$1-
}
}
alias b {
if ($away) {
nick %nick
scid -a ame is back from -: %away :- gone for -: $duration($calc($ctime - %left)) :-
scid -a away
unset %away %left %nick
}
else {
echo -a You're Not Away.
}
}
menu channel {
Away Script
.$iif($away,$style(2)) Set Away
..BRB: a BRB
..Food: a Food
..Sleep: a Sleep
..Custom: a $$?"Enter an away message:"
.$iif(!$away,$style(2)) Set Back: b
}
I blame GameGuru :P
(works ok now btw :))
GameGuru
11-04-2002, 12:50
A bad workman always blames his...
errr
fu Strembles :P ;)
is there anyway a reapter could be put in there?
i.e
*Jynxeh is still away -: reason :- gone for -: 8hrs 32mins 1sec :
thats just an example :)
( before I know it, I will have a full working client going ;) )
Strembles
11-04-2002, 22:54
a reaptor??
i think i know what you mean, and yes it can be done, and yes i know how to do it, but unfortunately tonight i cannot be arsed to do it so you'll either have to wait or hope that GG is kind enough to do it for you.
GameGuru
12-04-2002, 11:18
It would require a timer that repeats indefinately (although would be removed once you returned from being away) I would create it for you now, but I'm feeling lazy and tired so you'll have to wait for "l33t" Strembles to do it for you :)
ok cool, you've done alot for me already :E how could I re-pay u? :naughty:
GameGuru
12-04-2002, 13:14
Time to use your imagination ;)
GameGuru
12-04-2002, 13:52
Well, I got bored... :)
alias a {
if ($away) {
echo -a You're Already Away
halt
}
else {
%nick = $me
nick $me $+ |away
set %left $ctime
.timeraway -c 0 3600 ame is still away -: %away :- gone for -: $duration($calc($ctime - %left)) :-
scid -a ame is away -: $$1- :- at -: $asctime(hh:nn) :-
scid -a away $$1-
%away = $$1-
}
}
alias b {
if ($away) {
.timeraway off
nick %nick
scid -a ame is back from -: %away :- gone for -: $duration($calc($ctime - %left)) :-
scid -a away
unset %away %left %nick
}
else {
echo -a You're Not Away.
}
}
menu channel {
Away Script
.$iif($away,$style(2)) Set Away
..BRB: a BRB
..Food: a Food
..Sleep: a Sleep
..Custom: a $$?"Enter an away message:"
.$iif(!$away,$style(2)) Set Back: b
}
2 points:
It's missing any multi server support, Stremblax will add that for you, I have no knowledge of how to do it, and I can't refer to the mIRC help file since I don't have it here.
It currently tells people that you're still away every 1hr so change the underlined "3600" if that is too long (but it shouldn't be for extended time periods of being away.)
Apologies for any mistakes, seems I'm making a lot this week :)
it came out like this -:
* Jynxeh|away is still dead -: :- gone for -: 0secs :-
alias a {
if ($away) {
echo -a You're Already Away
halt
}
else {
%nick = $me
nick $me $+ |away
set %left $ctime
.timeraway -c 0 3600 ame is still away -: %away :- gone for -: $duration($calc($ctime - %left)) :-
scid -a ame is away -: $$1- :- at -: $asctime(hh:nn) :-
scid -a away $$1-
%away = $$1-
}
}
alias b {
if ($away) {
.timeraway off
nick %nick
scid -a ame is back from -: %away :- gone for -: $duration($calc($ctime - %left)) :-
scid -a away
unset %away %left %nick
}
else {
echo -a You're Not Away.
}
}
menu channel {
Away Script
.$iif($away,$style(2)) Set Away
..BRB: a BRB
..Food: a Food
..Sleep: a Sleep
..Custom: a $$?"Enter an away message:"
.$iif(!$away,$style(2)) Set Back: b
}
just a guess here, if I change -:
.timeraway -c 0 3600 ame is still away -: %away :- gone for -: $duration($calc($ctime - %left)) :-
to
.timeraway -c 0 3600 ame is still away -: $$1 :- gone for -: $duration($calc($ctime - %left)) :-
would that do anything?
Strembles
12-04-2002, 20:01
hmm i've sorted the reason bit.....just need to get the time bit to work, then you're sorted
(hopefully:/)
cool :D
:wub: GG and Strem :wub:
btw did I get the reason thing right or was I way off? ;)
Strembles
13-04-2002, 19:06
hmm, dunno, i reckon it would work, but all i did to get the reason to work was to shove that bit near the end :D
Strembles
13-04-2002, 22:02
lol yup, just gotta get the damned time bit to work now
:bigcry:
Does it still come up with 0secs when repeating?
Strembles
14-04-2002, 15:35
yup, i could always make another timer to do the time i suppose :/
if I knew anything irc scripting I would help, but I don't :cry:
Strembles
14-04-2002, 21:44
lol nothing i've tried so far works.... it's pretty wierd
hmm
/me gets back to it
GameGuru
17-04-2002, 13:30
Doh! I'm such a fool, I forgot that mIRC by default evaluates the identifiers at the start of the timer creation (thats why the time always reads 0secs) you need to prefix each identifier with a ! i.e.
.timeraway -c 0 3600 ame is still away -: $$1 :- gone for -: $!duration($!calc($!ctime - %left)) :-
that should work, if not I'm sure Strewmbles can tackle any final problems.
it didn't repeat this time :{
here's what I put in
alias a {
if ($away) {
echo -a You're Already Away
halt
}
else {
%nick = $me
nick $me $+ |away
set %left $ctime
.timeraway -c 0 3600 ame is still away -: $$1 :- gone for -: $!duration($!calc($!ctime - %left)) :-
scid -a ame is away -: $$1- :- at -: $asctime(hh:nn) :-
scid -a away $$1-
%away = $$1-
}
}
alias b {
if ($away) {
.timeraway off
nick %nick
scid -a ame is back from -: %away :- gone for -: $duration($calc($ctime - %left)) :-
scid -a away
unset %away %left %nick
}
else {
echo -a You're Not Away.
}
}
menu channel {
Away Script
.$iif($away,$style(2)) Set Away
..BRB: a BRB
..BBL: a BBL
..Food: a Food
..Sleep: a Sleep
..Custom: a $$?"Enter an away message:"
.$iif(!$away,$style(2)) Set Back: b
}
It's set to repeat everyone 1hour yes?
Strembles
17-04-2002, 20:16
nah GameGuru, that's one of the many things that i tried, it didn't work for me :/
oh and yes Jynxeh (it's in seconds btw so to change it to 30 minutes just do 1800 et.c)
Are you saying that the repeater doesn't work? :confused:
Strembles
18-04-2002, 20:52
The repeater works, just not if you do what GameGuru said to do :P and if you take that bit out, it works......it just doesn't say how long you've been away for :D
It might just be easier for it to say what time you went away and let everyone else work out how long you've been away for :/
GameGuru
19-04-2002, 11:38
If I remember (probably not) I'll obtain a copy of this thread on Monday and test the script at home on my personal IRC server (where I ROOL!!1111) and I'll try and get it working, can't do it this weekend tho, don't have a disk on me to take it home. ;(
GameGuru
23-04-2002, 12:58
alias a {
if ($away) {
echo -a You're Already Away
halt
}
else {
%nick = $me
nick $me $+ |away
set %left $ctime
.timeraway -c 0 3600 ame is still away -: $$1 :- gone for -: $!duration( [ $!awaytime ] ) :-
scid -a ame is away -: $$1- :- at -: $asctime(hh:nnTT) :-
scid -a away $$1-
%away = $$1-
}
}
alias back {
if ($away) {
.timeraway off
nick %nick
scid -a ame is back from -: %away :- gone for -: $duration($calc($ctime - %left)) :-
scid -a away
unset %away %left %nick
}
else {
echo -a You're Not Away.
}
}
menu channel {
Away Script
.$iif($away,$style(2)) Set Away
..BRB: a BRB
..BBL: a BBL
..Food: a Food
..Sleep: a Sleep
..Custom: a $$?"Enter an away message:"
.$iif(!$away,$style(2)) Set Back: back
}
I think that works :E
Powered by vBulletin™ Version 4.0.2 Copyright © 2010 vBulletin Solutions, Inc. All rights reserved.