The Forums of Avalon: the First Age
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Newbie Help with Variables, Aliases, Macros, and Triggers

+2
Dante
Mysterin
6 posters

Go down

Newbie Help with  Variables, Aliases, Macros, and Triggers Empty Newbie Help with Variables, Aliases, Macros, and Triggers

Post  Mysterin Tue Jun 12, 2007 1:08 am

Alright, by no means am I any Zmud expert, but I can start by offering some simple help.

I personally use Zmud variables for my target, and having a target is a pretty important thing... So on that note, we're going to set up a Target Variable first.

Setting up a Target Variable
Open up your variables and click new. Name your variable whatever, for sake of being obvious - I use the name Target. Leave everything else blank, and click save...

Tada! You've created a variable... how simple was that?

Rockin'! So now that we have a target variable...we need to make a way to set that target. To do this, we're going to create an Alias!

TIP!: We usually want to make the alias name something short and sweet that we can remember. This means that if you're going to make two letter aliases, similar to other two letter aliases, you better have a good enough memory as to which is which. If you are going to constantly mix up two letter aliases, then use three letters. In fact, in all honesty I even have a few four letter aliases!

Setting up an Alias to set your target
Okay, open up your aliases and click new. Give your alias a name... I use and am going to use T for this example. Very short, easy to remember, t for target.

Now, in the value we want to write target = %1.

How to use this alias: t <target>
Explanation: Alright, lets say we type t serethipas. This translates into target = serethipas, because %1 is the first word that comes after the alias name. So what zmud does is take this target = serethipas and makes the value of your variable target, serethipas! (I know, confusing, but trust me it works.)

Righto... now we want to be able to set up an alias that uses our target variable so we can do things to other people!

Using Variables within Aliases
Open your aliases back up, and create a new one... lets name it P for punch. In the value... make it punch @target.

How to use this alias: Once you have set your target, all you need to do is type p.
Explanation: Once you have your target set up, Zmud will automatically fill anything that has @target in it with the value of @target.

Woo, moving on quickly!
The next one I'm going to use for pentacle... just replace <item> with whatever item you have charged with pent.

Macros!
Open up your macros. Create a new one! For purposes of being easy... lets set one up using key F1. Set the value as point <item>.

How to use it: Simply press F1.
Explanation: Now when you press F1 that command will be sent right through, no pressing enter or anything, so its super fast. I personally keep my most important things (Life, Multiple Health and Mana potions, Pent, Smoke Malloran/Pent, and FP/Malloran) on my F-keys.

Okay finally, onto triggers. For now, we're just going to set up a simple trigger... perhaps I'll add more on setting up color triggers for poisons and herbs... etc.. you know. Whatever blah.

Triggers
Open up triggers and make a new one. Now, the pattern is a string of text that we want Zmud to recognize and respond to. So for what I'm going to do will be to automatically make you struggle when someone casts web on you.

So, for the pattern, we want it to be Casts a web about you

Then, all we want in the value for now is struggle.

How to use it: Its automatic.
Explanation: The line of text is recognized and sets off a trigger that tells it to struggle, therefore attempting to get you out of the web.


Okay, I'm done giving beginner lessons in Zmud. Maybe when I get bored again I'll set up beginner lessons in Zmud II. Or maybe some help for seer profession types, since we can use some weird variables for waxes and such. Hope this was helpful.
Mysterin
Mysterin
Baron (Parrius)

Number of posts : 278
Age : 35
Whereabouts : Middle Street, Parrius
Registration date : 2007-03-25

http://www.lizzydavisphotography.com

Back to top Go down

Newbie Help with  Variables, Aliases, Macros, and Triggers Empty Re: Newbie Help with Variables, Aliases, Macros, and Triggers

Post  Dante Tue Jun 12, 2007 2:31 am

Just an addition to Triggers. As a general rule, the best triggers are "Colour triggers". These are triggers that change the colour of the text so you notice them during the face paced scroll of the game.

To set up a colour trigger... Type the Pattern that you want to be highlighted

Eg
Pattern: casts a web about you.
Reaction: #cw red
Effect: casts a web about you.

