TF

by Shryke

Back to Mechanic's Corner.

Shryke2005-02-22 20:50:41
I am completely in the dark about scripting and things like that, but I want a good free client, and so far what I have heard about tf is that it is what I am looking for... So, if I got TF would I stand a chance at learning how to script for it, or will I need more exprience?
Thanks in advance!

PS can you get those flashy sidebars and things in TF like Zmud?
Unknown2005-02-22 20:54:36
TF is pretty much a coder's client. You need to be very proficient at programming to get anything really, really good out of it. It's a stripped down client that will work on many platforms and isn't "slowed down" by feature bloat.

If you want a powerful, free client, there are many available. I recommend MUSHclient, though it is technically shareware.
Morik2005-02-23 02:27:27
QUOTE(Shryke @ Feb 23 2005, 04:50 AM)

PS can you get those flashy sidebars and things in TF like Zmud?
57359



No - its a text mode only client. I do, however, have a flashy status bar which
has strings and stuff indicating various 'things' (including healing/pk status, sipping, my target, my health percentage, etc)
Unknown2005-02-23 02:38:10
TF is probably not what you're looking for, however, I wouldn't say you have to be a professional programmer to use it. If you have a basic understanding of if statements and loops, and the willingness to read up and understand technical documentation, you'll be fine. With that understanding and the ability/willingness to read, you can look at other peoples code and the provided scripts that come with TF to figure out a lot of cool stuff.

I've never used MUSHclient, before TF I was an avid Zmud user. However from what I've seen on these forums and on their website, I must say that I would endorse MUSHclient over Zmud any day of the week. To me, Zmud is very bloated. Yes, Zmud can do a lot of really cool stuff. However, that all comes at the price of performance. Even good code goes bad in Zmud if you do anything really complicated and involved.

My main attractions to TF were it's great potential to be scripted, and it runs in a terminal. The ability to run in a terminal is KEY for me. It allows me to keep all of my TF files installed on my webserver, and connect to it from any computer that I sit down at. I keep a copy of PuTTY (an ssh client) on my usb jumpdrive for the rare occasions that I must use Windows. It doesn't matter if I'm on vacation, visiting friends in another state, etc...I can always connect if there's a computer present.

The other big attraction of TF, for me, was that all configuration can be done in simple text files. Zmud disposed of more than one of my systems. I loved their folder interface for organizing classes and modules in my system, but things would randomly disapear and get "eaten". Having everything in nice simple text files means that I can make backups that work, use a version control system on them to revert any changes I make, use powerful editors like Vim to work on them, etc.

Windows-based programs usually attempt to be 20 programs smashed into one, Unix-based programs try to do one job very well. This difference in design philosophy is reflected in Zmud and TF. I get the impression that MUSHclient falls more into the "do everything" category, but they're doing it quite well. smile.gif
Unknown2005-02-23 03:33:55
If you're a completely beginner coder looking to code, use zMUD. It was my first scripting language-thing, and now I'm trying to learn MUSHclient... A bit harder.
Thule2005-03-24 15:06:09
I just started using TF on Aetolia about 2 months ago (before I came to Lusternia) and found that I highly prefer it. I have a question though for all you people that have experience with it. I'm trying to write a trigger for autosipping health (don't need mana yet but i'm sure it would be similar). I have had zero success. Any tips?
Unknown2005-03-24 20:47:01
This short description probably isn't as detailed as it could be, but I think you'll get the idea and be able to code something up pretty easy with this as your starting point.

As an aside, I'm converting to Kmuddy as of today (http://www.kmuddy.org normally, but while it's down you have to use http://kmuddy.arthmoor.com/). In roughly the year since I last used it they've updated things quite a bit, fixing the majority of my complaints. It's also scriptable in Perl which is much cleaner looking than TF code. smile.gif The developer, Tomas Mecir, is a saint I swear. I emailed him early this morning about troubles accessing the site and a few questions, within two hours I had a friendly reply. He's also extremely active on the Kmuddy forums. It's a great project to look into if you're a Linux user. It says it's developed for KDE, but I got it to compile on my Debian box running Fluxbox with relative ease. As long as you have KDE and QT installed, it should work fine.

