Documentation: Difference between revisions

From Dyrdex.com
Jump to navigation Jump to search
(Created page with "=About= This is a package of configurations for TinTin++. Rather than show actual code here, this documentation will explain how to use the package. (An additional document...")
 
(Replaced content with "This has all changed significantly. I'm now building a new version and will have documentation and a download coming soon. maybe. -mike")
Tag: Replaced
 
(252 intermediate revisions by the same user not shown)
Line 1: Line 1:
=About=
This has all changed significantly. I'm now building a new version and will have documentation and a download coming soon. maybe.
This is a package of configurations for TinTin++. Rather than show actual code here, this documentation will explain how to use the package.  


(An additional document will be created with specific code for common tasks)
-mike
 
To view the actual code:
Visit http://dyrdex.com/tintin/tintin.dyrdex/
Download the packages from http://dyrdex.com/tintin/ and open on your system.
 
==What it Does==
Connect to Realms with an alias 'go charname' and...
  -Load a config for that character (Set any specific alias, char's equipment, etc)
  -Load a config for his class      (Set primary 'hit', class triggers (think mage bot), other shared stuff for all chars in class.
  -Load a config based on if you're a magic user or not    (should we cast dispel or wear an amulet, q spring or c spring, etc)
  -Load a config based on guild/order affiliation          (set donation container names, hq navigation aliasing, order heal names, etc)
  -Load configs for 'modules' which all characters would want      (speedwalking, damage tracking, potion tracking, speech logging, etc)
  -Load a set of aliases by which other triggers/configs can be toggled on/off  (toggle re-spell triggers, autofighting, remote control, etc)
 
Provide some nice features:
  -Speedwalking
  -AutoHeal/AutoHit
  -Inventory tracking, auto-restocking, custom prompting to show # of heals, trues, sancs, etc, in prompt.
  -EQ damage tracking
  -Toggle-able re-spell triggers
  -Auto...track/re-arm/search/dig/style/drink/save. no-idle.
  -Speech control of alts.
 
==How does it do that?==
/speech_log.tin              The log of channel text.
/newtin/...                  The directory containing the goods.
    /main.tin                  Used to connect, read char, class, genre, order, and module configs.
    /mod_config.tin            The module config. Calls various modules contained in /scripts/...
    /scripts/...              Contains various purpose-built scripts, can be called from anywhere, or are toggle-able.
    /characters/...            Contains character config files.
    /classes/...              Contains class config files.
    /genres/...                Contains genre (and guild/order) config files.
 
==What it doesn't do==
 
One of the major assets of TinTin++ is that you can open multiple game connections out of the same tintin session.
This allows you to be multi and issue commands straight to different chars without any window hopping.
However, it also means you can't SEE all your chars simultaneously, you can only see ONE, with the rest running in the background.
This package DOES NOT utilize this feature. I prefer to SEE all my characters simultaneously.
 
So, to multi, you'll need to open multiple terminals and start the package in each of them.
 
==Disclaimer==
I'm not a programmer. I do webserver administration for a living. I know FreeBSD, spend my time watching/tweaking/restarting Apache/MySQL, postfix, firewalls, grepping logs, and piping some basic shell commands together. I have no clue what I'm doing as far as actual programming of anything really. Someone who knows how to program will likely think I'm a moron, which I fully admit. I'm sure there are wayyyyyy better ways to do some of this, and wayyyyy more stuff you can do if you know how. Unfortunately, I don't know how, so this is just a package that sets me up with the basic functionality, a few nice perks, and that's about it.
If you do know how to program this stuff - please by god e-mail me: dyrdex@gmail.com
 
= Installation Instructions =
 
==Get the files==
http://dyrdex.com/tintin/
Available in both .tar.gz and .zip format, as well as flat files.
 
That package actually also contains the tintin source, which you probably already have.
You really only need the following files:
  /tintin/main.tin
  /tintin/speech_log.tin
  /newtin
Just make sure they remain in that relative structure within your tintin directory.
 
If you do wanna run tintin itself out of the source in my archive, the tt++ executable there will need recompiled for your system
http://tintin.sourceforge.net/install.php
 
 
==Set Your Password==
Set your password in line 1 of /tintin/newtin/main.tin
#ALIAS          {go %0} {#ses %0 realmsofdespair.com 4000;%0;PASSWORD_HERE;&& \x0D && #cr};
(All chars must use same password under this setup)
 
==Connect==
 
I am stupid, and coded all paths relative to the tintin directory.
Add it to your $PATH
  or
cd /path/to/tintin/
 
Execute the tt++ executable followed by the path to the main.tin script. Like:
./path/to/tintin/src/tt++ /path/to/tintin/newtin/main.tin
 
I have a bash alias setup for this in my .bashrc:
alias runtin='~HOME/tintin/tt++ ~HOME/tintin/newtin/main.tin'
 
So for me, to run this I do:
cd tintin
runtin
 
Once tintin is up and running, to connect to the mud use the 'go %0' alias setup in main.tin. %0 is your character name.
go dyrdex
 
===Connection Scripting Explained===
This is just detail on what's happening under the hood, if you just want to start playing, do 'go charname' and skip to [[#Set_Required_Variables]]
 
 
The connection script main.tin contains:
'''Trigger''' "Welcome to Realms of Despair" 
      Reads in:
      Character specific: newtin/characters/CHARNAME_up_stuff.tin
      Global Modules:    newtin/mod_config.tin
**IMPORTANT**
This trigger is essential for ALL other scripting to load.
If you exit out of realms/tintin without issuing 'quit' - i.e. going LinkDead you do not receive the Welcome screen upon next login.
Thus, you cannot LD and relog with this entire package (as of yet). If you do LD, you have to relog, quit properly, relog.
You *MUST* quit properly.  (Only exception is getting kicked off at reboot. Welcome screen DOES appear on next login in that case)
After successful login, the 'score' command is ran and the "Class:" there sets $char_class variable. Configs are then read based on that:
'''Trigger'''  "Class: %0"
    Reads in
    Class & Genre:      newtin/scripts/class_genre_conf.tin
          This script itself reads in two or more scripts: 
    Class config:      newtin/classes/${char_class}_classconfig.tin  (e.g Thief_classconfig.tin)
    Genre config:      newtin/genres/nonmagics.tin or magics.tin.
          The magic/nonmagic configs setup fly/dispel/createspring aliases based on potion usage or spellcasting.
    Recall script:    newtin/scripts/recallscript.tin
          This is just a simple alias to get/recite recall. However, since Barb's don't do that, I ended up making every class BUT barbs read this script.
          (Barb recalling managed directly out of Barb class config)
          (Vampires also pose a problem as they have SOME spells, they don't read a magic/non config, and are just managed out of their class config)
    Prompt script:    newtin/scripts/mana_prompt.tin  or  nonmana_prompt.tin  or  blood_prompt.tin
 
Finally, main.tin also triggers upon the presence of "Order:  Dragonslayer" in 'score' and reads in a DS specific config:
'''Trigger'''    "Order:  Dragonslayer"
    Organization config:  newtin/genres/dragonslayer.tin
 
Upon quitting the game, configs will be saved based on the connected character specifically, and his class.
newtin/characters/CHARNAME_up_stuff.tin
newtin/classes/CLASSNAME_classconfig.tin
So, the FIRST time you connect a new charname or class, you may receive a 'cannot read file' type warning since those don't get created until the first quit. Just quit (writes out configs), and you should be able to log back in without any errors.
 
==Set Required Variables==
 
1. Upon FIRST login with a char, you must set the Potion and Item(recall) container variables once:
There are some aliases that do this work for you. Do:
1. varseton      (Enable some triggers in newtin/scripts/inv_vars.tin)
2. findcons      (Identify your potion and recall (item) containers)
3. setinv        (Take stock of current # of heal/sanc/true/spring potions in inventory)
4. varsetoff    (Disable triggers so that stock quantities are not skewed by other stuff later)
 
*Currently trying to figure out a way to get this down to one command, no luck so far.
 
In case you ever want to set these manually, there are also aliases for that:
potcon CONTAINER  (Should set to my.CONTAINER)
itemcon CONTAINER  (Should set to my.CONTAINER)
 
These vars are saved out to your character config, so should only need set ONCE, or until you change your container setup.
 
2. Set your HIT variable:
hitis HITNAME  (alias for: #var hit HITNAME) (this gets saved to your Class config)
 
3. Set your Weapon name and keyword (used for DISARM trigger)
eqon
(identify your weapon)
keyis KEYWORD (enter a valid keyword for your weapon, the most unique word available is best)
eqoff
do eqstat to confirm the item was stored correctly.
--This is also the eq damage tracking system. See [[#EQ_Damage_Tracking]] for more.
 
4. Set the 'wearall' alias for your given set of equipment. (saved to Character config)
If you have no layerable equpiment, just do:
    #alias wearlall {wear all}
For Layered gear, obviously make this alias do everything you need:
    #alias wearall {wear tunic;wear gamb;wear haub;wear hide;wear gry;wear runecape;wear tab;wear cloak;wear all}
 
=Commands=
This section provides a general list of aliases which are used either to control tintin stuff itself or are used 'in-game'.
 
This section will not reference which config each command is setup in, this is just a general outline of available commands.
 
==Client Commands==
charwrite      "Write to character config" mode. (Default)
classwrite    "Write to class config" mode. 
nowrite        "Don't save" mode. Useful for testing and development.
line          Runs #split so you get an input line, and custom prompting.
                  *Custom prompting will only work if your prompt matches mine... see [[#Custom_Prompt]]
ver            Runs 'version' which triggers a 'heal or hit' action ONE_TIME (loopable via fighton/off)
findcons      If 'varseton' has been enabled, this will rescan your containers and set those variables for pot_con and item_con
setinv        If 'varseton' has been enabled, this sill scan your inventory and take stock of everything currently tracked.
potcon BLA    Manually set pot_con to BLA  (would encourage you to actually enter my.BLA)
itemcon BLA    Manually set item_con to BLA (would encourage you to actually enter my.BLA)
hitis BLA      Set 'hit' to BLA
eqstat        Show all tracked eq db data.
itemfind BLA  Show item BLA in the eq db.
 
==Global MUD Aliases==
recall        finds and uses a recall scroll
trackgo MOB    auto track mob
stoptrack      force stop tracking
heal          quaff 1 heal  (q heal $pot_con)
heal4          quaff 4 heals
heale          quaff 8 heals
qtank          quaff tankset
spring        creates a mystical spring (quaffs potion if non-magic, casts if magic) (so..potions required)
dispel        wears amulet of dispersal or casts it depending on magic/non char. (amulet required)
shockstick    uses 'a sorcerer's walking stick' to cast shockshield
firestick      uses 'a staff of Barad-Dur' to cast fireshield
cameo          uses 'a jade cameo' to cast iceshield.
 
==Hit & Target Commands==
hit            ($hit $target) Both $hit and $target variables must be set
hitis HITNAME  Set's preferred hit variable. Alias for (#var hit HITNAME) Saves to CLASS config file.
targ MOB      Set's current target. Alias for (#var target MOB)
say target MOB Same
k MOB          Same.
kil MOB        Same.
bs MOB        Same.
vom MOB        Same.
Other initial attack commands could be setup similarly so that your attack itself sets the target.
 
==On/Off switches==
 
sancon/sancoff        requaff sanctuary potion upon expiration message
trueon/trueoff        requaff truesight potion upon expiration message
shieldsup/shieldsdown  request for fresh elem-shelds upon expiration via 'say SPELLNAME' (mage must be present)
    ***May revise or setup another option to use shockstick/firestick/cameo instead of requesting from Mage
celeston/celestoff    cleric only. recast of celestial might upon expiration.
tranceon/tranceoff    set magic/cleric to go back to trancing after any cast.
varseton/varsetoff    See above. Enable to re-run findcons or setinv to reset/scan variables for containers and potion on-hand numbers.
                        **Need to disable afterwards or everytime you pull out a potion/recall it'll reset the number to '1'
eqon/eqoff            Enable triggers to capture item data from 'identify' and update the item database for eq damage tracking.
fighton/fightoff      enable auto fight/heal loop.
immobon/immoboff      toggle re-immobilize trigger to constantly immob mob upon standing back up.
boton/botoff          toggle speech command responsiveness
    Bot Speech Commands:
        say fighton  - bot char runs 'fighton' to enable autofight triggers
        say fightoff  - bot char runs 'fightoff' to disable
        say immobon  - bot char runs 'immobon' to enable re-immob triggers
        say immoboff  - bot char runs 'immoboff' to disable
        say immo %0  - bot char runs "c 'immob' %0"
        * You CAN make YOURSELF a bot, and will respond to your own speech commands.
        **Might change these to tells to avoid public room spamming with this stuff
 
==Spell Triggers==
say spellme  - if mage present, casts 'spell' on you
say shields  - if mage present, casts all elemental shields on you
say all      - if cleric/mage present, casts all he can cast on you
*there are mage/cleric triggers for EVERYTHING they cast. See Mage/Cleric config.
 
=Modules=
Upon connection, 'modules' are loaded when main.tin reads in mod_config.tin.
 
I set it up this way so chunks of code could be enabled/disabled for debugging. Over time, will likely consolidate upwards.
 
<pre>
#READ newtin/scripts/basic_utilities.tin;    --A LOT in here. I keep adding to it. I've commented the script itself with details.
#READ newtin/scripts/dirslist.tin;          --Speedwalking Module
#READ newtin/scripts/quitscript.tin;        --An alias for 'quit' so that it saves char/class aliases/actions to their respective configs.
#READ newtin/scripts/onoffs.tin;            --The toggle-able stuff config, aliasing to turn things on/off.
#READ newtin/scripts/inventory.tin;          --Inventory/Potion tracking and management of 'in-stock' quantities.
#READ newtin/scripts/speech_logging.tin;    --Sets up logging of speech lines to a file (at /tintin/speech_log.tin)
#READ newtin/scripts/eq_tracking.tin        --Sets up equipment stat/damage tracking database
</pre>
 
==Basic Utilities==
 
This script is heavily commented, so it may just be best to read it directly. Sets up the majority of the basic command aliases and simple triggers.
 
/newtin/scripts/basic_utilities.tin
 
'''Synopsis'''
-Watches prompt to grab hp/maxHP variables, does a subtraction to get 'damage' variable.
-Trigger a "IF damaged, heal. ELSE, hit" statement upon seeing output of 'version' mud command
-Replace the output of ver "SMAUG 2.1" with "AUTOFIGHTING" just for visual clarification of what's happenin
-Targetting/Hit variable setting aliases
-Heal alising & 'getting full/drink spring' management
-Recall alias
-Auto Style (style %0 until successful)
-Auto Tracking
-Auto re-search, re-dig
-DISARMS trigger
-DH potion buyer char alias and triggering
-Tankset alias
-Elemental shield item aliases
-Anti-Idle auto-save ticker

Latest revision as of 19:06, 3 December 2020

This has all changed significantly. I'm now building a new version and will have documentation and a download coming soon. maybe.

-mike