[CODE] exploding monkeys snippit bug

From: Mark A. Heilpern (heilpern@MINDSPRING.COM)
Date: 10/30/97


I decided to play with the "exploding monkey" specproc thats on the
snippets page (I'm making a thief that will pick at random any player
in the mud, and steal an item from them. The message given to the player
indicates that they suddonly realize an item is missing from their pack.)

I've found a bug in that function, in the case (1) of removing an item the
player has equipped. The bug is in the line of code "to_take = number(0, 25);"
which randomly picks a wear-position number for removal. The problem is this
only works if your mud has 25 (perhaps 24 - i havent checked out the number()
function) wearable positions. Change 25 to NUM_WEARS-1 and all will be better.


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST