T2 Tutorial - elanthia-online/dr-scripts GitHub Wiki
T2 is a training loop that continuously evaluates your skills and executes scripts when training is needed. The core loop:
- Iterates through
training_listfrom top to bottom - For each entry, checks if the skill's mindstate is below the
startthreshold - Skips if skill is on cooldown (via
exp_timers) - When a match is found, executes all
scriptsin sequence - After completion, restarts from the top of the list
- If nothing matches, sleeps and warns (shouldn't happen with proper config)
training_list:
- skill: Outfitting # Single skill
start: 10 # Trigger when mindstate < 10
scripts:
- gosafe
- workorders tailoring
- skill: # Array of skills
- Shield Usage
- Parry Ability
- Small Edged
name: Weapons # Optional display name
start: 10
scripts:
- hunting-buddy threshold
- skill: Astrology
start: 20
moons: true # Only when moons visible (Moon Mages)
scripts:
- astrology| Property | Required | Description |
|---|---|---|
skill |
Yes | String or array of skill names. Array triggers if ANY skill is below threshold |
start |
Yes | Mindstate threshold (0-34). Triggers when skill's XP is below this value |
scripts |
Yes | Array of scripts to execute in order |
name |
No | Display name for status messages (useful for skill arrays) |
moons |
No | Boolean - if true, skips when no moons are visible (Moon Mages only) |
T2 provides no automatic protections. You must manually handle:
-
Room transitions - Use
go2orgosafein your scripts to move between locations -
Armor/gear changes - Use
weararmorif switching between gear sets - Returning to safe rooms - Always end scripts by returning somewhere safe
- Error recovery - T2 doesn't know if a script failed or you're stuck
T2 simply executes your scripts in order. It doesn't know if you're in the wrong room, wearing the wrong gear, or about to get arrested. You are responsible for scripting defensively.
Beyond training_list and exp_timers, these settings control T2 behavior:
Delay (in seconds) before T2 starts processing. Allows time for skill data to populate after login:
t2_startup_delay: 15Scripts to run before T2 begins processing or after graceful shutdown:
t2_before_startup:
- gosafe
- buff
t2_after_shutdown:
- gosafe
- sell-lootConfigure avoid settings activated when T2 starts:
t2_avoids:
- type: crime
state: true
- type: drag
state: false
- type: join
state: trueFor Thieves - attempt to burgle between every training block:
t2_burgle_every_block: trueSkip the awaken command on T2 startup (default: false):
t2_skip_awaken: trueMindstate values map to these terms:
-
0= clear -
1-3= interested/learning/thoughtful -
12-16= intrigued/engaged -
21-25= very focused/fascinated -
28-32= riveted/enthralled -
33= nearly locked -
34= mind lock (or capped at 1750 ranks)
For capped skills (rank 1750+), mindstate is forced to 34.
The list order determines training priority. T2 always restarts from the top after each block completes.
Pattern: Periodic Tasks --> Combat Blocks --> Crafting --> Fallthrough
training_list:
# 1. CHORES - Pseudo-skill for periodic maintenance
# "Chores" isn't a real skill, so threshold is always met
# The exp_timers cooldown controls how often it runs
- skill: Chores
start: 1
scripts:
- gosafe
- crossing-repair
- pay-debt
# 2. PRIMARY HUNTING - Your main training focus
- skill:
- Plate Armor
name: Plate
start: 10
scripts:
- checkfavors
- hunting-buddy plate
# 3. SECONDARY HUNTING - When primary skills are satisfied
- skill:
- Shield Usage
- Parry Ability
- Small Edged
# ... weapon skills
name: Threshold
start: 10
scripts:
- hunting-buddy threshold
# 4. CRAFTING - When combat skills are at threshold
- skill: Outfitting
start: 10
scripts:
- gosafe
- workorders tailoring
- skill: Engineering
start: 10
scripts:
- gosafe
- workorders shaping
# 5. FALLTHROUGH - Always has something to do
- skill: Evasion
name: fallthrough
start: 35 # High start = always triggers unless locked
scripts:
- hunting-buddy fallthroughWhy this works:
- Chores is a pseudo-skill gated by
exp_timerscooldown (e.g., every 14 hours) - Primary hunting gets priority when it needs XP
- Threshold hunting handles the bulk of weapon skills as a group
- Crafting runs during combat skill recovery
- Fallthrough prevents "ran out of things to do" warnings
The start value determines how aggressive training is for that skill.
Threshold Guidelines:
| Value | Use Case |
|---|---|
| 1-5 | Maintenance tasks, run infrequently |
| 8-12 | Standard training threshold |
| 15-20 | Skills that train passively (want to top off) |
| 25-33 | High priority, train aggressively |
| 34-35 | Fallthrough (always triggers unless fully locked) |
Group skills when they train together from the same activity.
When to Group:
- All weapon/armor skills that train from the same hunting session
- Skills that require being in the same location
- Skills with similar training rates
When to Separate:
- Skills with vastly different training rates
- Skills that need different locations
- Skills you want to prioritize independently
Example: Separating slow-training armor
# Plate Armor separated - trains slower, gets priority
- skill:
- Plate Armor
name: Plate
start: 10
scripts:
- hunting-buddy plate
# Other armor/weapons grouped - train together
- skill:
- Shield Usage
- Parry Ability
- Small Edged
- Large Edged
- Light Armor
- Brigandine
- Chain Armor
name: Threshold
start: 10
scripts:
- hunting-buddy thresholdThis pattern ensures Plate Armor (which trains slower) gets dedicated hunting sessions, while other combat skills share sessions.
Cooldowns prevent over-training specific skills. Defined separately from training_list.
You can create "pseudo-skills" for periodic tasks that aren't tied to real game skills:
training_list:
- skill: Chores # Not a real skill - always triggers
start: 1
scripts:
- gosafe
- crossing-repair
- pay-debt
exp_timers:
Chores: 50400 # 14 hours - this controls frequencySince "Chores" isn't a real skill, DRSkill.getxp('Chores') returns 0, so the threshold 0 >= 1 is always false (meaning it wants to trigger). The cooldown is what actually controls when it runs.
This pattern is useful for:
- Periodic maintenance (repairs, restocking)
- Daily/hourly tasks
- Any recurring activity not tied to skill mindstates
exp_timers:
Chores: 50400 # 14 hours - don't do repairs too often
Attunement: 180 # 3 minutes - cooldown between attunement training
Locksmithing: 600 # 10 minutes
Outdoorsmanship: 600 # 10 minutes
Skinning: 1200 # 20 minutesHow it works:
- After a skill's scripts complete, T2 records the time
- Next iteration skips that skill if
current_time - last_time < exp_timers[skill] - Cooldown is per-skill, not per-entry
Cooldown Guidelines:
| Duration | Use Case |
|---|---|
| 180-300s | Skills that train passively (attunement, etc.) |
| 600-900s | Active training skills (outdoorsmanship, locksmithing) |
| 1200-1800s | Skills with longer recovery or limited resources |
| 43200+s | Maintenance tasks (repairs, restocking) |
Hunting profiles define what happens during hunting-buddy <profile>:
# In Mahtra-threshold.yaml
hunting_info:
- :zone:
- adanf # Zone to hunt
:duration: 25 # Hunt for 25 minutes
stop_on:
- Shield Usage # Stop when these skills hit threshold
- Parry Ability
- Small Edged
stop_on_low:
- Athletics # Stop if these drop too low
- OutdoorsmanshipKey hunting_info properties:
-
stop_on: Skills to monitor - stops hunting when they reach threshold -
stop_on_low: Skills that if too low, should abort to train elsewhere -
stop_on_high_threshold: The XP level that triggers stop_on (default 20)
- No fallthrough entry - T2 will warn and sleep if nothing matches
- Thresholds too high - Skills will always trigger, nothing else runs
- Wrong skill order - Lower priority items at top steal training time
- Missing cooldowns - Can cause skills to over-train while others starve
-
Forgetting
name:on arrays - Status messages show the array, not a readable name
training_list:
# Maintenance first
- skill: Chores
start: 1
scripts:
- gosafe
- crossing-repair
- pay-debt
# Priority: Plate Armor (slowest training armor)
- skill:
- Plate Armor
name: Plate
start: 10
scripts:
- checkfavors
- hunting-buddy plate
- gosafe
# Secondary: All other combat skills
- skill:
- Shield Usage
- Parry Ability
- Small Edged
- Large Edged
- Twohanded Edged
- Small Blunt
- Large Blunt
- Twohanded Blunt
- Slings
- Bow
- Crossbow
- Staves
- Polearms
- Light Armor
- Brigandine
- Chain Armor
- Defending
name: Threshold
start: 10
scripts:
- checkfavors
- hunting-buddy threshold
- gosafe
- sell-loot
# Crafting during combat recovery
- skill: Outfitting
start: 10
scripts:
- gosafe
- workorders tailoring
- skill: Engineering
start: 10
scripts:
- gosafe
- workorders shaping
- skill: Forging
start: 10
scripts:
- gosafe
- workorders blacksmithing
- skill: Enchanting
start: 10
scripts:
- gosafe
- workorders artificing
# Performance
- skill: Performance
start: 10
scripts:
- gosafe
- performance 34
# Scholarship (Rangers using sigils)
- skill: Scholarship
start: 10
scripts:
- attunement sigil
# Fallthrough - prevents idle warnings
- skill: Evasion
name: fallthrough
start: 35
scripts:
- checkfavors
- hunting-buddy fallthrough
- gosafe
- sell-loot
exp_timers:
Chores: 43200 # 12 hours - pseudo-skill cooldown controls frequency
Attunement: 180
First Aid: 1200
Outdoorsmanship: 600
Skinning: 1200Clerics have Theurgy as a guild-specific skill that requires dedicated training via the theurgy script. Magic skills are often capped early, so the focus shifts to survival and combat skills.
training_list:
# Maintenance first
- skill: Chores
start: 1
scripts:
- gosafe
- crossing-repair
- pay-debt
# Theurgy - Cleric-specific skill
- skill: Theurgy
start: 10
scripts:
- checkfavors
- theurgy
# Survival skills - train before combat
- skill: Outdoorsmanship
start: 10
scripts:
- outdoorsmanship 34
- skill: Athletics
start: 10
scripts:
- checkfavors
- athletics max
- skill: Attunement
start: 10
scripts:
- checkfavors
- attunement
# First Aid and Skinning - if training separately
- skill: First Aid
start: 10
scripts:
- gosafe
- first-aid
- skill: Skinning
start: 10
scripts:
- gosafe
- first-aid
# Combat skills - grouped together
- skill:
- Bow
- Brawling
- Brigandine
- Chain Armor
- Crossbow
- Defending
- Evasion
- Heavy Thrown
- Large Blunt
- Large Edged
- Light Thrown
- Melee Mastery
- Missile Mastery
- Offhand Weapon
- Plate Armor
- Polearms
- Slings
- Small Blunt
- Small Edged
- Staves
- Twohanded Blunt
- Twohanded Edged
name: Threshold
start: 10
scripts:
- checkfavors
- hunting-buddy threshold
- gosafe
- sell-loot
# Performance
- skill: Performance
start: 10
scripts:
- checkfavors
- gosafe
- performance 34
# Fallthrough - prevents idle warnings
- skill: Evasion
name: fallthrough
start: 35
scripts:
- checkfavors
- hunting-buddy fallthrough
- gosafe
- sell-loot
exp_timers:
Chores: 43200 # 12 hours
Attunement: 180
First Aid: 1200
Outdoorsmanship: 600
Skinning: 1200
Theurgy: 720 # 12 minutes - Cleric-specificCleric-specific notes:
- Magic-prime guild - Magic skills train fastest for Clerics, so they often cap before other skills
-
Theurgy is trained via the
theurgyscript - Capped skills (rank 1750) are forced to mindstate 34 and won't trigger training blocks - remove them from your training_list or they become no-ops
-
First Aid/Skinning can be trained together via hunting or separately via
first-aidscript - Consider adding a
stop_on_lowfor Theurgy in your hunting profiles
- Order matters - T2 restarts from top after each block
- Skill arrays trigger when ANY skill drops below threshold
-
exp_timersprevent over-training specific skills -
Fallthrough entry with
start: 35prevents idle warnings
-
;e $T2.shutdown- Graceful shutdown after current block -
;e $T2.noshutdown- Cancel pending shutdown -
;e $T2.reload_settings- Reload YAML without restarting
For comprehensive technical analysis beyond this guide:
Barbarian:
Thief:
Warrior Mage:
Moon Mage:
Empath:
Paladin:
Ranger:
Bard:
Necromancer:
Trader: