示例#1
0
 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"))
示例#2
0
    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
示例#3
0
文件: Target.py 项目: sadnecc/pb
 def getMaxLife(self):
     point = PixelData.getPointByIndex(
         SysConfig.pixelIndex["targetMaxLife"])
     return point.getInt()
示例#4
0
文件: Target.py 项目: sadnecc/pb
 def getClass(self):
     data = PixelData.getPointByIndex(
         SysConfig.pixelIndex["targetClass"]).getInt()
     if data > len(SysConfig.className):
         return "未知"
     return SysConfig.className[data]
示例#5
0
文件: Target.py 项目: sadnecc/pb
 def IsTargetOfTargetPlayerAsNumber(self):
     return PixelData.getPointByIndex(
         SysConfig.pixelIndex["IsTargetOfTargetPlayerAsNumber"]).getInt()
示例#6
0
文件: Target.py 项目: sadnecc/pb
 def getCombatPoints(self):
     return PixelData.getPointByIndex(
         SysConfig.pixelIndex["combatPoints"]).getInt()
示例#7
0
 def howManyAreAttackingMe(self):
     point = PixelData.getPointByIndex(
         SysConfig.pixelIndex["howManyAreAttackingMe"])
     return point.getInt()
示例#8
0
文件: Party.py 项目: sadnecc/pb
 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)
示例#9
0
文件: Target.py 项目: sadnecc/pb
 def isSkingable(self):
     point = PixelData.getPointByIndex(SysConfig.pixelIndex["canSkin"])
     return point.getBool()
示例#10
0
 def getMaxLife(self):
     return PixelData.getPointByIndex(
         SysConfig.pixelIndex["petHealthMax"]).getInt()
示例#11
0
 def getShapeForm(self):
     return PixelData.getPointByIndex(
         SysConfig.pixelIndex["shapeForm"]).getInt()
示例#12
0
 def getMaxMana(self):
     point = PixelData.getPointByIndex(
         SysConfig.pixelIndex["playerMaxMana"])
     return point.getInt()
示例#13
0
 def getCurrentLife(self):
     point = PixelData.getPointByIndex(
         SysConfig.pixelIndex["playerCurrentLife"])
     return point.getInt()
示例#14
0
 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)
示例#15
0
 def getFacing(self):
     point = PixelData.getPointByIndex(SysConfig.pixelIndex["facing"])
     return point.getFloat(100000)
示例#16
0
文件: Target.py 项目: sadnecc/pb
 def getCurrentMana(self):
     point = PixelData.getPointByIndex(
         SysConfig.pixelIndex["targetCurrentMana"])
     return point.getInt()
示例#17
0
文件: Target.py 项目: sadnecc/pb
 def getLevel(self):
     point = PixelData.getPointByIndex(SysConfig.pixelIndex["targetLevel"])
     return point.getInt()
示例#18
0
 def getCurrentLife(self):
     return PixelData.getPointByIndex(
         SysConfig.pixelIndex["petHealthCurrent"]).getInt()
示例#19
0
文件: Party.py 项目: sadnecc/pb
 def getManaPercent(self):
     point = PixelData.getPointByIndex(self.rang["start"] + 4)
     rgb = self.get_color_RGB(point.x, point.y)
     return rgb[1]
示例#20
0
 def getMaxMana(self):
     return PixelData.getPointByIndex(
         SysConfig.pixelIndex["petPowerMax"]).getInt()
示例#21
0
 def getCurrentMana(self):
     return PixelData.getPointByIndex(
         SysConfig.pixelIndex["petPowerCurrent"]).getInt()
示例#22
0
 def getPlaytime(self):
     point = PixelData.getPointByIndex(SysConfig.pixelIndex["gameTime"])
     num = point.getInt()
     hour = num / 100
     minute = num - hour * 100
     return {"hours": hour, "minute": minute}