|
Butter Newbie
Joined: 19 Jan 2002 Posts: 6 Location: USA
|
Posted: Sun Jan 20, 2002 7:33 am
Need an experts help to set up a small script |
OK! here we go
Seeing as how the posters on this site always come through for us newbies I am calling on you all for some help.
My mud has an area that you fight in to get items you use for multiing.
I want to make a script to do the following:
1. Automatically scan
2. Go after certain creatures since all of the ones in the area cannot be killed
3. When it scans I want it to go after the first killable creature then not trigger off any others
4. When it kills the creature it goes after I want it to start back up by scanning again,then repeating the process...
5. If no attackable creature is found I would like it to scan again till one is found
6. The key is to go after only one thing at a time so I am not trying to go in 8 different directions at once
The automapper is not useable seeing as how one the areas map changes each time you enter it
Now that you know what I would like it do let me give you some info you will prolly need:
This is what it looks like when I scan:(I am including every possible killable creature, and the different messages that relate to how far away they are from me)
Looking around you see:
ok the way it shows up is: a (Mob Name), (distance and direction)
Distances:
right here...in the same room I am in
nearby to the (direction)...1 room away in the direction
not far (direction)...2 rooms away in the direction
off in the distance(direction)...3 rooms away in the direction
EXAMPLES:
a skeleton warrior, nearby to the east.
a skeleton warrior, nearby to the west.
a skeleton warrior, nearby to the south.
a skeleton warrior, nearby to the north.
a moth giant, not far east.
a moth giant, not far west.
a moth giant, not far north.
a moth giant, not far south.
a small Tanzanian, right here
a giant beetle, nearby to the south.
a small Tanzanian, off in the distance north.
the directions only go north,south,east,west
MOB NAMES:(these are all the killable mobs)
skeleton warrior
moth giant
small Tanzanian
giant beetle
I appreciate all the help I get in advance
PS I hope you could write it out so I can just copy and paste it into the command line so it will set it all up
and if you could make it all go into a class folder named "PG Bot"
. |
|
|
|
simson Beginner
Joined: 18 Oct 2000 Posts: 29 Location: Sweden
|
Posted: Sun Jan 20, 2002 8:49 am |
I will not give you a fish to eat today, instead I will teach you how to fish so you can eat every day.
1) and 5) You want to scan when you are in the start room, maybe creating an #alarm that waits a certain amount of time before rescanning will do the job? When moving out of the start room as in hunting a creature, it is easy to turn the alarm off.
3) When you find a killable creature you want to go after it. As soon as the first possible match is found, turn of this trigger so it will not match any other. Reading about #T+, #T- and classes in the help will teach you how to do this. I would create a class containing triggers for 2) killable creatures. There would not be alot of triggers, I guess only one per creature is required. In the help file, the topic 'patterns' give you more information.
4) Before the hunt begin, it would be a good idea to store the direction and how many rooms you walked, or even better, how to walk back from the room with creatures to the start room.
You made a 1-6 list of what to do. Using this list step by step actually makes it easy to create a script just like this one.
1 and 5 are the same. |
|
|
|
Butter Newbie
Joined: 19 Jan 2002 Posts: 6 Location: USA
|
Posted: Sun Jan 20, 2002 8:53 am |
I know how to do trigs,and classes, and things of the nature I need to know to do the script...I just would like someone who knows exactly how to set it up so it all works the way I wanted
easier to have it done right the first time instead of me doing it myself and asking 15 times why this or that does not work |
|
|
|
Butter Newbie
Joined: 19 Jan 2002 Posts: 6 Location: USA
|
Posted: Sun Jan 20, 2002 9:53 am |
Ok I went ahead(got off me lazy bum) and I set up the kill trigs I need and a bunch of other stuff
I made it so it scans, then goes after the first thing it sees that is killable
when it kills it I made it so it scans again now is where I run into a problem
if nothing is seen in the scan how do I make it move in a random direction(north,south,east,west) and then scan again? |
|
|
|
Darker GURU
Joined: 24 Sep 2000 Posts: 1237 Location: USA
|
Posted: Sun Jan 20, 2002 4:47 pm |
You could add a trigger to the class that checks the scan output that searches for a blank line (^$). If that's ever triggered, the %rand function could pick a directon command from a list. Naturally, that trigger should also turn off the class, execute the direction, and then the 'scan' command again.
zMUD 6 Online Help: All the power you'll ever need. |
|
|
|
|
|
|
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
|
|