TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

Idle tracker

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Script Help
View previous topic :: View next topic  
Author Message
mrbigtaco



Joined: 26 Jun 2011
Posts: 35

PostPosted: Sun Jun 26, 2011 6:19 am    Post subject: Idle tracker Reply with quote

I was trying to replicate the functionality of the example modules from the lyntin mud client- the ability to track how long since the last command sent to the mud, and also the ability to change the text of the window title bar (links to the python code from lyntin's example modules below, but not really relevant)

This snippet almost does exactly what I want (with a few limitations):
*It doesn't work with no active sessions.
*I expected SEND OUTPUT event to only trigger on commands sent to the server based on the wording of the help file- it appears to trigger even on commands parsed locally in tintin (like #help and #showme).

I'm assuming the session bit can't be helped, and the SEND OUTPUT even is probably WAD. At any rate, here's the snippet in case someone else wants to use it, improve it. I imagine another possible use would be to incorporate the $idle_time variable into an HP bar with an extra format in a split setup.

Code:
#event {SEND OUTPUT} {
   #var {idle_time} {0};
   #format title_bar {idle: %smin\e]2;idle: %smin\e\\} {$idle_time} {$idle_time};
   #showme {$title_bar};
   #ticker {idle_ticker} {
      #math idle_time $idle_time+1;
      #format title_bar {idle: %smin\e]2;idle: %smin\e\\} {$idle_time} {$idle_time};
      #showme {$title_bar}
   } {60}
}



http://lyntin.sourceforge.net/4.1.1/tutorials/tutorial1.php
http://lyntin.sourceforge.net/4.1.1/tutorials/tutorial2.php
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3274

PostPosted: Sun Jun 26, 2011 11:19 am    Post subject: Reply with quote

As far as I can tell SEND OUTPUT doesn't trigger on local commands.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Script Help All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group