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


Joined: 13 Jun 2001
Posts: 12
Location: Poland

PostPosted: Wed May 01, 2002 10:24 am   

Script based on db
 
Hi,
I tried to write script buy I found I don't really know how to do one thing :
its going to be robot-script
one db is for path:
1 n
2 n
3 ne
4 n
5 se
etc
and second is reverse of first
what i want to do is to use those db's var @place is counting # of steps,
I need something like repeat loop

place:=0
repeat
read_step(from moving db);
then function for doing whatever;
if place<34(let say 34 is last step) then
place:=place+1 else
place:=0
until place=end;

that is first thing, second is for backing, but if i can somehow manage to write moving forward i believe i can handle backing as well

the thing i dont know how to do is how i can pull value from db by its key ?
and @place determines where i have to look in db...
thnx for any suggestions

L.
Reply with quote
iljhar
GURU


Joined: 10 Oct 2000
Posts: 1116
Location: USA

PostPosted: Tue May 07, 2002 3:32 am   
 
Just out of curiousity, why do you want to use the db for this? A simple itemlist of dirs, with the use of a counting variable can produce the same affect. What are the functions that you want to do between stepping through the path?

Iljhar
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