PDA

View Full Version : Walk



stormtov
11-08-2008, 10:31 PM
I remeber hearing that there was a way to make the walk script turn round if it got to a certain room. Anyone know if this is right? or able to give me some pointers on how please?

Gibreficul
11-24-2008, 05:12 AM
You might want to use checkroomdescrip command. It grabs the room description, instead of just the room name. (something like, walk unless checkroomdescrip("In this spot you have unique room description information")

You can alwo checkroomdescip =~ /regexp of unique room description in here/

As for making the walk function/script reverse directions, I'm not sure. Here's a slightly different example I've used for a hunting ground with an "out" exit.

until checknpcs(currentcritters)
if checkpaths("out")
move nw
else
walk
end
sleep 0.05
end

Gibreficul

stormtov
11-24-2008, 08:50 AM
Forgot to mention a frend pointed me to the answer to this, was in the non lich part of the scripting forums so missed it. All you need to do is:

walk "room description of boundry 1" "room description of boundry 2" "room description 95782"
(you get the idea, as many as you want)

When ever it hits a room that matches any of the descriptions you provided it will stop and go back in the other direction.