|
rwfrk Wanderer
Joined: 26 Feb 2002 Posts: 81 Location: USA
|
Posted: Wed Oct 30, 2002 2:45 pm
Visiting Every Room in a Zone |
---Well..on the mud I play on occassionally the imms through out about 300+ Items randomly about the mud...and we have to collect as many as we can in the time limit.---What I want is..given a Short Description and a corresponding get command--- a script that will walk through every room in the zone-As Defined by the Mapper.(Forget about Death Traps for now..this mud doesnt have any) and issue said get command when it finds them (Appearently this calls for a suitable wait in moving too ;)..Having it issue the command in every room would be a 2nd option if the above is not accomplishable
Thanks for all the Help you guys have given to me in the past...
Thanks In advance for your help with this problem.
--
Zmud 6.16
Win 95b
40mb Ram
-- |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Oct 30, 2002 11:31 pm |
I had to do something similar when I made changes in how some map info was captured.
The first step is to build a list of the rooms, room numbers work best for this.
The next step is to have a trigger that will fire in each room, that trigger removes a room from the list, allows suitable time to pick up anything if it is the first visit to the room and then issues the next movement.
This will literally override the mapper's speedwalk, so walk paths will have to be built and executed by the above trigger.
All things condisered it would be better to create a predefined search path for each zone that would reduce the amount of backtracking you do. |
|
|
|
rwfrk Wanderer
Joined: 26 Feb 2002 Posts: 81 Location: USA
|
Posted: Wed Oct 30, 2002 11:35 pm |
Well...heres the thing..I dont want the noticeable fact of -Get (thing)- being sent in every room i walk through....*suggestions*
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Thu Oct 31, 2002 12:17 am |
quote:
Well...heres the thing..I dont want the noticeable fact of -Get (thing)- being sent in every room i walk through....*suggestions*
Can you easily identify the item? If you can, just build a trigger on that line to issue the GET command:
#trigger {A ({@Items.toGet}) is here.} {get %1}
Then all you have to do is worry about handling the walking.
li'l shmoe of Dragon's Gate MUD |
|
|
|
rwfrk Wanderer
Joined: 26 Feb 2002 Posts: 81 Location: USA
|
Posted: Thu Oct 31, 2002 12:20 am |
Ok..that part was easy..and i allready had something kida like that...the problem was when walking arround..it got out of sync..(Ie by the time it tried to get item i was already afew rooms down...I hear #wait has lots of problems so I'm trying to avoid using direction;#wait <time>;.etc..
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Thu Oct 31, 2002 4:08 am |
quote:
Ok..that part was easy..and i allready had something kida like that...the problem was when walking arround..it got out of sync..(Ie by the time it tried to get item i was already afew rooms down...I hear #wait has lots of problems so I'm trying to avoid using direction;#wait <time>;.etc..
Look into using #ALARMs or else using cascading triggers. Cascading triggers are triggers which create text (#SAY, #ECHO, etc) or send commands to the MUD to create output that another trigger will match; this other trigger will then create text or send commands to the MUD which generate text that the first trigger will match and the process will start over. Your triggers will keep doing this until some kind of exit condition is met (so make darn sure you have one or you could end up spamming yourself off the MUD).
What's your trigger to id the items? If it's not something that picks apart your room description via complicated or intensive code to grab the items then it should be easy to implement the cascading triggers. All you'd need are the three triggers and a state variable for each to manipulate or monitor.
#trigger {item-matching pattern} {#noop pause the walker, we might have an item to get;Walkstate = 0;verification code here}
#trigger {item-grabbing pattern} {Walkstate = 1;direction command code here}
#alarm *5 {#if (@Walkstate) {direction command code here} {#noop}}
li'l shmoe of Dragon's Gate MUD |
|
|
|
|
|