示例#1
0
    def GetPercentMP():
        MaxMP = CVecObject.FindPlayerAttributeNumberValue_By_Key("max_mana")
        if MaxMP == 0:
            return 0

        MP = CVecObject.FindPlayerAttributeNumberValue_By_Key("mana")
        return MP * 100 / MaxMP
示例#2
0
文件: Run.py 项目: wyexe/asktaoCheat
def PrintItem():
    CVecObject.FindPlayerAttributeNumberValue_By_Key("*")
    Vec = []
    CVecObject.GetVecItemObject(Vec)
    for itm in Vec:
        Item = CItemObject(itm)
        Item.PrintToLog()
示例#3
0
    def GetPercentHP():
        MaxHP = CVecObject.FindPlayerAttributeNumberValue_By_Key("max_life")
        if MaxHP == 0:
            return 0

        HP = CVecObject.FindPlayerAttributeNumberValue_By_Key("life")
        return HP * 100 / MaxHP
示例#4
0
    def GetPercentDurability(this):
        MaxDurability = int(
            CVecObject.FindAttributeValue_By_Key(this.GetAttributeTreeHead(),
                                                 "durability"))
        if MaxDurability == 0:
            return 0

        CurDurability = int(
            CVecObject.FindAttributeValue_By_Key(this.GetAttributeTreeHead(),
                                                 "max_durability"))
        return CurDurability * 100 / MaxDurability
def GetItemObject(ItemName):
    Vec = []
    CVecObject.GetVecItemObject(Vec)
    for itm in Vec:
        Item = CItemObject(itm)
        if Item.GetName() == ItemName:
            return Item

    return None
def GetTreasureMapTask():
    Vec = []
    CVecObject.GetVecTaskObject(Vec)
    for itm in Vec:
        Obj = CTaskObject(itm)
        if Obj.IsTreasureMapTask():
            return Obj

    return None
示例#7
0
 def GetCurrentMapName():
     return CVecObject.FindPlayerAttributeTextValue_By_Key("map_name")
示例#8
0
 def GetTotalScore():
     return CVecObject.FindPlayerAttributeNumberValue_By_Key("total_score")
示例#9
0
 def GetRawType(this):
     return CVecObject.FindAttributeValue_By_Key(
         this.GetAttributeTreeHead(), "raw_type")
示例#10
0
 def GetTaskType(this):
     return CVecObject.FindAttributeValue_By_Key(
         this.GetAttributeTreeHead(), "task_type")
示例#11
0
 def PrintToLog(this):
     PrintLog(
         "------------Task[{0:x}, TreeHead[{1:x}]]----------------".format(
             this.GetBase(), this.GetAttributeTreeHead()))
     CVecObject.FindAttributeValue_By_Key(this.GetAttributeTreeHead(), "*")
示例#12
0
 def GetItemUnique(this):
     return int(
         CVecObject.FindAttributeValue_By_Key(this.GetAttributeTreeHead(),
                                              "item_unique"))
示例#13
0
 def GetPos(this):
     return int(
         CVecObject.FindAttributeValue_By_Key(this.GetAttributeTreeHead(),
                                              "pos"))
示例#14
0
 def GetName(this):
     return CVecObject.FindAttributeValue_By_Key(
         this.GetAttributeTreeHead(), "name")
示例#15
0
 def GetCurrentPoint():
     return [
         CVecObject.FindPlayerAttributeNumberValue_By_Key("x"),
         CVecObject.FindPlayerAttributeNumberValue_By_Key("y")
     ]
示例#16
0
 def GetTaskPrompt(this):
     return CVecObject.FindAttributeValue_By_Key(
         this.GetAttributeTreeHead(), "task_prompt")
示例#17
0
 def GetId():
     return CVecObject.FindPlayerAttributeNumberValue_By_Key("id")
示例#18
0
 def PrintToLog(this):
     PrintLog(
         "------------Item[{0:x}, Obj=[{1:x}] TreeHead[{2:x}]]----------------"
         .format(this.GetBase(), ReadDWORD(this.GetBase() + 0x10),
                 this.GetAttributeTreeHead()))
     CVecObject.FindAttributeValue_By_Key(this.GetAttributeTreeHead(), "*")