Advertisement
Kovitikus

Untitled

Jul 23rd, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.80 KB | None | 0 0
  1. class CmdMark(Command):
  2.     """
  3.    Mark the current location.
  4.  
  5.    Usage:
  6.        mark <custom mark name>
  7.  
  8.    Marks the player's current location, using the provided arguments.
  9.    For a list of marks, simply type 'mark' with no argument.
  10.    """
  11.     key = "mark"
  12.  
  13.     def func(self):
  14.         if not self.caller.db.mark:
  15.             self.caller.db.mark = {}
  16.         if not self.args:
  17.             marks = self.caller.attributes.get('mark')
  18.             print(marks)
  19.             for x in marks:
  20.                 marked = dict(x)
  21.             print(marked)
  22.             return self.caller.msg(f"List of Marks: {marked}")
  23.        
  24.         self.caller.db.mark[self.args] = self.caller.location.dbref
  25.         self.caller.msg(f"{self.args} was added to your list of marks as {self.caller.location}.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement