|
Sylvanoes Beginner
Joined: 30 Jan 2003 Posts: 22 Location: USA
|
Posted: Thu Jan 30, 2003 6:20 am
Script Help |
I don't know a lot about scripting and I was wondering if someone could give me a hand with a script that I have in mind.
Basically what I am thinking is that the script would accept a number and then when it was done with the command would re-execute the same command but the number would advance.
Let me be a little more specific.
Currentlty I have an aliase called Hax, and this is what it is, its very simple.
#var current hax
#var number %1
hack '@number'
so, I type hax 00001 and it will respond with Hack 00001. When the routine is done it normally responds with "Damn! You cant find that account! Maybe its not there..."
which activates a trigger that loops the original command. What I was wanting was for it to instead use the original number, add 1 to the original number and continue on. Basically a counter.
Anyone have any ideas?
This is for a SWR MUD if it helps any.
Thanks |
|
|
|
Evangelist Adept
Joined: 10 Oct 2000 Posts: 224 Location: USA
|
Posted: Thu Jan 30, 2003 6:34 am |
#ALIAS HAX {Hax '@number';#MATH number {@number+1}}
Not sure if it is the correct brackets, but basically it does Hax number, then it adds 1 to that number. Type Hax again and it will do the next one.
You could also check to see if the number is equal to 99999 (or whatever number), and if it isnt, use the hax alias and add 1 to the number, then check again....
But it's midnight, maybe someone will see this post and write a better solution :)
Hope I was of some help.
Evangelist/Pernius
telnet://phidar.com:9000 |
|
|
|
Sylvanoes Beginner
Joined: 30 Jan 2003 Posts: 22 Location: USA
|
Posted: Thu Jan 30, 2003 7:11 am |
It works!! IT WORKS!!!
so this is basically what it looks like..
#var number %1
hack '@number'
#MATH number {@number+1}
but I have it set up to an infinate loop so that if I am interupted by having to eat or something else that is automated, it goes back to where it was.
THANKS!! |
|
|
|
|
|