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