Author Topic: [py] LazyDay - Auto Bandage Healer, Auto Buff Casting  (Read 3953 times)

0 Members and 1 Guest are viewing this topic.

Offline daymornTopic starter

  • Jr. Member
  • **
  • Posts: 21
  • Activity:
    0%
  • Reputation Power: 1
  • daymorn has no influence.
  • Respect: +3
  • Referrals: 0
    • View Profile
[py] LazyDay - Auto Bandage Healer, Auto Buff Casting
« on: October 15, 2020, 06:33:01 AM »
0
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: [Select]
cd \Stealth_v#.#.#\Scripts
git clone https://github.com/Daymorn/LazyDay.git

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


lazyday.py - snippet
Code: [Select]
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)

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: [Select]
"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" ]
}
}
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: [Select]
"actions": {
"bandage pet": {
"reqs": [ "peace", "pet_under90%hp" ]
},
"bandage party": {
"reqs": [ "party_under98%hp" ]
}
},
...
"curse weapon": {
"mana": 7,
...
"reqs": [ "war", "rhand", "self_over50%hp" ]
}

« Last Edit: October 29, 2020, 12:51:41 PM by daymorn »

Offline daymornTopic starter

  • Jr. Member
  • **
  • Posts: 21
  • Activity:
    0%
  • Reputation Power: 1
  • daymorn has no influence.
  • Respect: +3
  • Referrals: 0
    • View Profile
Re: [py] LazyDay - Auto Bandage Healer, Auto Buff Casting
« Reply #1 on: October 15, 2020, 09:22:07 AM »
0
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.

Offline unisharp

  • Elite
  • ***
  • *
  • Posts: 196
  • Activity:
    0%
  • Reputation Power: 4
  • unisharp has no influence.
  • Gender: Male
  • Respect: +40
  • Referrals: 0
    • View Profile
Re: [py] LazyDay - Auto Bandage Healer, Auto Buff Casting
« Reply #2 on: October 15, 2020, 10:21:36 AM »
0
Great addition nice work!
 :D

Offline daymornTopic starter

  • Jr. Member
  • **
  • Posts: 21
  • Activity:
    0%
  • Reputation Power: 1
  • daymorn has no influence.
  • Respect: +3
  • Referrals: 0
    • View Profile
Re: [py] LazyDay - Auto Bandage Healer, Auto Buff Casting
« Reply #3 on: October 16, 2020, 06:57:40 PM »
0
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.

Offline daymornTopic starter

  • Jr. Member
  • **
  • Posts: 21
  • Activity:
    0%
  • Reputation Power: 1
  • daymorn has no influence.
  • Respect: +3
  • Referrals: 0
    • View Profile
Re: [py] LazyDay - Auto Bandage Healer, Auto Buff Casting
« Reply #4 on: October 26, 2020, 09:17:34 AM »
0
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*.

Tags: