|
Sivan Beginner
Joined: 06 Nov 2000 Posts: 20
|
Posted: Mon Jul 14, 2003 7:10 pm
Help with an alias |
I need to be able to check objects for proper effects on a mud where I do the area co-ordination. It takes quite some time to check all the objects vnums with a single command for each object. What I would like is an alias to start with a certain vnum and end with a certain vnum.
Basically it would start with for example, object 1 run the command to check what the object effects are then increment by one until it gets to the end vnum.
Anyone have an idea on how to do this? |
|
|
|
Carabas GURU
Joined: 28 Sep 2000 Posts: 434 Location: USA
|
Posted: Mon Jul 14, 2003 7:26 pm |
Would a simple loop do the job?
#LOOP start,end {command to check object with vnum %i}
You could use this in an alias like this:
#ALIAS checkobj {#LOOP %1,%2 {command %i}}
Usage: checkobj 1 20
command 1
command 2
command 3
...
command 20
Hope this helps. |
|
|
|
Sivan Beginner
Joined: 06 Nov 2000 Posts: 20
|
Posted: Mon Jul 14, 2003 7:57 pm |
Hm, that worked but I need to do this in blocks of 100. Is there a way to add a wait for every one done so I do not spam myself off?
|
|
|
|
Carabas GURU
Joined: 28 Sep 2000 Posts: 434 Location: USA
|
Posted: Mon Jul 14, 2003 9:01 pm |
Yes, you can use the #WAIT command.
#WAIT milliseconds
--
#ALIAS checkobj {#LOOP %1,%2 {command %i;#WAIT 1000}}
This would wait one second before reiterating the loop. |
|
|
|
Sivan Beginner
Joined: 06 Nov 2000 Posts: 20
|
Posted: Mon Jul 14, 2003 11:42 pm |
That worked like a charm.
Thanks very much.
:) |
|
|
|
|
|