Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
alptraum
Newbie


Joined: 10 Feb 2003
Posts: 6
Location: Canada

PostPosted: Mon Feb 10, 2003 10:50 am   

script help wanted
 
I hope this is the proper forum to post, wasn't sure, but it is script related.

What i need my script to do is take a range of zone numbers (example 1000-100999) and do a redit, oedit, medit, tstat for each number and save it all in a logfile for me.

Maybe i can put in variables for my range like this

reditrange = 1000 - 10099
oeditrange = 1000 - 10099
meditrange = 1000 - 10099
tstatrange = 1000 - 10099

I need to do a redit 1000, then q, then pause for 2 seconds, then redit 1001, ect ect. and then when it reaches the end of 10099 for redit, it will cycle threw and start oedit 1000, q, oedit 1001, q ect ect.

can anyone help me with this...im struggling so much to try and get this working.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Feb 10, 2003 12:23 pm   
 
{#ALIAS LogEdit {#LOG {%concat("Edits ",%time("mm-dd-yy"))};#VAR CurrentEdit {redit};#VAR EditList {redit|oedit|medit|tstat};#VAR CurrentNum {999};#ALARM "EditPass" {*2} {#ADD CurrentNum 1;#IF (@CurrentNum=10100) {CurrentEdit=%item(@EditList,%ismember(@CurrentEdit,@EditList))};#IF (@CurrentEdit) {#EXEC {@CurrentEdit @CurrentNum};q} {#UNTRIG EditPass;#LOG}}}
Reply with quote
alptraum
Newbie


Joined: 10 Feb 2003
Posts: 6
Location: Canada

PostPosted: Mon Feb 10, 2003 7:20 pm   
 
Thank you so much Vijilante, now im just struggling with how to actually load it. I put it in a script.txt file and tried to load it as a script but its not working...im a bit new to all this, the new zmud is way different from the old ancient one i used to use.
Reply with quote
doomfyre
Apprentice


Joined: 03 Jan 2002
Posts: 152
Location: USA

PostPosted: Mon Feb 10, 2003 7:36 pm   
 
You should be able to just copy and paste that to the command line and hit enter, but leave off the { at the very beginning, right before #ALIAS. That is a typo i'm pretty sure.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Feb 10, 2003 11:36 pm   
 
Yeah I was a little burned out as I typed that. I just typed it straight in the forum, so there may be other typos.
Reply with quote
Zodican
Wanderer


Joined: 10 Oct 2000
Posts: 56
Location: USA

PostPosted: Tue Feb 11, 2003 12:24 am   
 
That seems a bit complicated if you ask me. ;)

You could much more easily do:

#log {%concat("Edits ",%time(""mm-dd-yy"))}
#loop 1000,10099 {redit %i;oedit %i;medit %i;tstat %i}
#log

Isn't that a bit easier?

-Zodican
Reply with quote
alptraum
Newbie


Joined: 10 Feb 2003
Posts: 6
Location: Canada

PostPosted: Tue Feb 11, 2003 3:40 am   
 
Thanks Zodican,

I was able to see your script try and do some things but it didn't actually do what it was supposed to. I need it to output redit 1000, then output a q to quit the menu, then to pause for 2 seconds, then change to redit 1001, output a q, pause for 2, and repeat all the way to 10099 or whatever level i put. Then when its done, Oedit 1000, q, pause for 2.

Your script tries to redit 1000 100099 times, but saves the same room to the log.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net