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


Joined: 16 Mar 2001
Posts: 38
Location: USA

PostPosted: Sat Oct 02, 2004 10:12 pm   

A Simple bot for some im sure. ... but im lost what to do...
 
Hopefully someone can help me out here...
First off i play Medievia.

I want to make a bot that follows a road, stops at intersections, stops for mob warnings, and stops if attacked.

I have a mob warning script already, dont recall who wrote it but love the way it works, i added some sounds to it incase im moving to fast to see the warning...

ANYWAY, exit prompt on road looks something like this..

Exits
NORTH - A Well-Traveled Road
EAST - A Dark Forest
SOUTH - A Well-Traveled Road
WEST - A Dark Forest

If i start walking north, i just want to keep walking as long as long as there are only 2 directions (of the road) to follow.

Example, was going north and exit shows...

Exit
NORTH - A Dark Forest
EAST - A Well-Traveled Road
SOUTH - A Well-Traveled Road
WEST - A Dark Forest

I would like the bot to be smart enuff to follow the road East and not try to turn around and go South.

If i come to an intersection,

Exits
NORTH - A Well-Traveled Road
EAST - A Gravel Path
SOUTH - A Well-Traveled Road
WEST - A Gravel Path

I want the bot to stop until i select a direction.

I also would like to manualy stop the bot if i need to.

Sounds impossible to me, but im SURE someone out there knows how to do it or already has done it....

Help....

PLEASE!
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Oct 06, 2004 6:04 am   
 
I doubt that anyone would find this easy. It sounds to me like a fairly advanced bot. Unless someone has shown interest in this project through private messages, you'll probably have to continue moving your characters yourself to keep them on a road.

It doesn't sound impossible, but I think it will require a significant amount of work and skill. Good luck!
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
Reply with quote
hav
Wanderer


Joined: 05 Oct 2004
Posts: 61
Location: Riga, Latvia

PostPosted: Wed Oct 06, 2004 3:38 pm   
 
i dont think its hard, but i dont play your mud so it wont be tested, dont blame me if i typoed or forgot bracket somewhere please?
decide how you start the bot, through alias, numpad keys or maybe fancy arrow buttons.
a button starting bot northwards would do something like
#VAR roadbot NORTH;#VAR grabname 1;glance
oh yeah, use them to nudge bot in the right direction at intersections too.
anything involving bot i usually put in separate class, enabling only when it has to work, just in case some wizard decides to bot-check you by echoing messages.
#TR (^Exits$) {#IF (@roadbot!="") {#T+ roadbot;#VAR movecheck 0}} {} 7
#TR (^NORTH - (*)$) {#IF (@grabname=1) {#IF (@roadbot=NORTH) {#VAR roadname %1;#VAR grabname 0;glance}} {#IF ((@roadbot!=SOUTH) AND (@roadname=%1)) {#VAR roadbot NORTH;#ADD movecheck 1}}} {roadbot} 7
#TR (^EAST - (*)$) {#IF (@grabname=1) {#IF (@roadbot=EAST) {#VAR roadname %1;#VAR grabname 0;glance}} {#IF ((@roadbot!=WEST) AND (@roadname=%1)) {#VAR roadbot EAST;#ADD movecheck 1}}} {roadbot} 7
#TR (^SOUTH - (*)$) {#IF (@grabname=1) {#IF (@roadbot=SOUTH) {#VAR roadname %1;#VAR grabname 0;glance}} {#IF ((@roadbot!=NORTH) AND (@roadname=%1)) {#VAR roadbot SOUTH;#ADD movecheck 1}}} {roadbot} 7
#TR (^WEST - (*)$) {#IF (@grabname=1) {#IF (@roadbot=WEST) {#VAR roadname %1;#VAR grabname 0;glance}} {#IF ((@roadbot!=EAST) AND (@roadname=%1)) {#VAR roadbot WEST;#ADD movecheck 1}};#T- roadbot;#IF (@movecheck=0) {#ECHO "bot stopped, no exits found"};#IF (@movecheck=1) {@roadbot};#IF (@movecheck>1) {#ECHO "bot stopped, intersection"};#IF (@movecheck!=1) {#VAR roadbot ""}} {roadbot} 7
bot runs until it can find the road and turns off manually with #VAR roadbot ""
by my design it first does glance and grabs road name, then sends glance again and starts moving (replace glance with appropriate command for your mud, look, exits, whatever and move commands, i used uppercase full, but it might be lowercase and/or short, replace as appropriate)
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