Example #1
0
 def handle_say(self, world, input):
   """ Talk to your fellow mudders!"""
   if " " in input:
     text = input.split(" ", 1)[1]
     self.write(toolsutils.wrap_text("You say: %s" % text, 72, 5, 0) + "\n")
     world.spamroom(toolsutils.wrap_text("%s says: %s" % (self._name, text), 72, 5, 0) + "\n")
   else:
     self.write("say what?\n")
Example #2
0
 def handle_say(self, world, input):
   """ Talk to your fellow mudders!"""
   if " " in input:
     text = input.split(" ", 1)[1]
     self.write(toolsutils.wrap_text("You say: %s" % text, 72, 5, 0) + "\n")
     world.spamroom(toolsutils.wrap_text("%s says: %s" % (self._name, text), 72, 5, 0) + "\n")
   else:
     self.write("say what?\n")
Example #3
0
 def handle_lyntin(self, world, text):
   """ Returns a paragraph, which coincidentally, is a description of Lyntin."""
   output = ("Lyntin is a mud client that is written in Python and uses " +
            "Python as a scripting language. It strives to be functionally " +
            "similar to TinTin++ while enhancing that functionality with " +
            "the ability to call Python functions directly from the input " +
            "line. It has the advantage of being platform-independent and " +
            "has multiple interfaces as well--I use Lyntin at home with " +
            "the Tk interface as well as over telnet using the text " +
            "interface.\n")
   output = toolsutils.wrap_text(output, 70, 0, 0)
   self.write(output)
Example #4
0
 def handle_lyntin(self, world, text):
   """ Returns a paragraph, which coincidentally, is a description of Lyntin."""
   output = ("Lyntin is a mud client that is written in Python and uses " +
            "Python as a scripting language. It strives to be functionally " +
            "similar to TinTin++ while enhancing that functionality with " +
            "the ability to call Python functions directly from the input " +
            "line. It has the advantage of being platform-independent and " +
            "has multiple interfaces as well--I use Lyntin at home with " +
            "the Tk interface as well as over telnet using the text " +
            "interface.\n")
   output = toolsutils.wrap_text(output, 70, 0, 0)
   self.write(output)
Example #5
0
  def __init__(self, options):
    self._event_queue = Queue.Queue(0)
    self._worker = None
    self._options = options
    self._ms = None

    temp = ("Welcome to Neil's Pub--a small tavern of unusual candor.  " +
            "In many ways, this is a dream come true for Neil and it shows " +
            "in the care he gives to the place.  The tavern is both " +
            "infinitely large and terribly small.  There are no exits.  " +
            "Only a long bar and a series of barstools for folks to show " +
            "up, take a load off, and socialize.")

    self._desc = wrap_text(temp, 70, 0, 0)
    self._npcs = []

    self._npcs.append(Neil(self))