The way I implemented my basic traps was to put checks upon entering the room if it was flagged with a certain ROOM_TRAP_FIRE or any of my other trap flags. I soon realized this was just not going to be good using all my room flags for traps. So currently I am implementing TRAP OBJECTS which are linked to items in rooms so players can disarm the traps themselves and not the chest... For example: You see a locked larged wooden chest. >examine chest You spot a <thin wire> attached to the chest. >disarm wire OH NO! Your skills as a thief are shameful! ....At this point call the trap procedure which has a case statement of the trap number on value 0 of object trap. My traps values are 0 - trap number used in switch statement. 1 - # of triggers for trap. Some traps can fire multiple darts before you get by them. so players have to take the hits or get someone to disarm it. 2 - Level of player to reset trap... Players can make traps which is a whole other page long essay on how traps work in my mud. :> 3 - Is it magical 0 for no 1 for yes. If magical only mages can reset it. I have about 95 skills in my mud and not all are combat oriented. Also I have my own object hit points code along with material type code which comes into play when a trap is attacked by players. If you hit the trap then it damages it,but also triggers it onto the attacker. If you'd like I can post my Trap links to mobs and players for use in things such as contingency spells for player deaths or thievery. +------------------------------------------------------------+ | 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/15/00 PST