So, I noticed that... a lot of people's systems are not as good as possible. I use zmud and figured I would try to give a few tips/explain zmud coding. If your system works for you, power to you. Some people don't know zmud stuff.
1. Stop using #WAIT. If you don't know what that is, good. Skip over this tip. Now, for all you people who are hooked on #wait, let me tell you a story. #wait kills. Okay, imagine you're in the middle of a fist fight with a some guy. Would you A) want to fight back... or B) want to get knocked unconscious so the guy can beat you up while you're out cold. Most people would choose choice A. What #WAIT does is knocks things unconscious. IF you necessarily have to delay things, use ALARM.
2. #ALARM. This is alright. I'm not a fan of using it, but if you have to delay things, do this. Basically, it's like this. Say you want to kick a puppy in three seconds after it walks in.
Pattern: A puppy walks in from the west
Value: #alarm +3 {kick puppy}
It's as simple as that. It's just like wait, minus the horribleness.
3. Variables. These things are awesome. I'm not really sure how to explain it. Let's say you're wearing a ring. The ring glows green when you're hungry. If it's not green, don't do anything. If your ring is green, what should you do? Eat. So, to code that, we simply
#if (@ring=green) {eat kitten}
Now, in the tradition of teaching coding, I'll complicate things further. If the ring is green, you're hungry. If not, you're tired (it's a cursed ring, we'll say. Shhh)
#if (@ring=green) {eat sandwich} {sleep on hammock}
As you can probably gather, If the stuff in the parenthesis is the condition. If the condition is true, it does whatever's in the first set of brackets. If it's false, it does whatever's in the second brackets.
So, looking back, if the ring is green, you'll eat a sandwich. If the ring is not green (@ring does not equal green), then you sleep on a hammock.
Variables can be quite a bit of things. They can be words, letters, numbers and lists (but I won't be covering lists in this guide). When you refer to them, though, make sure you put the @ sign before it. If you're assigning it something, you leave the @ sign off (I'll explain assigning later)
So. A variable named "cat" could equal 4, "grey" or just "G", depending on if you want to refer to how many legs has, what color he is or what his street name is.
The most common value to set a variable to is either 0 or 1. (This pretty much dates back to boolean language, true false, etc... but uh, that doesn't need to be explained) The general rule of thumb is that if a variable is equal to 0, it means whatever it is is in the "off" or "false" position, whereas 1 is in the "on" or "true" position, but you can set it equal to whatever you want, so long as you remember it.
Here's a simple example I use all the time. The line we want to set off your trigger is "You have recovered balance", so we'll call that the pattern. The value we want is for the system to acknowledge that you have balance. The value is as follows:
balance=1
Yep, it's that simple. Just put the variable name and whatever you want it to equal.
So say we want to have it do something if you have balance. Make an alias (a one word command) named "attack". The value of the alias is simply:
#if (@balance=1) {kick charlie}
* Oh. A quick note. Seriously, guys, variables for afflictions are useful. As in, when you get afflicted with seizure, go ahead and use a variable called seizure and set it equal to one. This way, you don't have to spend time diagnosing or waiting for a fit to come along for you to heal it if you were unable to the first time the fit happened.
4. #GAG. It's rather useful in certain situations. Let's say you're a smart coder and have your system set up where you try to STAND every time you have balance. Now, this can get spammy as you will see something along the lines of:
250/400h 100/160m 22xp > jab charlotte
You quickly punch Charlotte in the face.
250/400h 100/160m 22xp >
You have recovered balance.
stand
250/400h 100/160m 22xp >
You are already standing.
250/400h 100/160m 22xp >jab charlotte
You quickly punch Charlotte in the face.
250/400h 100/160m 22xp >
You have recovered balance.
stand
250/400h 100/160m 22xp >
You are already standing.
250/400h 100/160m 22xp >
and so on. To cut down on this, we simply #GAG lines, or, well, have our systems shield them from our eyes. It'll still be there, but we won't have to look at it. So, we use the pattern "You are already standing." and simply use the value:
#gag
It'll transform the above to something a bit less spammy. It might be one line, but after a while, it adds up.
There's a brother to #gag called #sub, but I haven't found a reason to use this other than for aesthetic reasons. It basically substitutes the text with whatever you put after it (in brackets). We'll ignore that one, though.
5. #math I actually forgot about this one until my mouse hovered over the "submit" button. Basically, it does what it says. It does math. it's very useful. Say you want the variable totalcats to equal the sum of your browncats and your yellowcats. Just do:
#math totalCats (@brownCats+@yellowCats)
Remember, since you're assigning the variable totalcats, it doesn't need the @ sign, but since you're referring to browncats and yellowcats, you use the @ sign. You can also do division, multiplication and subtraction. I use this in my autosipper by simply doing
#math percentHealth ((@currentHealth*100)/@maxhealth)
Okay, well, I'm tired. Good night and Good luck
1. Stop using #WAIT. If you don't know what that is, good. Skip over this tip. Now, for all you people who are hooked on #wait, let me tell you a story. #wait kills. Okay, imagine you're in the middle of a fist fight with a some guy. Would you A) want to fight back... or B) want to get knocked unconscious so the guy can beat you up while you're out cold. Most people would choose choice A. What #WAIT does is knocks things unconscious. IF you necessarily have to delay things, use ALARM.
2. #ALARM. This is alright. I'm not a fan of using it, but if you have to delay things, do this. Basically, it's like this. Say you want to kick a puppy in three seconds after it walks in.
Pattern: A puppy walks in from the west
Value: #alarm +3 {kick puppy}
It's as simple as that. It's just like wait, minus the horribleness.
3. Variables. These things are awesome. I'm not really sure how to explain it. Let's say you're wearing a ring. The ring glows green when you're hungry. If it's not green, don't do anything. If your ring is green, what should you do? Eat. So, to code that, we simply
#if (@ring=green) {eat kitten}
Now, in the tradition of teaching coding, I'll complicate things further. If the ring is green, you're hungry. If not, you're tired (it's a cursed ring, we'll say. Shhh)
#if (@ring=green) {eat sandwich} {sleep on hammock}
As you can probably gather, If the stuff in the parenthesis is the condition. If the condition is true, it does whatever's in the first set of brackets. If it's false, it does whatever's in the second brackets.
So, looking back, if the ring is green, you'll eat a sandwich. If the ring is not green (@ring does not equal green), then you sleep on a hammock.
Variables can be quite a bit of things. They can be words, letters, numbers and lists (but I won't be covering lists in this guide). When you refer to them, though, make sure you put the @ sign before it. If you're assigning it something, you leave the @ sign off (I'll explain assigning later)
So. A variable named "cat" could equal 4, "grey" or just "G", depending on if you want to refer to how many legs has, what color he is or what his street name is.
The most common value to set a variable to is either 0 or 1. (This pretty much dates back to boolean language, true false, etc... but uh, that doesn't need to be explained) The general rule of thumb is that if a variable is equal to 0, it means whatever it is is in the "off" or "false" position, whereas 1 is in the "on" or "true" position, but you can set it equal to whatever you want, so long as you remember it.
Here's a simple example I use all the time. The line we want to set off your trigger is "You have recovered balance", so we'll call that the pattern. The value we want is for the system to acknowledge that you have balance. The value is as follows:
balance=1
Yep, it's that simple. Just put the variable name and whatever you want it to equal.
So say we want to have it do something if you have balance. Make an alias (a one word command) named "attack". The value of the alias is simply:
#if (@balance=1) {kick charlie}
* Oh. A quick note. Seriously, guys, variables for afflictions are useful. As in, when you get afflicted with seizure, go ahead and use a variable called seizure and set it equal to one. This way, you don't have to spend time diagnosing or waiting for a fit to come along for you to heal it if you were unable to the first time the fit happened.
4. #GAG. It's rather useful in certain situations. Let's say you're a smart coder and have your system set up where you try to STAND every time you have balance. Now, this can get spammy as you will see something along the lines of:
250/400h 100/160m 22xp > jab charlotte
You quickly punch Charlotte in the face.
250/400h 100/160m 22xp >
You have recovered balance.
stand
250/400h 100/160m 22xp >
You are already standing.
250/400h 100/160m 22xp >jab charlotte
You quickly punch Charlotte in the face.
250/400h 100/160m 22xp >
You have recovered balance.
stand
250/400h 100/160m 22xp >
You are already standing.
250/400h 100/160m 22xp >
and so on. To cut down on this, we simply #GAG lines, or, well, have our systems shield them from our eyes. It'll still be there, but we won't have to look at it. So, we use the pattern "You are already standing." and simply use the value:
#gag
It'll transform the above to something a bit less spammy. It might be one line, but after a while, it adds up.
There's a brother to #gag called #sub, but I haven't found a reason to use this other than for aesthetic reasons. It basically substitutes the text with whatever you put after it (in brackets). We'll ignore that one, though.
5. #math I actually forgot about this one until my mouse hovered over the "submit" button. Basically, it does what it says. It does math. it's very useful. Say you want the variable totalcats to equal the sum of your browncats and your yellowcats. Just do:
#math totalCats (@brownCats+@yellowCats)
Remember, since you're assigning the variable totalcats, it doesn't need the @ sign, but since you're referring to browncats and yellowcats, you use the @ sign. You can also do division, multiplication and subtraction. I use this in my autosipper by simply doing
#math percentHealth ((@currentHealth*100)/@maxhealth)
Okay, well, I'm tired. Good night and Good luck
Comment