First you'll need a prompt trigger to gather all of the data for your variables. The following is the one I use. You'll have to tweak it a bit based on what your have displayed (and if you're not a Knight remove the options for left/right arm balance).
CODE

;;;;;; prompt trigger
;;; note: the {P1}+0, {P2}+0, etc is used to strip the color from the strings
/def -mregexp -n0 -q -h"PROMPT (\\d+)h, (\\d+)m, (\\d+)e, (\\d+)p, (\\d+)en, (\\d+)w (.*)\\-" prompt_catch = \\
   /eval /set health         $ %; \\
   /eval /set mana             $ %; \\
   /eval /set ego              $ %; \\
   /eval /set power         $ %; \\
   /eval /set endurance        $ %; \\
   /eval /set willpower        $ %; \\
   /eval /set equilibrium      $ %; \\
   /eval /set blind            $ %; \\
   /eval /set deaf             $ %; \\
   /eval /set balance_leftarm  $ %; \\
   /eval /set balance_rightarm $ %; \\
   /eval /set balance          $ %; \\
   /eval /set kafe_ingested $ %; \\
   /eval /set prone            $ %; \\
   /set health_percent $ %; \\
   /sip_health_if_needed

You'll need a trigger to catch when you have sipped health, so that your system knows you're off balance and cannot drink anymore:
CODE

/def -mregexp -n0 -aCmagenta -p3 -t"^The potion heals and soothes you\\.$" highlight_drink_health = /set balance_health 0

You'll need a trigger for health/mana balance so that your system knows you have regained balance and can drink again:
CODE

;;;;;; curing recovery replacements (gags/highlights)
/def -mregexp -n0 -p3 -F -ag -t"^You may drink another health, mana, or bromide potion." balance_heal_replacement = \\
   /echo -aBCmagenta +--------|   health    |--------+ %; \\
   /set balance_health 1

Finally you'll need the code for the sipper. It's executed by the prompt if necessary:
CODE

;;;;;; auto health sipper
/alias healthsipper \\
   /if ( {#} > 0 ) \\
    /if ( {1} =~ "on" ) \\
        /set enabled_health_sipper 1 %; \\
        /echo -aBCcyan <<<< health sipper is enabled. >>>> %; \\
    /elseif ( {1} =~ "off" ) \\
        /set enabled_health_sipper 0 %; \\
        /echo -aBCcyan <<<< health sipper is disabled. >>>> %; \\
    /else \\
        /echo -aBCcyan <<<< healthsipper error: legal options are "on" and "off". >>>> %; \\
    /endif %; \\
   /else \\
    /echo -aBCcyan <<<< healthsipper error: you must supply an option, "on" or "off". >>>> %; \\
   /endif

/def sip_health_if_needed = \\
   /if ( {enabled_health_sipper} & {balance_health} ) \\
    /if ( {health_percent} < 0.85 ) \\
        drink health %; \\
    /endif %; \\
   /endif
Thule2005-03-25 14:03:25
QUOTE
CODE

/def -mregexp -n0 -aCmagenta -p3 -t"^The potion heals and soothes you\\.$" highlight_drink_health = /set balance_health 0



So I could add the syntax in here for any potion type?

also need to add health_max variable correct?
Thule2005-04-19 17:23:11
could you show something abit simplier? Like one to just capture health and drink as needed?
Unknown2005-04-19 17:51:58
I have found much love in Mushclient (i love it) but I have to say, it gets annoying if you are using it free because every time you start up, it has to go through the number set thing, and whether or not you select the tips to go away, they stay up anyway. I am going to try out TF and now maybe Kmuddy after I get Gentoo with KDE installed on my new box. Anyway, yesh.

One quick question though, is TF and Kmuddy runable on a Windows OS? That's all I have right now, and I feel I need to get some practice on the coding if I want to suceed with it.
Thule2005-04-19 17:56:56
I run Cygwin on my Windows box and TF under it. Cygwin is a Unix Emulator, very nice imho.
Unknown2005-04-20 01:06:52
There is a windows version of TF, which is superior to the compiled Cygwin one (which is buggy as hell) get it from http://www.druware.com/products/tinyfugue.html
Thule2005-04-20 13:21:30
QUOTE(AlyssandraAbSidhe @ Apr 19 2005, 09:06 PM)
There is a windows version of TF, which is superior to the compiled Cygwin one (which is buggy as hell) get it from http://www.druware.com/products/tinyfugue.html
102938



Oh yeah? I have have never had problems with my version, I wonder where the problems lie. How good overall is the windows version? Can you use the same .tfrc file or do you need one in a win friendly format?
Unknown2005-04-21 01:31:49
its the same, only difference would be cr\\lf pairs, but Cygwin produces windows format not unix format text files anyway. and if it really doesnt work, just open it in notepad and resave it.
Unknown2005-04-21 03:38:46
i'll wait till i get gentoo on my boxes