def do_delitem(self, session, line): self.barn = Select.getItemNameId(line) try: Delete.deleteItem(self.barn[0]) session.push(tpl.DELITEM % self.barn[1]) except: session.push(tpl.DELITEM_ERR)
def do_clone(self, session, line): self.obj = Select.getItemNameId(line.lower()) self.npc = Select.getNpc(line.lower()) if self.obj: Insert.cloneItem(self.obj[0], session.p_id, time.time()) session.push(tpl.CLONE % str(self.obj[1])) elif self.npc: Insert.cloneItem(self.obj[0], session.p_id, time.time()) session.push(tpl.CLONE % str(self.npc[1])) else: session.push(tpl.CLONE_ERR)