Documentation

From Dyrdex.com
Jump to navigation Jump to search

Connection Management

Included in main.tin are the following useful aliases:

Command syntax notes
go go character (or nickname, or group) Connect. Prints full character list if no argument is given.
addchar addchar character password nickname nickname is optional
addnick addnick character nickname add/modify character nickname
delchar delchar character removes connection config. (character file remains in place on system).
show show character (or nickname) prints useful OFFLINE info about the player at last quit. Doesn't print active data (yet).
addgroup addgroup groupName member1 member2-7 Must add all group members at once, now. Use full names.
delgroup delgroup groupName deletes a group
remgroup remgroup groupName member1 removes member1 from groupName. Use full member name.
pquit pquit Quits a character and flags them 'Prepped'. Will display in 'go' eventually (not yet).
teston/off teston or testoff Reads tt3/test_script.tin into testing class, or kills that class off.
rtest rtest does testoff;teston useful for quick reloading of test file during development

Session Control

Command notes
charname <command> sends commands to that character. Enclose multiples in {in;brackets}.
nickname <command> sends commands to that character. Enclose multiples in {in;brackets}.
all <command> sends commands to all your sessions. Enclose multiples {in;brackets}.
ses print all active session names (useful to confirm nobody is running in the background)

Modules

You can edit tt3/modules.conf to add/remove modules. Module scripts live in tt3/modules/

The most important are the Menu options and inventory counts.

Command notes
init attempts to set up some of the character menu options.
menu prints the character menu, the primary character config system
finddir place searchs speedwalks for the alias to speedwalk to place
setinv attempts to set your inventory containers and quantities. If it fails, set these first:
potcon my.YOURCON sets the location of heals. Alias 'heal' works.
itemcon my.YOURCON sets the location of recalls. Use menu to see how to set recall option to find/recite scroll.
restock DS chars only, run in donation room, see menu to set levels, have container vars set.


Game Automation

Most universal game related stuff I put in tt3/modules/game.tin

All these commands will repeat until they succeed:

search
dig
scan
style STYLE
flee
Command notes
trackon Guy tracks and moves toward Guy until you get there.
save runs automatically ever 500 seconds so you never void
qtank quaffs tankset
goneut uses pillow until neutral
heal q heal $pot_con
blue q mana $pot_con
app eat apple $item_con

Optional world flagging system

  • You can flag a character with any of 6 flag Names: bot, class, org, run, group, or prompt.
    • Class and Org are auto-setup.
Syntax: flag <character> <flagName> file

The file can be any word you want provided a corresponding file exists at tt3/flagName/file.tin

Example: 'flag dyrdex run seth' would flag my character to autoload tt3/runs/seth.tin at login. 
Command syntax notes
flags flags character If you're connected, run without argument to see current data.
flag flag character flagType file flagType can be: prompt, class, org, run, group
unflag unflag character flagType removes flag
load load character scans for these 6 flags and reads files in if found.

In addition to the 'flag' alias for setting flags, these are shortcuts to call 'flag' from your current session.

That is, these would set 'your' active connected session without needing the whole 'flag charname type value' syntax.

These can be set to ANY word you want as the argument, as long as tt3/TYPE/any_word.tin exists:

Class Flag: cset arg   
Org Flag:   org  arg   
Prompt:     pset arg   
Run Flag:   run  arg   
Botting:    bot  arg*  

For 'bot' there are the special arguments 'on' and 'off' to toggle botting.

