def someBodyWihsperMe(palyerName): whisper = PixelData.getPointByIndex( SysConfig.pixelIndex["sombody_whisper_me"]).getInt() if whisper > Player.whisper: Player.whisper = whisper from lib.tools.mail import sendmail from lib.base.Base import Base from run.config.UserConfig import UserConfig sendmail(UserConfig.email, palyerName + "some one whisper to me ", "", Base.screenshot("sombody_whisper_me"))
def getSatus(self): castableBinary = PixelData.getPointByIndex(SysConfig.pixelIndex["spellCastable"]).getInt() equippedBinary = PixelData.getPointByIndex(SysConfig.pixelIndex["spellEquipped"]).getInt() notEnoughManaBinary = PixelData.getPointByIndex(SysConfig.pixelIndex["spellNotEnoughMana"]).getInt() inrangeBinary = PixelData.getPointByIndex(SysConfig.pixelIndex["sellInRange"]).getInt() spells = [] i = 23 # 13-24 和左下动作条61-72一共24个技能 while i >= 0: tmp = {} if castableBinary - math.pow(2, i) >= 0: tmp['castable'] = True castableBinary = castableBinary - math.pow(2, i) else: tmp['castable'] = False if equippedBinary - math.pow(2, i) >= 0: tmp['equipped'] = True equippedBinary = equippedBinary - math.pow(2, i) else: tmp['equipped'] = False if notEnoughManaBinary - math.pow(2, i) >= 0: tmp['notEnoughMana'] = True notEnoughManaBinary = notEnoughManaBinary - math.pow(2, i) else: tmp['notEnoughMana'] = False if inrangeBinary - math.pow(2, i) >= 0: tmp['inRange'] = True inrangeBinary = inrangeBinary - math.pow(2, i) else: tmp['inRange'] = False spells.append(tmp) i = i - 1 spells = spells[::-1] ret = {} k = 0 for slot in self.slots: ret[slot] = spells[k:k + 1][0] k = k + 1 return ret
def getMaxLife(self): point = PixelData.getPointByIndex( SysConfig.pixelIndex["targetMaxLife"]) return point.getInt()
def getClass(self): data = PixelData.getPointByIndex( SysConfig.pixelIndex["targetClass"]).getInt() if data > len(SysConfig.className): return "未知" return SysConfig.className[data]
def IsTargetOfTargetPlayerAsNumber(self): return PixelData.getPointByIndex( SysConfig.pixelIndex["IsTargetOfTargetPlayerAsNumber"]).getInt()
def getCombatPoints(self): return PixelData.getPointByIndex( SysConfig.pixelIndex["combatPoints"]).getInt()
def howManyAreAttackingMe(self): point = PixelData.getPointByIndex( SysConfig.pixelIndex["howManyAreAttackingMe"]) return point.getInt()
def getCropsCoordi(self): xPoint = PixelData.getPointByIndex(self.rang['start'] + 2) yPoint = PixelData.getPointByIndex(self.rang['start'] + 3) x = xPoint.getFloat(10000) y = yPoint.getFloat(10000) return CoordiPoint(x, y)
def isSkingable(self): point = PixelData.getPointByIndex(SysConfig.pixelIndex["canSkin"]) return point.getBool()
def getMaxLife(self): return PixelData.getPointByIndex( SysConfig.pixelIndex["petHealthMax"]).getInt()
def getShapeForm(self): return PixelData.getPointByIndex( SysConfig.pixelIndex["shapeForm"]).getInt()
def getMaxMana(self): point = PixelData.getPointByIndex( SysConfig.pixelIndex["playerMaxMana"]) return point.getInt()
def getCurrentLife(self): point = PixelData.getPointByIndex( SysConfig.pixelIndex["playerCurrentLife"]) return point.getInt()
def getCropsCoordi(self): xPoint = PixelData.getPointByIndex(SysConfig.pixelIndex["xCorpse"]) yPoint = PixelData.getPointByIndex(SysConfig.pixelIndex["yCorpse"]) x = xPoint.getFloat(10000) y = yPoint.getFloat(10000) return CoordiPoint(x, y)
def getFacing(self): point = PixelData.getPointByIndex(SysConfig.pixelIndex["facing"]) return point.getFloat(100000)
def getCurrentMana(self): point = PixelData.getPointByIndex( SysConfig.pixelIndex["targetCurrentMana"]) return point.getInt()
def getLevel(self): point = PixelData.getPointByIndex(SysConfig.pixelIndex["targetLevel"]) return point.getInt()
def getCurrentLife(self): return PixelData.getPointByIndex( SysConfig.pixelIndex["petHealthCurrent"]).getInt()
def getManaPercent(self): point = PixelData.getPointByIndex(self.rang["start"] + 4) rgb = self.get_color_RGB(point.x, point.y) return rgb[1]
def getMaxMana(self): return PixelData.getPointByIndex( SysConfig.pixelIndex["petPowerMax"]).getInt()
def getCurrentMana(self): return PixelData.getPointByIndex( SysConfig.pixelIndex["petPowerCurrent"]).getInt()
def getPlaytime(self): point = PixelData.getPointByIndex(SysConfig.pixelIndex["gameTime"]) num = point.getInt() hour = num / 100 minute = num - hour * 100 return {"hours": hour, "minute": minute}