Unknown2004-12-04 18:10:05
Hey everybody! I used to play Achaea, but have now forgotten how to script to do things such as: pg-put gold in pack, re-reply elemeos, just shorten things up.
I am geomancer and lucidian, want to shorten the cast blast command and whatnot.
Can anyone help me!! Please I'm desperate!!!
I am geomancer and lucidian, want to shorten the cast blast command and whatnot.
Can anyone help me!! Please I'm desperate!!!
Unknown2004-12-04 19:42:57
For something like this... im just gonna be mean for once and say:
Read The Manual.
I mean, christ.
Read The Manual.
I mean, christ.
Unknown2004-12-04 19:43:01
#ALIAS {pg} {put gold in pack}
#ALIAS {re} {reply} (reply elemoeos will reply saying elemeos...)
#ALIAS {bl} {cast blast}
Etc
#ALIAS {re} {reply} (reply elemoeos will reply saying elemeos...)
#ALIAS {bl} {cast blast}
Etc
mel2004-12-05 02:28:47
Just looking for comments mostly .. Everywhere I go I read that #wait is bad, #wait is evil.. you should never use #wait etc
Well consider this little alias:
#alias balwait {balance=0 ; #while (@balance=0) {#wait 50}}
I also have the 'You have recovered balance on all limbs.' message triggered to set the balance variable to 1
I call this alias whenever I do somthing that takes balance if i want to perform another action right after it, I also have one for eq as well.
What is does is set my balance variable to 0 and then checks for balance every 50 milliseconds. Its completely lag proof (short of timing right out *grin*) and as far as i can tell you cant do this with #alarm as the amount of time it needs to wait is variable on the amount of lag at that particular time.
(plus id hate to have my eq recover in say 4.05 seconds and have to wait 5 before moving on since #alarm only works in whole seconds)
One very good example of where i use the EQ version a lot is in my defup alias which sets up all my defences one after the other without me having to do a thing
As far as I can tell this is one of those rare good reasons to use #wait. Though If someone can come up with another lag proof alternative to this thats not insanely complex, id be interested.

Well consider this little alias:
#alias balwait {balance=0 ; #while (@balance=0) {#wait 50}}
I also have the 'You have recovered balance on all limbs.' message triggered to set the balance variable to 1
I call this alias whenever I do somthing that takes balance if i want to perform another action right after it, I also have one for eq as well.
What is does is set my balance variable to 0 and then checks for balance every 50 milliseconds. Its completely lag proof (short of timing right out *grin*) and as far as i can tell you cant do this with #alarm as the amount of time it needs to wait is variable on the amount of lag at that particular time.
(plus id hate to have my eq recover in say 4.05 seconds and have to wait 5 before moving on since #alarm only works in whole seconds)
One very good example of where i use the EQ version a lot is in my defup alias which sets up all my defences one after the other without me having to do a thing
As far as I can tell this is one of those rare good reasons to use #wait. Though If someone can come up with another lag proof alternative to this thats not insanely complex, id be interested.

Unknown2004-12-05 09:07:32
QUOTE (mel @ Dec 5 2004, 03:28 PM)
Just looking for comments mostly .. Everywhere I go I read that #wait is bad, #wait is evil.. you should never use #wait etcÂ
Well consider this little alias:
#alias balwait {balance=0 ; #while (@balance=0) {#wait 50}}
I also have the 'You have recovered balance on all limbs.' message triggered to set the balance variable to 1
I call this alias whenever I do somthing that takes balance if i want to perform another action right after it, I also have one for eq as well.
What is does is set my balance variable to 0 and then checks for balance every 50 milliseconds. Its completely lag proof (short of timing right out *grin*) and as far as i can tell you cant do this with #alarm as the amount of time it needs to wait is variable on the amount of lag at that particular time.
(plus id hate to have my eq recover in say 4.05 seconds and have to wait 5 before moving on since #alarm only works in whole seconds)
One very good example of where i use the EQ version a lot is in my defup alias which sets up all my defences one after the other without me having to do a thing
As far as I can tell this is one of those rare good reasons to use #wait. Though If someone can come up with another lag proof alternative to this thats not insanely complex, id be interested.Â

Well consider this little alias:
#alias balwait {balance=0 ; #while (@balance=0) {#wait 50}}
I also have the 'You have recovered balance on all limbs.' message triggered to set the balance variable to 1
I call this alias whenever I do somthing that takes balance if i want to perform another action right after it, I also have one for eq as well.
What is does is set my balance variable to 0 and then checks for balance every 50 milliseconds. Its completely lag proof (short of timing right out *grin*) and as far as i can tell you cant do this with #alarm as the amount of time it needs to wait is variable on the amount of lag at that particular time.
(plus id hate to have my eq recover in say 4.05 seconds and have to wait 5 before moving on since #alarm only works in whole seconds)
One very good example of where i use the EQ version a lot is in my defup alias which sets up all my defences one after the other without me having to do a thing
As far as I can tell this is one of those rare good reasons to use #wait. Though If someone can come up with another lag proof alternative to this thats not insanely complex, id be interested.Â

With #WHILEs it is hard to get around the #WAITs if you want a pause or something similar.
Unknown2004-12-05 09:24:26
QUOTE (Ajmil @ Dec 5 2004, 07:10 AM)
Hey everybody! I used to play Achaea, but have now forgotten how to script to do things such as: pg-put gold in pack, re-reply elemeos, just shorten things up.
I am geomancer and lucidian, want to shorten the cast blast command and whatnot.
Can anyone help me!! Please I'm desperate!!!
I am geomancer and lucidian, want to shorten the cast blast command and whatnot.
Can anyone help me!! Please I'm desperate!!!
The commands used which 'shortens things up' are called aliases. This is how you use them:
CODE
#ALIAS {shortened_command} {full_command}
To create this in your zMUD, you can either copy and paste the above and enter it as you usually would with anything in your command line (it will not send it to the MUD), or make it a .txt file and import it through Settings > Import > Script (ASCII), or make it yourself through zMUD. To make an alias like this through zMUD, click on the Settings button to go to the zMUD Settings (this is for all scripting). Then, click on the New button's down arrow, and go to New Alias. Now, in the Edit Alias window, enter the shortened_command in the "Name" text box, and the full_command in the "Value" box.
Taking Aliases a Little Further:
If you want an alias which you want to enter a different value in each time you do it - such as specifying a certain amount of gold to put in your pack, you use special built-in variables. A put-gold-in-pack example:
CODE
#ALIAS {pg} {put %1 gold in pack}
So in this, if you enter "PG 123", it will send "put 123 gold in pack". The %1 stands for the first word/value after the alias, in this case it is "123". This is the same for %2, %3... %99, as %2 stands for the second word/value etc. You can also you things like %-1, which stands for everything after the alias, or %-2 which stands for everything after the first word/value of the alias. These can be used in things like tells:
CODE
#ALIAS {tl} {tell %1 %-2}
which is the same as
#ALIAS {tl} {tell %-1}
which is the same as
#ALIAS {tl} {tell %-1}
So if you enter "TL Jim Bob died" it would send "tell Jim Bob died" to the MUD. But this example is pretty pointless because in IRE MUDs you can just start the tell with the player's name, such as "Jim Bob died".
I suggest reading the zMUD help files, e.g. "Introduction to Aliases".
Unknown2004-12-05 11:22:01
@Mel:
Reasons why you shouldn't use wait:
-Once initiated, you cannot stop them, which you might want to do if you use them for balance things.
-while a #WAIT is being processed, zMud will significantly slow down, to the point where your whole system is put on hold untill the #wait expires. That is because #wait is a synchroneous process aswell as because for some reason it puts zmud under quite a heavy work load.
the only advantage of #wait is that you can use it to delay code execution in a single script directly, however, as I said, it's a very bad idea to use it.
Even Zugg, the author of zMud, tells everyone not to use #wait.
As I said in a different thread, using #ALARM for pretty much any purpose you might consider using #wait will always serve you much better. The downside is that you can only time #alarms in seconds rather than milliseconds like #waits, but I'm sure you can find a way around that problem.
-david
Reasons why you shouldn't use wait:
-Once initiated, you cannot stop them, which you might want to do if you use them for balance things.
-while a #WAIT is being processed, zMud will significantly slow down, to the point where your whole system is put on hold untill the #wait expires. That is because #wait is a synchroneous process aswell as because for some reason it puts zmud under quite a heavy work load.
the only advantage of #wait is that you can use it to delay code execution in a single script directly, however, as I said, it's a very bad idea to use it.
Even Zugg, the author of zMud, tells everyone not to use #wait.
As I said in a different thread, using #ALARM for pretty much any purpose you might consider using #wait will always serve you much better. The downside is that you can only time #alarms in seconds rather than milliseconds like #waits, but I'm sure you can find a way around that problem.
-david
Unknown2004-12-05 13:47:06
Version 7.x of zMUD added better multithreading internally, allowing it to process the waits asynchronously. They'll still slow you down, however. For the case of regaining balance, I'd recommend using either a temp trigger or a multi-state trigger.
Then you can "balwait kick rat" and it'll make a temp trigger for when you regain balance. (You might want to put in a check to see if you already have balance when you call it, so it'll just execute it right away.) Don't overuse this alias, though, as it'll create lots of temp triggers. It's just an illustration.
When I wanted to do some preset series of actions, like enchanting or putting up defenses, I liked to use a multi-state trigger.
Hope that all makes sense. I'd recommend reading the article "Advanced zMUD Triggers" under Support -> zMUD Support on the zuggsoft.com site.
CODE
#ALIAS balwait {#temp {You have recovered balance on all limbs.} {%-1}}
Then you can "balwait kick rat" and it'll make a temp trigger for when you regain balance. (You might want to put in a check to see if you already have balance when you call it, so it'll just execute it right away.) Don't overuse this alias, though, as it'll create lots of temp triggers. It's just an illustration.
When I wanted to do some preset series of actions, like enchanting or putting up defenses, I liked to use a multi-state trigger.
CODE
#ALIAS blah {step one}
#TRIGGER {You start some action.} {}
#COND {You have recovered balance on all limbs.} {step two}
#COND {You have recovered balance on all limbs.} {step three}
#TRIGGER {You start some action.} {}
#COND {You have recovered balance on all limbs.} {step two}
#COND {You have recovered balance on all limbs.} {step three}
Hope that all makes sense. I'd recommend reading the article "Advanced zMUD Triggers" under Support -> zMUD Support on the zuggsoft.com site.
Unknown2004-12-05 14:38:41
Thanks for all of your help! And also thanks for being a dick Lodin, I thought this forum was for people who can communicate about questions and ideas about Lusternia.
Sorry I've never played a MUD before or am not an expert like you!
You guys helped me get started, I appreciate it.
Sorry I've never played a MUD before or am not an expert like you!
You guys helped me get started, I appreciate it.
Dumihru2004-12-05 15:57:55
Regarding balance recovery, one really flexible approach is to:
- Throw everything you want to do when you have eq/b into a queue (list).
- Trigger "You have recovered balance on all limbs." to execute as many things in the queue as it can as long as you still have eq/b.
- Trigger "You have recovered equilibrium." to the same thing.
This is great for one-time queues of actions like deffing up or put bomb in pack.
This handles repetitive actions that you want to do X times too. For example, if you want to make 50 tints, add the tint creation alias to the queue 50 times.
You can enhance this to handle repetitive actions that aren't limited by number by creating an "execute everytime I have eq/b" queue. With these, you have to make sure the actions can turn themselves off (remove self from queue) when a specific condition is reached. If they also take eq/b, then you have to deal with that too.
If you really need it, you can also add the ability to assign priorities to queue items so that they're executed first/second/etc.
Then to speed things up, put the eq/b triggers in a class. Turn it on when you add to the queue, turn it off when the queue is empty. That way, you have 2 less triggers firing normaly
- Throw everything you want to do when you have eq/b into a queue (list).
- Trigger "You have recovered balance on all limbs." to execute as many things in the queue as it can as long as you still have eq/b.
- Trigger "You have recovered equilibrium." to the same thing.
This is great for one-time queues of actions like deffing up or put bomb in pack.
This handles repetitive actions that you want to do X times too. For example, if you want to make 50 tints, add the tint creation alias to the queue 50 times.
You can enhance this to handle repetitive actions that aren't limited by number by creating an "execute everytime I have eq/b" queue. With these, you have to make sure the actions can turn themselves off (remove self from queue) when a specific condition is reached. If they also take eq/b, then you have to deal with that too.
If you really need it, you can also add the ability to assign priorities to queue items so that they're executed first/second/etc.
Then to speed things up, put the eq/b triggers in a class. Turn it on when you add to the queue, turn it off when the queue is empty. That way, you have 2 less triggers firing normaly

Unknown2004-12-06 07:28:05
First time anyones called me an expert. Must be my lucky day. I still think it'd be an awsome idea to just go through the manual anyways.
Unknown2009-07-16 22:48:37

I want to code my own system .
But I help with
Prompt
whats the script in Prompt to read current Health
how do you do that.