def validDoEventScript(self, who, npcObj, key): if key in ("点击", "回复"): if not who.isSingle(): if self.parentId == task.map.TASK_MAP_PARENT_ID: self.doScript(who, npcObj, "D1003") else: self.doScript(who, npcObj, "D2006") return 0 return customTask.validDoEventScript(self, who, npcObj, key)
def validDoEventScript(self, who, npcObj, key): needLevel = getattr(self, "needLevel", 0) if who.level < needLevel: message.tips(who, "请先升到#C04{}级#n".format(needLevel)) return 0 return customTask.validDoEventScript(self, who, npcObj, key)