Documentation: Difference between revisions

From Dyrdex.com
Jump to navigation Jump to search
(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
 
(139 intermediate revisions by the same user not shown)
Line 1: Line 1:
Realms tintin++ package by Dyrdex. I have no idea what I'm doing, this is my first foray into programming of any sort. Please forgive my terrible terrible coding!
This has all changed significantly. I'm now building a new version and will have documentation and a download coming soon. maybe.


=Get the files=
-mike
You can curl or wget this stuff. I update it too frequently to keep a tar.gz up there. Should probably switch to github.
http://dyrdex.com/tinrod/
 
=Setup=
==Quick==
1. Edit tinrod/main.tin
*Edit line 26: path to the tinrod directory on your system, relative to where you are when you launch tt++
#VARIABLE      {script_dir}    {tinrod}
For me, the dir is at ~dyrdex/tinrod. If you have it buried, update {/path/to/tinrod} above.
*Edit line 32 with your password where it says PASSWORD_HERE
#ALIAS  {go %0} {#ses %0 realmsofdespair.com 4000;%0;PASSWORD_HERE;&& \x0D && #cr}
 
2. Run tintin++ along with the main.tin file, you'll probably want to set a shell alias for this:
    /path/to/tt++ /path/to/tinrod/main.tin
 
3. Connect to the mud using the alias 'go CHARNAME'
 
4. Use the 'menu' alias to view the Main Menu. Set at least these minimum options (required for autofight)
    pset lowbie    - sets up your prompt
    clearinv        - 0's out inventory count variables
    recalls scroll  - set's up 'recall' alias to find a recall and recite it.
    springs potion  - set's up your spring creation tool as the potions for that.
    minhealth ###  - where ### is the minimum hp you would drop to before you start healing)
    hitis HITNAME  - set's your hit variable, ex: hitis swat
    manaoff        - disables automatic mana potion quaffing for now.
 
5. Setup your weapon keyword for use in Disarm trigger:
    eqset a rusty machete
    keyis machete
 
6. Set your potion and item container variables, set your inventory counts
  (there is automation for this when using certain AV containers, but not for lowbies using lowbie containers yet)
    potcon my.chest    (or my.sack or my.rune or whatever)
    itemcon my.chest  (as a lowbie, you probably have 1 container for both purposes, so set them identically)
    setinv
    setinv  (yes, run it twice the first time, after that just once will update counts if things get off)
 
7. Save this configuration (this autosaves frequently anyways, but I like to explicitly save it the first time)
    saveconf
 
You are now good to go. General gameplay workflow:
go dyrdex  - logs in dyrdex
fighton    - enables autofight
go on a murderous rampage
See "Features: Quick View" below for help on what else is built in here.
 
==Full==
1. Edit tinrod/main.tin
Edit line 26: path to the tinrod directory on your system (i.e. just 'tinrod' if you've got it at ~home/tinrod) and execute tt++ from ~home
Edit line 32 with your password where it says PASSWORD_HERE
 
2. Run tintin++ along with the main.tin file, you'll probably want to set a shell alias for this:
    /path/to/tt++ /path/to/tinrod/main.tin
 
3. Connect to the mud using the alias 'go CHARNAME'
 
4. Setup your character config.
 
    4a: run 'menu' to see all configurable character options.
        NOTE: After setting the 'affiliation' option (to 'ds' presumably) do 'reload'.
              This loads in the current file, and prevents you from overwriting it with a blank one later.
    4b: set your containers and inventory counts by running 'setinv' TWICE (yes do it twice initially)
 
5. Setup your equipment damage tracking (or at LEAST setup your weapon, as its required for the disarm trigger).
    Run the following aliases:
    5a: eqon
    5b: (id a piece of equipment via any means)
    5c: keyis KEYWORD
    5d: (repeat id and keyis for every piece of eq)
    5e: eqoff
    5f: NOTE: for lights and weapons you must manually enter the AC since its not present in 'identify' output.
              After id'ing, do:
              itemac 20  (for lights, and 12 for weapons).
    5g: acset 
 
At this point you should be basically good to go. Most of the other features should 'just work'.
 
I guess, I need to tell you what all those features are....
 
=Features=
 
==Quick View==
 
====General Gamplay====
 
Auto re-search until success
Auto re-dig until success
Auto fighting style change until success (be sure you've practiced the style or it will fail infinitely)
Auto track-walk pursuit (trackgo MOB to begin, and stoptrack to stop preemptively)
Auto Save (saves every 500 seconds)
Anti-Void (thanks to auto-save sending a command every 500 seconds, this prevents you from disappearing into the void when idle)
Auto-config saving for character and classes:
  By default anything you do is saved to your character config either when you do it, or upon quit.
  You can also choose to save new alises/triggers into a Class config if you want it shared among all chars of a given class:
  Just use the alias 'classwrite' to enter into Class-config-writing mode.
  Then use the alias 'charwrite' to return to Character-config-writing mode.
 
====Speedwalking====
 
Script Location: /tinrod/scripts/dirs.tin
 
Aliases to walk from DH[] to numerous places exist and there is an in-program alias to search the file:
finddir fooplace
 
Example:
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};
So, the alias to walk from dh[] to Temple of the Moon is 'gotom'. Run it at dh[] obviously.
I do not have Darkhaven gate unlocking built in yet, so you may run into the closed gate and get all fucked up.
 
 
====Autofighting====
Script Location: /tinrod/scripts/autofight.tin
 
Aliases: fighton/fightoff  toggles autofight on/off
          pause/resume      temporarily pauses or unpauses
          potclear          empties your stomach count for drinking spring
          minhealth ###    sets your min hp level
          hitis HITNAME    sets your preferred hit
 
*If problems arise, it should echo you information. You can always type 'resume' to restart.
*For lowbies, you will probably need to run potclear fairly frequently or you use up all your spring potions too fast.
*For HIT setting, I have *MOST* hits setup in my script, however not all. The hit message MUST be setup or autofight won't loop right.
**See the bottom of the autofight.tin script, and you'll see what I mean. Add in any other hit messages you may need.
 
====Inventory Tracking====
 
Script Location: /tinrod/scripts/inv_vars.tin
 
The 'setinv' alias attempts to find a heal potion and a recall, and set's your $pot_con and $item_con variables accordingly.
*Because I keep potions in one containers, and all other items in another.
 
The gathered data is then displayed in your prompt. The 'setinv' alias with auto-locate and set everything IF you use supported stuff.
*See the full [[#Inventory_Tracking_2]] section below for more details
 
====Other====
 
Other move advanced setups exist, see below, in short they are:
Equipment Damage Tracking
Auto-Restocking of items/potions for Dragonslayer members
Mob Name & Keyword Tracking
Specific Run scripting for some run mobs
Speech logging
Multi-session support
 
==The Main Menu==
[[Image:Menu.png]]
Alias: menu
Displays config options for your char.
 
All of the options for each settings are also shown, so for example:
  Prompt: nomana pset <mana|nomn|blood|lowbie>
 
Means that you can set your prompt with the 'pset' alias followed by any of those 4 options (i.e. pset mana)
 
===Player Config===
Name: Each character reads its own specific config from /tinrod/characters/..
Class: All chars of a given Class read the shared Class config for the Class. How Classy.
 
Affliation: Only ds is really setup right now. ALWAYS do 'reload' if you set/change this option.
Prompt: Currently, you've got mana, no-mana, blood, and lowbie. If you wanna change em, good luck, it's a bitch.
        NOTE: the prompts also 'do' some important stuff as far as setting variables. So be careful mucking around.
Bot Type: Currently 4 options: mage, cleric, immob, tank.
Bot Status: Botting is NOT enabled unless you do 'boton'
The mage/cleric bots do what you think, but, those scripts also suck and are currently broken. Sorry!
The immob bot will just keep immo'ing whatever you hit with immob once.
The tank bot will, if you ALSO enable autofighting, only heal, and never hit. (so do both: boton;fighton)
 
===Item Config===
Setup which items you prefer to use for recalls/springs/dispels/fly
 
===Fight Config===
See Autofighting section below. Setup your autofight preferences.
Note that Sanctuary on/off is now obsolete because autofighting enforces sanc to be ON while fighting.
Truesight however is still up to you, so set 'trueon' if you want that.
 
===Restock Config===
Only works with 'affiliation ds' characters at the moment. Set your stock quotas for the listed items.
 
==Stuff in main.tin==
1. Quick Connect/Reconnect, Saving of stuff to your configs.
 
2. TinTin options
 
3. Multi-Session control
 
4. Speech Logging
 
5. MSDP Support
 
6. Inventory Tracking
 
7. Gameplay options (trigger on/offs)
 
8. Gameplay automation
 
9. EQ Tracking
 
10. Mob Tracking
 
11. Run Scripting
 
===Quick Connect===
Alias: go %0
This is how you connect. Type 'go dyrdex' for example.
All your chars need to share the same password (which is hardcoded into main.tin line 32)
 
Alias: quit
The word 'quit' is aliases to write out all your configs before actually quitting the mud.
This writes: character, class, affiliation, and mobs list to the appropriate configs upon quit.
 
Alias: saveconf
This does the same thing as 'quit' but without quitting.
 
===TinTin Config Options===
 
Nothing fancy here, just your basic tintin config options. Set as desired.
 
===Multi-Session Config===
 
Alias:  (shorthand) (session name)
 
Since tintin allows you to multi sessions in the background, these let you switch to, or send commands to, bg'd sessions quickly:
Since each session we open is named a character name, you can type that character to control that session.
We can then setup aliases to shorthand those session names even further.
 
Probably best to just look at this section of main.tin to understand this better
You'll want to setup a shorthand for each character.
 
So, for example, setting this up;
#ALIAS          {dym} {#dymrex}
 
Allows me to control Dymrex, when he is 'backgrounded', by doing:
dym say hello
 
If you want to foreground Dymrex, just do:
dym
 
You can also setup quick connect aliases here to log groups/armies, etc.
 
Alias: groupall %0
Allows you to have all your sessions follow %0 and has %0 group them.
 
Alias: regroup
Does the same as groupall, but does it again.
 
=== Speech Logging ===
 
Log: ~tinrod/speech_logging.tin
 
This needs work, but for now it just grabs certain channels/socials and logs them.
Open a second terminal and tail -f /path/to/tinrod/speech_logging.tin
 
Alias: savelog %0
Will write out your entire buffer to a log file named %0.
NOTE: writes to your current working directory, not within the tinrod directory.
 
=== MSDP Support ===
 
This *should* 'just work' automatically upon login at this point. If it doesn't, use this alias to 'start' it:
Alias: msdp_report
 
MSDP Var's Further detail. For use in your own scripting, call msdp stuff as follows:
All variable: $msdp_info
All variables + their values: $msdp_info[]
One thing: $msdp_info[THING]  (note caps is required)
For all affects: $msdp_info[AFFECTS]
For ONE affect:  $msdp_info[AFFECTS][sanctuary]
If you're unsure, play around with #showme $msdp_info[THING] and whatnot till you find what you need, or email me.
 
=== Inventory Tracking ===
 
I identify a potion container and an item container and save those as variables.
I track a select group of potions/items within those containers and adjust values as used/stocked.
Values of the most useful potions are displayed in the prompt.
 
Important to note that these counts get integrated into 2 other scripts/purposes.
1. In the 'ds' affiliation script, there is a 'restock' alias. Set your preferred levels via the 'menu' alias options.
2. Potion quaffing is tracked, and this used by the autofight script, so that you always drink spring after 8 potions (when fighting).
 
Alias: clearinv
Clears inventory tracking values.
 
Alias: setinv (also invset, because I can never remember which way it goes, so just setup both!)
This uses 'finditem' to find a heal and a recall, and sets your container variables accordingly.
Then, it examines those containers to get counts on the things it tracks upon the sight of them.
Then the 'at sight' triggers are disabled so further examinations don't adjust levels anymore.
There are also manual controls, listed below:
 
Alias: potcon %0
Sets your potions container to %0 (use the keyword for the object)
 
Alias: itemcon %0
Sets your item container to %0 (use the keyword for the object)
 
=== Gameplay Options ===
 
These are a bunch of things you might want to turn on/off here and there for whatever purposes.
 
Alias: teston / testoff
This is for developing new stuff quickly. It reads in (or kills) whatever you have written in /tinrod/scripts/test_script.tin
 
Alias: eqon / eqoff
Toggles the equipment tracking triggers. Turn on before id'ing gear. Turn off after. Explained above.
 
Alias: immobon / immoboff
This will enable/disable re-immobilize triggers. This is actually redundant now because you can set this up elsewhere.
See the 'menu' options for Bot Type, set 'bot tank' then 'boton' and you get the same thing.
 
Alias: glasson / glassoff
For Fathomer glasseye skill, redo upon expiration.
 
Alias: shieldson / shields off
Upon expiration, request fresh e-shields from your mage bot. Adjust this for your own chars and bot aliases.
 
Alias: celeston / celestoff
For cleric celestial might... I never use this, but did once for about 5 minutes so its setup.
 
=== Gameplay Automation ===
 
This section contains a ton of misc stuff to auto-do-stuff in the game.
 
Auto-style/search/dig/fly/track, etc.
Anti-Idle (auto-save every 500 seconds)
 
Aliases......Results:
supcor      supplicate corpse, get all, wear all.
trackgo %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.
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 for options, there's a lot.
Also Dh potion buying, if you have a potion buyer, just put a small birch chest on him and give him 1m.
 
=== Equipment Damage Tracking ===
 
This has already been explained above, but, process is:
1. eqon
2. (id a piece of gear)
3. keyis KEYWORD
(3a. IF light/weapon: itemac 20/12 respectively)
4. eqoff
 
To view your current eq stats:
eqstat
 
To remove a piece of gear from the eq db:
remeq a weapon of striking  (use the full name of the object)
 
To reset damage values to 0:
acset
 
To find a specific piece of gear only
itemfind %0  (case sensitive)
 
 
 
=== Run Scripting ===
 
These are each kinda their own beast. For when general autofighting doesn't work well.
 
I would just suggest reading each one. They're not great yet, just all kinda 'in the works'.
<pre>
Bishop/Krakov are basically flee then healup scripts.
Collosus is kinda the same, very unfinished
Edo Dragon heads are useful for having your ranger snipe heads from above to aggro them.
Mithril Hall isn't totally automated, just some time saving stuff in there.
Seth sets up some stuff to track who is tanking and when he chills, but not anything else (like hitting).
</pre>
 
== AutoFight ==
 
Configurable via the options shown in 'menu'
 
Uses a 'minhealth' variable, under which you will heal up. Above which you will hit.
 
Without going into 'how it work' let's just get to 'how to use'
 
Gonna use these aliases:
hitis HITNAME
minhealth #####
manaoff or manaon
fighton / fightoff to enable/disable autofighting.
pause    to totally pause this stuff
resume  to restart
 
So, first set those all up. Some notes on that: 
A: For spells, do hitis {c 'vindur gong'} in curly brackets like that.
B: If your 'hit' uses mana, do 'manaon'. If it does not, go 'manaoff'.
C: If things get screwed up, just type 'pause' to pause the whole thing. Some conditions do this automatically.
D: Use 'resume' to restart everything.
 
The logic follows as such:
If you have not already triggered this check, and
If the check has not failed for some reason already (meaning it would continue to fail infinitely), and
If the autofight system is not purposefully paused, and
If you aren't at 8 potions in the stomach, and
If you won't be blind once truesight expires, and
If you don't have a remainder of heals to quaff from a previous healup run, and
If you have the sanctuary spell (or sacral divinity, or holy sanctity), and
If your health is above the minhealth value you setup in your menu, and
If you are not configured as a tank (who doesn't hit), and
If you are not a vampire in need of blood, and
If you are not a mana user
Then Hit the Target, and re-run this check.
(If you ARE a mana user, and mana is under 200, then Hit the Target and sip 4 mana pots until within 200 of full mana.)
 
 
If any of those fail, rectify them, and recurse:
If this check has already been fired: do nothing
If this check has already failed: echo alert, echo vars, disable autofighting.
If the system is paused, echo as such.
If you ARE at 8 potions: drink spring (if you can't find it, make one, if you can't make one, say 'no spring!')
If you WILL be blind when true runs, quaff cure blind now. (and if you fail, say 'blind' and pause the system until cured)
If you have remaindered heals to quaff, quaff them.
If you don't have sanc, quaff it (and if you fail, echo that, set an override, and recheck)
If your health isn't up to snuff, heal up to full, recheck.
If you are a tank, don't even hit, just pass all if-checks and then recurse and recheck. (never hit)
If you are a vamp with under 20 blood, feed, recheck.
If you are a mana user, and mana is under 200, sneak in 4 mana pots with each hit.
Also: if you are EVER blinded in a fight:
The system is paused, you 'say blind' and upon that blindness expiring you will automatically quaff truesight and turn 'trueon'.
 
=== Debugging ===
 
Currently there are debugging echo's built into the check which you will see if you enable this. This helps me develop it.
 
You can edit out all the #SHOWME lines to get rid of those, but be warned, it's a bitch to debug without them.
 
=== 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 AF script always hits a specific target. This data is pulled from the mob tracking system, so read on below:
 
== Mob Tracking ==
 
Everytime you fight anything, you can capture the mob data from msdp and set a mob keyword.
 
Those keywords become the 'target' variable when autofighting is enabled.
 
If a mob is not already setup in the mob tracking db, you will be prompted to enter the keyword with this alias:
 
mobkey %0    (i.e. mobkey demon)
Note: upon entering the mobkey, autofighting is automatically restarted.
NOTE: DO NOT TYPE MOBKEY BEFORRREEE YOU (or your group) is ready to start the fight: Cuz you WILL $hit $target and start it. 
 
To view the entire mob database:
Alias: mobstat
Note: I also started saving mob level as well, seems like it could be useful for future leveling purposes.
 
== Speedwalk ==
 
There's a ton of places already aliased for speedwalking, and a way to search for those too.
/tinrod/scripts/dirslist.tin
 
All speedwalking directions start from dh[]
 
All my speedwalk aliases are like goHERE
NOTE: Notice the difference between these two similar, but different aliases:
      go HERE  (attempts to connect to the mud as character name 'HERE')
      gohere  (attempts to speedwalk to 'HERE')
 
All the place names are shorthanded to my own liking. How would you know what I've setup? I'm glad you asked:
Alias: finddir %0
Searchs dirs list for 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' or even consult the actual dirs if you're walking already
 
 
== Affiliation Config ==
 
I've only setup 'ds' so far, but you could do the same for guilds or barbs or pk.
 
Just sets up things relevant to headquarters, and our potion names. Mainly: restocking.
 
Use the 'menu' to set your stock values. Then go into donation room and do 'restock'. Done.
 
Also tracks recalls and auto-buys more when you are down to 1.
 
Also automatically says 'town' in the portal to town.
 
= Bugs =
 
Configuration Overwrite
Configs are loaded upon login, and written out upon quit.
If you log in/out too quickly, then you may 'quit' before anything was loaded.
Thus, you will write out empty config files. Most frequently happens with the affiliation config for some reason.
--OR--
After initially setting up a character. If you set the affiliation to ds, you MUST 'reload' to read in the current file.
Otherwise, when you quit, you try to write that class to that file, and, you write nothing cuz nothing was ever loaded.
Thus, you've wiped out the /affiliation/ds config.
Solution: I keep a copy of the ds config, it seems to be the one I overwrite the most. Just recopy it into place again:
cp /tinrod/affiliations/ds.orig /tinrod/affiliations/ds
Make sure to 'reload' your chars before quitting them.
 
 
Autofight Failover
There can become a conflict between the 'fightcheck' and 'healup' aliases, since they each call the other.
If 'fightcheck' thinks it's time to heal, and 'healup' thinks its time to fight -- infinite loop, big problem.
This is failsafed to just alert and disable autofight, otherwise it crashes tintin completely.
Why: Most likely the issue is that your minhealth value cannot be achieved.
      (mostly: You removed eq and max hp is now lower than your minhealth value.)
Solution: Always set minhealth to at LEAST 101 hp below your max hp. Also try to account for removed eq.
          My suggested minhealth is -400 from max hp. Thats 4 quaffs, 1 round, half-stomach, works out well in testing.
 
 
Auto-Cure-Blind problem
For some reason right now this is broken for mana-characters. It works perfect for vamps for some reason... gotta debug more.
 
 
=Contact=
 
If anybody ever uses this, feel free to contact me at dyrdex@gmail.com about it.

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