Beispiel #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
Beispiel #2
0
def PrintItem():
    CVecObject.FindPlayerAttributeNumberValue_By_Key("*")
    Vec = []
    CVecObject.GetVecItemObject(Vec)
    for itm in Vec:
        Item = CItemObject(itm)
        Item.PrintToLog()
Beispiel #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
Beispiel #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
Beispiel #7
0
 def GetCurrentMapName():
     return CVecObject.FindPlayerAttributeTextValue_By_Key("map_name")
Beispiel #8
0
 def GetTotalScore():
     return CVecObject.FindPlayerAttributeNumberValue_By_Key("total_score")
Beispiel #9
0
 def GetRawType(this):
     return CVecObject.FindAttributeValue_By_Key(
         this.GetAttributeTreeHead(), "raw_type")
Beispiel #10
0
 def GetTaskType(this):
     return CVecObject.FindAttributeValue_By_Key(
         this.GetAttributeTreeHead(), "task_type")
Beispiel #11
0
 def PrintToLog(this):
     PrintLog(
         "------------Task[{0:x}, TreeHead[{1:x}]]----------------".format(
             this.GetBase(), this.GetAttributeTreeHead()))
     CVecObject.FindAttributeValue_By_Key(this.GetAttributeTreeHead(), "*")
Beispiel #12
0
 def GetItemUnique(this):
     return int(
         CVecObject.FindAttributeValue_By_Key(this.GetAttributeTreeHead(),
                                              "item_unique"))
Beispiel #13
0
 def GetPos(this):
     return int(
         CVecObject.FindAttributeValue_By_Key(this.GetAttributeTreeHead(),
                                              "pos"))
Beispiel #14
0
 def GetName(this):
     return CVecObject.FindAttributeValue_By_Key(
         this.GetAttributeTreeHead(), "name")
Beispiel #15
0
 def GetCurrentPoint():
     return [
         CVecObject.FindPlayerAttributeNumberValue_By_Key("x"),
         CVecObject.FindPlayerAttributeNumberValue_By_Key("y")
     ]
Beispiel #16
0
 def GetTaskPrompt(this):
     return CVecObject.FindAttributeValue_By_Key(
         this.GetAttributeTreeHead(), "task_prompt")
Beispiel #17
0
 def GetId():
     return CVecObject.FindPlayerAttributeNumberValue_By_Key("id")
Beispiel #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(), "*")