| View previous topic :: View next topic |
| would you benifit from perl/python support? |
| yes |
|
75% |
[ 6 ] |
| no |
|
25% |
[ 2 ] |
| I'm sorry I don't understand the question. |
|
0% |
[ 0 ] |
|
| Total Votes : 8 |
|
| Author |
Message |
iamtux
Joined: 23 Aug 2008 Posts: 3
|
Posted: Sat Aug 23, 2008 2:55 pm Post subject: perl/python support for triggers and aliases |
|
|
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 |
|
 |
Scandum Site Admin
Joined: 03 Dec 2004 Posts: 3281
|
Posted: Sat Aug 23, 2008 7:54 pm Post subject: |
|
|
| 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 |
|
 |
iamtux
Joined: 23 Aug 2008 Posts: 3
|
Posted: Sat Aug 23, 2008 10:28 pm Post subject: awesome |
|
|
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 |
|
 |
Scandum Site Admin
Joined: 03 Dec 2004 Posts: 3281
|
Posted: Sun Aug 24, 2008 1:07 pm Post subject: |
|
|
\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 |
|
 |
iamtux
Joined: 23 Aug 2008 Posts: 3
|
Posted: Sun Aug 24, 2008 3:18 pm Post subject: you're awesome |
|
|
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 |
|
 |
mysha
Joined: 23 Sep 2008 Posts: 1
|
Posted: Tue Sep 23, 2008 3:05 pm Post subject: |
|
|
| 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 |
|
 |
Scandum Site Admin
Joined: 03 Dec 2004 Posts: 3281
|
Posted: Wed Sep 24, 2008 7:50 am Post subject: |
|
|
| 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 |
|
 |
|