For more combinations you can also change the background:
Pattern: casts a web about you.
Reaction: #cw red,white
Effect: Text Red, Background White
(Note: I don't know how to show the effect of this on this forum)



Note: All triggers can be spammed, some skills can be spammed too. Never trigger anything that takes BALANCE or EQUILIBRIUM, or something you don't mind going off 5000 times in 1 second.

Dante
Nobleman/Noblewoman

Number of posts : 120
Age : 37
Whereabouts : England
Registration date : 2007-04-28

Back to top Go down

Newbie Help with  Variables, Aliases, Macros, and Triggers Empty Re: Newbie Help with Variables, Aliases, Macros, and Triggers

Post  Diomedes Tue Jun 12, 2007 12:43 pm

For you seer professionals:
This is a way to automatically have your prepared wax ready to go against whoever you set as your target.
You should preset your waxes as variables with your targets name:
Serethipas=wax1111
Nexus=wax2222
Mysterin=wax3333
then,

Expanding on Mysterin's targeting alias:
#al {t} {target=%1;wax=@%1}

Make your wax aliases with the variable @wax.
#al {bond @wax to @target}

Now when you set your target, you will always be using the correct preset wax without having to set it up seperately before each battle.
Diomedes
Diomedes
Commoner

Number of posts : 13
Whereabouts : Louisiana, USA
Registration date : 2007-04-30

Back to top Go down

Newbie Help with  Variables, Aliases, Macros, and Triggers Empty Re: Newbie Help with Variables, Aliases, Macros, and Triggers

Post  Kalimantra Thu Jun 14, 2007 1:52 am

Thank you, thank you, thank you! Your kindness is truely appreciated. I look forward to future evidence of your boredom, all ;o)
Kalimantra
Kalimantra
Commoner

Number of posts : 13
Whereabouts : mercinae
Registration date : 2007-06-12

Back to top Go down

Newbie Help with  Variables, Aliases, Macros, and Triggers Empty Re: Newbie Help with Variables, Aliases, Macros, and Triggers

Post  Lord Pryrates Wed Jun 20, 2007 4:22 am

For those who are Sorcerers!!! here's an alias for you...


#al {ohshit} {absolve !1}

Hahahahahahahaha :-p
Lord Pryrates
Lord Pryrates
Commoner

Number of posts : 19
Registration date : 2007-05-23

Back to top Go down

Newbie Help with  Variables, Aliases, Macros, and Triggers Empty Re: Newbie Help with Variables, Aliases, Macros, and Triggers

Post  Dante Wed Jun 20, 2007 4:49 am

Really, I thought it was

#al {tell} {absolve %1}

Dante
Nobleman/Noblewoman

Number of posts : 120
Age : 37
Whereabouts : England
Registration date : 2007-04-28

Back to top Go down

Newbie Help with  Variables, Aliases, Macros, and Triggers Empty Re: Newbie Help with Variables, Aliases, Macros, and Triggers

Post  Tauria Mon Jul 02, 2007 3:53 am

Again, another thing written for legends that can't hurt to share here Smile

Zmud Guide for Novice Coders

Vocabulary and Basic Commands
Syntax
Advanced Commands
Examples

****

-Zmud Vocabulary and Basic Commands-

Here are some easy terms to help people new to zmud understand it a bit better.

SYNTAX:
the correct order you need to do something, or to write a bit of coding in. For example, the correct syntax for smiling at someone is SMILE (PERSON) eg SMILE SNUFFLES. Coding follows the same method - you must code commands in the right order for zmud to understand what you want it to do.

ALIAS: this means a shortcut for a command. You make an alias to stand for a series of actions you want to do. For example, you can have an alias titled HAPPY, with the commands SMILE, GIGGLE and DANCE inside (each command is separated by ; or a carriage return, to denote that they are new commands). Zmud would then send those three emotes to the MUD, and whenever you type HAPPY, you will do all 3 emotes.

VARIABLE: Just like in math class, where variables are used to express unknown or changing aspects of the equation, variables can be used in coding for parts of your aliases that you want to change. Using variables allows you to make general aliases with specific parts that can easily be changed. For example, you could have an alias called GW, which would stand for GET WEAPON. Then the command for the alias would be GET @WEAPON;WIELD @WEAPON. (@ is how you tell zmud that you are using a variable). Then, whenever you change a weapon, you don't need to change the whole alias, simply the variable for your weapon.

TRIGGER: Triggers are automatic reflexes that zmud will execute whenever a specified bit of text comes up. For example, you could make a trigger set to the PATTERN (the text you base the trigger on) of SNUFFLES TICKLES YOU MERCILESSLY for the COMMAND of GROWL SNUFFLES.

CLASS: Classes are folders in which you can place aliases, variables, and triggers. The benefit and power of using classes is that they can be disabled and enabled, allowing you to make temporary settings that are not always active, only when you specify them to be.

***

-Syntax for Settings-

Making settings via the command bar is the fastest, easiest way to make simple settings (the command bar is what you type in to interact in the MUD). You can make basic settings this way without having to access the main menu, although for complex editing, opening the menu (just click on the icon that says SETTINGS on the top left of your zmud window) tends to be best.

