A lot of the script samples contained in the tutorial were written for DragonRealms - The Fallen. Please keep in mind the policies governing the version of the game you play.
There are two types of wizard scripts - the command (*.cmd) and the standard (*.wiz) version.
The difference is that the command script can be executed from the "command line" in your Wizard Frontend, hence the name.
The standard script must be executed through your Wizard - Script menu at the top of the screen.
The command script is more powerful in that you can enter variables to pass to the script's logic.
For instance, say your script is called Sell.cmd and it will sell any type of object from any type of container you have.
You would start the script by entering ".sell <item><container>".
The "item" and "container" are variables.
The item can be skins, hides, or pelts and the container can be a backpack, pack, haversack etc...
The period in the front of the script name is the default character that the wizard uses to execute the script.
You can change this to another type of character in your Wizard-Configuration menu.
Notice that you do not have to type the script's file extension of ".cmd".
The command script can be called automatically with trigger programs such as what you will find on www.kinist.com.
This allows you to create powerful scripting loops with some logic to handle unexpected situations.
I will talk about this later in the tutorial.
The downside of command line scripts is that if you are like me.... you may forget the name.
Then, you will have to open up your Window's browser or using the "edit script" command in Wizard to seach through and find the script name.
You don't have this problem with standard scripts because a description of the script is displayed in the pop-up menu that Wizard opens when you go to execute that type of script.
Now a way around this problem for command scripts is to create a command script called MENU.cmd.
In it you can list all the script names and what they do.
You are more likely to remember the script name "MENU" than say "ppxing", "moonieastrology", etc...
You can name your scripts just about anything, providing you don't use special characters like a -, %, ^, etc...
I tend to group my scripts by what they are.
For instance:
PM_cleric.cmd
PM_moonmage.cmd
PM_warmage.cmd
combat_fiends.wiz
combat_meys.wiz
travel_Lang2Theren.wiz
travel_Muspari2Theren.wiz
I find having some kind of order to the naming convention and the descriptor line in the script helps to organize your script directory, especially when you have hundreds of scripts like I do. <g>
This is the first line of any script which starts with a # symbol.
The # is used to denote a remark line.
This means that the script will by-pass this line when executing the commands.
It is for your reference only.
Often times coders will use remark statements throughout their programs to define what variables are being used or what that section of code is to do.
The Wizard will display the descriptor line for *.wiz files when you open up the menu to execute them.
So if you have a lot of scripts being displayed and you want to find the appropriate one quickly, you should pay more attention to how you define the descriptor line.
Some examples of how I define the descriptor line are as follows:
#Travel - From the Crossing East Gate to the Moon Mage Guild Leader
#Travel - From Crossing Bank Window to Wolf Clan's Leather Repair
#Moon Mage - PM, MD, and Astrology
#Moon Mage - Clarify Gems
#Combat - Cleric - Fiends
#Combat - Ranger - Leucro
#Empath - Self Heal
#Empath - Heal Others
The Wizard has some configuration settings that can greatly assist your scripting.
Let's say you play 3 characters but each one has a different place that you keep your weapons and boxes.
They even use different cambrinth and juggling items.
Well, it's kind of silly to have 3 scripts (one for each character) that does the same thing but each is uniquely defined for those type of items.
Likewise, its cumbersome to do character checks through your script to know what type of equipment to use or where to store an item.
So the easy way to do it is to go to your Wizard - Configuration - Options - Variables menu.
In this menu you will see a place to define variables such as:
%sheath
%container
%weapon
%weapon2
%level
%shield
%user1 through %user9
Micwolf uses a harness for his weapons, so in the %sheath box I will type "harness".
He also uses a backpack as his primary container.
So in the %container box, I will type backpack.
%shield will be shield... but this could be a "lid" if you us the cooking pot lid from Arthe Dale.
For his %weapon1, I will enter broadsword and %weapon2 will be his crossbow.
Now, there are 9 user variables that you can define.
I like to standardize mine.
I use %user9 for cambrinth items and %user8 for juggling items.
You do not have to define all the variables - they are optional.
Now that they are defined on each of my character profiles and the configuration saved, I can now start my script.
In my script I can do something like this...
PM_MD:
ECHO -> WORK PM & MD
put get my %user9
put hold my %user9
pause
put pre mpfe 10
put charge my %user9 5
pause
put focus my %user9
pause
put cast
pause
goto PM_MD
The first line is called the label (PM_MD:).
All labels have a colon after them.
The echo statement used above will display the message "-> WORK PM & MD" to your screen when the script hits that section.
I included a "get" and "hold" statement to compensate for the type of cambrinith item.
For instance, I might be wearing my cambrinith ring so "get" wouldn't put it in my hands - but "hold" would.
My cambrinith item might be an orb - in this case "get" would work and hold wouldn't have any affect.
The "pause" statement is needed to make sure that I don't exceed my alotted type aheads as specified by my account type (ie Premium vs basic).
The pause after I charge the cambrinith item will cause the script to wait for the RT to pass.
You could also use the WAITFOR ROUNDTIME command to do the same thing.
At the end is the "goto PM_MD" statement. The "goto" command will redirect the script back to a "label".
Our label in this example is PM_MD: This is a very simple looping script that is endless.
Typically for any subloop in a script you will have a means for it to exit to another area of the script or end the script altogether.
There are several ways to accomplish this and I will discuss them further in this tutorial.
The in-game command, "STOW" is another useful tool when working with scripts.
You can see the usage for this by typing STOW HELP in game.
Be careful as to what container you set the stow command.
If you want to use it to stow your weapons, then use it in a script to STOW your gems, hides, boxes...
You may find that your harness/quiver is too full to put your weapon back into it.
You may also have difficulty in having the item fit into the container.
To set the STOW command you hold an item in your hand and type STOW MY <item> IN MY <container>.
This sets your stow to that container.
It will remain that way until you reset the stow command to something else.
After its set, all you have to do is type... STOW LEFT or STOW RIGHT to take the object in the left/right hand and put it in the set container.
You can shorten this with STOW L or STOW R.
When using this in a script you would have a statement "put stow r" or "put stow l".
Why would you use this over "put my box in my %container"?
What if the object in your hand was unidentifiable by your script?
Your script would hang.
The stow command doesn't care what the item is.
It will attempt to put it in the container.
I'll give you some instances where this will help.
Say you have a lot of game lag and you get that annoying message of "Sorry, you may only type ahead two lines."
When this happens often times a line or more in your script is ignored.
So you then advance to an area of your script where you have to get another item, but you can't, because your hands are full.
Earlier in your script, you got and used a cambrinth item, then picked up a box to disarm, and you removed your armor.
So which of these items is still in your hand?
You don't know without doing a "glance" at your hands then have a set of match statements to see whats in them.
So a quick and dirty way is just to STOW the item so you can move on in the script.
Earlier I talked about passing command line variables into your command scripts (*.cmd).
I do not know the limit of the number of variables you can have.
I have tested up to 30 successfully.
I can't imagine where you'd ever need more than 10.
Lets say you have a script where you are working some survival and lore skills.
In it you steal from someone, tend a wound, and forage for an item to crush.
Maybe you use this script on more than one character.
Your ranger can forage junliar stem but your thief can only forage a jadice flower.
Your wound may not be in the same location each time you go to use the script or the person you are stealing from isn't the same.
This is where variables come in handy.
You would pass these into the script by including them after the file name in the command box on your Wizard.
Example: .SurvivalLore "junliar stem" Micwolf "left arm"
The file name is SurvivalLore.
It is a command line script so the period in front of the file name is required to execute the script.
The first variable (%1) is "junliar stem".
The second variable is "Micwolf", and the third is "left arm".
What is "junliar stem" and "left arm" in quotes?
For items with an adjective such as "left" or "junliar", by using quotes the entire phrase is considered variable 1.
Some people will use %1 %2 to define junliar stem etc...
This isn't necessary.
Now in this example "junliar stem" is what you will be foraging, "Micwolf" is who you will be stealing from, and "left arm" is what you will be tending.
I typically put the body part to tend as the last variable in my scripts because it is less frequently used.
Here is a very simple script showing the use of variables.
#VARIABLES
ECHO -> LETS TEST HOW VARIABLES ARE PASSED
ECHO Variable 1 = %1
ECHO Variable 2 = %2
ECHO Variable 3 = %3
ECHO Variable 4 = %4
Copy and paste the above script into your notepad and save it as variables.cmd in your Wizard's script directory.
Then execute it in the game command window by typing ".variables blue green red yellow".
Your screen will display the following:
Variable 1 = blue
Variable 2 = green
Variable 3 = red
Variable 4 = yellow
Match tables are one of the key elements to intelligent script coding.
By that, I mean providing a dynamic response to a multitude of possible events.
In the Wizard, you are allowed a maximum of 32 match statements per table.
The match table can be loaded prior to issuing the trigger or after.
For Example:
DetermineBoxType:
put glance
match SaveStrongbox strongbox
match SaveCaddy Caddy
match SaveSkippet Skippet
match SaveTrunk Trunk
match SaveCasket Casket
match SaveChest Chest
match SaveCrate Crate
match SaveCoffer Coffer
match SaveCase Case
match SaveBox Box
match NotABox in your left hand.
match DetermineBoxType ...wait
match DetermineBoxType Sorry, system slow
match DetermineBoxType Sorry, you may
match Abort or you decay
matchwait
The trigger is "glance".
The match statements wait for a response from the game, then redirect the script to the appropriate label.
The syntax is MATCH <label name> <game response>.
The match table must be followed by a matchwait command or the script will not pause for the game response.
In the above example the match table is loaded in the script after the trigger.
You can very well write the same thing this way...
DetermineBoxType:
match SaveStrongbox strongbox
match SaveCaddy Caddy
match SaveSkippet Skippet
match SaveTrunk Trunk
match SaveCasket Casket
match SaveChest Chest
match SaveCrate Crate
match SaveCoffer Coffer
match SaveCase Case
match SaveBox Box
match NotABox in your left hand.
match DetermineBoxType ...wait
match DetermineBoxType Sorry, system slow
match DetermineBoxType Sorry, you may
match Abort or you decay
put glance
matchwait
Which way is correct? I don't think it really matters.
Sometimes the game responds too fast for postloaded match tables.
I personally haven't had that happen but others have.
One last thing on the match statement - for some reason match doesn't work when you are trying to control a "move" command.
You will need to use "put <direction>" instead.
The "save variable" in Wizard is extremely useful in scripting.
You can use it to save your weapon type, weapon name, person's name, weapon, etc...
How is this useful? Say you want to write a combat script that works multiple weapons.
You want the script to switch between the weapons when you mindlock one.
Instead of writing a script with several large looping sections you can do this easily with the save variable (%s).
Here is how...
WeaponScimitar:
save "medium edge"
goto Mainloop
WeaponShortsword:
save "light edge"
goto Mainloop
WeaponBroadSword:
save "heavy edge"
goto Mainloop
.... COMBAT CODING GOES HERE ....
MeleeWeaponExp:
echo ->MeleeWeaponExp
echo -> Check to see if we need to stop working melee weapon... if so switch to ranged
echo -> Saved melee weapon variable is %s
pause
put exp %s
match MeleeWeaponExp ...wait
match MeleeWeaponExp Sorry, you may
match MeleeWeaponExp Sorry, system slow
match MeleeWeaponExp stunned
match Abort smashed up
match Abort terribly wounded
match Abort badly hurt
match Abort very beat up
match Abort near death
match Abort or you decay
match Abort tug of eternity
match CountMonsters % clear
match CountMonsters % learning
match CountMonsters % thoughtful
match CountMonsters % pondering
match CountMonsters % concentrating
match CountMonsters % muddled
match CountMonsters % very muddled
match CountMonsters % perplexing
match CountMonsters % perplexed
match SwitchWeapon % bewildering
match SwitchWeapon % bewildered
match SwitchWeapon % dazed
match SwitchWeapon % mind lock
matchwait
Further into the script you would check for what weapon edge is in your hand then redirect the script up to the "save" statements and get your new weapon out to fight with.
Counters are great. They can really save you coding lines if you use them correctly.
They also help your scripts compensate for the alternate experience system.
Ever had that problem where your match statements wouldn't catch when you are locked cause your learning capped on the alt-exp system?
Well no more! Welcome to counters.
A good rule to follow is if you use more than one counter in a script, be sure to always reset the counter to 0 before going to the next looping section.
This will keep count mistakes from occuring.
The counter commands are:
counter set <#>
counter add <#>
counter subtract <#>
Here is a fragment from one of my scripts as an example:
ECHO -> PERCEPTION
counter set 0
StartPerception:
StartPerception1:
StartPerception2:
StartPerception3:
StartPerception4:
StartPerception5:
StartPerception6:
StartPerception7:
StartPerception8:
StartPerception9:
PUT AWAKE
counter add 1
ECHO -> PERCEPTION LOOP = %c
pause 1
put health
put look
match Abort arrow lodged shallowly into your
match abort bolt lodged shallowly into your
match abort stone lodged shallowly into your
match Abort bad shape
match Abort very bad shape
match Abort extremely bad shape
match Abort body feels very beat up
match Abort body feels extremely beat up
match Abort death's door
match Abort a ghost
match Abort or you decay.
match Abort that you have just died!
match Abort are stilled stunned
match HealthContinue Obvious
matchwait
HealthContinue:
put get my %user8
put juggle my %user8
pause 10
put juggle my %user8
pause 10
put juggle my %user8
pause 10
put juggle my %user8
pause 10
put juggle my %user8
pause 10
put juggle my %user8
pause 10
put tend my %1
pause 5
put exper Perception
match PerceptionDone mind lock
match PerceptionCheckMind Overall state
match Abort or you decay.
matchwait
PerceptionCheckMind:
put exp
match PerceptionSleep Overall state of mind: clear and sleepy.
match StartPerception%c Overall state of mind: clear
match PerceptionSleep Overall state of mind: fluid
match PerceptionSleep Overall state of mind: murky
match PerceptionSleep Overall state of mind: frozen
match PerceptionSleep Overall state of mind: stagnant
match PerceptionSleep Overall state of mind: dense
match PerceptionSleep Overall state of mind: thick
match PerceptionSleep Overall state of mind: very
match Abort or you decay.
matchwait
PerceptionSleep:
put sleep
pause 60
put tend my %1
pause 5
goto PerceptionCheckMind
StartPerception10:
PerceptionDone:
put put my %user8 in my %container
What this above script does is to cycle through juggling 10 times then continues to another section of the script whether you're mind locked or not.
If it locks prior to 10 times, then it will move to the new section as well.
The IF statement checks for a command line variable.
Hence it is only used in *.cmd type scripts.
The syntax is IF_1 <do something>, or IF_2 <do something> where 1 is %1 and 2 is %2.
IF_0 is the entire command line - I have never had to use this.
Well remember I talked about putting the body part you wanted tended as a command line variable?
Where is your chance to check for it, tend if its there, or ignore otherwise.
In the above counter example I had...
put juggle my %user8
pause 10
put tend my %1
pause 5
This will attempt to tend regardless of if you have a bleeder or not.
Therefor when it cant find %1, you will get some help message telling you about tending.
This can clutter the screen and your log files. So you can instead do this....
put juggle my %user8
pause 10
IF_1 put tend my %1
IF_1 pause 5
Now, this will check for a body part to tend.
If its there it will tend and then pause 5 to wait for the roundtime to clear.
If its not there those two lines of the script will be ignored.
There are several applications for this.
Another example would be if you have a stealing script that you use on your friends.
It can take %1, %2, and %3 friend names.
The IF statement can skip by those variables not listed when you issue the command.
Therefore, you won't get the message "I could not find what you were referring to." when the game server can't locate that undefined character.
I haven't had to us this command but here's how it works.
Lets say you have hides, skins, and pelts in your backpack that you want to sell at the tannery.
You could use the SHIFT command to cycle through them.
.sell hide skin pelt
Start:
IF_1 goto sell
exit
Sell:
put get my %1 from my %container
put sell my %1
pause
shift
goto Start
If you have a variable after the file name then the script will go to the Sell label and perform those actions.
The first time through it will get and sell a hide.
Then the script SHIFTs the %2 variable into the %1 position and starts over at the Start label.
It then gets a skin and sells it.
Then it SHIFTs again and puts the %3 variable in the %1 position and goes to the Start label.
This time it gets a pelt and sells it.
Now what this script is lacking is match statements which can be used to sell ALL of your hides, then ALL of your skins, and finally ALL of your pelts.
For example...
.sell hide skin pelt
Start:
IF_1 goto sell
exit
Sell:
put get my %1 from my %container
match Gotit from inside your
match FindNext I could not find
matchwait
Gotit:
put sell my %1
pause
goto Sell
FindNext:
pause
shift
goto Start
You could use this same script structure for dumping your mortar contents into a bucket or bin.
The LabelError label is built into the Wizard to catch all errors from missing or mispelled labels.
For instance if in a match statement you have....
match HealthCheck favors
But there is no HealthCheck label in the script, normally you would get "NO GOTO LABEL FOUND" error.
If you use the LabelError: in your script then it would have gone to that section rather than stopping.
Under LabelError you can do several things like have ECHO statements that display the value of your command line variables, %s, or %c.
This can help a lot with debugging.
You may also want to put a "quit" command in that section so you leave the game instead of hanging and becoming critter food.
In this section, we will go over several script commands in detail.
The PUT command is used to perform actions like getting a lockpick from your pouch etc.
It can also be used to move your character from room to room.
PUT North
PUT N
PUT go bridge
The MOVE command does the same thing with regard to moving your character from room to room.
The difference is the script will not go to the next line when a MOVE is executed until the new room description is received from the game and any roundtime incurred has completed.
For instance if you are traveling up the Northern Trade Road and encounter the muck area which gives you roundtime, the MOVE statement will wait till that roundtime is over where as the PUT command will go ahead and issue the next command.
This will cause you to have an error and hang your script.
To compensate for the PUT you can place a PAUSE after it to handle the roundtime.
PUT may also cause you problems with moving when the game is laggy - The evil "Sorry, you may only have 2 type aheads" message.
MOVE North
MOVE N
MOVE go bridge
So why use the PUT command at all for moving around in the game?
There are areas in the game where the room description isn't sent to your Wizard, therefore MOVE will hang your script.
One such area is in Aesry's Unyns - dark caverns.
Another situation where you may prefer to use PUT with PAUSEs is when moving through water.
Your character might be fatigued and can not swim or is drug back a room.
You can either put in location and fatigue checks in your script or use the PUT/PAUSE method to swim in a certain direction until you can not go any further (determined with a match), then change directions etc...
The NEXTROOM command waits until your wizard receives the new room description before the script continues.
Above I talked about using PUT with PAUSE and the MOVE command.
Well if you use PUT with NEXTROOM, it will do the same things as the MOVE.
PUT North
NEXTROOM
PUT East
** is the same as **
MOVE North
MOVE East
** is similar to **
PUT North
pause
PUT East
The WAIT and PAUSE command do similar things.
The WAIT command will wait until a response is received from the game before continuing the script.
This doesn't mean a specific response - just any response.
The PAUSE will wait a brief amount of time before continuing.
The PAUSE can also have a numeric value after it to define the number of seconds you want the script to wait before continuing (this is optional).
For instance, if your mind is "clear and sleepy" and you go into sleep mode to drain your mindstate, you can PAUSE 120 then recheck your mind.
That will pause the script for 2 minutes.
If you are appraising items and typically it takes 10 seconds of roundtime to complete you can PAUSE 10.
But there is a trick with PAUSE, even though it may take you 10 seconds that doesn't mean you have to use PAUSE 10.
You can use PAUSE 3 and the script will still wait for your entire roundtime to end prior to continuing.
I'm not sure if this is a bug in the script language or intentional.
Regardless its very useful for roundtimes that vary such as when you work power perception.
The WAITFOR command is used when you want more control over the script continuing.
The syntax is WAITFOR <trigger phrase>.
Example...
WAITFOR Joe just arrived.
PUT cast Joe
In the above example, when your Wizard receives the message "Joe just arrived.", poor Joe will probably get his head burned off by a prepped spell.
You can also use this in scripts where you are giving a lecture or performing a wedding and you have to wait till someone asks a question or completes some task.
PUT 'Now I will take any questions you may have?
WAITFOR asdf
In this example the script is paused until the Wizard receives an "asdf" message.
The odds of another player saying that is slim. So you can manually trigger the script to continue once you answer all the questions.
Just be sure if you are using this command for something like this that you have a trigger phrase that a player can't inadvertantly say.
Below is a moderately complex combat script.
You can get much more in depth than this by including the ability to loot gems and boxes, or to roam the hunting ground for creatures that are in vacant rooms, to flee the room when there are too many creatures, or even to make a run to the tanner/bank/healer.
Below the script, I will break it apart into its components and explain what its doing and why.
This is an example of a combat script that I wrote for a ranger in vipers.
The ranger will dance with 2 vipers to work defense.
The script will check mind state and sleep when necessary.
If there are no creatures then it will work some other skills.
If a third viper enters it will go ranged with longbow.
It also works PM via the sphere of protection spell.
First I'll list the whole script, then I will break it down into its sections and explain it.
#VIPERS - a sample combat script
put get my scimitar
MainLoop:
pause
IF_1 put tend my %1
pause
put face third viper
match Longbow You turn to face a giant thicket viper, leaving
match Longbow You are already facing the thicket viper.
match Longbow You turn to face a giant thicket viper.
match Deadwarr What's the point in facing a dead viper?
match Continue There is nothing else to face!
match Continue Face what?
match Dead You are a ghost!
match Dead or you decay
match Mainloop ...wait
match Mainloop Sorry, system slow
match Mainloop Sorry, you may
matchwait
Continue:
pause
put ass
put exp
match Longbow viper (3:
match Longbow viper (3)
match CheckHealth viper (2:
match CheckHealth viper (2)
match CheckHealth viper (1)
match CheckHealth viper (1:
match Dead You are a ghost!
match Dead or you decay
match Continue ...wait
match Continue Sorry, system slow
match Continue Sorry, you may
match NoCreature Favors:
matchwait
CheckHealth:
pause
put health
put exp
match Abort body feels very beat up
match Abort body feels extremely beat up
match Abort bad shape
match Abort very bad shape
match Abort extremely bad shape
match Abort Death's door
match Abort or you decay
match CheckHealth ...wait
match CheckHealth Sorry, system slow
match CheckHealth Sorry, you may
match CheckMind Favors:
matchwait
CheckMind:
put awake
pause
put exp
match Sleep Overall state of mind: clear and sleepy.
match Fight Overall state of mind: clear
match Sleep Overall state of mind: fluid
match Sleep Overall state of mind: murky
match Sleep Overall state of mind: frozen
match Sleep Overall state of mind: stagnant
match Sleep Overall state of mind: dense
match Sleep Overall state of mind: thick
match Sleep Overall state of mind: very
match Dead You are a ghost!
match Dead or you decay
match Checkmind ...wait
match Checkmind Sorry, system slow
match Checkmind Sorry, you may
matchwait
Sleep:
put sleep
goto Fight
Fight:
put exper primary magic
match Fightmajik % clear
match Fightmajik % learning
match Fightmajik % thoughtful
match Fightmajik % pondering
match Fightmajik % concentrating
match Fightmajik % muddled
match Fightmajik % very muddled
match Fightmajik % perplexing
match Fightmajik % perplexed
match Fightmajik % bewildering
match Fightmajik % bewildered
match Fightmajik % dazed
match FightNoMajik % mind lock
match Leave you are stunned
match Leave you are still stunned
match Leave stunning you
match Fight ...wait
match Fight Sorry, system slow
match Fight Sorry, you may only
matchwait
Fightmajik:
pause 3
put prep sop 10
match manalow have to strain
match manaok close your eyes and breathe
match manaok You are already preparing
match Fightmajik ...wait
match Fightmajik Sorry, system slow
match Fightmajik Sorry, you may
matchwait
manalow:
put release
manaok:
pause 3
put cast
FightNoMajik:
pause
put jab
pause
put parry
pause
goto Mainloop
Longbow:
pause
put retreat
put retreat
KillwithLongbow:
pause
put retreat
put face next
pause
put retreat
put face third viper
match Continue2 You turn to face a giant thicket viper, leaving
match Continue2 You are already facing the thicket viper.
match Continue2 You turn to face a giant thicket viper.
match Donelongbow Face what?
match Donelongbow There is nothing else to face!
match Deadwarr What's the point in facing a dead viper?
match Dead You are a ghost!
match Dead or you decay
match KillwithLongbow ...wait
match KillwithLongbow Sorry, you may
match KillwithLongbow Sorry, system slow
matchwait
Continue2:
pause
put retreat
put stow r
pause
put retreat
put remove my long
pause
put retreat
put retreat
pause
put retreat
put get b arrow
Load:
pause
put retreat
put retreat
pause
put retreat
put load
pause
Empty:
put retreat
put stow l
pause
Aim1:
put aim
match Empty You need both hands
match Aim You begin to target
match Aim You are already facing
match Aim You turn to face a
match Aim shift your target
match Load isn't loaded!
match DoneLongbow Face what?
match DoneLongbow What's the point in facing
match NoCreature At what are you trying to aim?
match Leave [You're very badly hurt
match Leave [You're smashed up
match Leave [You're near death
match Leave [You're terribly wounded
match Dead You are a ghost!
match Dead or you decay
match Aim1 ...wait
match Aim1 Sorry, you may
match Aim1 Sorry, system slow
matchwait
NoCreature:
pause
put forage white rose
pause 3
put retreat
put drop my rose
pause
put retreat
If_1 put tend my %1
pause
put conc
pause 3
put retreat
put retreat
goto Mainloop
Aim:
pause
put retreat
put retreat
pause
put retreat
IF_1 put tend my %1
pause
put retreat
put retreat
pause
put retreat
put retreat
pause
ShootIt:
put retreat
put shoot
match Leave [You're very badly hurt
match Leave [You're smashed up
match Leave [You're near death
match Leave [You're terribly wounded
match Dead You are a ghost!
match Dead or you decay
match DeadWarr A giant thicket viper slaps around a few times and then grows
still.
match DeadWarr At what are you trying to fire?
match DeadWarr balanced]
match DeadWarr balance]
match KillwithLongbow position.]
match KillwithLongbow isn't loaded!
match KillwithLongbow advantage.]
match DoneLongbow There is nothing else to face!
match Shootit ...wait
match Shootit Sorry, system slow
match Shootit Sorry, you may
matchwait
DeadWarr:
pause
put retreat
put unload
pause
put retreat
put wear longbow
pause
put retreat
put stow l
pause
put retreat
put get knife
pause
put retreat
put skin
pause
put retreat
put bundle
pause
put put sac in my %container
put drop sac
pause
put ret
put ret
Health88:
pause
put health
put look
match Abort arrow lodged shallowly into you
match abort bolt lodged shallowly into your
match abort stone lodged shallowly into your
match Abort bad shape
match Abort very bad shape
match Abort extremely bad shape
match Abort body feels very beat up
match Abort body feels extremely beat up
match Abort death's door
match Abort a ghost
match Abort or you decay.
match Abort that you have just died!
match Abort are stilled stunned
match HealthContinue3 Obvious
match Health88 ...wait
match Health88 Sorry, system slow
match Health88 Sorry, you may
matchwait
HealthContinue3:
pause
put ret
put ret
pause
put ret
put search viper
pause
put ret
put search other viper
pause
put ret
put ret
pause
goto GetArrow
GetArrow:
pause
put ret
put stow l
pause
put ret
put ret
pause
put ret
put get b arrow
match Leave [You're very badly hurt
match Leave [You're smashed up
match Leave [You're near death
match Leave [You're terribly wounded
match GetArrow You need a free hand to pick that up
match GetArrow You pick up
match GetArrow You unload
match NoArrow You pull a
match NoArrow You get
match NoArrow You stop as you realize the
match NoAmmoAtAll I could not
match GetArrow ...wait
match GetArrow Sorry, you may
match GetARrow Sorry, system slow
match Dead You are a ghost!
match Dead or you decay
matchwait
NoArrow:
pause
put retreat
put retreat
pause
put put my knife in my %sheath
put retreat
pause
put put get my scimitar
put retreat
pause
put stow my arrow
put exp long bow
match Leave [You're very badly hurt
match Leave [You're smashed up
match Leave [You're near death
match Leave [You're terribly wounded
match Dead You are a ghost!
match Dead or you decay
match Sleep2 sleepy
match Sleep2 frozen
match Sleep2 dense
match Sleep2 thick
match Sleep2 stagnant
match Sleep2 very murky
match Sleep2 murky
match Awaken2 fluid
match Awaken2 clear
match NoArrow ...wait
match NoArrow Sorry, you may
match NoArrow Sorry, system slow
matchwait
Awaken2:
put ret
put ret
pause
put awake
goto longbow
Sleep2:
put ret
put sleep
pause
put ret
goto longbow
DoneLongbow:
pause
put unload
pause
put wear my longbow
put put my arrow in my %sheath
pause
put get my scimitar
goto Mainloop
NoAmmoAtAll:
ECHO -> Out of Ammo! ARGH!
goto Leave
Dead:
ECHO -> OUCHIE! I am dead!
goto Leave
LabelError:
ECHO -> Damn Skippy, you have encountered a label error!
Abort:
Leave:
put exit
Now for the explanation of the vipers.cmd script...
Labels are in red.
Explanations are in green.
The actual script is in grey.
#VIPERS - a sample combat script
<- (The Wizard pop-up menu displays this in the edit dialog.)
put GET MY SCIMITAR
<- (Makes sure your weapon is out.)
MainLoop:
<- (This starts the main loop, for dancing with 2 vipers.)
pause
IF_1 put TEND MY %1
<- (This will tend the wound you define in the %1 variable.)
pause
put FACE THIRD VIPER
<- (Checks for a 3rd viper by matching game output to the match table below.)
match Longbow You turn to face a giant thicket viper, leaving
match Longbow You are already facing the thicket viper.
match Longbow You turn to face a giant thicket viper.
- The first three match statements above determine if there is a 3rd viper.
- If so, it will go to the Longbow section.
match Deadwarr What's the point in facing a dead viper?
- This statement says, yes there is a 3rd one but its dead.
- It will direct the script to the section where you skin etc..
match Continue There is nothing else to face!
match Continue Face what?
- These two statements say that there isn't a 3rd viper, so continue with your dancing.
match Dead You are a ghost!
match Dead or you decay
- These two statements handle your death.
- They will send you to the Dead section where you exit the game.
match Mainloop ...wait
match Mainloop Sorry, system slow
match Mainloop Sorry, you may
- These three responses are needed to handle lag problems
- either with your isp or the game server.
matchwait
<- This is required to make the match table wait for a response.
Continue:
put GET MY SCIMITAR
<- This makes sure your weapon is in hand for melee dancing.
pause
put ASSESS
put EXPERIENCE
- These two commands are used to determine if you need to go ranged
- or if you can continue dancing with 2 vipers.
match Longbow viper (3:
match Longbow viper (3)
- These to match statements will go ranged if you assess that there is a 3rd viper
match CheckHealth viper (2:
match CheckHealth viper (2)
match CheckHealth viper (1)
match CheckHealth viper (1:
- These statements tell you that you only have 1-2 vipers,
- then sends you to a health check section.
match Dead You are a ghost!
match Dead or you decay
- These will send you to the Dead section and exit the game if you are dead
match Continue ...wait
match Continue Sorry, system slow
match Continue Sorry, you may
- These three are required to handle server and isp lag.
match NoCreature Favors:
- If you assess and find no creatures then you do an EXP, it will trigger off of
- the "Favors" word in the game response and direct you to the NoCreature section
- where you can work some alternate skills.
matchwait
<- This is required to make the match table wait for a response.
match Sleep Overall state of mind: clear and sleepy.
match Fight Overall state of mind: clear
- The first match statement here will send you to the sleep section if your
- mind state is sleepy. The second one will send you to fight if your mind is
- clear and NOT sleepy. You must put these two in this order. If you had the
- Second in the first line of the table then it would hit "clear" and not
- continue through the match table. Therefor you would never rest your mind
- when it was sleepy.match Sleep Overall state of mind: fluid
match Sleep Overall state of mind: murky
match Sleep Overall state of mind: frozen
match Sleep Overall state of mind: stagnant
match Sleep Overall state of mind: dense
match Sleep Overall state of mind: thick
match Sleep Overall state of mind: very
- These statements determine if your mind is getting mucked up. If it is
- it will send you to the Sleep section where you can rest.match Dead You are a ghost!
match Dead or you decay
match Checkmind ...wait
match Checkmind Sorry, system slow
match Checkmind Sorry, you may
matchwait
- These have been explained above several times.
This section puts you to sleep so your mind can clear.
Sleep:
put sleep
goto Fight
This is the start of the defense skill working. I wanted to work some PM skills while I was at it, so I included a check of my primary magic skill. If I'm not locked in that, then I will cast the SOP spell. If I am locked then I won't do magic.
Fight:
put exper primary magic <- check my PM skill
match Fightmajik % clear
match Fightmajik % learning
match Fightmajik % thoughtful
match Fightmajik % pondering
match Fightmajik % concentrating
match Fightmajik % muddled
match Fightmajik % very muddled
match Fightmajik % perplexing
match Fightmajik % perplexed
match Fightmajik % bewildering
match Fightmajik % bewildered
match Fightmajik % dazed
- The above match statements check to see if I should still work magic.match FightNoMajik % mind lock
- This match statement checks to see if I should stop working magic. I could
- probably reduce the number of statements by coupling the EXP command with
- another like ENCUMBRANCE. Then eliminate the top 12 statements and replace
- them with one that says "match fightmajik encumbrance".match Leave you are stunned
match Leave you are still stunned
match Leave stunning you
match Fight ...wait
match Fight Sorry, system slow
match Fight Sorry, you may only
matchwait
- These have been explained a few times above.
If I made it to this section then I'm alive, in fairly good health, there are 1-2 vipers in the room, my mind state is good, and my primary magic skill needs some work.
Fightmajik:
pause 3
put prep sop 10 <- prep my spell.
match manalow have to strain
- This checks to see if I am tapped of mana, if so then it will go to the
- manalow section and release the spell to prevent my character from
- getting twitches.match manaok close your eyes and breathe
- These tells me that I'm ok on mana and that I began to prep the spellmatch manaok You are already preparing
- This is a safety net. It says.. duh, you are already preparing a spell
- This catches any problems with my spell not being cast later in the script.match Fightmajik ...wait
match Fightmajik Sorry, system slow
match Fightmajik Sorry, you may
matchwait
manalow:
put release <- release mana if I strain when I prep the spell
manaok: <- script goes here if I prep the spell without problems.
pause 3 <- pause time to let the spell be castable.
put cast <- cast the spell.
FightNoMajik: <- This is where the script will go if I'm not able to work magic. Its also the default for after I've cast a spell.
pause
put jab <- This is where I dance with the vipers. I am jabbing only to make sure my character stays balanced.
pause
put parry
pause
goto Mainloop <- Now everything is good! I've danced once so lets repeat by going
to the start of the loop.
If my script gets to this section that means that I am alive, my health is good, and there is at least 3 vipers in my room. So now I need to kill some so I can go back to dancing.
Longbow:
pause
put retreat <- This just keeps me out of melee so I don't get killed.
put retreat
KillwithLongbow:
pause
put retreat
put face next <- This makes sure I am facing a viper. Sometimes when they enter the room you don't automatically face them. Therefor you can't fire your bow
pause
put retreat
put face third viper <- This sets me to the 3rd viper and makes sure that there are
indeed at least 3 in the room.
match Continue2 You turn to face a giant thicket viper, leaving
match Continue2 You are already facing the thicket viper.
match Continue2 You turn to face a giant thicket viper.
- This verifies that you are facing the right viper so you can load up and fire.match Donelongbow Face what?
match Donelongbow There is nothing else to face!
- If less than 3 vipers this match statement will redirect you
- back to dancing melee.match Deadwarr What's the point in facing a dead viper?
- This match statement will send you to the skinning section.match Dead You are a ghost!
match Dead or you decay
match KillwithLongbow ...wait
match KillwithLongbow Sorry, you may
match KillwithLongbow Sorry, system slow
matchwait
Continue2:
pause
put retreat
put stow r <- This stows your weapon in your right hand.
pause
put retreat
put remove my long <- Places your longbow in your hand.
pause
put retreat
put retreat
pause
put retreat
put get b arrow <- This will take a barbed arrow from the ground or from your container.
Load:
pause
put retreat <- All these retreats keep you out of melee ranged while working longbow
put retreat
pause
put retreat
put load <- Loads your arrow
pause
Empty:
put retreat
put stow l <- This will store the remaining arrows if any, into your container
pause
Aim1:
put aim
match Empty You need both hands
- If something is in your left hand, this will redirect you back to the stow sectionmatch Aim You begin to target
match Aim You are already facing
match Aim You turn to face a
match Aim shift your target
- These match statements ensure you are aiming at a vipermatch Load isn't loaded!
- This match statement will catch any error in loading your longbow
- Like if you pick up an arrowhead instead of an arrow etc...match DoneLongbow Face what?
match DoneLongbow What's the point in facing
- If the 3rd viper dies before you aim, then this will catch it.match NoCreature At what are you trying to aim?
- This will redirect you if there are no creatures in the room to aim at.match Leave [You're very badly hurt
match Leave [You're smashed up
match Leave [You're near death
match Leave [You're terribly wounded
match Dead You are a ghost!
match Dead or you decay
- These statements are your health and death checksmatch Aim1 ...wait
match Aim1 Sorry, you may
match Aim1 Sorry, system slow
matchwait
If there are no creatures in the room then both the dance section and longbow section will redirect you to this loop.
NoCreature:
pause
put forage white rose
pause 3
put retreat
put drop my rose
pause
put retreat
If_1 put tend my %1 <- Variable %1 is used for the body part you want tended.
pause
put conc
pause 3
put retreat
put retreat
goto Mainloop
When you succesfully aim your longbow at a viper, it will direct you to this section. This means there are at least 3 vipers in the room.
Aim:
pause
put retreat <- The following retreats keep you out of melee while you get a good lock on the viper with your longbow.
put retreat
pause
put retreat
IF_1 put tend my %1
pause
put retreat
put retreat
pause
put retreat
put retreat
pause
ShootIt:
put retreat
put shoot
match Leave [You're very badly hurt
match Leave [You're smashed up
match Leave [You're near death
match Leave [You're terribly wounded
match Dead You are a ghost!
match Dead or you decay
- The above statements check your healthmatch DeadWarr A giant thicket viper slaps around a few times and then grows still.
match DeadWarr At what are you trying to fire?
match DeadWarr balanced]
match DeadWarr balance]
- These match statements determine if you killed the vipermatch KillwithLongbow position.]
match KillwithLongbow isn't loaded!
match KillwithLongbow advantage.]
- These match statements will send you back to start the longbow section again.
- This means that you fired at the viper but didn't kill it.match DoneLongbow There is nothing else to face!
- This match statement checks for less than 3 vipers or that your 3rd viper
- either left or died.match Shootit ...wait
match Shootit Sorry, system slow
match Shootit Sorry, you may
matchwait
Ok, when the script gets to this section that means a viper has died. You will wear your longbow, stow any arrows in your left hand, get your knife, skin, and put the sac in your container. If it doesn't fit in the container it will drop the sac.
DeadWarr:
pause
put retreat
put unload
pause
put retreat
put wear longbow
pause
put retreat
put stow l
pause
put retreat
put get knife
pause
put retreat
put skin
pause
put retreat
put bundle
pause
put put sac in my %container
put drop sac
pause
put ret
put ret
Health88:
pause
put health
put look
match Abort arrow lodged shallowly into your
match abort bolt lodged shallowly into your
match abort stone lodged shallowly into your
match Abort bad shape
match Abort very bad shape
match Abort extremely bad shape
match Abort body feels very beat up
match Abort body feels extremely beat up
match Abort death's door
- These match statements are to make sure you don't get overly hurt while skinning. Sometimes creatures charge and you can get killed.match Abort a ghost
match Abort or you decay.
match Abort that you have just died!
match Abort are stilled stunned
match HealthContinue3 Obvious <- This match statement plays off of the "look" command above. if your health is all ok, it reaches this point then sends you to the HealthContinue3 section where you search the viper.
match Health88 ...wait
match Health88 Sorry, system slow
match Health88 Sorry, you may
matchwait
HealthContinue3:
pause
put ret
put ret
pause
put ret
put search viper
pause
put ret
put search other viper
pause
put ret
put ret
pause
goto GetArrow
GetArrow:
pause
put ret
put stow l <- This makes sure you have a hand free to pick up the arrows.
pause
put ret
put ret
pause
put ret
put get b arrow <- this is where you get and stow your barbed arrows. I never use the normal kind.
match Leave [You're very badly hurt
match Leave [You're smashed up
match Leave [You're near death
match Leave [You're terribly wounded
match GetArrow You need a free hand to pick that up <- This sends you to where you free up your left hand.
match GetArrow You pick up <- Here you successfully got an arrow off the ground.
match GetArrow You unload <- This happens if there are none on the ground or in the viper.
match NoArrow You pull a <- This is if you pull the arrow out of the viper
match NoArrow You get <- This is if you get the arrow out of your sheath.
match NoArrow You stop as you realize the <- This handles hunting with a friend.
match NoAmmoAtAll I could not <- If you run out of arrows this will send you to an area where you exit the game.
match GetArrow ...wait
match GetArrow Sorry, you may
match GetARrow Sorry, system slow
match Dead You are a ghost!
match Dead or you decay
matchwait
You reach this section after you have picked up all the arrows on the ground. Now you stow your knife and get your melee weapon out.
NoArrow:
pause
put retreat
put retreat
pause
put put my knife in my %sheath
put retreat
pause
put put get my scimitar
put retreat
pause
put stow my arrow
For this match table, I wanted to check my mind state and rest it if necessary. But we are currently in the ranged weapon loop, so I didn't want to branch out and go up to the other sleep/awaken area. This keeps it all contained within this section.
put exp long bow
match Leave [You're very badly hurt
match Leave [You're smashed up
match Leave [You're near death
match Leave [You're terribly wounded
match Dead You are a ghost!
match Dead or you decay
match Sleep2 sleepy
match Sleep2 frozen
match Sleep2 dense
match Sleep2 thick
match Sleep2 stagnant
match Sleep2 very murky
match Sleep2 murky
match Awaken2 fluid
match Awaken2 clear
match NoArrow ...wait
match NoArrow Sorry, you may
match NoArrow Sorry, system slow
matchwait
Awaken2:
put ret
put ret
pause
put awake
goto longbow
Sleep2:
put ret
put sleep
pause
put ret
goto longbow
We are done with longbow now which means we no longer have 3 vipers in the room. So lets wear the longbow and get out our melee weapon.
DoneLongbow:
pause
put unload
pause
put wear my longbow
put put my arrow in my %sheath
pause
put get my scimitar
goto Mainloop
NoAmmoAtAll:
ECHO -> Out of Ammo! ARGH!
goto Leave
Dead:
ECHO -> OUCHIE! I am dead!
goto Leave
LabelError:
ECHO -> Damn Skippy, you have encountered a label error!
Abort:
Leave:
put exit
***************************
A Sample Script For Looting...
Credit goes to Nix for this.
Nix has added some explanation to his script to help you follow its logic. I will interject where I feel its needed. After all, not everyone is on the same level with regard to script creation.
# UTILITY: Loot the current room
#
# Its always good to put a description of how to use the script at the start. Especially if its a script that you won't use frequently.
Header:
ECHO ==========================================
ECHO -> USAGE: .loot
ECHO ==========================================
echo ->
echo -> NOTE:
echo -> Make sure %sheath% variable is set to a container for arrows
echo -> Make sure %container% variable is set to a container for boxes
echo ->
echo -> Currently grabs:
echo -> coins
echo -> boxes if you have room
echo -> known gems and stones
echo -> ammo - arrows
echo ->
# I use a counter here. Reason being is that sometimes room descriptions
# have the words of what I consider to be treasure. A common one is "trunk"
# meaning a tree trunk... where I want all treasure trunks. So, I loop this
# so as not to have it get stuck forever.
LootStart:
echo -> [LootStart]
echo -> Beginning to loot all valuables from the room
goto LootThem
LootThem:
counter set 0
Loot:
echo -> [Loot]
counter add 1
echo -> Looting. This is try %c through the logic
pause
put exp lore %c
# Match on lag
match Loot ...wait
match Loot Sorry,
# match on death/wound problems
match Abort smashed up
match Abort badly hurt
match Abort very beat up
match Abort near death
match Abort or you decay
match Abort tug of eternitymatch LootContinue above rank 1.
match LootContinue above rank 2.
match LootContinue above rank 3.
match LootContinue above rank 4.
match LootContinue above rank 5.
match LootContinue above rank 6.
match LootContinue above rank 7.
match LootContinue above rank 8.
match LootContinue above rank 9.
match LootContinue above rank 10.
match LootContinue above rank 11.
match DoneLoot above rank 12.
match DoneLoot above rank 13.
match DoneLoot above rank 14.
match DoneLoot above rank 15.
matchwait
# The above match table might be somewhat confusing to you. Instead of having matches for when you try to get an item and it succeeds/fails, he is using the counter along with a match on overall lore to limit the number of trys per gem/box. The draw back to this is if you have been scripting over night and you have more than 11 topaz gems on the floor then it will only pick up 11. In his GETGEM section he only picks up the saved gem value one time. But if you look at his COIN section he picks those up 4 times.... so even though the script loops through the log 11 times on coins, he actually picks up 44 sets of coins. If there is a treasure word in the room description like trunk/chest/crystal etc... It will attempt to get it till the counter stops it. Then the script will end. So there could be other treasure items on the ground that will be left (those below that word in the match table).
LootContinue:
echo -> [LootContinue]
echo -> What's here?
pause
put look
# NOT MATCHING LAG DUE TO FULL MATCH TABLE HERE
# Match on lag
#match LootContinue ...wait
#match LootContinue Sorry,
# match on death/wound problems
match Abort smashed up
match Abort near death
match Abort or you decay
match Abort tug of eternitymatch BoxCoffer coffer
match BoxStrong strongbox
match BoxTrunk trunk
match BoxChest chest
match BoxSkippet skippet
match BoxBox box
match BoxCasket casket
match BoxCaddy caddy
match Arrow arrow
match coin coin
match GemDiamond diamond
match GemAquamarine aquamarine
match GemRuby ruby
match GemBloodstone bloodstone
match GemNugget nugget
match GemZircon zircon
match GemAmethyst amethyst
match GemQuartz quartz
match GemJasper jasper
match GemStone malachite stone
match GemStone turquoise stone
match GemGem gem
match GemDiopside diopside
match GemCrystal crystal
match GemOpal opal
match GemTopaz topaz
match DoneLoot Obvious
matchwait
LootNoBox:
echo -> [LootNoBox]
echo -> What's here besides boxes?
pause
put look
# Match on lag
match LootNoBox ...wait
match LootNoBox Sorry,
# match on death/wound problems
match Abort smashed up
match Abort near death
match Abort or you decay
match Abort tug of eternitymatch Arrow arrow
match coin coin
match GemDiamond diamond
match GemAquamarine aquamarine
match GemRuby ruby
match GemBloodstone bloodstone
match GemNugget nugget
match GemZircon zircon
match GemAmethyst amethyst
match GemQuartz quartz
match GemJasper jasper
match GemStone malachite stone
match GemStone turquoise stone
match GemGem gem
match GemDiopside diopside
match GemCrystal crystal
match GemOpal opal
match GemTopaz topaz
match DoneLoot Obvious
matchwait
Arrow:
pause
put get arrow
put put my arrow in my %sheath%
pause
put get arrow
put put my arrow in my %sheath%
pause
goto Loot
Coin:
pause
put get coin
put get coin
pause
put get coin
put get coin
goto Loot
GemBloodstone:
save "bloodstone"
goto GetGem
GemNugget:
save "nugget"
goto GetGem
GemDiamond:
save "diamond"
goto GetGem
GemAquamarine:
save "aquamarine"
goto GetGem
GemRuby:
save "ruby"
goto GetGem
GemOpal:
save "opal"
goto GetGem
GemZircon:
save "zircon"
goto GetGem
GemAmethyst:
save "amethyst"
goto GetGem
GemJasper:
save "jasper"
goto GetGem
GemGem:
save "gem"
goto GetGem
GemDiopside:
save "diopside"
goto GetGem
GemCrystal:
save "crystal"
goto GetGem
GemTopaz:
save "Topaz"
goto GetGem
GemQuartz:
save "quartz"
goto GetGem
GetGem:
echo -> [GetGem]
echo -> Getting gem of type %s
pause
put get %s
put open my pouch
pause
put put %s in my pouch
put close my pouch
goto Loot
BoxCoffer:
save "coffer"
goto CheckTreasureBox
BoxStrong:
save "strongbox"
goto CheckTreasureBox
BoxTrunk:
save "trunk"
goto CheckTreasureBox
BoxChest:
save "chest"
goto CheckTreasureBox
BoxCasket:
save "casket"
goto CheckTreasureBox
BoxSkippet:
save "skippet"
goto CheckTreasureBox
BoxBox:
save "box"
goto CheckTreasureBox
BoxCaddy:
save "caddy"
goto CheckTreasureBox
CheckTreasureBox:
echo -> [CheckTreasureBox]
echo -> Checking box of type %s
pause
put look in %s
# Match on lag
match CheckTreasureBox ...wait
match CheckTreasureBox Sorry,
# match on death/wound problems
match Abort smashed up
match Abort badly hurt
match Abort very beat up
match Abort near death
match Abort or you decay
match Abort tug of eternitymatch Loot could not find
match GetTreasureBox That is closed.
match LootNoBox In the
matchwait
GetTreasureBox:
echo -> [GetTreasureBox]
echo -> Getting box of type %s
pause
put get %s
pause 2
put put %s in my %container%
# Match on lag
match Loot ...wait
match Loot Sorry,
# match on death/wound problems
match Abort smashed up
match Abort badly hurt
match Abort very beat up
match Abort near death
match Abort or you decay
match Abort tug of eternitymatch Loot You put
match LootNoBox first
match LootNoBox find what
match NoRoomInBack fit
matchwait
NoRoomInBack:
pause
put drop %s
goto LootNoBox
DoneLoot:
echo -> All done
***************************
Another Loot Script Example
This is a script I wrote that does looting but it uses match statements to try and determine if the treasure is actually an item and not something in the room description. If it can't pick it up, it will move to the next treasure type match table. It also has a movement section where it will attempt to take your empty boxes and dump them in a neighboring room. The auto movement will be cardinal direction only. So if you want to specific a direction or tell it to go through a door and drop the trash, then you can provide a variable %1 and %2 on the command line. If that's there, it will by-pass the autodirection and do that instead.
#Looting (micloot.cmd - gems/boxes/special items)
ECHO -> .micloot <path to garbage room><path back to your room>
ECHO ->
ECHO -> Example: .micloot NW SE
ECHO -> Example: .micloot OUT "go blue door"
ECHO ->
ECHO -> If you do not specify a garbage room location then the script
ECHO -> will attempt to find one.
LOOT:
put open my pouch
put open my %container
LOOTGEMS:
echo -> LOOT GEMS & COINS
pause
put look
match coin coin
match GemAnimite animite
match GemEmerald emerald
match GemDiamond diamond
match GemAquamarine aquamarine gem
match GemRuby ruby
match GemPearl pearl
match GemBloodstone bloodstone
match GemNugget nugget
match GemZircon zircon
match GemAmethyst amethyst
match GemQuartz eye quartz
match GemQuartz rose quartz
match GemQuartz gold-painted quartz
match GemAmber lump of dark amber
match GemJasper jasper
match GemStone malachite stone
match GemStone turquoise stone
match GemDiopside diopside
match GemCrystal rock crystal
match GemOpal opal
match GemTopaz topaz
match GemBar silver bar
match ABORT or you decay
match LOOTGEMS ...wait
match LOOTGEMS Sorry,
match Lootboxes Obvious
matchwait
LOOTBOXES:
pause
put look
match Lootboxes ...wait
match Lootboxes Sorry,
match Abort smashed up
match Abort near death
match Abort or you decay
match Abort tug of eternity
match BoxCoffer coffer
match BoxStrong strongbox
match BoxChest chest
match BoxSkippet skippet
match BoxBox box
match BoxCasket casket
match BoxCaddy caddy
match BoxTrunk trunk
match Lootother Obvious
matchwait
LOOTOTHER:
echo -> LOOT GEMS & COINS
pause
put look
match Arrow arrow
match Tablet Tablet
match Scroll Scroll
match Parchment parchment
match Rune runestone
match Cambrinth cambrinth lump
match Lazuli lapis lazuli
match ring ring
match Bark bark
match ABORT or you decay
match LOOTOTHER ...wait
match LOOTOTHER Sorry,
match DoneLoot Obvious
matchwait
COIN:
pause
put get coin
match COIN You pick up
match LOOTGEMS What do you want to get?
match LOOTGEMS I could not find
match COIN ...wait
match COIN Sorry,
match Abort or you decay
matchwait
GETGEM:
pause
put get %s
match STOREGEM You pick up
match LOOTGEMS What do you want to get?
match LOOTBOX I could not
match LOOTBOX You can't get that
match ALREADYHAVEGEM from inside your
match GETGEM ...wait
match GETGEM Sorry,
match ABORT or you decay
matchwait
STOREGEM:
put put my %s in my pouch
goto GETGEM
ALREADYHAVEGEM:
put put my %s in my pouch
goto LOOTGEMS
CHECKTREASUREBOX:
GETBOX:
put get %s
match CHECK4TRASH You pick up a
match LOOTBOXES I could not
match ALREADYHAVEBOX from inside your
match LOOTOTHER You can't get that
match GETBOX ...wait
match GETBOX Sorry,
match ABORT or you decay
matchwait
CHECK4TRASH:
put look in my %s
match STOREBOX That is closed.
match REMOVETRASH you see
match REMOVETRASH There is nothing in there.
match CHECK4TRASH ...wait
match CHECK4TRASH Sorry,
match ABORT or you decay
matchwait
STOREBOX:
put put my %s in my %container
goto GETBOX
ALREADYHAVEBOX:
put put my %s in my %container
goto LOOTBOXES
GETOTHER:
pause
put get %s
match STOREOTHER You pick up a
match LOOTOTHER I could not
match ALREADYHAVEOTHER from inside your
match END You can't get that
match GETOTHER ...wait
match GETOTHER Sorry,
match Abort or you decay
matchwait
STOREOTHER:
put put my %s in my %container
goto GETOTHER
ALREADYHAVEOTHER:
put put my %s in my %container
goto LOOTOTHER
REMOVETRASH:
# Remove empty treasure boxes from your room.
IF_1 move %1
IF_1 put drop my %s
IF_1 pause
IF_2 move %2
IF_1 goto LOOTBOXES
pause
put look
match NOEXIT none.
match NORTHEAST northeast
match NORTHWEST northwest
match SOUTHEAST southeast
match SOUTHWEST southwest
match NORTH north
match SOUTH south
match EAST east
match WEST west
match ABORT or you decay
match REMOVETRASH ...wait
match REMOVETRASH Sorry,
matchwait
NORTHEAST:
move ne
put drop my %s
move sw
pause
goto LOOTBOXES
NORTHWEST:
move nw
put drop my %s
move se
pause
goto LOOTBOXES
SOUTHEAST:
move se
put drop my %s
move nw
pause
goto LOOTBOXES
SOUTHWEST:
move sw
put drop my %s
move ne
pause
goto LOOTBOXES
NORTH:
move n
put drop my %s
move s
pause
goto LOOTBOXES
SOUTH:
move s
put drop my %s
move n
pause
goto LOOTBOXES
EAST:
move e
put drop my %s
move w
pause
goto LOOTBOXES
WEST:
move w
put drop my %s
move e
pause
goto LOOTBOXES
NOEXIT:
put drop my %s
goto LOOTOTHER
DONELOOT:
put close my pouch
goto End
# ========= SAVE SECTION =========== #
GemPearl:
save "pearl"
goto GetGem
GemAnimite:
save "animite"
goto GetGem
GemEmerald:
save "emerald"
goto GetGem
GemAmber:
save "amber"
goto GetGem
GemBar:
save "silver bar"
goto GetGem
GemBloodstone:
save "bloodstone"
goto GetGem
GemNugget:
save "nugget"
goto GetGem
GemDiamond:
save "diamond"
goto GetGem
GemAquamarine:
save "aquamarine gem"
goto GetGem
GemRuby:
save "ruby"
goto GetGem
GemOpal:
save "opal"
goto GetGem
GemZircon:
save "zircon"
goto GetGem
GemAmethyst:
save "amethyst"
goto GetGem
GemJasper:
save "jasper"
goto GetGem
GemGem:
save "gem"
goto GetGem
GemDiopside:
save "diopside"
goto GetGem
GemCrystal:
save "crystal"
goto GetGem
GemTopaz:
save "Topaz"
goto GetGem
GemQuartz:
save "quartz"
goto GetGem
BoxCoffer:
save "coffer"
goto CheckTreasureBox
BoxStrong:
save "strongbox"
goto CheckTreasureBox
BoxTrunk:
save "trunk"
goto CheckTreasureBox
BoxChest:
save "chest"
goto CheckTreasureBox
BoxCasket:
save "casket"
goto CheckTreasureBox
BoxSkippet:
save "skippet"
goto CheckTreasureBox
BoxBox:
save "box"
goto CheckTreasureBox
BoxCaddy:
save "caddy"
goto CheckTreasureBox
Arrow:
save "arrow"
goto GetOther
Tablet:
save "Tablet"
goto GetOther
Scroll:
save "Scroll"
goto GetOther
Parchment:
save "parchment"
goto GetOther
Rune:
save "runestone"
goto GetOther
Ring:
save "ring"
goto GetOther
Bark:
save "bark"
goto GetOther
Cambrinth:
save "cambrinth lump"
goto GetOther
Lazuli:
save "lapis lazuli"
goto GetOther
# ========= END SAVE SECTION =========== #
Abort:
put exit
LabelError:
ECHO *************************************************
ECHO Doah! There is a label error in this script!
ECHO The save value is %s
ECHO *************************************************
End:
ECHO -> FINISHED LOOTING
***************************
Sample Rejuvenation Script
I wrote this script for use with dxtriggers. Whenever a deader said my name followed by please help, then the script would be started and the deader's name was passed to it via %1.
#Rejuve.cmd <person> (%user9 is your cambrinth item, in this script its a camb ring)
put stow l
put stow r
pause
put hold my %user9
put get my %user9
pause
#Check for blacklisted names
put act checks her naughty-list.
put look %1
match BlackList Maximus GregArj
match Start Elothean
match Start Elf
match Start Gnome
match Start Gor'Tog
match Start Human
match Start Halfling
match Start Kaldar
match Start Pyrdean
match Start S'kra Mur
match Start Dwarf
match Start Rakash
match Done I could not find
matchwait
Start:
put 'Rejuving %1.
Mainloop:
put release
put pre rej 8
match Waitformana1 Strain
match SpellPrepped You begin chanting a prayer to invoke the Rejuvenation spell.
match SpellPrepped You are already preparing the Rejuvenation spell!
match Mainloop Your concentration slips for a moment, and your spell is lost.
match Mainloop Sorry, you may
match Mainloop Sorry, system slow
match Mainloop ...wait
matchwait
SpellPrepped:
put charge %user9 4
pause
put focus %user9
pause 5
put cast %1
# rejuve levels
match Done I couldn't find what you were referring to.
match Done You can't cast Rejuvenation on yourself!
match Done Nothing happens.
match FullyRejuved A thin silver nimbus surrounds %1
match Mainloop A thin golden nimbus surrounds %1
match Mainloop A thin yellow nimbus surrounds %1
match Mainloop A thin orange nimbus surrounds %1
match Mainloop A thin pink nimbus surrounds %1
match Mainloop A thin red nimbus surrounds %1
match Mainloop A thin violet nimbus surrounds %1
match Mainloop A thin blue nimbus surrounds %1
match Mainloop A thin black nimbus surrounds %1
match Done Nothing happened.
matchwait
Waitformana1:
put 'Letting harness build.
Waitformana:
put POWER
PAUSE 5
pause 10
match Mainloop three quarters
match Mainloop three-quarters
match Mainloop intact attunement
match Mainloop complete attunement
match Mainloop good attunement
match Mainloop high attunement
match waitformana no effective
match waitformana low attunement
match waitformana quarter strength
match waitformana a third of your normal
match waitformana half your normal
match waitformana two-thirds your normal
put mana
matchwait
FullyRejuved:
put pre rejuve 10
pause 8
put cast %1
pause 1
put perc %1
match NoFavor %1 has no favor with
match Few %1 has a few favors
match One %1 has one favor
match Two %1 has two favors
match Many %1 has many favors
matchwait
NoFavor:
save "no"
goto NoDepart
Few:
save "a few"
goto SafeDepart
One:
save "one"
goto SafeDepart
Two:
save "two"
goto SafeDepart
Three:
save "three"
goto SafeDepart
Four:
save "four"
goto SafeDepart
Many:
save "many"
goto SafeDepart
NoDepart:
pause 1
put whisper %1 You are fully rejuved. You also have NO favors. Please log till you find a raiser.
put 'Leave the realms.
goto Done
SafeDepart:
pause
put whisper %1 You are fully rejuved. You also have %s favor(s) at the moment. Depart.
put 'Depart
goto Done
BlackList:
put 'Sorry, but you have been blacklisted.
goto Done
Done:
pause
put release
pause
put wear my %user9
put put my %user9 in my %container
ECHO -> Finished Rejuving
ECHO -> Finished Rejuving
***************************
Disarm Boxes on a Table
I decided to include this script of mine because I've seen people do this a lot. What this script does is to cycle through 2 of each box type on a table, find the trap, and return it. I use a counter in it to direct it to the right box to disarm. This allowed me to use one find trap section in the script.
#Disarm (use with DXTriggers to abort for bad health)
counter set 0
undress:
put remove my helm
put put my helm in my %container
match glove You put
match mask I could not
match oops too heavy
match oops to fit
matchwait
mask:
pause 2
put remove my mask
put put my mask in my %container
match glove You put
match hood I could not
match oops too heavy
match oops to fit
matchwait
hood:
pause 2
put remove my hood
put put my hood in my %container
match glove You put
match coif I could not
match oops too heavy
match oops to fit
matchwait
coif:
pause 2
put remove my coif
put put my coif in my %container
match glove You put
match balaclava I could not
match oops too heavy
match oops to fit
matchwait
balaclava:
pause 2
put remove my balaclava
put put my balac in my %container
match glove You put
match glove I could not
match oops too heavy
match oops to fit
matchwait
glove:
pause 2
put remove my glove
put put my glove in my %container
match start You put
match gauntlets I could not
match oops too heavy
match oops to fit
matchwait
gauntlets:
pause 2
put remove my gauntlets
put put my gauntlets in my %container
match start You put
match handguards I could not
match oops too heavy
match oops to fit
matchwait
handguards:
pause 2
put remove my handguards
put put my handg in my %container
match start You put
match start I could not
match oops too heavy
match oops to fit
matchwait
# What's another way you could have written the above section? Right now it will try to remove and put your armor in your container. If its not there, it goes to the next armor type. List left me with redundant match statements. If you wanted to stream line this you can do an inventory check with match statements to pick up the armor you are wearing. Then save that to %s and then only have one section where you put the armor in your container. I just wrote it this way, cause I was lazy <g>.
# =============================
Start:
0:
GetTrunk:
pause
put get trunk on table
match Trunk You get a
match GetStrongbox could not find what
match Abort You are a ghost!
match GetTrunk ...wait
match GetTrunk Sorry,
matchwait
1:
GetStrongbox:
counter add 1
pause
put get strongbox on table
match Strongbox You get a
match GetChest could not find what
match Abort You are a ghost!
match GetStrongbox ...wait
match GetStrongbox Sorry,
matchwait
2:
GetChest:
counter add 1
pause
put get chest on table
match Chest You get a
match GetCoffer could not find what
match Abort You are a ghost!
match GetChest ...wait
match GetChest Sorry,
matchwait
3:
GetCoffer:
counter add 1
pause
put get coffer on table
match Coffer You get a
match GetCaddy could not find what
match Abort You are a ghost!
match GetCoffer ...wait
match GetCoffer Sorry,
matchwait
4:
GetCaddy:
counter add 1
pause
put get caddy on table
match Caddy You get a
match GetCasket could not find what
match Abort You are a ghost!
match GetCaddy ...wait
match GetCaddy Sorry,
matchwait
5:
GetCasket:
counter add 1
pause
put get casket on table
match Casket You get a
match GetBox could not find what
match Abort You are a ghost!
matchwait
6:
GetBox:
counter add 1
pause
put get box on table
match Box You get a
match GetSkippet could not find what
match Abort You are a ghost!
match GetBox ...wait
match GetBox Sorry,
matchwait
7:
GetSkippet:
counter add 1
pause
put get skippet on table
match skippet You get a
match GetCase could not find what
match Abort You are a ghost!
match GetSkippet ...wait
match GetSkippet Sorry,
matchwait
8:
GetCase:
counter add 1
pause
put get case on table
match Case You get a
match GetCrate could not find what
match Abort You are a ghost!
match GetCase ...wait
match GetCase Sorry,
matchwait
9:
GetCrate:
counter add 1
pause
put get crate on table
match Crate You get a
match RoundTwo could not find what
match Abort You are a ghost!
match GetCrate ...wait
match GetCrate Sorry,
matchwait
RoundTwo:
10:
GetTrunk2:
counter add 1
pause
put get other trunk on table
match Trunk You get a
match GetStrongbox2 could not find what
match Abort You are a ghost!
match GetTrunk2 ...wait
match GetTrunk2 Sorry,
matchwait
11:
GetStrongbox2:
counter add 1
pause
put get other strongbox on table
match Strongbox You get a
match GetChest2 could not find what
match Abort You are a ghost!
match GetStrongbox2 ...wait
match GetStrongbox2 Sorry,
matchwait
12:
GetChest2:
counter add 1
pause
put get other chest on table
match Chest You get a
match GetCoffer2 could not find what
match Abort You are a ghost!
match GetChest2 ...wait
match GetChest2 Sorry,
matchwait
13:
GetCoffer2:
counter add 1
pause
put get other coffer on table
match Coffer You get a
match GetCaddy2 could not find what
match Abort You are a ghost!
match GetCoffer2 ...wait
match GetCoffer2 Sorry,
matchwait
14:
GetCaddy2:
counter add 1
pause
put get other caddy on table
match Caddy You get a
match GetCasket2 could not find what
match Abort You are a ghost!
match GetCaddy2 ...wait
match GetCaddy2 Sorry,
matchwait
15:
GetCasket2:
counter add 1
pause
put get other casket on table
match Casket You get a
match GetBox2 could not find what
match Abort You are a ghost!
match GetCasket2 ...wait
match GetCasket2 Sorry,
matchwait
16:
GetBox2:
counter add 1
pause
put get other box on table
match Box You get a
match GetSkippet2 could not find what
match Abort You are a ghost!
match GetBox2 ...wait
match GetBox2 Sorry,
matchwait
17:
GetSkippet2:
counter add 1
pause
put get other skippet on table
match skippet You get a
match GetCase2 could not find what
match Abort You are a ghost!
match GetSkippet2 ...wait
match GetSkippet2 Sorry,
matchwait
18:
GetCase2:
counter add 1
pause
put get other case on table
match Case You get a
match GetCrate2 could not find what
match Abort You are a ghost!
match GetCase2 ...wait
match GetCase2 Sorry,
matchwait
19:
GetCrate2:
counter add 1
pause
put get other crate on table
match Crate You get a
match Done could not find what
match Abort You are a ghost!
match GetCrate2 ...wait
match GetCrate2 Sorry,
matchwait
Trunk:
save trunk
goto FindTrapBase
Strongbox:
save stro
goto FindTrapBase
Chest:
save chest
goto FindTrapBase
Coffer:
save coff
goto FindTrapBase
Caddy:
save cadd
goto FindTrapBase
Casket:
save cask
goto FindTrapBase
Box:
save box
goto FindTrapBase
Skippet:
save skipp
goto FindTrapBase
Case:
save case
goto FindTrapBase
Crate:
save crate
goto FindTrapBase
FindTrapBase:
put disarm my %s
match FindTrapBase aren't able
match Dropit It's not locked
match DropIt torn free and discarded
match DropIt longer will function
match DropIt liquid was drained out
match DropIt bent needle sticks harmlessly out
match DropIt harmless
match DropIt damp stain down the front
match DropIt blocking whatever would have come out.
match Return is the painted image of a small
match Return catches your attention
match Return catches your eye
match Return you see what seems to be a pin
match Return black scarab of some unidentifiable
match Return indicate that something is awry.
match Return Small black dots bounce inside,
match Return miniature metallic visage
match Return frighteningly large vial of naphtha
match Return you notice
match Return You find a
match Return could not find what
match Abort You are a ghost!
match FindTrapBase ...wait
match FindTrapBase Sorry,
matchwait
Return:
pause
put health
put look
match Abort arrow lodged shallowly into your
match abort bolt lodged shallowly into your
match abort stone lodged shallowly into your
match Abort bad shape
match Abort very bad shape
match Abort extremely bad shape
match Abort body feels very beat up
match Abort body feels extremely beat up
match Abort death's door
match Abort a ghost
match Abort or you decay.
match Abort that you have just died!
match Abort are stilled stunned
match HealthContinue Obvious
matchwait
DropIt:
counter add 1
pause
put drop my %s
echo -> Counter is %c
goto %c
HealthContinue:
counter add 1
put put my %s on table
pause 2
put put my %s on table
echo -> Counter is %c
goto %c
# =============================
Abort:
oops:
put quit
20:
21:
Done:
redress:
pause 1
put get my helm
put wear my helm
pause 1
put get my mask
put wear my mask
pause 1
put get my hood
put wear my hood
pause 1
put get my coif
put wear my coif
pause 1
put get my balaclava
put wear my balac
pause 1
put get my glove
put wear my glove
pause 1
put get my gauntlets
put wear my gauntlet
pause 1
put get my handguards
put wear my handguard
pause 1
ECHO -> HEALTH CHECKS
put stand
put stand
pause 2
put health
pause 30
put health
pause 30
put health
ECHO -> FINISHED!
The health checks at the bottom are to detect if vitality drops from poison or a bad bleeder. If need be DXTriggers will log the character to prevent death. If you don't use triggers or are in prime, you should remove the bottom "put health" statements.
***************************
Thief Scripts
Lets see if I can explain this set of scripts. For those of you who don't know what DXTriggers is, its a program that watches the Wizard screen for game responses you define. When it sees it, then it will enter a command to the screen - this command is something you define also. You can find the program at www.kinist.com for Windows 95/98/Me. A beta version that works with Windows XP is at http://www.imperialcomputertech.com/wiztrigger/. I have heard that this one is a bit buggy still and since I loth XP and haven't converted, I just stick with the old DXTriggers for now. I will probably upgrade shortly as this beta version is much more powerful. But for the below examples, the scripts are used with the old DXTrigger program.
These programs were written for a thief to work outside of the Aesry bank. The thief will work his skills which includes repairing the first four lockpicks in his belt, check his health and eat herbs, carve new lockpicks from keyblanks, work appraisal, forage, juggle, hide and stalk, work climbing, and check mindstate. When someone want him to open boxes for them, they just hand the box to the thief. He then will check his hands and stow any items prior to accepting the box. He will disarm and unlock the box unless he can't find the trap after 5 attempts or he breaks 2 lockpicks on the same box. When he is done or gives-up he will return the box to the owner. He will get new lockpicks when one breaks. He will check his health if he blows a trap - certain traps will log him. If someone interrupts him, he will ask who's box he's holding and return it. If no one answers, he will drop it. He uses khri to support his box popping. If someone says "Heigh JoeThief" he will rob them to provide perception until they leave or tell him "Stop JoeThief". The thief also comes with his own help menu. If someone says "JoeThief help", he will recite the commands to use to work him. He also will accept tips when he's finished!
First... This is what the trigger file looks like.
36
"you're extremely imbalanced","quit"
"gestures at you","quit"
"very badly hurt","quit"
"near death","quit"
"smashed up","quit"
"still stunned","quit"
"your death cry echoes in your brain","quit"
"you are a ghost!","quit"
"grabs your arm and drags you","quit"
"grabs your arm and tries to drag you","quit"
"reaches over and holds your hand.","quit"
"you are swept into dance by","quit"
"fires a crossbow bolt at you.","quit"
"arrow at you","quit"
"very beat up","quit"
"extremely beat up","quit"
"bad shape","quit"
"very bad shape","quit"
"extremely bad shape","quit"
"death's door","quit"
"something grabs your arm and tries to drag you","quit"
"appears to be aiming at you","quit"
"arrow at you.","quit"
"bolt at you","quit"
"leaps from hiding and jabs at you","quit"
"stunning you.","quit"
"you slowly tip over and fall down.","quit"
"heigh JoeThief","#.JoeThief_bank word(1)" <- Trigger for the scripts
"stop JoeThief","#.disarm_auto_skills" <- Trigger for the scripts
"offers you","#.disarm_auto word(1)" <- Trigger for the scripts
"-> emptyhands","#.emptyhands" <- Trigger for the scripts
"-> dropdashit","#.emptyhands" <- Trigger for the scripts
"-> startskills","#.disarm_auto_skills" <- Trigger for the scripts
"taps you lightly on the shoulder.","give word(1)" <- Trigger for the scripts
"JoeThief help","#.disarm_auto_help" <- Trigger for the scripts
DISARM_AUTO_SKILLS.CMD (The skill script for downtime)
# Disarm - Auto Disarm & Pick when handed a box
# By Micwolf 8/6/02 Rev.1
# Dxtriggers:
#
# Supporting Scripts and Triggers (JoeThief_Aesry)
# emptyhands.cmd = trigger: -> EmptyHands
# JoeThief_bank.cmd = trigger: Heigh JoeThief
# Trigger: Stop JoeThief = Disarm_Auto_Skills.cmd
# Disarm_Auto_Skills.cmd = Trigger -> Stop JoeThief
# Disarm_Auto_Skills.cmd = Tigger: -> StartSkills
# Trigger: taps you on the shoulder Response: give word(1)//#.emptyhands
#
#=================================================
# STOW ITEMS IN HANDS
pause
put awake
pause
put open my belt
put put my lockpick in my belt
pause
#=================================================
counter set 0
# Make sure your hands are empty before accepting more boxes
CheckHands:
put glance
match AcceptNewBox down at your empty hands
match WhosBoxIsThisRH Caddy in your right hand
match WhosBoxIsThisRH Skippet in your right hand
match WhosBoxIsThisRH Trunk in your right hand
match WhosBoxIsThisRH Casket in your right hand
match WhosBoxIsThisRH Chest in your right hand
match WhosBoxIsThisRH Crate in your right hand
match WhosBoxIsThisRH Coffer in your right hand
match WhosBoxIsThisRH Case in your right hand
match WhosBoxIsThisRH Box in your right hand
match WhosBoxIsThisRH Strongbox in your right hand
match WhosBoxIsThisLH Caddy in your left hand
match WhosBoxIsThisLH Skippet in your left hand
match WhosBoxIsThisLH Trunk in your left hand
match WhosBoxIsThisLH Casket in your left hand
match WhosBoxIsThisLH Chest in your left hand
match WhosBoxIsThisLH Crate in your left hand
match WhosBoxIsThisLH Coffer in your left hand
match WhosBoxIsThisLH Case in your left hand
match WhosBoxIsThisLH Box in yoru left hand
match WhosBoxIsThisLH Strongbox in your left hand
match NotABox in your left hand
match CheckHands ...wait
match CheckHands Sorry, system slow
match CheckHands Sorry, you may
match Abort or decay
matchwait
#=================================================
WhosBoxIsThisLH:
pause
put swap
WhosBoxIsThisRH:
put 'Who's box am I holding? Please tap me if its yours, otherwise I will drop it in 15 seconds
pause 15
goto EndScript
#=================================================
AcceptNewBox:
put accept
pause
put act cracks his knuckles.
put khri support
pause
put khri safe
pause
# Make sure they really handed you a box
DetermineBoxType:
put glance
match SaveStrongbox strongbox
match SaveCaddy Caddy
match SaveSkippet Skippet
match SaveTrunk Trunk
match SaveCasket Casket
match SaveChest Chest
match SaveCrate Crate
match SaveCoffer Coffer
match SaveCase Case
match SaveBox Box
match NotABox in your left hand.
match DetermineBoxType ...wait
match DetermineBoxType Sorry, system slow
match DetermineBoxType Sorry, you may
match Abort or decay
matchwait
SaveCaddy:
save "caddy"
goto Disarm
SaveSkippet:
save "skippet"
goto Disarm
SaveTrunk:
save "trunk"
goto Disarm
SaveCasket:
save "casket"
goto Disarm
SaveChest:
save "chest"
goto Disarm
SaveCrate:
save "crate"
goto Disarm
SaveCoffer:
save "coffer"
goto Disarm
SaveCase:
save "case"
goto Disarm
SaveBox:
save "box"
goto Disarm
SaveStrongbox:
save "strongbox"
goto Disarm
#=================================================
NotABox:
#Determine what is in your hands or if you have a box and something else in your hands
#Get rid of or store the non-box.
pause
put glance
match StowTipRH zircon in your right hand
match StowTipRH quartz in your right hand
match StowTipRH crystal in your right hand
match StowTipRH bloodstone in your right hand
match StowTipRH amethyst in your right hand
match StowTipRH nugget in your right hand
match StowTipRH ruby in your right hand
match StowTipRH jasper in your right hand
match StowTipRH malachite stone in your right hand
match StowTipRH turquoise stone in your right hand
match StowTipRH gem in your right hand
match StowTipRH diopside in your right hand
match StowTipRH topaz in your right hand
match StowTipRH opal in your right hand
match StowTipRH pearl in your right hand
match StowTipRH bar in your right hand
match StowTipRH lockpick in your right hand
match AcceptNewBox down at your empty hands
match CheckLH in your left hand
matchwait
CheckLH:
pause
put glance
match StowTipLH zircon in your left hand
match StowTipLH quartz in your left hand
match StowTipLH crystal in your left hand
match StowTipLH bloodstone in your left hand
match StowTipLH amethyst in your left hand
match StowTipLH nugget in your left hand
match StowTipLH ruby in your left hand
match StowTipLH jasper in your left hand
match StowTipLH malachite stone in your left hand
match StowTipLH turquoise stone in your left hand
match StowTipLH gem in your left hand
match StowTipLH diopside in your left hand
match StowTipLH topaz in your left hand
match StowTipLH opal in your left hand
match StowTipLH pearl in your left hand
match StowTipLH bar in your left hand
match StowTipLH lockpick in your left hand
match AcceptNewBox down at your empty hands
match NotATip in your left hand
matchwait
StowTipRH:
put stow r
pause
goto Checkhands
StowTipLH:
put stow l
pause
goto Checkhands
NotATip:
put 'I don't recognize what's in my hands.
goto Endscript
#=================================================
Disarm:
FindTrap:
FindTrap0:
FindTrap1:
FindTrap2:
FindTrap3:
FindTrap4:
pause
counter add 1
put disarm my %s
match FindTrap%c aren't able to discern
match GiveBoxBack It's not locked, so there's not much chance of it being trapped, is there?
match DisarmTrap is the painted image of a small
match DisarmTrap catches your attention
match DisarmTrap catches your eye
match DisarmTrap frighteningly large vial of naphtha
match DisarmTrap you notice
match DisarmTrap You find a
match DisarmTrap you see what seems to be a pin
match DisarmTrap black scarab of some unidentifiable
match DisarmTrap indicate that something is awry.
match DisarmTrap Small black dots bounce inside,
match DisarmTrap miniature metallic visage
match SleepTrap until finally collapsing to the ground, dead asleep.
match pickBox torn free and discarded
match PickBox longer will function
match PickBox liquid was drained out
match PickBox bent needle sticks harmlessly out
match PickBox harmless
match PickBox damp stain down the front
match PickBox blocking whatever would have come out.
match ShadowlingTrap "liquid shadows" begin to pour from it!
match BlownBox could not find what
match Abort or decay
matchwait
ShadowlingTrap:
pause
put 'argh!
goto Disarm
Sleeptrap:
pause
put wake
pause 40
put take %s
goto Disarm
FindTrap5:
pause
put 'I can not disarm this box. Please accept.
put give %1
pause 60
goto EndScript
#=================================================
BlownBox:
# Check to see why you aren't holding the box any more.
pause
Stand:
put stand
match Stand You are so unbalanced you cannot manage to stand.
match CheckHealth You stand back up.
match CheckHealth You are already standing
matchwait
CheckHealth:
pause
put health
put look
match Abort arrow lodged shallowly into your
match Abort bolt lodged shallowly into your
match Abort stone lodged shallowly into your
match Abort bad shape
match Abort very bad shape
match Abort extremely bad shape
match Abort body feels very beat up
match Abort body feels extremely beat up
match Abort death's door
match Abort or you decay.
match Abort are stilled stunned
match Jadice ugly stump
match Jadice rate
match Yelith rate
match Yelith inside
match Cebi scars
match Cebi Scarring
match Hisan twitching
match BlownBox2 Obvious
matchwait
EatHerbs:
Jadice:
put eat my jadice flower
goto BlownBox2
Yelith:
put eat my yelith root
goto BlownBox2
Cebi:
put eat my cebi root
goto BlownBox2
Hisan:
put eat my hisan salve
goto BlownBox2
BlownBox2:
pause
put glance
match SaveCaddy Caddy
match SaveSkippet Skippet
match SaveTrunk Trunk
match SaveCasket Casket
match SaveChest Chest
match SaveCrate Crate
match SaveCoffer Coffer
match SaveCase Case
match SaveBox Box
match SaveStrong Strongbox
match NotABox in your left hand.
match BlownBox2 ...wait
match BlownBox2 Sorry, system slow
match BlownBox2 Sorry, you may
match Abort or decay
match BlownBox3 glance down at your empty hands.
matchwait
BlownBox3:
put 'Abort disarm/pick in 15 sec unless handed another box.
pause 15
goto Endscript
#=================================================
DisarmTrap:
pause
put disarm my %s
match DisarmTrap You fiddle with the mechanism for a while
match PutBoxInLeftHand You manage to work the contact fibers away
match PutBoxInLeftHand of dust from the ground
match PutBoxInLeftHand Working slowly, you carefully bend the head
match PutBoxInLeftHand You cautiously pry the seal away from the lid
match PutBoxInLeftHand Working with extreme care, you cautiously bend
match PutBoxInLeftHand Working slowly, you carefully pry the studs
match PutBoxInLeftHand Working with extreme care
match PutBoxInLeftHand spray harmlessly upon the ground.
match PutBoxInLeftHand With the skill of a true locksmith, you grab
match PutBoxInLeftHand With the precision and grace of a skilled craftsman
match PutBoxInLeftHand With sweat forming on your brow, you slowly move the rune
match PutBoxInLeftHand After wiggling it back and forth for a few moments, you manage
match PutBoxInLeftHand With precise control, you shove the pin away
match PutBoxInLeftHand Carefully, you pry the bronze face away from the pine box
match PutBoxInLeftHand Reaching into the keyhole carefully, you knock free the coin
match PutBoxInLeftHand you use your fingernail to scratch out the painted Elf girl
match PutBoxInLeftHand you are able to pry off the crusty scarab
match PutBoxInLeftHand It's not exactly an original solution, but it still works.
match PutBoxInLeftHand you finally bend it away from any spark-causing surfaces.
match PutBoxInLeftHand look up with a grin
match PutBoxInLeftHand It seems harmless.
match PutBoxInLeftHand longer will function
match SleepTrap until finally collapsing to the ground, dead asleep.
match BlownBox could not find what
match Leave world around you has gotten much bigger
match Abort or decay
match DisarmTrap ...wait
match DisarmTrap Sorry, you may
match DisarmTrap Sorry, system slow
matchwait
PutBoxInLeftHand:
pause
put swap
match PutBoxInLeftHand to your right hand
match PickBox to your left hand.
matchwait
#=================================================
PickBox:
counter set 0
PickBox0:
PickBox1:
PickBox2:
put khri support
pause 2
put khri safe
pause 2
counter add 1
put get my lockpick
match GotALockpick You are already holding that.
match NoLockpick I could not find what you were referring to.
match GotALockpick from inside your
matchwait
NoLockpick:
pause
put 'Can not pick the box. I'm out of lockpicks.
GiveBoxBack:
put swap
match GiveIt to your right hand
match GiveBoxBack to your left hand.
matchwait
GiveIt:
pause
put 'Please accept this box before handing me another.
put give %1
match WaitForTimeOut You offer your
match GiveBoxBack There's nothing in your right hand to give
matchwait
WaitForTimeOut:
pause 120
goto Endscript
GotALockpick:
pause
put khri support
pause
put khri safe
pause
put pick my %s
match GotALockpick No such luck.
match SwapdaBox Find a more appropriate tool and try again!
match PickBox%c With your bare hands?
match PickBox%c Your pick just broke
match PickBox%c *SNAP*!
match FinishedPicking Click!
match FinishedPicking It's not locked.
matchwait
SwapdaBox:
put swap
goto PickBox
PickBox3:
pause
counter set 0
put 'I can not pick this box. Please accept.
put give %1
pause 60
goto Endscript
#=================================================
FinishedPicking:
pause
put put my lockpick in my belt
goto GiveBoxBack
#=================================================
Abort:
Leave:
put quit
EndScript:
Echo -> EmptyHands
Echo -> EmptyHands
EMPTYHANDS.CMD
#Disarm - Empty hands (no box, no tip)
# Dxtrigger: Emptyhands, Response = #.emptyhands
LookAtHands:
pause
put glance
match DropRose rose
match StowInBackpackLH knife in your left hand
match StowInBackpackRH knife in your right hand
match StowInBackpackLH keyblank in your left hand
match StowInBackpackRH keyblank in your right hand
match StowInBackpackLH lockpick in your left hand
match StowInBackpackRH lockpick in your right hand
match StowInBackpackLH beanbags in your left hand
match StowInBackpackRH beanbags in your right hand
match StowInBackpackLH juggling pins in your left hand
match StowInBackpackRH juggling pins in your right hand
match EndScript empty hands
match LookAtHands2 .
matchwait
LookAtHands2:
CHECKRH:
pause
put glance
match StowTipRH zircon in your right hand
match StowTipRH quartz in your right hand
match StowTipRH crystal in your right hand
match StowTipRH bloodstone in your right hand
match StowTipRH amethyst in your right hand
match StowTipRH nugget in your right hand
match StowTipRH ruby in your right hand
match StowTipRH jasper in your right hand
match StowTipRH malachite stone in your right hand
match StowTipRH turquoise stone in your right hand
match StowTipRH gem in your right hand
match StowTipRH diopside in your right hand
match StowTipRH topaz in your right hand
match StowTipRH opal in your right hand
match StowTipRH pearl in your right hand
match StowTipRH bar in your right hand
match StowTipRH lockpick in your right hand
match EndScript down at your empty hands
match CheckLH in your left hand
matchwait
CheckLH:
pause
put glance
match StowTipLH zircon in your left hand
match StowTipLH quartz in your left hand
match StowTipLH crystal in your left hand
match StowTipLH bloodstone in your left hand
match StowTipLH amethyst in your left hand
match StowTipLH nugget in your left hand
match StowTipLH ruby in your left hand
match StowTipLH jasper in your left hand
match StowTipLH malachite stone in your left hand
match StowTipLH turquoise stone in your left hand
match StowTipLH gem in your left hand
match StowTipLH diopside in your left hand
match StowTipLH topaz in your left hand
match StowTipLH opal in your left hand
match StowTipLH pearl in your left hand
match StowTipLH bar in your left hand
match StowTipLH lockpick in your left hand
match EndScript down at your empty hands
match NotATip in your left hand
match EndScript empty hands
matchwait
NotATip:
pause
put glance
match DropStrongbox Strongbox
match EndScript down at your empty hands
match DropCaddy Caddy
match DropSkippet Skippet
match DropTrunk Trunk
match DropCasket Casket
match DropChest Chest
match DropCrate Crate
match DropCoffer Coffer
match DropCase Case
match DropBox Box
match NotATip ...wait
match NotATip Sorry, system slow
match NotATip Sorry, you may
match Abort or you decay
matchwait
TriggerDrop:
pause
put glance
Echo -> Dropdashit
pause 5
put glance
Echo -> Dropdashit
pause 5
goto EndScript
DropCaddy:
put drop my caddy
goto NotATip
DropSkippet:
put drop my skippet
goto NotATip
DropTrunk:
put drop my trunk
goto NotATip
DropCasket:
put drop my casket
goto NotATip
DropChest:
put drop my chest
goto NotATip
DropCrate:
put drop my crate
goto NotATip
DropCoffer:
put drop my coffer
goto NotATip
DropCase:
put drop my case
goto NotATip
DropBox:
put drop my Box
goto NotATip
DropStrongbox:
put drop my strongbox
goto NotATip
StowTipRH:
put stow r
pause
goto Checkhands
StowTipLH:
put stow l
pause
goto Checkhands
StowInBackpackRH:
pause
put stow r
goto LookAtHands
StowinBackpackLH:
pause
put stow l
goto LookAtHands
DropRose:
pause
put drop my rose
goto LookAtHands
Endscript:
Echo -> StartSkills
Echo -> StartSkills
JOETHIEF_BANK.CMD
#Stealing - JoeThief at the bank working off triggers
top:
put hide
pause 3
put steal %1
match Stop I could not find what you were referring to.
match Steal2 You cautiously attempt to lift a few coins
match steal2 You carefully reach your hand
matchwait
Steal2:
pause
put steal %1
match Stop I could not find what you were referring to.
match Steal3 You cautiously attempt to lift a few coins
match steal3 You carefully reach your hand
matchwait
Steal3:
pause
put stow r
put stow l
pause 1
put health
pause 1
goto top
Stop:
Echo -> Stop JoeThief
Echo -> Stop JoeThief
DISARM_AUTO_HELP.CMD (help command script)
#Disarm_Auto_Help
#Trigger: JoeThief Help
put 'Hello, I am the automated-thief. I will tell you about the services I offer. The commands I will mention will have an extra space in them to keep me from falsely triggering. Omit this space when you wish to issue me the command.
pause 5
put 'If you GIVE me a treasure box, I will auto disarm, pick, and return it unless I fail to find the trap after the 5th attempt or break 2 lockpicks on it.
pause 3
put 'If someone interrupts me or I get stuck, you can tap me on the shoulder to return your box.
pause 3
put 'If you say "H eigh JoeThief", I will give you perception via stealing. (note extra space should be omitted).
pause 3
put 'If you say "S top JoeThief", I will stop stealing from you. (note extra space should be omitted).
pause 3
put 'Please only give me one box at a time.
pause
put 'I do accept tips in the form of gems at the end of your boxes. Simply offer me one.
pause 3
put 'If you fail to accept your box back or I am holding something I can't recognize, I will attempt to drop it.
pause 3
put 'Between disarm/picking and stealing, I will be around this area working other skills. Simply command me in the room outside of the bank to obtain my services.
pause 3
put 'And of course my help message can be displayed by saying "J oeThief Help" (note extra space should be omitted).
pause 120
echo -> STARTSKILLS
ECHO -> STARTSKILLS
DISARM_AUTO_SKILLS.CMD
# Disarm - Work Other Skills outside of Aesry Bank
#
#
# Dxtrigger: -> StartSkills
Start:
# Fix Lockpicks
counter set 1
open my belt
open my %container
Lockpick1:
pause
put get my lockpick from belt
goto Fixlockpick
Lockpick2:
pause
put get my second lockpick from belt
goto FixLockpick
Lockpick3:
pause
put get my third lockpick from belt
goto Fixlockpick
Lockpick4:
pause
put get my fourth lockpick from belt
goto Fixlockpick
Fixlockpick:
pause
put health
counter add 1
put fix my lockpick
match StowFixedLockpick doesn't look like it needs any repairing.
match StowFixedLockpick You feel confident that you have done some good.
match StowFixedLockpick make things worse
match Health I could not find
match Health I couldn't find
match StowFixedLockpick You carefully
matchwait
StowFixedLockpick:
pause
put put my lockpick in my belt
goto Lockpick%c
Lockpick5:
counter set 0
goto Health
#===========================================
Health:
pause
put health
put look
match sufil left eye
match sufil right eye
match jadice deep cuts
match yelith inside
match Yelith swollen
match Yelith bruised
match cebi scar
match Hisan twitch
match Hisan twitching
match Hisan numbness
match Keyblanks Obvious
matchwait
#===========================================
Herbs:
Sufil:
put eat my sufil sap
goto Keyblanks
Jadice:
put eat my jadice flower
goto Keyblanks
Yelith:
put eat my yelith root
goto Keyblanks
Cebi:
put eat my cebi root
goto Keyblanks
Hisan:
put eat my hisan salve
goto Keyblanks
#===========================================
Keyblanks:
# Carve Keyblanks
HalfDone:
pause
put get my knife
put get my lockpick from my %container
match Carve from inside your
match Broke I could not find
mathcwait
Broke:
pause
put put my lockpick in my belt
put get my keyblank from my %container
match Carve from inside your
match Appraisal I could not find
mathcwait
Carve:
pause
put health
pause
put carve my keyblank with my knife
match Broke It would be better to find a creature to carve
match Broke You throw away the pieces with a muttered curse
match Carve2 As you finish
match Carve2 when you finish
match Carve2 when you are finished
match Carve2 You start to carve
match Carve2 you find yourself holding
match FinishedCarving too injured to
match FinishedCarving you put the final touches on your wor
match FinishedCarving proudly glance down
matchwait
Carve2:
pause
put carve my lockpick with my knife
match Broke It would be better to find a creature to carve
match Broke You throw away the pieces with a muttered curse
match Carve2 As you finish
match Carve2 when you finish
match Carve2 when you are finished
match Carve2 You start to carve
match Carve2 you find yourself holding
match FinishedCarving too injured to
match FinishedCarving you put the final touches on your wor
match FinishedCarving proudly glance down
matchwait
FinishedCarving:
pause
put put my knife in my %container
put put my lockpick in my belt
pause
#===========================================
Appraisal:
put appraise my belt
pause
put appraise my bow
pause
put appraise my gweth
pause
put appraise my pouch
pause
put appraise my backpack
pause
put appraise my leathers
pause
#===========================================
Foraging:
pause
put health
pause
put forage white rose
pause
put forage white rose
pause
put drop my rose
put drop my rose
pause
put forage white rose
pause
put forage white rose
pause
put drop my rose
put drop my rose
pause
put forage white rose
pause
put forage white rose
pause
put drop my rose
put drop my rose
pause
put forage white rose
pause
put forage white rose
pause
put drop my rose
put drop my rose
pause
put forage white rose
pause
put forage white rose
pause
put drop my rose
put drop my rose
pause
#===========================================
Juggle:
pause
put health
pause
put get my %user8
put juggle %user8
pause
put juggle %user8
pause
put juggle %user8
pause
put juggle %user8
pause
put juggle %user8
pause
put juggle %user8
pause
put juggle %user8
pause
put juggle %user8
pause
put juggle %user8
pause
put juggle %user8
pause
put put my %user8 in my %container
pause
#===========================================
Hide/STalk:
put hide
pause
put sneak n
pause 2
put sneak s
pause 2
put sneak se
pause 2
put sneak nw
pause 2
put sneak n
pause 2
put sneak s
pause 2
put sneak se
pause 2
put sneak nw
pause 2
put sneak n
pause 2
put sneak s
pause 2
put sneak se
pause 2
put sneak nw
pause 2
put health
pause
#===========================================
Climb:
move w
move go gate
move w
move w
move w
move climb stair
move w
move climb stair
move w
move climb stair
move w
move climb stair
move w
move climb stair
move w
move climb stair
move w
put health
pause 15
move e
move climb stair
move e
move climb stair
move e
move climb stair
move e
move climb stair
move e
move climb stair
move e
move climb stair
move e
move e
move go gate
move e
move e
#===========================================
MindCheck:
pause
put exper
match Sleep Overall state of mind: clear and sleepy.
match Awake Overall state of mind: clear
match Sleep Overall state of mind: fluid
match Sleep Overall state of mind: murky
match Sleep Overall state of mind: frozen
match Sleep Overall state of mind: stagnant
match Sleep Overall state of mind: dense
match Sleep Overall state of mind: thick
match Sleep Overall state of mind: very
matchwait
Sleep:
put sleep
put hide
pause 120
goto MindCheck
Awake:
put awake
pause
goto Start
If you made it this far... CONGRATULATIONS! Hopefully you have gained some knowledge. If you are completely confused read it again. <g> If you are still confused after that, you can email me your questions (see the feedback form at http://arcanewolf.com/feedback)