1. Set bot type with bot TYPE         (can be any THING provided tt3/bots/THING exists (note: no .tin on file)
2. Set bot tatus with bot on/off
 
Once set, those are saved and will be applied at login. 



Other aliase that are in main.tin:

gather_data - auto-gathers Class and Org flags from 'score'.

load - scans for those 6 flags and reads those files in if found

reload - writes out current world data, then does load again

password - updates local tt3 stored pword when you reset in-game.

Modules

Display Modes

Right now, these are only built in test_script.tin so you have to run teston first:

Command notes
off Resets screen to basic top/bottom split
hud Prints fullscreen heads-up display
bigmap Prints L/R split with big map on R
affson/off Prints the affects list from hud as standalone box
mapload name Reads in map file from tt3/maps/name.map
bigmap name Reads in map file and puts you in bigmap mode.
mapon/off Toggle map display
gohere Jump map to current room name.
tmap Terrain Map. Sets room terrain flag to msdp terrain var.

The useful map commands are:

#map find <roomname or vnum>
#map run <roomname or vnum>

To add terrain colors/symbols to your map run commands for all terrain types:

#map terrain Hills <afa>X    <aca> is color range aaa-fff (rgb), X is whatever map symbol you wanna use for Hills. 

Set up all values for all room types. Once defined, run tmap in every room.

The Main Menu

Alias: menu

Displays config options for your char. 

All of the options for each settings are also shown, so for example:

 Recalls: scroll             recalls <spell|scroll|rune|stone>

Item Config

These establish which options you'll use for recalls, springs, dispels, fly.

Provided you set ANY of the values, you'll have these aliases:

recall    recalls you
spring    creates a spring
dispel    dispels magic
gofly     uses fly object

Player Config

Shows current connection flags. Use bot, run, org, cset, pset, to configure.

Fight Config

Sets up autofighting.

For spell hits use: hitis {c 'spell name'} with brackets like that.

Manaheal is for anybody whose hit uses mana, to re-mana over time.

Apples is for a 'Big Hit' trigger that eats 3 apples upon 1000hp damage change in 1 round.

Restock Config

Only works with DS chars atm. Go into donations, type restock.


Speedwalk

There's a ton of places already aliased for speedwalking, and a way to search for those too.

All my speedwalk aliases are like goHERE

Alias: finddir bla   

Searchs dirs list for 'bla' to find the the shorthand code for the place you wanna go: 
finddir tree

#NOP Tree of Life =  tol
#ALIAS {gotol} {#50 w;#5 s;#3 w};

You then know the shorthand for Tree of Life is 'tol' and can do 'gotol'

I do not have Darkhaven gate unlocking built in yet, so you may run into the closed gate and get all fucked up.

Gameplay Automation

Contained in /tinrod/main.tin

This section contains a ton of misc stuff to auto-do-stuff in the game.

  • Auto-style/search/dig/fly/track/re-quaff-drops, etc.
If you do any of those, you will auto-retry literally forever. 
Anti-Idle (auto-save every 500 seconds) 
Anti-Spam (auto-enters a generic command anytime you receive the warning for same command 20 times.)
Aliases......Results:
supcor       stand, supplicate corpse, get all cor, wear all, (get/wear several times actually) 
trackon %0   track mob named %0 and automatically continue to track/move/track/move
stoptrack    stop tracking
heal         quaff 1 heal
heal4        quaff 4 heals
heale        quaff 8 heals
blue         quaff a ds orchid mana potion
blueup       quaff orchids until mana is full
qtank        quaff a tankset
drotank      drop a tankset
shockstick   use shockshield stick
cameo        use iceshield cameo
firestick    use fireshield staff
goneut       use a pillow to get align back within +/- 80 of 0. (Must have a pillow in your Item Container)

Also various 'target setting' aliases, but this is pretty much taken care of automatically now by the mob tracking system. 
But, in case you just wanna manually set your target variable, check out this section of main.tin for options, there's a lot. 

Also Dh potion buying, if you have a potion buyer, just park him at dh shop and put a small birch chest on him, give him 1m.


Inventory Tracking

Have at least 2 heals in your potion con, and 2 recalls in your item con, and run 'setinv'.

If its the first time you're setting inventory, run setinv TWICE.

potcon my.FOO

itemcon my.FOO

clearinv

setinv

Supported Items

You must be using a Supported Container for setinv to auto-detect containers, I only track certain Potions/Items.

Supported Containers:

Dragonslayer container
Gnomish crafted metal potion container
a pouch of purple cloth
Kahl's Green Dragonhide Pouch
a laundry basket
a hardened metal case
an extradimensional portal
a small birch chest
an old decaying basket

Supported Potions/Items:

Dragonslayer heals
Dragonslayer manas
Dragonslayer recall scrolls
a glowing violet potion
a tribal rune
a recall scroll
a create spring potion
a true sight potion
a sanctuary potion
a cure blindness potion


Autofight

Usage

Enabled via the fighton/fightoff aliases, current status shown in 'menu'

Uses a 'minimum health' variable, under which you will heal up. Above which you will hit.

Without going into 'how it works' let's just get to 'how to use'

Run these aliases to control on/off/pause/resume

fighton / fightoff  -- enable/disable autofighting. 
pause               -- to totally pause this system
resume              -- to restart 

You should know about these:

tset                -- target set (Used to re-scan msdp mob name variable, if target ever gets 'off')
mobkey KEYWORD      -- If you have to the target keyword it will prompt you to enter this
potclear            -- to restart in the case of false-positive 'No Spring' enforced pause.
trueon/trueoff      -- to enforce truesight re-quaff or not. 
*Actually, trueon/trueoff is outside the fight script, and will keep going after the fight, so turn it off manually. 

The script watches hp, mana, stomach fullness, sanctuary, blindness, blood points, and if all that's good - you hit.


Hit Support

The whole thing works based on your hit message triggering the recursion. So, ALLLL hit messages have to trigger that.

So far I have a lot, but not all setup. See the bottom of the tinrod/scripts/autofighting.tin file, it should be obvious what I mean.

If your autofight isn't working, or it only seems to fire 'once' make sure your hit message is setup in that file like all the others.

Target Support

  • The script always hits a specific target.
  • This data is pulled from the mob tracking system, and you MAY have to enter the mob keyword.
  • See the Mob Tracking section below for more info on targetting

Disruptions

The system is NOT fully self sufficient. It's intended for leveling mostly, and even then, it's more of a fight-ASSIST than anything.

MANY things will pause or otherwise disrupt this system, it WILL very likely require your attention to manage and run.

The solution to nearly everything is 'resume' or 'potclear'.

Shutdowns The fight system will shut itself down under certain conditions, to prevent crashing tintin itself.

  • If values are impossible to attain:

Case 1: you set a minhealth of 1000. However, you remove a piece of eq that was too damaged, and now, max HP is 999. The scripting would heal infinitely, so instead, it shuts itself down. fightoff.

Case 2: If, due to some mis-configuration of variables:

The fightcheck alias thinks that you should heal via the healup alias
The healup alias thinks that you're healed, and should re-run fightcheck.
That's a loop. fightoff (or tintin crash). 

In nearly all cases, the solution is to check your mininmum values, namely minhealth in 'menu' and make sure it's attainable.

Pauses The system automatically pauses itself when:

  • No mob keyword found, manual entry required.
Run 'mobkey KEYWORD' to enter the key data and initiate the fight. 
  • No spring can be created.
If, after 8 potions, you attempt drink and no spring is found, you will attempt to create one. 
If you cannot create one, a warning is echo'd and autofight is PAUSED. 
This has killed me many times and I should not do that probably, because for now I do....
potclear     to clear that variable and resume autofight.
  • Blind (or inevitably blind)
Blindness is granted priority, the hit/heal check pauses while we try to resolve blind. 
If blindness is cured, truesight is automatically found, quaffed, and 'trueon' enabled. 
  • If stomach is actually 'too full'
System pause, and all attention is given to trying to obtain a spring/drink asap. 
If someone/something creates a spring you AUTOMATICALLY drink from it and resume autofight.

Stallouts

  • MSDP Missing
Sometimes at the start of a fight, msdp data will be late and still report there is no mob name variable.
Autofight will not kick in. 
You need to recheck the msdp vars by doing 'resume' or  'tset'
  • Single Fire*
The whole thing loops based on sight of your hit message. If it's running ONCE, issuing one hit, and then stalling:
Make sure your hit message is in the bottom of /tinrod/scripts/autofight.tin or add it in if its not present.
fightoff/fighton afterwards to reload that config.

Debugging

Currently there are debugging echo's built into the check which say what its doing, with some numeric step numbers. This helps make it obvious at what point in the autofight.tin script problems are occurring.

Mob Database

Everytime you fight anything, you can capture the mob data from msdp and set a mob keyword.

  • Mob Full Name
  • Mob keyword
  • Mob Area
  • Mob Level

These are kept in a huge list so that we can automatically see who we're fighting and what keyword we need to use to attack them automatically. It's also handy if you want to look for other mobs of a specific level for leveling purposes or something. I just recently added Area's and Levels, so not all mobs in my 'current' listing have that data (i'll have to refight/rescan them all over time)


