Re: [CODE][BUG] Exploitable bug in do_flee/do_simple_move

From: Mike Breuer (
Date: 09/11/01

----- Original Message -----
From: "Mysidia" <jmhess@I-55.COM>

> do_flee has its own handler... I don't get it; if your proc is messing
> something up then it's a bug in your proc.

Look, forget my proc for now.  do_simple_move() is supposed to return 1 if
the char actually moved, 0 otherwise.  Because do_simple_move makes a call
to an "unknown function", sometimes the char moves as a result of the call,
but not directly within the do_simple_move code.  In those cases,
do_simple_move returns 0, even though the char has changed rooms.  The
problem is that functions like do_flee rely on do_simple_move to return a 1
when the player has moved.

Since do_simple_move is making calls to spec_procs, it needs to handle the
case where the proc causes the players to change rooms.  I cannot do it
using return values without significant redesign.  Spec_procs return nonzero
if a command was handled, 0 otherwise.  This does not indicate whether the
player moved, only that the command was handled.  A case in point would be
the guild guards which conditionally disallow movement in a particular
direction.  A return value of nonzero in that case indicates that the player
did NOT move.

I appreciate the feedback, but I am not looking for help in solving the
problem.  My suggestion is to modify do_simple_move so that it returns a 1
in every case in which the char has changed rooms, and 0 otherwise.  I
believe this is correct behavior for the function, and it is do_simple_move,
not my implementation of a particular spec_proc that is at fault.

Again, the danger is that do_flee COULD miss the fact that someone has
changed locations, allowing players to escape combat without losing the
experience gained.


   | FAQ: |
   | Archives: |

This archive was generated by hypermail 2b30 : 12/06/01 PST