Documentation: Difference between revisions
Line 602: | Line 602: | ||
Currently the script is configured to remove an item once it reaches an AC of '5' explicitly (line 16 newtin/scripts/eq_tracking.tin) | Currently the script is configured to remove an item once it reaches an AC of '5' explicitly (line 16 newtin/scripts/eq_tracking.tin) | ||
=== | ===Item DB=== | ||
This system essentially lets you build up an item db for each character. | This system essentially lets you build up an item db for each character. | ||
It's not important to remove equipment from the db if you're not wearing it, the eqlist can contain tons of eq. If the trigger sees ANY of those names being damaged, its AC will be adjusted and actions taken accordingly. So, you can build a huge list for each char really. | It's not important to remove equipment from the db if you're not wearing it, the eqlist can contain tons of eq. If the trigger sees ANY of those names being damaged, its AC will be adjusted and actions taken accordingly. So, you can build a huge list for each char really. | ||
Line 624: | Line 624: | ||
$eqlist[Andvarinaut][key] Outputs andvar | $eqlist[Andvarinaut][key] Outputs andvar | ||
The damage trigger basically adjusts #var $eqlist[%0][ac] by -1 anytime it sees the message '%0 gets damaged'. | The damage trigger basically adjusts #var $eqlist[%0][ac] by -1 anytime it sees the message '%0 gets damaged'. | ||
==='''Screenshots'''=== | ==='''Screenshots'''=== |
Revision as of 19:45, 14 September 2017
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 will be created with specific code for common tasks)
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 -Autofighting (autoheal + autohit) -Inventory tracking, auto-restocking, -Custom prompt to show # of potions and spell duration's in prompt. -EQ damage tracking and auto-removal -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.
I only do this a little bit so far. I haven't really taken advantage here and just use in game triggers to control my alts.
For the most part, when I multi, I just open multiple terminals. However, for simplistic purposes, like golding, you can open multiple sessions and there are aliases setup to toggle them quickly, and triggers setup so you can control alts from a main via speech commands.
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. Use the 'reload' alias after LD/RC to manually handle reloading of all configs. Or, quit properly, and log back in.
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 by running this alias:
setinv (Note: I always forget if its setinv or invset, so, I actually set up both, both work, all the time)
In case you ever want to set container variables 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, keyword (used for DISARM trigger), and ficticious AC (used for auto-removal pre-scrap)
eqon (identify your weapon via spell or scroll) keyis KEYWORD (enter a valid keyword for your weapon, the most unique word available is best) itemac ## (weapons have no AC, but eq is stripped if AC is unset or < 4, so set to something higher than 4 or 99 to disable auto-strip) 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. Most of mine are one of these: #alias wearall {wear cloak; wear all} #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
(Setup in /newtin/main.tin) These are all configured at the upper-most session level (The GTS session) Save Options
charwrite "Save to character config" mode. (Default) classwrite "Save to class config" mode. nowrite "Don't save" mode. Useful for testing and development.
Session Options
ses# Toggle to session # botson Has ALL open sessions run 'boton' to enable speech command botsoff Has ALL open sessions run 'botoff' to disable speech command allquit Has ALL open sessions run 'quit' to logoff. logall Runs go A, go B, go C, etc, where A-Z would be your characters. Quick-log army.
Load Options
reload Must be run after LD or RC. Since no 'welcome' message occurs, this manually triggers all config loads.
Terminal Options
line Runs #split so you get an input line, and custom prompting. *Custom prompting will only work if you have run 'line' and your prompt matches what scripting expects #Custom_Prompt unline Un-split the terminal, back to default game prompt and no text-entry line.
The Following are setup in various scripts under /newtin/scripts. Grepping for them would be the best way to find them specifically. Prompt Related
setnonmanaprompt Sets your in-game prompt so it triggers my tintin replacement prompt - for non-mana using classes. setmanaprompt Sets your in-game prompt so it triggers my tintin replacement prompt - for mana users setbloodprompt Sets your in-game prompt so it triggers my tintin replacement prompt - for blood point users. setlowbiemanaprompt Can you guess?
AutoFight Related
fighton Enables fight/heal loop fightoff Disables fight/heal loop ver Runs 'version' which triggers a 'heal or hit' action ONE_TIME (loopable via fighton/off) hitis BLA Set 'hit' to BLA gogo Fight script gets disabled by'too full' or 'out of heals'. Run gogo to re-enable fight scripting.
Speedwalking Related
finddir %0 Search the directions list for term %0 to find the short-hand code for the area and display full directions.
Inventory/EQ Management
findcons If 'varseton' has been enabled, this will rescan your containers and set those variables for pot_con and item_con setinv Runs 'findcons' then scans your inventory and takes stock of potions 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)
EQ Tracking Related
eqstat Show all tracked eq db data. itemfind BLA Show item BLA in the eq db. eqset Manually specify a piece of eq as being scanned for entry into the eq db. itemac %0 Manually set ac/maxAC of item currently specified as being scanned. keyis %0 Manually set the keyword of the item currently specified as being scanned. remeq Remove a piece of eq from the eq db.
Global MUD Aliases
recall finds and uses a recall scroll repwear remove all; repair all; wearall wearall {wear x; wear y; wear z; etc) For handling layers. 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 drotank get a tankset from your potion container and drop it on the ground. 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.
#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 #READ newtin/scripts/spell_tracking.tin --Sets up triggers which countdown spell duration's in seconds within variables.
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 -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 -'is DEAD!!' alias to turn off any re-spell triggers you may have enabled. -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
Speedwalking
Aliasing to send chars to game areas from DH []
newtin/scripts/dirslist.tin
Usage goBLA Speedwalk to area BLA where BLA is my own shorthand for the area name. See list below.
Some specific mobs or places: gokarl Go to Karl in KoTR, remove all, repair all, and recall. goseth Go the whole way to the Chaos Maze in Seth's Fortress gojade From exit of chaos maze, go to outside Jade's room. govla Go to Vl'aresch (to favor) goaen Go to A'enari (to favor)
Search Function If you're not sure of what the shorthand key for an area is, you can search for it with the 'finddir' alias The full directions set is also displayed in case you want to see that for some reason. finddir BLA Searches for the term BLA in the dirslist.tin file. Case insensitive, and any term in the area name will work. finddir moon #NOP Temple of the Moon = tom #ALIAS {gotom} {nw;w;w;#4 n;e;look painting;open n;n;#49 w;#8 s;sw;#3 w;n};
CURRENT AREA LOCATIONS AVAILABLE:
#NOP Area Name = Shorthand Key #NOP Bartok Grove = bar #NOP Shadowport = shad #NOP Morgul Vale = morg #NOP Blasted Lands = bl #NOP Salburg = sal #NOP Coral Depths = cd #NOP Cursed Lands = cl #NOP Darkhaven Art Gallery = dag #NOP Dragon's Pass = dpass #NOP Elemental Canyon = elem #NOP Glimwinkles Windmill = glim #NOP Kontaur = kon #NOP La Chute Deu L'ancients = lachute #NOP Lake of Tich'Pyga = tich #NOP Lamech's Abandoned Manor = lam #NOP Mithrill Hall = mith #NOP Mountain of Lost Souls = mols #NOP Nevermore = nev #NOP Ocean Keep = ok #NOP Sentinel = sent #NOP Seth's Fortress = seth (Whole way to Chaos Maze -- DON'T WALK NORTH BY ACCIDENT) #NOP Seth's Forress from exit of Chaos Maze to outside Jade's room. = jade #NOP Shattered Refuge = shat #NOP Temple of the Moon = tom #NOP Tree of Life = tol #NOP Village of Edo = edo #NOP Village of Tar'pa Cithm (Barbarian Hometown) = barb #NOP The Wilds = wilds #NOP Wyvern's Tower = wyv #NOP Karl the repair guy and recall = karl #NOP V'laresch = vla #NOP A'enari = aen #NOP MacMillan Family Farm = mac #NOP Dunhill Demesnes = dun ** Incomplete, only have added areas as I go to them really. Many more to add and will probably add more specific people/mobs too.
Quit Script
newtin/scripts/quitscript.tin
This is a stupid simple script that should probably just be condensed up into something else.
Sets up 'quit' as an alias for:
1. Write all actions/alises under the character_connected class out to the character config file. (e.g newtin/characters/GUY_connected_up.tin 2. Write all actions/alises under the char_class class out to the. (e.g. newtin/classes/Thief_classconfig.tin) 3. Sends the actual 'quit' command to the mod.
Trigger Toggles
newtin/scripts/onoffs.tin
Command aliases to enable/disable triger sets for specific purposes that we don't want enabled all the time:
See Above: #On.2FOff_switches
Description of functionality:
Each 'on' alias does: 1. Open new class (sanc_trig in example below) Read a script containing the trigger/alias we want into that class (all scripts read out of /newtin/scripts/) (Class is closed automatically after read) 2. ReOpen the default character_connected class. Example Code: #ALIAS {sancon} { #CLASS {sanc_trig} {read} {newtin/scripts/sanc_trig.tin}; #CLASS ${char_connected}_up {open}; }
Each 'off' script simply kills that class, which destroys all triggers/aliases which were setup in it: 1. Kill the class that was loaded by the 'on' alias 2. ReOpen the default character_connected class. Code: #ALIAS {sancoff} { #CLASS {sanc_trig} {kill}; #CLASS ${char_connected}_up {open}; }
Inventory Mgmt
Scripting to track inventory items, restock, etc.
Aliases: varseton/varsetoff, findcons, inventoryupdate, setinv. Script: newtin/scripts/inv_vars.tin Script: newtin/scripts/inventory.tin
Initial 'on hand' values are taken by enabling the inv_vars.tin trigger set. We don't always want these triggers enabled however, so they are a toggle.
varseton/varsetoff (toggle inv_vars.tin triggers to set the following variables upon 'seeing' things via findcons and setinv aliases)
newtin/scripts/inv_vars.tin - Sets up triggers for capturing the following variables:
Variable Definition OHrecalls On-Hand recall scrolls quantity - can be standard recall scrolls, tribal runes, or Dragonslayer recalls OHheals On-Hand heal potions quantity - can be standard violet pots, or Dragonslayer heals. OHspringpots On-Hand create-spring potions quantity OHtrues On-Hand truesight potions OHsancs On-Hand sanctuary potions OHblues On-Hand mana potions (Currently setup for Dragonslayer orchid pots, didn't actually add "blue potions" cuz I forgot.
Additionally, inv_vars.tin contains the pattern matching used by the 'findcons' alias to identify containers and set the pot_cont and item_con variables.
Container Pattern Matching - Currently Supported Containers: Dracocutis of the Isorla Gnomish crafted metal potion container a laundry basket a pouch of purple cloth Kahl's Green Dragonhide Pouch an old decaying basket an extradimensional portal a small birch chest Originally, I had this setup to simply grab a %0 and set that as the var, so it would work with ANY container, but that was problematic. Discrepancies between container names and keywords were a pain to sort out. Given I only use 2/3 containers ever, was easier to script explicitly.
newtin/scripts/inventory.tin This script is always enabled. It manages the upkeep of inventory 'on hand' values and the math for that.
Synopsis of inventory.tin:
-Set minimum values of tracked potions. Useful for 'restock' aliasing, or 'low stock' notifications. -Increment/Decrement 'on-hand' values based on 'putting' items in the container or 'quaff/recite' usage triggers.
How to set your inventory
There are multiple aliases you can run, as well as 'one alias to rule them all'
Manual step-by-step: varseton findcons inventoryupdate varsetoff The one-step method: setinv -OR- invset (both do the same thing)
Running #var you should now see variables setup for your containers and potion quantities.
#VARIABLE {OHheals}={141} #VARIABLE {OHrecalls}={21} #VARIABLE {OHsancs}={2} #VARIABLE {OHspringpots}={6} #VARIABLE {OHtrues}={2} #VARIABLE {item_con}={my.laundry} #VARIABLE {pot_con}={my.draco}
Restock/Reset
Eventual plan is to have a full 'character reset' alias that would:
1. Recall 2. Repair 3. Restock to specific quotas 4. ReFavor 5. Potentially even return to 'last area' gone to.
Recall/Repair are scripted. Refavor will take 2 seconds. Restocking is in the works, then must put em all together in one big alias.
Restocking alias:
Currently, this is only available to chars in Dragonslayer given that it uses DS specific potion names and donation room containers.
newtin/genres/dragonslayer.tin Alias: restock Usage: Must be in DS donation room. Will 'restock' up to defined "Minimum" quotas. Only heals, trues, sancs, create-springs are currently tracked. Will add the rest once this much works perfectly. "Minimum" Quotas must be specified in newtin/scripts/inventory.tin (should add aliasing to set these more easily) #VAR {min_heals} {100} #VAR {min_trues} {5} #VAR {min_sancs} {5} #VAR {min_springs} {5} Notes: For heals, the code is smart enough to 'get' in batches of 10, so you can get large quantities to attain a quota of whatever (default 100) For the others, the code is dumber, and if you want/need more then one 'get' it's going to fail cuz it'll just try "get ## potion" which you can't carry.
Alias: 100heals Usage: Must be in DS donation room. Get's 100 heals and puts them in your $pot_con
Alias: gettank Usage: Must be in the DS donation room. Get's a full tankset and puts it in your $pot_con
Speech/Channel Logging
newtin/scripts/speech_logging.tin
The following channels are logged out to a file at /tintin/speech_log.tin
ordertalks says, exclaims, wonders tells you chats asks answers yells
To setup a secondary window for speech logging, which is nice during a run when too much text is flying by to catch conversation:
Open a new terminal window tail -f /path/to/tintin/speech_log.tin
Of course, that will lack colorization. If you'd like to add color to that log to differentiate between the different channels logged:
Google about it, I used this primarily: https://unix.stackexchange.com/questions/8414/how-to-have-tail-f-show-colored-output
I ended up going with 'colorex' (https://bitbucket.org/linibou/colorex/wiki/Home)
In a new terminal, I run: tail -f speech_log.tin | colorex -y .\*ordertalks.\* --green .\*says.\* --green .\*exclaims.\* --cyan .\*tells.\* -r 'chats|asks|answers' -m .\*yells.\*
I would suggest adding an alias to that in your shell config. (In my case, this is .zshrc)
alias tinlog="tail -f speech_log.tin | colorex -y .\*ordertalks.\* --green .\*says.\* --green .\*exclaims.\* --cyan .\*tells.\* -r 'chats|asks|answers' -m .\*yells.\*"
EQ Damage Tracking
newtin/scripts/eq_tracking.tin newtin/scripts/id_eq.tin
The eq_tracking.tin script contains the triggers for tracking ac, adjusting values, and auto-removing eq.
The id_eq.tin script is a toggle on/off script which must be enabled for initial gear scanning to set eq inventory and ac stats.
Commands
There are a few aliases entailed in this that you should be aware of:
eqon/eqoff Toggle triggers to capture item vars from 'identify' output eqset {%0} Manually set a piece of eq for entry. Use the FULL descriptive name of the object in brackets. itemac %0 Manually set items AC and Max AC to %0 keyis KEYWORD Set's the item's keyword for command usage eqstat Display all tracked eq stats itemfind ITEM Display specific item eq stats (matches based on item name, any terms found in item name work) acset Reset all AC values to max repairall Reset all AC values to max, then issue in-game 'repair all' command remeq Remove a piece of eq from the tracked eq list
How to Use
Entering Item Data
Using 'identify' to auto-enter details:
eqon Enables triggers to capture item vars do identify on a piece of gear. Capture item name, current AC, max AC values. keyis KEYWORD Set functional keyword for item ..(repeat identify/keyis for all gear) eqoff Disables triggers so no further data is captured by subsequent 'identify's on other eq.
Manually Entering Items (Necessary for weapons and lights)
(Set weapons to 12 and lights to 20) eqset Full Item Name Set item to be scanned (also clears any existing info in the eq db for the item) itemac %0 Set the items AC and maxAC values to %0 (presumes item is currently at max ac) keyis KEYWORD Set functional keyword for item
Removing Item Data
Removing Items
remeq ITEMNAME. Sometimes removing items can be tricky because of the way special characters work. If necessary, just hard edit the variable: quit from your character open newtin/characters/CHARNAME_up_stuff.tin edit the {eqlist} var (see below for formatting)
Displaying Item Data
eqstat Display all tracked eq stats itemfind BLA Display all tracked eq stats for any items which include the term BLA anywhere in name or key.
Auto-Removal of Items
Warnings and Actions
Currently the script is configured to remove an item once it reaches an AC of '5' explicitly (line 16 newtin/scripts/eq_tracking.tin)
Item DB
This system essentially lets you build up an item db for each character. It's not important to remove equipment from the db if you're not wearing it, the eqlist can contain tons of eq. If the trigger sees ANY of those names being damaged, its AC will be adjusted and actions taken accordingly. So, you can build a huge list for each char really.
The Item DB is stored in the 'eqlist' variable. Each item name is a nested variable, and each items ac, max ac, and keyword, are nested within each item name:
#var {eqlist} { {Andvarinaut}{{ac}{16}{acMAX}{16}{key}{andvar}} {the ring of the ancient gods}{{ac}{12}{acMAX}{12}{key}{ancient}} {scales of alpha \& omega}{{ac}{40}{acMAX}{40}{key}{1.scales}} } Generically: {FULL ITEM NAME} {Current AC}{##} {Max AC}{##} {Keyword}{Key for item} (In your config script that'll all be condense so it looks like one long string) This took me a lont time to figure out, so, if you want to mess with stuff, it's probably useful information to show how to call each var: $eqlist[] Outputs all item full names $eqlist[Andvarinaut][ac] Outputs 16 $eqlist[Andvarinaut][key] Outputs andvar The damage trigger basically adjusts #var $eqlist[%0][ac] by -1 anytime it sees the message '%0 gets damaged'.
Screenshots
Spell Tracking
newtin/scripts/spell_tracking.tin
Tracks spell durations in seconds, stored in variables. Can be incorported into custom prompting, or consulted via other means.
Currently only tracking Truesight and Sanctuary POTIONS. Does not detect spells cast upon you by others. Gives 5 second count-down to spell elapsed. Announces spell elapsed.
Spell Durations:
Truesight 120 seconds Sanctuary 690 seconds
Variables
The variables can be put in your prompt, or checked by re-quaff triggers, etc.
Each spell has 3 nested variables for total duration, time elapsed, and time remaining. For example:
$true[DUR] Duration of spell in seconds (120) $true[TIME] Time elapsed $true[LEFT] Time remaining
ReCasting
This is all garbage. I need a way better philosophy of how to deal with failed spells. should prrrrobably just be disabled for now. (comment it out of newtin/mod_config.tin)
newtin/scripts/nonfight_recast.tin
When NOT fighting ($fighting var = 0) failure message triggers "!" (resend last command)
That works well enough if you're casting spells one by one.
It fails entirely when trying to do 'all' or 'shields' for instance and a spell in the middle fails. That spell is lost, and instead the final spell of the group is recast. If THAT Spell is already applied, then even a successful cast will result in failure messages indefinitely... -You've now got a runaway trigger firing! You're Welcome!
When Fighting ($fighting var = 1), failure message triggers "version" (triggers my heal/hit triggers)
This is basically currently geared for auto re-hitting with a mage/ceric via qspike or virtue. The logic would go: VERSION -> check health -> IF necessary (heal + rerun version) ELSE -> cast hit spell FAILED -> rerun version SUCCESS -> rerun version
This part works well enough so long as your ONLY hitting with a spell. If you try to cast other stuff during a fight, this becomes a nuisance.
Custom Prompt
Custom prompting via tintin works by staging the tintin #prompt command to pattern match your in-game prompt, and then substitute/rearrange that however you want.
The tintin prompt is useful because you can configure it to include tintin variables, and MSDP data.
Split Mode
Custom prompts in tintin only work when in #split mode. The command is simple and I have even-simpler aliases:
Command to split or unsplit the screen: #split #unsplit Alias setup in main.tin line unline
Pattern Matching
TinTin's custom prompting is essentially a trigger on your in-game prompt. It works like this:
Trigger setup on to fire on your actual in-game prompt by pattern matching the whole string. Gag that in-game prompt and substitute it with a custom tintin prompt on a specific line.
Thus, for tintin custom prompting to work, your in game prompt must match what the custom prompting scripts expect.
I've made alises which will adjust your in-game prompt accordingly NOTE: You should run 'prompt' and 'fprompt' in-game and note those down first, as this will blow them away:
Depending on if your class uses mana, no-mana, blood, or if you are a lowbie and want to see exp, set your in-prompt: setmanaprompt Mage, Cleric, Ranger, Fathomer, Augurer, etc. setnonmanaprompt Thief, Warrior, Barbarian setbloodprompt Vampire setlowbiemanaprompt Lowbie-Mana Users (I didn't setup a lowbie-non-mana user yet, it's a pain, just use the mana one and deal with the extraneous field)
The script newtin/scripts/class_genre_conf.tin specifies which tintin prompt to load for each class.
I have heavily commented these scripts so hopefully it takes you less time to figure out how these work than it took me. /newtin/scripts/mana_prompt.tin /newtin/scripts/nonmana_prompt.tin /newtin/scripts/blood_prompt.tin /newtin/scripts/lowbie_mana_prompt.tin *Yes, these COULD also be combined into a single script, given that only 1 is gonna match your in-game prompt. But, too lazy to condense.
Output
The output is a two-line prompt that displays both regular prompt data as well as inventory stock, and soon, spell durations:
Example mana-user prompt:
Regular Prompt: (Dyredex) 1366/1366hp 1750/1750mn 590/590mv 903 HY True (0) Sanc (0) $1,230,442 (37.hl 99.mn 2.ts 2.sp) Fighting Prompt (Dyredex) 1366/1366hp 1750/1750mn 590/590mv 903 HY True (25) Sanc (109) $1,230,442 (37.hl 99.mn 2.sn 2.ts 2.sp) (Slightly scratched) .:|||:.
KEY: True (#) = rounds remaining on truesight Sanc (#) = rounds remaining on sanctuary hl = heals on hand mn = mana potions on hand sn = sanctuary pots on hand. ts = truesights on hand sp = create spring potions on hand
TO COME:
Once msdp support is fixed, LOTS will be changed here. Any of the following are available, most importantly affect string. Char name, affect string, alignment, experience, xp to next level, current health, max health, level, race, class, mana, max mana, wimpy, number of practices, gold, movement, max movement, blood, hitroll, damroll, ac, str, int, wis, dex, con cha, lck, base str, base int, base wis, base dex, base con, base cha, base lck, favor, weight, current opponent, current opponent health, area name, room exits, room name, world time.
AutoFight
Compenents
/newtin/scripts/fighton.tin Toggled on/off by 'fighton' and 'fightoff' aliases specified in /newtin/scripts/onoffs.tin
Some aspects of this stuff are actually always enabled in newtin/scripts/basic_utilities.tin
- hp tracking - 'version' triggering heal/hit check - hit and target aliasing
Variables Used:
$hp Current HP: captured from prompt $hpMAX Max HP: captured from prompt $damage Result of MaxHP - Current HP = Damage taken. $fighting Used to flag us fighting or not, essentially gets used to intiate FIRST command to start loop and that's all. $canquaff Used to determine if we are even able to quaff a potion. If not, disables further attempts to do so to prevent runaway failures.
Triggers Used:
1. (CHARNAME)F : My fprompt starts with this. The 'F' makes it different from regular prompt so it fires this trigger. ALWAYS: set hp/maxhp/damage variables based on frprompt fields. IF $fighting variable is set to 0 (we are not yet fighting) set it to 1 and run 'ver'. Go to 2. ELSEIF: $fighting variable is set to 1 (we are already fighting i.e. have already started the heal/hit loop) Then: Do nothing. (This starts the fight, and heal/hit loop with the initial send of 'ver'. Then it ignores further fprompts. 2. SMAUG 2.1 : Output of('ver' command) triggers the IF statements: IF the 'canquaff' variable is set to 0, it means we're out of heals or totally full, so don't do anything. (Prevents runaway heal attempts) ELSEIF damage > 100; THEN heal & run 'version' again. (Thus heals one at a time: check, heal, recheck, heal, recheck, heal, up to dam < 100. ELSE damage < 100; THEN $hit the $target If you run 'ver' without 'fighton' being enabled the logic stops here, you would heal until you hit, and then nothing happens. If 'fighton' is enabled, then the following step is also applied, which loops back to running 'ver' to restart everything once more. 3. Your hit * : Output of various class 'hit' commands. See below for included hit messages so far. (Upon display, run ver. Ver waits in mud buffer for hit lag to resolve, then shows asap. Go To 2.
Aliases Used:
fighton Enables recursive loop fightoff Disables looping ver Runs 'version' targ %0 Sets $target variable (multiple aliases for this, see #Hit_.26_Target_Commands gogo Re-enables the package if it gets disabled by inability to quaff heals. See 'Additional Triggers' just below in this section.
ALIAS: fighton
This alias reads in the necessary triggers to cause additional 'version' commands which restart the loop indefinitely. Triggers re-start the loop by doing 'version' upon hit messages. Currently supported hits: circle leap grasp rend smash stun vindur gong Just add other hit messages into the file so any 'hit' causes another 'ver' to create a loop.
ALIAS: fightoff
Disables the triggers above so that hit messages do not trigger further 'version' commands to restart the loop.
Logic
When we see the Fprompt if you're not currently flagged as 'fighting'($fighting = 1) then set fighting=1 and issue 'version' to initiate heal/hit check. "Version" triggers an HP check, heals up if necessary to witihn 100 hp of max, then issues a $hit to $target. Monitor for various 'hit' messages. Upon those hit messages - issue 'version' once more. This will appear on sceen as soon as hit lag resolves. If a spell attack fails, re-run 'version' once more.
The Loop:
With 'fighton' enabled, the logical loop is as such: 0. k MOB (sets $targ as MOB) (The $hit variable is also already defined upon login via the class config, can be reset with 'hitis HITNAME' as well) 1. IF the Fprompt appears, flag us as fighting, and issue initial 'version' command. (Also IF the Fprompt appears again, and we're flagged fighting, do nothing) -This is used to START a fight at first sight of Fprompt by sending 'ver', but not sending additional ones on each subsequent fprompt. 2. Version appears on screen. Triggers step 3. 3. IF damage is greater than 100, take a heal and ReRun 'version'. Return to step 2. ELSEIF damage is less than 100. Proceed to step 4. 4. Issue a hit to the target 5. Hit message appears on the screen. Triggers step 6. (Hit lag active) 6. Send 'version' command to mud, it sits in mud buffer while hit lag resolves. 7. Hit lag resolves. Version command processed. Return to step 2. 8. Regular (non-fprompt) appears on screen (fight is over): set $fighting variable to 0.
Additional Triggers
"You Cannot Circle" -------------> reset $hit variable from 'circle' to 'leap' "...has no blood to feed upon" --> fightoff (should make this just switch the attack to a none-blood attack) (Spell MISS messages) -----------> version (rerun heal/hit trigger) "You are too full..." -----------> set's the 'can quaff' flag to 'no' and disables further fight/heal triggering. Back to manual control. "You don't see that" ------------> (out of heals) does the same as above. Back to manual control.
Remote Control
There is a toggle which enables characters to receive command from remote characters via 'say'.
boton/botoff Setup in /newtin/scripts/onoffs.tin
Currently, the only 'say' commands setup are:
say fighton (character who's implemented 'boton' would execute 'fighton' autofighting loop) say fightoff (character who's implemented 'boton' would execute 'fightoff' to disable autofighting loop) say immobon (bot char enables re-immobilize trigger to constantly immob) say immoboff (bot char disabled re-immobilize trigger) say immo %0 (bot character casts immob against mob %0)
And the over-arching wildcard 'do THIS':
tell BOTCHAR 'foo bar' (bot char executes 'foo bar')
Additional TO DO
1. Add more 'remote control' commands so that tank can say/tell things to bots for specific actions. -May convert all these to 'tells' to reduce public room spam. Could also control characters from entirely different areas, could be neat) 2. Add in triggers to handle status ailments or whatnot 3. Vette all 'hit messages' and find all 'miss messages'. 4. Find all 'you can't do that' messages and setup auto-change-hit triggers upon those, similar to "you cannot circle" above. 4. KNOWN BUG: Too many 'ver' commands get sent to mud. This bug occurs in the following case: 1. You are fighting more than 1 mob. 2. The first mob dies. The prompt toggles back to non-fighting prompt for a split second. 3. The other mob in the room is the same 'target' name as the initial opponent. The bug itself: 1. You issue a hit to your opponent. They die upon that hit. 2. That hit message has already triggered another 'ver' and it's already in the mud buffer waiting processing. 3. The prompt will change from fprompt to regular prompt. Set's $fighting var to 0 (not fighting). 3. 'ver' output triggers heal/hit. If you hit: 4. Since the mob is dead, you would TYPICALLY get a failure message ala "They're not here" etc. 4a. This may not happen if... there is another mob by the same target name in the room! So then: 6. BUG: The hit in the muds command buffer intended for target A lands on new target B 7. This hit message triggers a 'ver', let's call it "ver A". 7a. This means the original hit/heal loop is essentially uninterrupted, triggered by target A and hitting target B after A died. 8. The prompt flips back to the frompt upon hitting target B. 9. The Fprompt triggers a check on the $fighting, since its 0, triggers another 'ver'. let's call it "ver b"
End result: You get 2 'ver' outputs (AUTOFIGHTING) <--Carried over from original fight, still going. (AUTOFIGHTING) <--Initiated because prompt flipped back to regular and then fprompt again, resetting $fighting var. Fight re-initiated. Triggering 2 actions (You HIT the TARGET) (You HIT the TARGET) Which trigger 2 more 'ver' outputs, and this all now runs in clumps of 2 checks and 2 actions. If you kill a 3rd mob, it goes to 3, etc. Solutions: Manage the $fighting variable better upon death? Perhaps delay it's removal several seconds to allow hits in buffer to resolve?
To Do
A. Re-casting improvements:
track 'last casted' and if it fails, store it as a 'needs recasted' var, and cast those until they receive success message. How to track last INPUT command? Not sure that's possible. Log inputs and tail the last 1 line?
Z. Once realms fixes MSDP support, MSDP integration.