def onBorn(self, who, npcObj, **kwargs): customTask.onBorn(self, who, npcObj, **kwargs) doublePoint = who.doublePoint if 0 < doublePoint: return fdp = who.getFrozenDoublePoint() if not fdp: return dp = min(fdp, 80 - doublePoint, 40) who.addDoublePoint(dp, "领取高倍点数", False) who.addFrozenDoublePoint(-dp, "领取高倍点数") activity.center.centerChange(who, "doublePoint", "frozenDoublePoint")
def onBorn(self, who, npcObj, **kwargs): #override ''' ''' customTask.onBorn(self, who, npcObj, **kwargs) #定时 datePart = getDatePart() lEndTime = [] lEndTime.append(datePart["year"]) #年 lEndTime.append(datePart["month"]) #月 lEndTime.append(datePart["day"] + 1) #日 lEndTime.append(0) #时 lEndTime.append(0) #分 lEndTime.append(0) #秒 iEndTime = getSecond(*lEndTime) leftTime = iEndTime - getSecond() self.setTime(leftTime) # 计时任务
def onBorn(self, who, npcObj, **kwargs): customTask.onBorn(self, who, npcObj, **kwargs) dayRing = who.day.fetch("schoolRing") if dayRing > 0: who.taskCtn.set("schoolRing", dayRing % 10)
def onBorn(self, who, npcObj, **kwargs): '''出生时初始化,只在给予任务时执行一次 ''' holidayId = holidayData.getCurrentHoliday() self.set("holidayId", holidayId) customTask.onBorn(self, who, npcObj, **kwargs)
def onBorn(self, who, npcObj, **kwargs): customTask.onBorn(self, who, npcObj, **kwargs) self.autoGoAhead(who)
def onBorn(self, who, npcObj, **kwargs): customTask.onBorn(self, who, npcObj, **kwargs) self.set("needCnt", self.calNeedMonsterCnt(who.level)) self.set("dayNo", getDayNo())
def onBorn(self, who, npcObj, **kwargs): if kwargs.get("npcIdx"): self.set("npcIdx", kwargs["npcIdx"]) customTask.onBorn(self, who, npcObj, **kwargs)