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
Qwaydoe
Newbie


Joined: 17 Apr 2003
Posts: 1

PostPosted: Thu Apr 17, 2003 8:01 am   

AutoBattle/Hunter - Call it what you will.
 
Okay.. I've been reading this forum for hours and have found stuff to get a general idea, but I found a small problem.

What I'm trying to do, is make a script that walks around the MUD, killing anything.

Description of a room:

The path intersection
You are standing on an intersection between 3 paths.
To the west you can follow a long, narrow path through the foothills.
To the north a wide path leads to the Village of Ofcol and an
ancient path leads towards the south.


[Exits: north east south west ]


Now this is what I'm trying to use when I look for things to kill. It's a command called "scan". This is what it looks like:

Looking around you see:
a nomad guard, right here.
a nomad child, nearby to the north.
a nomad child, nearby to the east.


This is what I have going on currently:
PATTERN: %w (*), right here.
VALUE: #IF (@atobtl != "on") {#VAR atobtl on;#VAR target {%1};@method @target}


I have a trigger for every direction... Kinda the same thing. @method is assigned already. It's like "kill" or whatever I wanna do. The reason I'm assigning @target is because I also have a chasing script.

What I want to do though, is possibly remove my 11 triggers, and make them into 1, if that's possible. the 11 triggers being for every direction. Also, I have a horse that I always have with me. Which kinda makes it a pain in the butt to do this script. It makes my "scan" command look like this:

Looking around you see:
a beautiful white charger, right here.
a nomad guard, right here.
a nomad child, nearby to the north.
a nomad child, nearby to the east.


So as you could tell, I always end up trying to attack my horse. Would it be possible to skip the horse and go right for the "nomad guard"? And just so I don't surprise anybody, I have it also walking around with:

PATTERN: ~[Exits~: (*) ~]
VALUE: #EXEC %item( %replace( "%1", " ", "|"), %random( 1, %numitems( %replace( "%1", " ", "|"))))


Breaking it down, this is what I'm trying to do.

1)Type "scan"
2)Find an enemy
3)Walk towards the enemy and attack it
4)Type "scan" once it's dead. (This part works fine)
5)Go to the next enemy and kill it
6)Type "scan". If nothing comes up, activate the auto-walker
7)Use the least amount of triggers as possible


Oh forgot to mention, an empty "scan" response would look like:

Looking around you see:
a beautiful white charger, right here.


Any help would be great. Thanks guys.
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