Cleaner's RotJ Page

Help! I'm new! Zmud help RotJ Tables About the author Quick Navigate Disclaimer Links

Home > Zmud help > Examples and importable scripts

Also in this section: Aliases | Variables | Triggers

 

Examples and importable scripts

 

Import instructions for downloadable scripts

 

You need to download the file and save it somewhere on your hard drive. Right click on the hyperlink on this page and select 'Save target as'. After downloading, go into zMUD and start a session with your character. It can be on- or offline. Click "Settings", move to "Import" and then click "Script (Ascii)". Select the type of file to be "TXT Files" if it is not there already. Browse to the downloaded file, select it and click open. Everything should then be ready to be used.

 

Auto-eating

 

Trigger looks like this:

 

pattern:             ^You are hungry.
command:        get @food @container ; eat @food

You might have the command as "get ration net ; eat ration" but let's say you get an obsidian expando bag as a new container and you start eating breads rather than rations? Then you'd have to change the trigger. If you use variables, simply typing "container=expando" and "food=ration" will have changed everything needed to use the new eq.

 

 

Unlock alias

 

alias name is "unl"
command lines are   "unlock %1 %2 ; open %1 %2"
Thus, if I type "unl gate w", the following will be sent to the mud:
unlock gate w
open gate w

 

Download unlock alias script Version 4.62 and 7.05

 

Tick timer

 

IMPORTANT: Not everybody has the same length ticks. To find out how long ticks are on your computer, stop eating (your character, you should still feed yourself) and wait for your character to get hungry. Then you simply need to find the time between the "You are hungry." messages. If your ticks aren't 75 seconds long, then change the examples below to however long your ticks are.

Click on "Actions" and then "Tick Timer"


Set the default time to 75 seconds and the timeout according to preference.
The secret to an accurate tick timer is to sync it every now and again. To do this, you need to know that certain things only happen on ticks. Like the change in weather, for instance. "The clouds disappear." only happens on a tick, thus, you need to reset your timer if you see this message appear.

 

The command to set a timer is "#ts 75". Ticks are between 70 and 75 seconds long on RotJ. I prefer using a variable, so if somebody else wants to import my settings they only have to change one variable, rather than changing 50+ triggers one by one.

So all you need to do is copy and paste a lot of weather changes into triggers to reset your timer. Then you need to find more sources of tick-happened info. Corpses decay on ticks, spells run out on ticks and dreams happen on ticks. People waking up from dreams also only happen on ticks, it's just that you weren't the one dreaming. :p

 

Pattern:             "^A quivering horde of maggots "
Command:      "#ts @tick"

 

Download tick reset script  Version 7.05

Download tick reset script  Version 4.62

 

Spell Recasting - for version 4.62

 

Alias name: "arm". Commands: "conc 'armor' "

Variable name: "armon". Value doesn't matter. Default advised to be set to "arm"

You will need 3 triggers for one spell.

Trigger 1:
    Pattern: "You feel less protected."
    Command: "#ts 75 ; armon=arm ; arm"
Trigger 2:
    Pattern: "You feel someone protecting you."
    Command: "armon="
Trigger 3:
    Pattern: "Your skin feels more durable."
    Command: "armon="

 

The key I use for "score full" is F8. So if yours is too, then add into F8's command line "armon=arm" with the appropriate ; signs.

In the alias that you use to cast needed spells, mine is "ca" (stands for "cast all"), you need to add "@armon". Remember the ;

 

Now, for the explanation.

The variable "armon" is an indicator whether "Armor" is needed or not.

What you need to understand is that if a variable's value is the name of an alias, it will call that alias when you use the variable.

When a spell runs out, first you reset your tick timer, which is the #TS 75 bit, then you assign the variable "armon" to the alias "arm", or in other words, you make the variable "armon" 's value "arm", then you try to recast the spell immediately by calling "arm". This last part is optional (the auto-casting)

When you press F8, you tell the client that the spell needs casting, and you wait for the score sheet to run by. If the spell is active, the spell doesn't need casting, and that is why your trigger sets the variable "armon" to nothing if the appropriate line of text is received from the mud (the-spell-is-active's line of text).

After the score sheet has run by, typing "ca" will run through all your spells' variables, and all the variables that have spells' aliases in them, will call the aliases, which will cast the spells. Should a spell fail, obviously the variable will keep the spell's alias as a value. Thus, typing "ca" now and again will keep all your spells active.

