Exemple #1
0
 def do_ridplayer(self, session, line):
     self.getrid = Select.getPlayerByName(line.lower())
     try:
         Delete.deletePlayer(self.getrid[1])
         session.push(tpl.RIDPLAYER % line.capitalize())
     except:
         session.push(tpl.RIDPLAYER_ERR % line.capitalize())
Exemple #2
0
    def do_delnpc(self, session, line):
        self.barn = Select.getNpc(line)

        if self.barn: #If the object exists
            Delete.deleteNpc(self.barn[0])
            session.push(tpl.DELNPC % line)
        else: session.push(tpl.DELNPC_ERR)
Exemple #3
0
 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)
Exemple #4
0
 def do_delroom(self, session, line):
     try:
         self.fop = Select.getRoom(line)
         Delete.deleteRoom(self.fop[0])
         Delete.deleteLink(self.fop[0])
         session.push(tpl.DELROOM % (fop,))
     except:
         session.push(tpl.DELROOM_ERR)
Exemple #5
0
 def do_dellink(self, session, line):
     if not line: session.push(tpl.DELLINK_ERR)
     self.linker = Select.getLink(line)
     
     if self.linker != []:
         Delete.deleteLinkById(self.linker[0])
         session.push(tpl.DELLINK % self.linker[0])
     else:
         session.push(tpl.DELLINK_ERR)
Exemple #6
0
 def do_dest_npc(self, session, line):
     self.rcount = Delete.deleteNpcInst(line)
     if self.rcount == 1: 
         session.push(tpl.DESTNPC % line)
     else: 
         session.push(tpl.DESTNPC_ERR % line)
Exemple #7
0
 def do_dest_obj(self, session, line):
     self.rcount = Delete.deleteObject(line)
     if self.rcount == 1: 
         session.push(tpl.DESTOBJ % line)
     else:
         session.push(tpl.DESTOBJ_ERR % line)