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
Zander2001
Beginner


Joined: 13 Nov 2001
Posts: 10
Location: USA

PostPosted: Tue Dec 11, 2001 12:02 am   

Quick question for scripts
 
I am making a script for my mud to walk through an area in my mud and I had a few questions.
First with the script activated can I still have it use my triggers I have already set up to kill things automatically.
Second how do I make the script loop when I get make to the beginning of the area?

Live each day like it's your last!
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Tue Dec 11, 2001 2:30 am   
 
to your first question, yes. all your triggers should fire normally while the script is executing.

for the second thing, i recommend enclosing everything you want to repeat in a while loop, like so:

#while (@step < 25) {
..all the stuff you want to do
}

the blue part can be any condition you would like :)
emit
Reply with quote
Zander2001
Beginner


Joined: 13 Nov 2001
Posts: 10
Location: USA

PostPosted: Tue Dec 11, 2001 6:16 am   
 
for the read command
where does the txt file have to be for it to be read..I tried putting it in the zmud and the mud folders and when I type in #read filename.txt nothing happens(script is not read)
can someone help

Live each day like it's your last!
Reply with quote
Acaila
Apprentice


Joined: 30 Aug 2001
Posts: 187
Location: Netherlands

PostPosted: Tue Dec 11, 2001 10:43 am   
 
I don't know a lot about using external files, but I think you need to give a number to the file you want to open, like #READ 1 File.txt. Then later on you call that number to specify the file in whatever function you want to use it.

Acaila
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Dec 12, 2001 1:42 am   
 
quote:

for the read command
where does the txt file have to be for it to be read..I tried putting it in the zmud and the mud folders and when I type in #read filename.txt nothing happens(script is not read)
can someone help

Live each day like it's your last!



You need to open the file first with the #FILE command.

The help file will tell you for sure, but I believe #FILE 1 through #FILE 5 are used for text files while #FILE 6 through #FILE 10 are used for databases.

li'l shmoe of Dragon's Gate MUD
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