And now for the beautiful part. If you put all the spell variables into your Status Window, you will at all times be able to see which spells need recasting. (Click Window, and then click Status, if you don't have such a window.)

 

Spell Recasting - for version 7.05

 

Will be explained real soon, please be patient with me :-)

 

Telling your group if Sunburst worked

 

This example illustrates the usage of variables and trigger classes.

These triggers will mostly only be used by Jedi Masters, but everybody can learn something from it.

First you need to understand how Sunburst works, before trying to understand what I'm trying to accomplish with these triggers.

Sunburst has a chance to force hold an evil mob until the next tick. After that tick, the mob will be normal again, and casting Sunburst again will waste mana. You need to wait approx 5 ticks before Sunburst will "hold" the same evil mob again. However, the only difference in the messages is that the line "Nothing seems to happen." appears after the lines of text which always look the same. (If Sunburst held, of course)

"Your opponent seems to be very weak, strike now!" means that Sunburst's "hold" feature worked. This message will appear even when the mob cannot be held again.

If I cast SB twice on one evil mob, and the "hold" part works both times, I will spam my group members with my reports on SB. Only one report is needed, because if you simply make a trigger to report failure after SB is cast, then you will spam your groupies with two lines of "SB worked" and one line of "SB didn't work" and this is not good. I'm speaking from personal experience here. My trigger on "SB worked" generates two lines of text for everybody, and "SB didn't work" another two, mostly all-caps.

 

Thus, it might look something like this.

 

conc 'sunburst'

Okay.
You focus your force energy to create one massive burst!
Your opponent seems to be very weak, strike now!

 

conc 'sunburst'

Okay.
You focus your force energy to create one massive burst!
Your opponent seems to be very weak, strike now!
Nothing seems to happen.

 

So let's get to work.

 

Variable name: burstrep, value 1, default 1

 

Trigger 1:
    Pattern: "Your opponent seems to be very weak, strike now!"
    Command: "#IF @burstrep=1 {say sunburst has held ; burstrep=0} ;#T+ Burstfailed"
    Trigger Class: None

 

Trigger 2:
    Pattern: "Nothing seems to happen."
    Command: "say sunburst didn't hold"
    Trigger Class: "Burstfailed"


Note: set trigger to be inactive upon startup

 

Trigger 3:
    Pattern: "You"
    Command: "#T- Burstfailed"
    Trigger Class: "Burstfailed"


Note: set trigger to be inactive upon startup

 

Now you need a way to restore "burstrep" to 1. I do this with a button, but you might want something else, like a dialog box when a mob dies.

 

ID window capture

 

These triggers create a log file in your zmud directory called ID.txt and whenever you scan any item the info is stored in the file, so you can browse through it later. It also captures any items scanned during the current mud session in a window called ID. 

 

It is a very basic concept. All lines matching those displayed when identifying items are sent to a child window, and these are then logged into a text file on your computer.

 

Download ID window capture script Version 7.05

Download ID window capture script Version 4.62

 

 

Old damage messages

 

These triggers will turn your damage messages back into what they were with the full caps damage messages and that lot. I can almost guarantee that it will work with any damage type, but I could only test h2h, lightsaber, blast and turbo blast messages, and they all work fine. There is no way that I will be able to convert "received damage" messages into the old form, I have tried, and it's just too complicated. Try to do it yourself, and if you succeed, please let me know how the heck you did it.

 

Download old damage message script Version 7.05

 

This script is not functioning perfectly at the moment, however with most of the damage messages it works fine. For some reason, the trigger output for two of the lines of text are then checked for triggers again, which it should not do, because I deselected the "Trigger on trigger" option. I will update as soon as I have a fix for this.

 

 

Space walk

 

This is my space walking alias, which I use to skip hyperspace and rather walk from place to place, since my ship's hyperdrive is rather slow :p

Simply go into space and type "travel" to use. You'll need to know where you are and where you're going, so if you're lost in space, rather hyperjump.

 

I plan to convert this into a nice menu-driven interface, but that's for when I have more time.

 

Download space walk script Version 7.05

Download space walk script  Version 4.62

 

 

Ion cannon tracking

 

This small script keeps track of Ion cannons and when they are ready to shoot. It will only be useful if you put the 'ion' variable into your status bar or status window. Simply put something like Ion: @ion in the bar or window and it'll show 1 when ready to fire and 0 when not yet ready.

 

Download Ion cannon script Version 7.05

Download Ion cannon script Version 4.62

 

 

Help! I'm new! Zmud help RotJ Tables About the author Quick Navigate Disclaimer Links

Home > Zmud help > Examples and importable scripts

Also in this section: Aliases | Variables | Triggers

1