Exemplo n.º 1
0
 def on_packet(self, packet):
     if isinstance(packet, p.AsciiMessage):
         if packet.type == 0 and packet.serial != 0 and packet.serial != self._client.world.player.serial and \
            packet.serial != 0xffffffff and \
            len(packet.name) > 0 and packet.text != packet.name and packet.text[0] != '[':
             self._client.send(p.TalkAscii(type=packet.type, hue=packet.hue, font=packet.font, text=packet.text))
     elif isinstance(packet, p.UnicodeMessage):
         if packet.type == 0 and packet.serial != 0 and packet.serial != self._client.world.player.serial and \
            packet.serial != 0xffffffff and \
            packet.language != 'Eng' and \
            packet.text != '(bonded)' and \
            packet.text != '(tame)' and \
            packet.text != '(summoned)' and \
            packet.text[0] != '*' and \
            len(packet.name) > 0 and packet.text != packet.name and packet.text[0] != '[':
             self._client.send(p.TalkUnicode(text=packet.text, type=0x09, hue=packet.hue, font=packet.font))
Exemplo n.º 2
0
Arquivo: items.py Projeto: shyba/gemuo
    def __init__(self, client, container):
        Engine.__init__(self, client)

        self._serial = container.serial
        self._open = False

        if container.is_bank(client.world.player):
            self._client.send(p.TalkUnicode(text='Bank!', keyword=0x02))
        else:
            if not self._client.world.is_empty(container):
                # we know its contents, it seems already open
                self._success()
                return

            client.send(p.Use(self._serial))

        self.call_id = reactor.callLater(3, self._timeout)
Exemplo n.º 3
0
 def call_guards(self):
     log.msg("Calling guards")
     self._client.send(p.TalkUnicode(text='.', keyword=0x07))
Exemplo n.º 4
0
Arquivo: buy.py Projeto: shyba/gemuo
 def get_offer(self):
     self._client.send(p.TalkUnicode("vendor buy", 0x3c))
Exemplo n.º 5
0
 def eject_mobile(self, packet):
     self.target = Target(packet.serial, packet.x, packet.y, packet.z,
                          packet.body)
     self._client.send(p.TalkUnicode("remove thyself", 0x33))
Exemplo n.º 6
0
Arquivo: items.py Projeto: shyba/gemuo
 def __init__(self, client):
     Engine.__init__(self, client)
     self._client.send(p.TalkUnicode(text='Bank!', keyword=0x02))
     self.call_id = reactor.callLater(2, self._timeout)