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
Foam
Novice


Joined: 08 Nov 2000
Posts: 44
Location: Australia

PostPosted: Wed Jul 17, 2002 12:20 pm   

Mapping Bot
 


The new zmud mapper is looking great, and zmapper too. Thing is,
there are some areas that would potentially lend themselves to
being mapped by a bot before adding details in zmapper. Below
is two example rooms, and below them is a example of what u see
when u type where, which is the comand that shows u what area u
are in. I'm wondering has anybody made a mapping bot b4, or have
a general idea about how to make one please? That the mapper
recognises links it hasnt explored yet suggests possibilities
to me, but i dont think i could write a bot to do it from
scratch, expecially as i havent gotten seriously into mapping b4,
but now ive bought zmapper im looking to give it a shot :)

*tnx for your time*


The Main Gate
As you reach the top of the hill, you come upon a large, three-story manor.
Past the gate, you can see a nice, well-maintained yard, with trees and
flowers. The house is red brick with white trim, and two candle lamps are
on either side of the door. You could turn around and go back the way you
came, or enter the yard through the gate. As you look to your right, you
see a small bronze plaque embedded in a rock.
Exits: [north] down

A Gentle Hill
Your progress becomes a little difficult as the ground slopes up into a hill.
To the east and west, all you can see is forest, and at the top of the hill
you think you can make out a gate and a large fence. You can continue on
and explore what lies ahead, or return south toward the pond.
Exits: south up

Players near you in Tullfuhrzky Manor:
| Exampleplayername | A Gentle Hill
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Wed Jul 17, 2002 3:45 pm   
 
One thing your bot will never be able to do is recognize when its about to enter a trap or a deathtrap or wander into a area with aggressive mobs thrice your level. Exploring with a bot is just not a good idea.

Troubadour
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Wed Jul 17, 2002 10:01 pm   
 
What Troubadour said is correct, however if that doesn't deter you there scripts in the finished scripts area that attempt to do this. I think one of them even has a flee feature.

But be forewarned... this VERY risky

Asati di tempari!
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Thu Jul 18, 2002 12:01 am   
 
Were I to write my own, I would start with a timing block. This is key as it is very hard to tell when zMud's automapped has finished creating a room (it is supposed to be when it detects a prompt).

#CLASS {MapBot|TimingBlock} {disable}
#ALARM {*1} {#IF (@CurrentRoom!=%roomnum) {CurrentRoom=%roomnum;we have moved}}
#CLASS 0

Now the rest of that where I put "we have moved" would have to be changed to call some alias that decides where to move next. We will also want an alias to start the whole thing.

#CLASS {MapBot}
#VAR CurrentRoom {}
#VAR CurrentOpenLinks {}
#VAR BotTemp1 {}
#VAR ValidDirs {n|e|w|s|u|d}
#VAR CurrentDest {}
#VAR CurrentRoute {}
#ALIAS StartMapBot {CurrentRoom=0;CurrentDest=0;CurrentOpenLinks="";#LOOP 1,%numrooms {BotTemp1=%mapvnum(%i);#FORALL @ValidDirs {#IF (%roomlink(@BotTemp1,%i)=-2) {#ADDITEM CurrentOpenLinks @BotTemp1}}};#T+ TimingBlock}
#ALIAS DoMovement {#IF (@CurrentDest=0} {develop new dest and route} {#IF (@CurrentRoom=@CurrentDest) {we got there maintenance openlinks as needed, step to an openlink if possible, before stepping remove room from open list if no open left.}}}

Now you would have to fill in all that stuff, you would also want to decide either to find the closest room with an open link or just do them sequentially. Since the StartMapBot would populate the list with all of them for the whole zone you might not have to worry about the bot wandering off to the other side of the mud, but it would be good to set a few rooms as do not enter, or oneway temporarily so the mapper can't find the route out with %walk. Then you need merely to detect that and remove the room from the list so it doesn't get checked again.

Truly it is more hassle then it is worth, but would be fun to write if you enjoy that kind of effort.
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