Some basic syntax for settings through the command bar:

aliases - #al {name} {command;command}

variables - #var {name} {value1|value2|value3}

also – (variable name)=(value), eg target=snuffles, lets you set a single value quickly for a variable

triggers - #tr {pattern} {reaction}

classes - #class {name}

ifs are a bit more tricky part of coding, they let you specify certain times actions should occur at. The syntax is #if (this is true) {then do this} {if it's not true, do this instead (this part is optional)}

#if girl {smile like a girl} {otherwise smile like a boy}


***

-Advanced Commands-

This is nowhere near exhaustive, as zmud is a highly complex client, enabling you to do many diverse things. However, here are some more advanced commands and ideas to help get you exploring the coding potential.

Variables – Variables can be more than just a simple item or name. They can also represent STATES of being. The most common state is “on” and “off,” for which the values are usually for (for on, or active) and 0 (for off, or disabled). You can then dictate certain actions to be executed for the different states of the variables. #ifs are usually used to help code these types of settings.

Eg - #al {emotion} {#if @happy=1 {em dances about in merriment} {em sulks in a corner}} – this setting will display an emotion appropriate to the state of the variable happy. If happy=1, ie if happy is “on,” then you will execute a happy command. Otherwise, if happy=0, “off,” you will execute an unhappy command. You’ll want to also create settings that determines what mood you are in - #al {happy} {happy=1} and #al {sad} {happy=0} – this changes the value of the variable named happy.

Macros – This setting lets you pin any actions to any key on your keyboard. Just select the macros button (the one with the keyboard key) from the top bar of the zmud window. Then create a new one, for the macro name typing the name of the key you want it to be set to (eg type F2 for it to be set to the F2 key or SHIFT+F2 for it to be set to pressing both shift and F2 at once).

^ - This symbol is placed at the start of triggers to indicate that the trigger should only fire if the pattern is the start of a line. This translates into stopping people from emoting or saying text and setting your triggers off

* - This symbol allows you to use a wildcard expression in triggers. * will replace any text that can vary. Eg #tr {* giggles at you} {wink} – this trigger will set off winking, no matter who it is giggling at you.

%1 – This allows you to capture a variable text and use it in your settings. Eg #tr {%1 giggles at you} {wink %1} – this trigger will have you wink back at whoever if giggling at you

#cw/#co – this adds color to your MUD. #cw will color any words you specify, #co will color an entire line. Eg #tr {Snuffles says, “I love you.”} {#cw pink} – just in case Snuffles ever admits it, you’ll see it bright and clear.

#say/#echo – this displays a text in the MUD window (visible only to you, no actually interaction with the MUD), useful for suggesting curing options, reminders, etc. eg #tr {Snuffles says, “I love you.”} {#say RUN AWAY NOW!}. Or, if you’re the popular type, #tr {%1 says, “I love you.”} {#say %1 wants to join the fan club.}

#path – this lets you set directional paths that you can then walk back later. #mark to start a path, then #path (name) to end it and title it. .name to walk it, ..name to walk it in reverse.

#temp – this sets a temporary trigger that will fire only once. Syntax is: #temp {pattern} {action}. You can place this inside aliases and other triggers; for example, you have a trigger to pick up bodies after you slay them: #tr {^You have slain *} {#temp {(text for regaining balance)} {get @target}}

#wait – this tells zmud to wait a specified amount of milliseconds before sending the next command. Eg #al {badjoke} {say Why did Snuffles cross the road?;#wa 1000;say To run away from the lag beast!}. This gives you the nice dramatic delay before the punchline that all jokes need.

%additem/#additem – Variables can also occur with multiple values for the variable, known as STRINGLISTS. These commands add a value to the list. #additem only adds the value if it is not already on the list. For example, you want to make a list of all your friends. You’d put them all into a variable named FRIENDS, by using the command %additem.

Eg - #al {addfriend} {#additem friends %1} – Just type addfriend Snuffles to add him to your list
#al {showfriends} {#show friends} – this displays all your friends

#loo – this lets you loop through a certain command a specified number of times, executing it multiple times with different values. Eg #al {hideandseek} {#loo 1,10 (say %i)} – This setting will have you count from 1 to 10. Note that %i is used to denote the value that is being changed. This can be used in much more complex ways. For example, if you want to send a tell to all of your friends (or to your fighting allies):

#al {friendtell} {#loo 1,%numitems( @friends) {tell %item( @friends, %i) %1}}
Then, just type friendtell Snuffles just said he loved me! and everyone will know about the latest gossip.

