|
demingm Beginner
Joined: 27 May 2005 Posts: 23
|
Posted: Wed Jan 04, 2006 6:29 am
Map/Autokill Bot |
Ok, I know there is a plethora of topics on this already, and I tried making heads or tails out of them, but I'm having some difficulties. I'll will explain what I'm trying to do and hopefully someone can give me some guidence. Ok, so I have a small area that I've already mapped out using the automapper. Basically what I want is to start at the beginning of the map, and slowly walk through the map, stopping along the way to kill any mobs that might be in the particular room I am in. Here is a sample of room output:
Inside the Temple
You are inside the temple. You see paintings, shields, and armor with
different God of good on them. You see all kinds of people walking around. Some of them look your way, most of them dont even look up from their duties.
[Exits: north south ]
A follower of Kantilles is wandering around here.
A follower of Taliena is walking around here
A follower of Taliena is walking around here
In the area there are only about six to eight different mobs, and I'd like to somehow put them in a moblist so I don't need to setup a trigger for each one. So I'd kill the first one in the room, and when that is done, I'd look, and if there were other mobs in the room I'd kill them, till there are no more and then I'd move to the next room in the map. I know its probably pretty simple but I just can't get it to work.
Oh, one small feature I'd like to add if I ever get this to work. The mobs tend to move around a bit, so I'd like to continue a few cycles through my path until I know for sure everything is dead. If I make it through twice with no mobs, I want to leave the area via recall, rest up, and let the mobs repop and then restart the cycle again. I'd obviously like to automate it as much as possible, but if that requires too much work I'd go for a simple approach too.
Thanks for all of your help in advance. |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
|
|
|
demingm Beginner
Joined: 27 May 2005 Posts: 23
|
Posted: Wed Jan 04, 2006 6:20 pm A few questions |
Ok, I looked at that link, and there were some good ideas in there. I'm still a bit confused but I'll try a few things out and see what happens. I did notice that the script used paths, and I was wondering if there was a way I could directly reference a map I created instead of using paths. I saw this function called #LMAP in the helpfiles... could this be used somehow to create a loop that walks through each room in my map, does the triggers to check the room for mobs that match my mob list, kill the mobs, and then when there are no mobs left leave the area to let the mobs repop?
If that wouldn't work, I guess I could just create a path for the area, and use the #step and #pause functions. I was just hoping I could be lazy and use the map instead of making a path |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Thu Jan 05, 2006 5:07 pm |
LMAP
Syntax: #LM path command
Related: #LOOP
Loop through the given speedwalk path and execute the command for each room on the map along the path. The variable %i is set to the room number.
Note: The current room IS included in the loop.
LMAP example
#LMAP "3sn" {#SHOW %roomname(%i)}
From the current map location, move 3 squares south, then one square north. At each step, display the name of the room
The Imperial Library (G) [**> PK <**]
#LMAP "3n" {#SHOW %roomname(%i)}
...output...
The Imperial Library (G) [**> PK <**]
umm....I didn't move.
I got no use for this, but i never saw this command before and thought i'd see what it did. Didn't do much except for outputting the room names.
Thought that if it said MOVE it would actually move :-)
tried it with
#LMAP ".3n" {#SHOW %roomname(%i)}
as well and same result.
basically demingm, this aint gonna help ya :-) |
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Thu Jan 05, 2006 5:56 pm |
Well I just opened SampleMUD and then opened the map, set the current position to Vertic Avenue right at the top of the map and used the help file example. It did exactly what it said on the tin, output the names of the rooms on the speedwalk path. You want it to move you extend the help file example and use #LMAP "3sn" {#SHOW %roomname(%i);#walk %i}
|
|
_________________ Taz :) |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Fri Jan 06, 2006 1:30 am |
since the help file said that the command itself moved you, I wouldn't have thought that "extending the help file example" was needed.
|
|
|
|
ZealousAnonymous Wanderer
Joined: 06 Jan 2006 Posts: 70
|
Posted: Fri Jan 06, 2006 10:02 am |
Alrighty, heres what I do. It can be kinda slow for lots of rooms but just make sure zones aren't very big.
#if (%ismember( %1, @BashingAreas)) {
#va BashingRooms @%1Rooms
#va BashingRoomsCleared %null
#va CurrentlyBashing %1
bashing_paths_1=%null
bashing_paths_2=%null
bashing_paths_3=%null
#forall @bashingrooms {#additem bashing_paths_%len( %len( %pathfrom( , %i))) _%len( %pathfrom( , %i))_%i}
#va bashing_paths_1 %sort( @bashing_paths_1)
#va bashing_paths_2 %sort( @bashing_paths_2)
#va bashing_paths_3 %sort( @bashing_paths_3)
#if (%numitems( @bashing_paths_1)>0) {
#walk %word( %item( @bashing_paths_1, 1), 3, "_")
#va BashingRoomCurrent %item( @bashing_paths_1, 1)
} {
#if (%numitems( @bashing_paths_2)>0) {
#walk %word( %item( @bashing_paths_2, 1), 3, "_")
#va BashingRoomCurrent %item( @bashing_paths_2, 1)
} {
#walk %word( %item( @bashing_paths_3, 1), 3, "_")
#va BashingRoomCurrent %item( @bashing_paths_3, 1)
}
}
} {#echo Invalid Bashing Area}
Basically each zone has a variable like TempleRooms with all the roomnums of the rooms in it and the zone temple is in a variable called BashingAreas.
This script will run through all of the room numbers, walk to the closest one. Then when you're done with that room, delete that roomnum from bashingrooms, run the walkclosest script agan. And so on! Enjoy. |
|
|
|
|
|
|
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
|
|