Qwaydoe Newbie
Joined: 17 Apr 2003 Posts: 1
|
Posted: 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.
|
|