On Fri, 22 Mar 1996, Orasis wrote: > I am sure that some of you already know this, but as I was using my mud > while invisible, I saw one of the players pick up a cursed item.....then > he proceeded to buy a bag, and put the cursed item in the bag and junk > the bag along with the cursed item........Is there a fix for this cheesy > method of getting around cursed items?? My solution was to check if an item being put into a bag was cursed and if so, I just cursed the bag and when a cursed item was removed I checked that no more items inside the bag were cursed and if none were, I removed the curse from the bag. The problem I had was with containers that were already cursed. I solved it by using a value as a FALSE/TRUE for curse on creation, and if it was set then the bag would not get curse removed from it. Pretty easy to code, really. Just add an <if> statement to check if the object being put in the bag is cursed and if it is, set the bag to cursed to do_put (or was it something like perform_put?). Then when something is removed from a bag loop through it's contents and check that nothing else in it is cursed and if not, remove the curse from the bag when the cursed object is taken out. It worked for me with no problems (well, I haven't actually fiddled with it, so that's a lie, the game compiled without any problems resulting from the changes)...
This archive was generated by hypermail 2b30 : 12/07/00 PST