Targetting

This really only comes into play with aggressive mobs, or when fighting a sucession of mobs.

When attacking a non-agg mob, the kill or hit attack itself sets the target variable at that time.

  • For example: kil MOB (kil with 1 'L') actually sets the $target variable to MOB at that time, then sends 'kill $target' to the mud.

However, when an agg mob attacks you, we watch msdp data for the mob name, and then automatically check if we've fought it before.

*The mob db is queried to see if we can find the mob name and corresponding keyword. 
*IF the mob is in the db already, the target is automatically set to its keyword from the db. 
*IF the mob is NOT in the db already, you are prompted to enter it with the 'mobkey' alias, see below. 

alias: tset

(Target Set) This is the alias to run the target setting actions, query the db, set the target variable.

  • This run automatically (upon sight of the fprompt when FightAssist is enabled)
  • Running this manually is sometimes necessary in lieu of the following bug:
  • BUG: At times, msdp data is slow to arrive, and when we run this check the msdp mob name variable hasn't arrived yet.
If the system doesn't see the msdp mob name var, the whole FightAssist system won't engage. 
So, run tset to re-scan for msdp mob name var and it should then see it, grab the target, and proceed. 


alias: mobkey KEYWORD (i.e. mobkey demon)

If a new mob is detected which is not already in the mob db, you will be prompted to enter its keyword:

Now Fighting: an octopus
Cannot Locate Mob Data: Capturing...
* * * * * Enter Mob Key: mobkey KEYWORD * * * * *

You would then do 'mobkey octo' to enter the key, once entered, the FightAssist system engages and takes control of the fight.

  • IMPORTANT: Autofight will NOT proceed until you enter the mob's keyword with this alias.
Note: upon entering the mobkey, autofighting IS automatically restarted and you WILL hit the target.
NOTE: DO NOT TYPE MOBKEY BEFORRREEE YOU (or your group) are ready to start the fight: Cuz you WILL $hit $target and start it.  

alias: mobstat

Display the entire mob database: mob full name, mob level, mob keyword.

Note: I would like to start saving lots of other mob data well, seems like it could be useful for future purposes.
      I now track level as well.

alias: findmob TERM

This is a general search function to query the mob database.

*Can query by any term in the mob's full name, or by numeric level. 
*Case insensitive. Partial matching accepted. 

Examples:

findmob hound
                      the denizen hound: Level 39   key hound 

findmob Dragon
                Talinka, the Red Dragon: Level 50   key tali  
               the Ancient Green Dragon: Level 32   key drag  

findmob 34
            Asema, the disturbed spirit: Level 34   key asem  
                                   Life: Level 34   key life  
             The first horseman, Famine: Level 34   key horse  
                             the amazon: Level 34   key ama

Current Issues

2. can only set bot status from inside game with 'bot foo' and 'bot on/off'.

   TODO: fix 'flag' alias to regex for bot key, and require type/status

3. cannot set flag to null, use unflag.

   TODO: build additional regex for 'off' (run off, prompt off, etc).

4. addgroup cannot append names to group, must set all at once.

  TODO: make this work with list indexes and append


If global session aliasing gets knocked out, can print to screen with these then copy/paste into global.tin:

To setup nickname session aliasing:

#foreach $worldlist[] {char} {#showme {#alias #$worldlist[$char][nickname] $char}}

To print full name session aliasing:

#foreach $worldlist[] {char} {#showme #alias $char #$char}

Backup & Restore

BACKUP YOUR DATA: I make a copy of a few of the folders fairly regularly:

cp -r tt3 tt3.bak

(Writing a cron job to do this every 2 days is a pretty good idea)


File Restoration If you accidentally wipe out a config somehow (it happens), just copy the backup into place:

cp /tt3/characters.bak/dyrdex.tin /tt3/characters/

And reconnect or do 'reload'.

Contact

If anybody ever uses this, feel free to contact me at dyrdex@gmail.com about it.