mIRC Home    About    Download    Register    News    Help

Print Thread
#240594 17/02/13 08:58 PM
C
Cowpizza7
Cowpizza7
C
Hey, so I'm trying to write a simple afk script that will append or remove "|afk" from what ever nick im currently using...but Im kinda lost on how to do that 0.o - cheers

}
/away {
say Bye!
/nick **add |afk from current nick
}

/back {
say Hi!
/nick **remove |afk from current nick
}

Right now I'm using:
}
/away {
say Bye!
/nick cowpizza7|afk
}

/back {
say Hi!
/nick cowpizza7
}

The problem is I sometimes change nicks, and I don't want to have to update the script everytime I nick hop smile

#240595 17/02/13 09:02 PM
D
dominic_eddy
dominic_eddy
D
/nick $me $+ |afk
as for taking the afk away afterwards, i guess just make it so that when you type /away, it saves what your last nick was
set %me $me (will have to go before the /nick script)
so just do /nick %me for when you come back
(haven't tested it out, but i'd be surprised if that did'nt work)

Last edited by dominic_eddy; 17/02/13 09:03 PM.
#240596 17/02/13 10:06 PM
C
Cowpizza7
Cowpizza7
C
Thanks! I managed to get /away to work but not /back.. I dont think I set the $me value right, o.0 -cheers
set %me $me
/away {
say Bye!
/nick $me $+ |afk
}

/back {
say Hi!
/nick %me
}

thanks again!

#240597 17/02/13 10:31 PM
Joined: Feb 2003
Posts: 3,412
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,412
Code:
/away {
set %me $me
say Bye!
/nick $me $+ |afk
}

/back {
say Hi!
/nick %me
}

You need to have the %me part inside your alias.

#240603 18/02/13 01:41 AM
D
Deega
Deega
D
You don't really need the %me variable, use $remove()
Code:
/away {
  say Bye!
  nick $me $+ |afk
}
/back {
  say Hi!
  nick $remove($me,|afk)
}


Link Copied to Clipboard