def restock_box_opened(client, restock_box): backpack = client.world.backpack() if backpack is None: return defer.fail('No backpack') d = OpenContainer(client, backpack).deferred d.addCallback(backpack_opened0, client, restock_box) return d
def open_backpack(self): backpack = self._client.world.backpack() if backpack is None: return defer.fail('No backpack') d = OpenContainer(self._client, backpack).deferred d.addCallback(self.get_runes, self._client.world, backpack) return d
def open_backpack(self): backpack = self._client.world.backpack() if backpack is None: return defer.fail("No backpack") d = OpenContainer(self._client, backpack).deferred d.addCallback(self.get_runes, self._client.world, backpack) return d
def run(client): backpack = client.world.backpack() if backpack is None: return defer.fail('No backpack') d = OpenContainer(client, backpack).deferred d.addCallback(print_contents, client.world, backpack) return d
def harvested(result, client): chest = find_chest_at(client.world, client.world.player.position.x - 2, client.world.player.position.y) if chest is None: return defer.fail('No chest') d = OpenContainer(client, chest).deferred d.addCallback(chest_opened0, client, chest) return d
def run(client): PrintMessages(client) restock_box = find_restock_box(client.world) if restock_box is None: return defer.fail('No box') d = OpenContainer(client, restock_box).deferred d.addCallback(restock_box_opened0, client, restock_box) return d
def run(client): PrintMessages(client) backpack = client.world.backpack() if backpack is None: return defer.fail('No backpack') d = OpenContainer(client, backpack).deferred d.addCallback(backpack_opened, client) return d
def run(client): PrintMessages(client) backpack = client.world.backpack() if backpack is None: return defer.fail("No backpack") d = OpenContainer(client, backpack).deferred d.addCallback(backpack_opened, client) return d