The %numitems means take the number of items in the list “friends”, so the loop goes from 1 to however many entries you have in friends. Syntax: %numitems(s) where s is any list, eg #show %numitems(a|b|c) would produce 3, because there are 3 items in the list.

The %item means use the value from the list friends in the %i place. Remember, %i is what we use to indicate this is the part that gets changed each loop. So, this translates into Friend1, friend2, friend3 etc. Syntax: %item(list,n) where list is the list you are taking a value from and n is the nth place in the list you are specifying. Eg #show %item(a|b|c, 2) will give you b, because b is the 2nd item in the list.

***

-Examples-


Very first thing you will want to do is set up how to make a target. So...

Target alias
Name:tt
command: targ=%1

This sets the variable targ (for target) to whatever you type after tt. Eg you type tt Snuffles, then Snuffles will be the variable’s value.

Now, let's make an alias using that.

Jab Alias
Name: j
command: Jab %1 @targ
This has you attempt to jab whatever you type after j. If you type nothing, it jabs whoever/whatever you have targetted with the TT alias

Now, let’s make a variable so you can remember what the number of your sword is. This makes it easy to change things around if you switch your item.

Sword Variable
Name: sword
value:%1=%2

now just figure out what the item is, then simply type sword=item#### into your command line. easy as pie to change it, don't even have to open up the big settings menu.

Let’s make a setting now to get your sword and wield it.

Wield Alias
Name: gs
Command: get @sword;wield @sword

Let's make a setting that helps you pick out what your target is, by colour.

Target Colour Trigger
Pattern: {%q{@peopleBigThaks}%q}
value:#cw (colour)

This just makes your target show up whatever color you choose. The %q ensures that the word won’t be colored unless the proper punctuation is in place (ie it is a full word, rat as your target won’t show up colored in the middle of the word “celebration”).

Now, let's tack on something fancy to help keep things easy to track.

Target Status Bar
Go to ACTIONS -> DEFINE STATUS BAR. This opens up the menu that lets you make a new status bar...a bit of text between the command line and the MUD window, that shows whatever you want.
Status Line: Target is: @targ

That should add a nifty line that keeps track of your current target and displays it for you. You can put lots of fun things in there, like tracking if you can resip potions yet or if you are webbed, etc.

Here is a setting to color all the names of your citymates, combining several of the ideas above:

#al {addcit} {#additem citymates %1}
#tr {%q{@citymates}%q} {#cw red}


Let’s make a more fancy (yet still simple) alias, one for poisoning weapons and then attacking.

First, we have the multiple aliases:

Alias (prep-blade)
Name: pb
Command: outp %1
Outp %2
Rub %1 on @swordr
Rub %1 on @swordl
Inp %1
Inp %2

Then just type pb poison1 poison2 to coat your swords

Alias
Name: j
Command: SR
Jab @targ
SL
Jab @targ

Then we add them together.

Alias (poison-jab)
Name: pj
Command: pb %1 %2
j

Then, we make it easy to use. I like using numbers for the basis on my main attacks, with suffixes added to them for the varieties of poisons and commands I can use. Eg, 1 for a jab, 2 for a jj, 3 for shooting arrows.

Alias
Name: 2
Command: pj %1 %2

Alias
Name: 2nb
Command: 2 nann bukandas

Simply make an alias for each combo you like. The benefit of nesting aliases like this is that you can quickly change all of your settings (for example, if you wanted to tweak your jj alias) just by changing the main ones.
Tauria
Tauria
Commoner

Number of posts : 13
Registration date : 2007-07-02

Back to top Go down

Newbie Help with  Variables, Aliases, Macros, and Triggers Empty Re: Newbie Help with Variables, Aliases, Macros, and Triggers

Post  Dante Mon Jul 02, 2007 6:57 am

Just to note:

This guide covers everything i've ever used to make settings and even goes beyond it.
(My settings have about 50 class folders for ease of organising settings for editing.)

Aliases, Triggers (and Colour Triggers), Macros and Varibles are all you really need.

Remember: The aim of settings is to do anything you want to do, as soon as you know you want to do as quickly as possible. Triggers don't fullfill this purpose as they usually act when you don't want them too.

Colour triggers bring your attention to stuff you want to take notice of. (#say or #echo are useful for adding a guide to your actions or for a bigger warning message like:
#echo ******* Vommiting - Aim Mouth @targ *******

Dante
Nobleman/Noblewoman

Number of posts : 120
Age : 37
Whereabouts : England
Registration date : 2007-04-28

Back to top Go down

Newbie Help with  Variables, Aliases, Macros, and Triggers Empty Re: Newbie Help with Variables, Aliases, Macros, and Triggers

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum