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

Pass commands from external sw

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Unix Shell
View previous topic :: View next topic  
Author Message
Helden



Joined: 02 Jan 2015
Posts: 13

PostPosted: Thu Apr 30, 2015 12:33 am    Post subject: Pass commands from external sw Reply with quote

Hello,
I'm trying to develop some easy bot with an external software that uses input keeping reading the log file.
Is there an easy way to pass commands to tintin++?
I've already tried to forward typing to the console of tintin (I'm under linux) but it seems it doesn't work.

Tintin scripting language is definitely strong but for my needs I really prefer to use a stronger one.

Any other idea?

Tks.
Back to top
View user's profile Send private message
Slysven



Joined: 10 Apr 2011
Posts: 365
Location: As "Jomin al'Bara" in WoTMUD or Wiltshire, UK

PostPosted: Thu Apr 30, 2015 8:39 am    Post subject: Reply with quote

The #CHAT protocol might be one way - ah, you'll have to develop your own peer to connect to the TinTin++ peer that is set up on localhost:4050 by default.

I did something a way back where I had a main TinTin++ instance on one PC and a second slave instance running either on a second display on that same machine (which was multi-headed - well a laptop with an external display!) or on a different machine on my LAN. I then had a "simple" chat protocol and used a small (32MByte) SAMBA (on GNU/Linux) shared RAM drive on the main machine that the second machine could read the shared TinTin++ map file from as the master updated it and told the slave to re-read - though if the map was unchanged a simple command to move to a different room (and a return acknowledgement) was adequete to keep things in step. This was also usable when one/both of the instances was running under Cygwin on Windows...

One insignificant detail is that #CHAT only runs over an IPv4 network - it hadn't, the last time I looked, been revised to listen/use sockets on IPv6 or both simultaneously.

The reason I mention this is that though I'm not much active (I used to throw patches at Scandum which he treated with the merit they deserved Wink ) on TinTin++ myself I'm coding for a different client which I really want to also have MMCP - so it can talk with TinTin++ and the other few clients that offer it.
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Thu Apr 30, 2015 6:01 pm    Post subject: Reply with quote

If it's a console program you could run it within tintin using

#run bla <program>

If you want to run triggers on a log file you could try:

#run bla tail -f logfile.txt

bla would be the session name and can be named anything you want.
Back to top
View user's profile Send private message Send e-mail
Helden



Joined: 02 Jan 2015
Posts: 13

PostPosted: Fri May 01, 2015 12:43 pm    Post subject: Reply with quote

Thank you for the answers,
@Slysven:
through CHAT protocol I can send commands to the MUD server? or just to the tintin client?

@Scandum:
it should be some kind of bot non coded with tintin script system buy with an external pyton app. So I need to get output from MUD (I thought logfiles) and send input to MUD. It's not still clear to me how my app can tell to the tintin session to send something to the MUD server.

Tks,
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Fri May 01, 2015 5:37 pm    Post subject: Reply with quote

Might be possible to run your python app within tintin using #run.

Here's an example on how to do something like this with lua

http://tintin.sourceforge.net/scripts/lua.php
Back to top
View user's profile Send private message Send e-mail
Helden



Joined: 02 Jan 2015
Posts: 13

PostPosted: Tue May 05, 2015 8:56 am    Post subject: Reply with quote

Scandum wrote:
http://tintin.sourceforge.net/scripts/lua.php


Is this a lua script written outside of tintin and launched inside tintin?
Sorry but I'm not used to recognize lua code.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Unix Shell 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