Scripting Resources & Utilities > Stealth scripts

[py] LazyDay - Auto Bandage Healer, Auto Buff Casting

(1/1)

daymorn:
Source: https://github.com/Daymorn/LazyDay
Python: v3.6+
Stealth Client: 8.11.2
Last Updated: 10/29/20

This script can/will:

* Auto bandage heal on self - char.bandageSelf()
* Auto cast buffs on self - char.checkBuffs('PeaceBard Tamer')
* Auto bandage heal party member - char.bandageParty()
* Auto bandage heal pets - char.bandagePets()
NOTE: A lot of credit goes to user Unisharp for both examples and functions that got me started.
http://www.scriptuo.com/index.php?action=profile;u=3879

I am trying to focus on game play assistance for actions that I think are more tedious than fun. This is a work in progress and can be extended out to cover quite a bit more. This is particularly true for the list of spells defined and the number of character templates to choose from. I will likely extend this more over time, otherwise please feel free to look up the ClilocIDs yourself and share.

Installation
Download or clone LazyDay into your StealthClient scripts folder.

--- Code: ---cd \Stealth_v#.#.#\Scripts
git clone https://github.com/Daymorn/LazyDay.git

--- End code ---

Run
edit lazyday.py to what suits your needs
load LazyDay\lazyday.py into the Stealth Client and push play.


lazyday.py - snippet

--- Code: ---if __name__ == '__main__':
    char = Character(Self())
   
    while True:       
        # Check if you need to bandage yourself.
        # Optional
        char.bandageSelf()
       
        # Uncomment if you want to auto bandage party members
        # It attempts to heal the most damaged player first, if within 1 tile.
        # Optional
        #char.bandageParty()

        # Check if you need to bandage a pet.
# Pet must be guilded/green.
# Will bandage guildmates pets as well, most damaged first.
        # Optional
        #char.bandagePets()
       
        # Check if need to cast desired buffs
        # Defined in json\dicts.json -> templates.<name>
        # Currently supports: 'Death Knight', 'Paladin', 'Mage', 'Skald'
        #   'ProvoBard Tamer', 'PeaceBard Tamer'
        # Optional
        char.checkBuffs('Death Knight')
       
        # Millisecond interval between each cycle
        # 1000ms works well for me
        # 500ms is very responsive
        Wait(1000)

--- End code ---

I've started with a small list of buffs that personally irritate me the most. This list can easily be expanded upon inside the JSON formated file,
json/dicts.json - current character templates

--- Code: ---"templates": {
"Death Knight": {
"buffs": [ "curse weapon" ]
},
"Paladin": {
"buffs": [ "consecrate weapon", "divine fury" ]
},
"Skald": {
"buffs": [ "protection", "invigorate", "inspire" ]
},
"Mage": {
"buffs": [ "bless" ]
},
"ProvoBard Tamer": {
"buffs": [ "protection", "invigorate" ]
},
"PeaceBard Tamer": {
"buffs": [ "protection", "resilience", "perseverance" ]
}
}

--- End code ---
Optionally modifying spell/action requirements.
'reqs' currently supports:

* war
* peace
* rhand
* undamaged
* self_<over|under><1-99>%hp
* party_<over|under><1-99>%hp
* pet_<over|under><1-99>%hp'


--- Code: ---"actions": {
"bandage pet": {
"reqs": [ "peace", "pet_under90%hp" ]
},
"bandage party": {
"reqs": [ "party_under98%hp" ]
}
},
...
"curse weapon": {
"mana": 7,
...
"reqs": [ "war", "rhand", "self_over50%hp" ]
}

--- End code ---

daymorn:
I verified that bandageOther() works with pets as well. i will likely add bandageParty() and bandagePets() functions so that the player/pet objectiDs don't have to be specified in the script.

unisharp:
Great addition nice work!
 :D

daymorn:
bandageParty() has been added. It auto cycles through each party member and attempts to to bandage the most damaged first, if near them. I'll work on a BandagePets() function next.

daymorn:
bandagePets() has been added. bandageOther() has been removed. I also added more requirements that must be met for a spell or action to be done.

This has been tested quite a bit so far between myself and another. The auto bandage healing functions seem to work very well. The auto buff casting depends on how you are playing your character and that's why I created some health requirements to be adjustable. For instance, on my necromancer I never want the script to try to cast curse weapon if my health is lower than 50% ("self_over50%hp"), since *bleep* is probably hitting the fan at that point.

For bandagePets(), after quite a bit of gameplay with a bard tamer, I settled on requiring:
"reqs": [ "peace", "pet_under90%hp" ]
I could see adding "undamaged" for some tamer types so that you never attempt to bandage if you are in the *bleep*.

Navigation

[0] Message Index

Go to full version