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