[CF-Devel] new cut 1.4.0 and realestate idea

Mark Wedel mwedel at sonic.net
Tue Sep 17 23:15:40 CDT 2002


Todd Mitchell wrote:

>
     
     
     >
     
      Ya this is the biggest problem.  I could also create a temporary exit to the
     
     >
     
      new maps the same way I create a 'deed' but don't know yet if I can create
     
     >
     
      objects on maps in memory if the player is not on that map.  Also what if
     
     >
     
      someone is standing on the lot?  That is the most complicated bit.  I
     
     >
     
      suppose it would be a good idea to only put lots on less travelled maps and
     
     >
     
      perhaps create a portal to send the player to their new home (since they
     
     >
     
      could leave with no problem).
     
     
  Well, how do you 'update' the parent map?  You can't modify the original copy 
of it (or really shouldn't, as bad things are likely to happen if you do, like 
losing all the information on them.  Plus, there is no guarantee that the 
original maps are read/write).

  So the correct thing to do is update the 'unique' objects of the map.  If the 
map is currently in memory, updating it shouldn't be that big a deal.

  If the map has been swapped out, that is a little more difficult - if you know 
that the spot your are putting this lot on the map will not have any other exit 
assigned to it, you could just append the appropriate information to the unique 
object version of the map - presuming that a unique object version has been created.



>
     
     
     >
     
      When a lot is purchased (for a hefty price), three thngs happen:
     
     >
     
      1.a 'deed' is issued using the activatorname and the lot number, which
     
     >
     
      produces a unique object to check for.
     
     >
     
      2. the parent map is updated by writing an exit on the 'lot' on the map
     
     >
     
      file,
     
     >
     
      3. the template maps are read, the inventory checkers and exits are
     
     >
     
      rewritten based on the 'deed' and on the information in the 'lots' file (for
     
     >
     
      the main exit),  and a directory containing the modified copys of the maps
     
     >
     
      is placed in the player's directory.
     
     >
     
     
     >
     
      The exits to the new home are updated by rewriting the parent map (to:
     
     >
     
      /playerdir/player/housedir/), the maps are public with unique floors
     
     >
     
      (mostly) and use inventory checkers to give access to some areas (for
     
     >
     
      display cases and such).
     
     >
     
      The homes are public access by invitation, the owner would have to let
     
     >
     
      people in and many areas would be accessable only by the deed holder.
     
     
  Why put this map in the player directory?  Is the plugins smart enough to see 
that if this player quits (and hense the playerdir is removed) that the deed is 
made available again?

  When you say the map is by invitation only, how so?  If I buy a lot, can other 
people actually go to that map -even if most of it is not accessible, or if they 
tried to go to the exit where the lot is, would they get some message such that 
they can't even enter?

  Various thoughts I have:
1) Put the proper path for the exits in the parent map - just these maps don't 
exist until the deed is bought.  When the deed is bought, the script copies for 
the maps to the appropriate place that the exit points - in this way, don't need 
to do anything about updating the parent map.

2) Not sure how doable this is, but use the scripts in the exit objects/lots. 
When the object is applied, the script runs, checks its database of information 
and updates the exit, as needed, as well as call the appropriate function to 
move the player to the new map.



    
    


More information about the crossfire mailing list