Repair Tools *KS* (script)

From Elanthipedia
Jump to navigation Jump to search
Repair Tools *KS* (script)
Category Crafting,Forging,Blacksmithing
Front-end StormFront
Author Kashna

What This Script Does

Analyzes and repairs up to 7 separate tools. If you're missing a brush or oil, it will tell you and wait for you to acquire the item in question, so that you can continue the repairs at the exact same point. It is anticipated that the tools in question may be repaired via Blacksmithing.

Using It For The First Time

To use the script, just edit the variables in the first portion of the script to define your two containers: the container you keep your tools, brush and oil in, and if you tie your tools to something (a toolbelt of some sort), define that as well. After that, you'll need to roll through the Tool variables to insert your own. Once this is done, you'll only have to mess with the script when you upgrade/change your forging tools.

Regarding Prompts

For any prompt you receive in the execution of this script, you may NOD or type "GTG" to continue the script. This allows you to do what you need to to acquire the items required, while still allowing the script to start right where it left off once you do one of those two actions. :-)

Repair Tools (Script)

# What container do you keep your tools in?
setvariable ToolBagDesc forging
setvariable ToolBag kit
# If you tie your tools to something, set that here.
setvariable ToolBeltDesc forger
setvariable ToolBelt belt

counter set 1
goto Glance

# Set the following Tool Variables - the "MyToolDesc" and "MyTool".
# This script is currently designed to manage 7 different tools in total.

Start:
Tool1:
setvariable MyToolDesc cross
setvariable MyTool hammer
goto AddToCounter

Tool2:
setvariable MyToolDesc leather
setvariable MyTool bellows
goto AddToCounter

Tool3:
setvariable MyToolDesc stir
setvariable MyTool rod
goto AddToCounter


Tool4:
setvariable MyToolDesc curved
setvariable MyTool tongs
goto AddToCounter


Tool5:
setvariable MyToolDesc square
setvariable MyTool shovel
goto AddToCounter


Tool6:
setvariable MyToolDesc plain
setvariable MyTool pliers
goto AddToCounter


Tool7:
setvariable MyToolDesc
setvariable MyTool stamp
goto AddToCounter

# END OF VARIABLES  -  SCRIPT BEGINS HERE


GotOilNo:
Glance:
put glance
match CheckOil empty hands
match StashLog logbook
match StashBook book
match StashRod rod
match StashOil flask of oil
matchwait

CheckOil:
put count oil
match NeedOil could not find what
match Start remaining.
matchwait

Start:
Tool1:
setvariable MyToolDesc cross
setvariable MyTool hammer
goto AddToCounter

Tool2:
setvariable MyToolDesc leather
setvariable MyTool bellows
goto AddToCounter

Tool3:
setvariable MyToolDesc stir
setvariable MyTool rod
goto AddToCounter


Tool4:
setvariable MyToolDesc curved
setvariable MyTool tongs
goto AddToCounter


Tool5:
setvariable MyToolDesc square
setvariable MyTool shovel
goto AddToCounter


Tool6:
setvariable MyToolDesc plain
setvariable MyTool pliers
goto AddToCounter


Tool7:
setvariable MyToolDesc
setvariable MyTool stamp
goto AddToCounter



Tool8:
goto Done

AddToCounter:
counter add 1
goto Analyze



Analyze:
ToolCheck:
pause 1
put analy my %MyToolDesc %MyTool
match NextTool Analyze what?
match NextTool mint condition
match NextTool pristine condition
match Untie Roundtime
matchwait

Untie:
pause 1
put untie my %MyToolDesc %MyTool from my %ToolBeltDesc %ToolBelt
put get my %MyToolDesc %MyTool from my %ToolBagDesc %ToolBag
match GetBrush You get
match GetBrush You untie
match Untie ...wait
matchwait

GetBrush:
put get brush from my kit
match Rub you get an iron wire brush
match GetBrush ...wait
match NeedBrush What were you
match Rub You are already holding
matchwait

Rub:
put rub my %MyToolDesc %MyTool with my brush
match StowBrush Roundtime
match ToolDone ready to be oiled
match Rub ...wait
matchwait

StowBrush:
pause 1
put put my brush in my %ToolBagDesc %ToolBag
match GetOil You put
match StowBrush ...wait
matchwait

GotOilYes:
GetOil:
pause 1
put get my oil from my %ToolBagDesc %ToolBag
match PourOil You get
match PourOil You are already holding
match NeedOil2 What were you referring
match GetOil ...wait
matchwait

PourOil:
pause 1
put pour my oil on my %MyToolDesc %MyTool
match ToolDone have completed the repair
match PourOil ...wait
matchwait

ToolDone:
pause 1
put tie my %MyToolDesc %MyTool to my %ToolBeltDesc %ToolBelt
put put my %MyToolDesc %MyTool in my %ToolBagDesc %ToolBag
match StowOil You put
match StowOil you tie
match StowOil you attach
match ToolDone ...wait
matchwait

StowOil:
put put my oil in my %ToolBagDesc %ToolBag
match ToolCheck You put
match StowOil ...wait
matchwait

NextTool:
pause 1
goto Tool%c

Done:
pause 1
echo
echo **************************
echo
echo *** All tools are ready for use ***
echo
echo **************************
echo
Exit

NeedOil2:
setvariable OILBREAK yes
goto OilDeclaration

NeedOil:
setvariable OILBREAK no
goto OilDeclaration

OilDeclaration:
echo
echo ************************
echo
echo *** Need more oil to continue
echo
echo ************************
echo
match OilAcquired You nod
match OilAcquired GTG
matchwait

OilAcquired:
goto GotOil%OILBREAK


OilWarn:
put tap my second oil
match Start you tap a flask
match OilWarnTrue what were you referring
matchwait

OilWarnTrue:
echo
echo ******************************
echo *** Very few uses of oil remaining
echo
echo *** Commencing repairs in 2 seconds..
echo ******************************
pause 2
goto Start

NeedBrush:
echo
echo *****************************
echo *** Need to purchase a brush
echo
echo *** NOD or type GTG to continue
echo *****************************
echo
match GetBrush you nod
match GetBrush gtg
matchwait

StashBook:
pause 1
put put my book in my %ToolBagDesc %ToolBag
goto Glance

StashLog:
pause 1
put put my log in my %ToolBagDesc %ToolBag
goto Glance

StashRod:
pause 1
put tie my rod to my %ToolBeltDesc %ToolBelt
put my rod in my %ToolBagDesc %ToolBag
goto Glance

StashOil:
pause 1
put put my oil in my %ToolBagDesc %ToolBag
goto Glance