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

perl/python support for triggers and aliases

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Feature Requests
View previous topic :: View next topic  

would you benifit from perl/python support?
yes
75%
 75%  [ 6 ]
no
25%
 25%  [ 2 ]
I'm sorry I don't understand the question.
0%
 0%  [ 0 ]
Total Votes : 8

Author Message
iamtux



Joined: 23 Aug 2008
Posts: 3

PostPosted: Sat Aug 23, 2008 2:55 pm    Post subject: perl/python support for triggers and aliases Reply with quote

I used a I mud client for years called MCL, I cant get it to run on my mac at all, I am not much of a C coder so I have not been able to fix it... the creator has not been willing to help fix it and it has been out of development for about 5ish years now. one of the great things it does have is perl and python support built into modules... I didnt know if it would help you build it into tintin or not... but that is really the only thing that i miss about that client vs tintin.

I am a tintin convert now and would like to be able to reuse my extensive perl trigger library.

here is the link to MCL client and I hope this will conquer the perl challenge... MCL is GPL so there should be no issue borrowing his code.
Cheers
http://www.andreasen.org/mcl/
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3281

PostPosted: Sat Aug 23, 2008 7:54 pm    Post subject: Reply with quote

You can enable regular expressions in actions/aliases/etc with #config regex on. If the command line version of perl and python is installed you can also execute scripts with the #script command.
Back to top
View user's profile Send private message Send e-mail
iamtux



Joined: 23 Aug 2008
Posts: 3

PostPosted: Sat Aug 23, 2008 10:28 pm    Post subject: awesome Reply with quote

I have been playing with the regexes to get matches in actions.

now I am having some trouble getting the output to work right, could you help?

#action {^(\w+) looks at you.} {look $1}

the variable doesnt work from the captured text in the response.
I have tried $0 $1 %0 %1 for the variable and I get the same responses.
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3281

PostPosted: Sun Aug 24, 2008 1:07 pm    Post subject: Reply with quote

\w isn't supported so you'd want to use:

#action {^([A-Za-z]+) looks at you.} {look %1}

I also added an example script on how to go about accessing a scripting language with the #run command.

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



Joined: 23 Aug 2008
Posts: 3

PostPosted: Sun Aug 24, 2008 3:18 pm    Post subject: you're awesome Reply with quote

thanks alot that is going to make life alot easier
I look forward to using the full potential of tintin, thus far I am loving it
Back to top
View user's profile Send private message
mysha



Joined: 23 Sep 2008
Posts: 1

PostPosted: Tue Sep 23, 2008 3:05 pm    Post subject: Reply with quote

On topic of regexps, it would be very beneficial to support PCREs. Using libpcre and libpcreposix wrapper library, it's not that hard to add support for it, from what I've seen in the source.
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3281

PostPosted: Wed Sep 24, 2008 7:50 am    Post subject: Reply with quote

It's on my todo list but I don't have any time to work on tintin at the moment. Feel free to give it a try yourself.
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 -> Feature Requests 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