In a message dated 2/10/99 12:37:25 PM Eastern Standard Time,
magik@thegrid.net writes:
> The search_block() function is handy for this. It's mostly why the
> constants in contants.c are set up with a '\n' at the end.
>
> int door;
>
> if ((door = search_block(arg, dirs, FALSE)) == -1) {
> send_to_char("That's not a direction.\r\n", ch);
> return;
> }
>
> do_simple_move(ch, door, TRUE);
>
>
> Where arg is the argument after "retreat". 'door' will now have a value of
> the direction that the player should retreat. You should perform other
> checks such as CAN_GO. Take a look at do_flee for other things.
>
> Rick
>
I just wanted thank the guys who helped me out with the retreat skill, I was
able to come up with a complete function thanks to you folks and it works
great. I appreciate it.
Turgantarganath
PS If anyone happens to be interested in the code I'd be glad to mail it to
em.
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST