Simple !afk & back

Platform:  mIRC
Published  Jun 28, 2011
Updated  Jun 28, 2011
This is my first script & just a simple script.
!afk <reason>
!back


on *:TEXT:*!afk*:#:{
if ($nick) {
/set %reason $2- | /amsg 9 $nick is away
/amsg 4Reason: 4 $+ %reason $+ 9,0 | set %away.time $ctime | enable #away | set %away on
}
on *:TEXT:*!back*:#:{
if ( $nick) {
/amsg 7 $nick Is back from 4Reason: $+ %reason $+ 9
/amsg 9 He was away for $duration($calc($ctime - %away.time)) $+ 6. | unset %reason | disable #away | unset %away.time | unset %away on
}

Comments

Sign in to comment.
baloe12nl   -  Jun 13, 2012
@Dany

delet the 4 and use Ctrl+k then typ a 4

Code

 
 Respond  
baloe12nl   -  Jun 08, 2012

Code

 


A adation to the code. This is my first try to adet a code. credit to the origenal code maker
 Respond  
Dany   -  May 23, 2012
[00:15] <~Dany> !afk testin
[00:15] <~Hi> Dany is away
[00:15] <~Hi> Reason: testin
[00:15] <~Dany> !back
[00:15] <~Hi> Dany Is back from Reason:4
[00:15] <~Hi> He was away for 2secs.

see the "reason" on the 5th line its showing "4" ?????????????
 Respond  
Snip3KitTy   -  Jul 01, 2011
i prefer to just have my own personal afk script rather than a bot script
 Respond  
GrimReaper   -  Jun 28, 2011
If you have just %reason for everyone that uses the script, It will over-write the previous reason set by the previous user.. I would suggest using something like

Code

 
Same with %away.time But that's just my opinion.
 Respond  
xbox_gamer1   -  Jun 28, 2011

Code

 


work on your coding
 Respond  
napa182   -  Jun 28, 2011
This seems like it was ripped out of something larger. I am not saying you ripped this from someone it is just you have things missing. you have it enabling a group but you don't use it as well you are missing brackets. Just seems odd with the use of wildcards for the triggers.
the use of amsg can get you banned from some servers.

It would be better to place this under one text event instead of 2, but what ever to each their own.
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.