I am new to scripting and really only know enough to tweak scripts to make them work for me (to some degree). I was browsing and found this walking script which I thought could be useful if improved upon a little. My question is how would I go about pausing the walking to attack npcs in a room, bury, then resume the walking script again?
Thank you.
Thank you.
<triggers>
<trigger
enabled="y"
match="[Exits: *]"
send_to="12"
sequence="100"
>
<send>
-- table of inverse directions
inverse = {
north = "south",
south = "north",
east = "west",
west = "east",
up = "down",
down = "up",
ne = "sw",
sw = "ne",
se = "nw",
nw = "se",
} -- end of table of inverse directions
-- split exits into a table at the comma
exits = {}
for w in string.gmatch ("%1", "[^,]+") do
table.insert (exits, w)
end -- for
number_of_exits = table.getn (exits)
repeat
-- choose one randomly
which = (math.floor (MtRand () * number_of_exits)) + 1
direction = Trim (exits [which])
until direction ~= inverse [last_direction] or number_of_exits == 1
-- go that way
Send (direction)
-- remember it so we don't go back
last_direction = direction
</send>
</trigger>
</triggers>