How To Keep Fish In Rivers Or Keeping Land Based Mobs On Land

This mostly came up because of mobs wandering on the continents - being able to restrict a fish to river only sectors or a mountain lion to the mountains etc

The solution for this involves using the new 'lastroom' character property along with an entry trigger. If the mob tries to enter a sector type you don't want it to be in, transfer it back to its last room.

   --- Fish mob, can only wander to another river or a lake.
   --- At the point an entry trigger fires, the mob is already in the room
   --- it is attempting to move to.

   local lastroom = self.lastroom
   if lastroom ~= nil then
      if self.room.sector ~= SECT_RIVER and self.room.sector ~= SECT_LAKE then
         rgoto(lastroom)
      end
   end

The trigger for this is:

   Current Triggers
   No   Trigger Type Program       Old Vnum Phrase/Percentage
   ==   ============ ============= ======== ==================================
   1 - Entry        test-47              0 100