Advertisement
Kovitikus

Mark System Iteration 1

Jul 23rd, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.87 KB | None | 0 0
  1. """
  2. Output when typing "mark home":  home was added to your list of marks as #2.
  3.  
  4. At location 'Limbo(#2)'.
  5.  
  6. Persistent attributes:
  7. desc = This is User #1.
  8. prelogout_location = Limbo
  9. strength = 5
  10. agility = 4
  11. magic = 2
  12. power = 10
  13. combat_score = 69
  14. mark = {' home': '#2'}
  15. """
  16.  
  17. class CmdMark(Command):
  18.     """
  19.    Mark the current location.
  20.  
  21.    Usage:
  22.        mark <custom mark name>
  23.  
  24.    Marks the player's current location, using the provided arguments.
  25.    For a list of marks, simply type 'mark' with no argument.
  26.    """
  27.     key = "mark"
  28.  
  29.     def func(self):
  30.         if not self.caller.db.mark:
  31.             self.caller.db.mark = {}
  32.         current_location = self.caller.location.dbref
  33.         self.caller.db.mark[f'{self.args}'] = current_location
  34.         self.caller.msg(f"{self.args} was added to your list of marks as {current_location}.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement