Beispiel #1
0
def restore_stats(im):
        current_health = getHealth(im)
        current_spirit = getSpirit(im)
        current_mana = getMana(im)
        if current_health == 0 and not enemies_exist(im):
            Cord.p_dead = True
            print "Player has died"
        elif activate_cure(current_health, current_mana):
            print "Cure Casted"
        elif use_health_pot(current_health):
            print "Health Potion used"
        elif use_mana_pot(current_mana):
            print "Using Mana Potion"
        elif use_spirit_pot(current_spirit):
            print "Using Spirit Potion"
        elif activate_regen(current_health):
            print "Regen Casted"
        elif activate_protection():
            print "Protection Casted"
        elif is_channeling_active():
            if activate_premium():
                print "premium activated"
        else:
            return False
        return True
Beispiel #2
0
def restore_stats(im):
        current_health = get_health(im)
        current_spirit = get_spirit(im)
        current_mana = get_mana(im)
        message = ""
        if current_health == 0 and not enemies_exist(im):
            time.sleep(1)
            if current_health == 0 and not enemies_exist(screenGrab()):
                Cord.p_dead = True
                message = "Player has died"
            else:
                return False
        elif use_gem(0, current_health):
            message = "Health Gem Used"
        elif activate_cure(current_health):
            message = "Cure Casted"
        elif activate_spark_life(current_health):
            message = "Spark Life Casted"
        elif use_health_pot(current_health):
            message = "Health Potion used"
        elif use_gem(1, current_mana):
            message = "Mana Gem Used"
        elif use_mana_pot(current_mana):
            message = "Mana Potion used"
        elif use_gem(2, current_spirit):
            message = "Spirit Gem Used"
        elif use_spirit_pot(current_spirit):
            message = "Spirit Potion used"
        elif activate_regen(current_health):
            message = "Regen Casted"
        elif activate_protection():
            message = "Protection Casted"
        elif is_channeling_active() and activate_premium():
            message = "premium activated"
        #elif activate_absorb():
        #    message = "absorb activated")
        elif activate_auto_cast():
            message = "auto skill activated"
        return message