Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - daymorn

Pages: [1] 2
1
"It's just going to be harder with armor/weapons because there are more types." <== This sums up the whole problem. You start doing it for one type, then you start doing it for everything. You are right though, since the more complex the script gets, the more likely you will need a giant list of all the type IDs.

2
I remember jewelry pissing me off because I didn't want to make a list of every type ID, and I never could find a pattern in the name parameter that easily covered every ring & bracelet due to the magic prefix & suffix crap.

If you check parameters, like Unisharp is doing
Code: [Select]
if GetParam(_tooltipRec, 1112857) >= 20 and not\, but use it for both accepting and filtering properties you can end up selecting jewelry by making sure it doesn't have the strength requirement parameter. No jewelry will ever have that parameter.

So you can end up making loot lists like this.
Code: [Select]
"ssi jewelry": {                                                                                                       
    "props": {
        "ssi 10": {"1060486": ["10"]},
        "stam 8": {"1060484": ["8"]}
    }, 
    "filters": {
        "antique": {"1152714": []},
        "cursed": {"1049643": []},
        "strength req": {"1061170": []}
    }                                                                                                 
},                                                                                                },

3
Stealth scripts / Re: [py] weapons, jewelry, armor libraries
« on: October 26, 2020, 12:41:04 PM »
This is going to come in handy. Thanks for all the work.

4
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*.

5
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.

6
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.

7
Stealth scripts / [py] LazyDay - Auto Bandage Healer, Auto Buff Casting
« on: October 15, 2020, 06:33:01 AM »
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" ]
}


8
Stealth scripts / Re: [py] EggFarmer
« on: October 07, 2020, 08:21:01 AM »
I forked your repo and tweaked it just enough to get it to work. I've ran the following for at least a couple of hours. i've seen it successfully use smoke bombs twice, and have obtained about 30 eggs.

https://github.com/Daymorn/StealthUO-Scripts/blob/master/EggFarmer.py

Biggest change I made was that I put the egg searching section into a function, and then added EggSearch() inside of MoveNextSpot() in order to be more aggressive on picking the eggs up. I had several times where the character would leave the area with an egg on the ground.

There have been a few times where the script seems to stall out after a 'Trying to persuede snakes..." section, but it could honestly be from me switching off focus from my windows VM causing it. I've never encountered the problem while actively watching it so far.

Fantastic work and thank you again!

9
Stealth scripts / Re: [py] EggFarmer
« on: October 06, 2020, 12:19:27 PM »
I got past the first problem. EggFarmer.py was passing lists as nested lists:
Bombs = NewFind([BombTypes], [0xFFFF], [Backpack()], True)
vs
Bombs = NewFind(BombTypes, [0xFFFF], [Backpack()], True)

Next problem seems to happen when no more nests. I just ran out of time to debug, but will try again later.
Code: [Select]
15:10:45:024 [daymorn-2d]: Traceback (most recent call last):
15:10:45:026 [daymorn-2d]:   File "C:\Python34\lib\runpy.py", line 170, in _run_module_as_main
15:10:45:035 [daymorn-2d]:     "__main__", mod_spec)
15:10:45:036 [daymorn-2d]:   File "C:\Python34\lib\runpy.py", line 85, in _run_code
15:10:45:036 [daymorn-2d]:     exec(code, run_globals)
15:10:45:036 [daymorn-2d]:   File "C:\Users\****\Desktop\Stealth_v8.10.2\py_stealth\__main__.py", line 80, in <module>
15:10:45:037 [daymorn-2d]:     main()
15:10:45:037 [daymorn-2d]:   File "C:\Users\****\Desktop\Stealth_v8.10.2\py_stealth\__main__.py", line 59, in main
15:10:45:037 [daymorn-2d]:     module = __import__(os.path.splitext(filename)[0])
15:10:45:037 [daymorn-2d]:   File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
15:10:45:038 [daymorn-2d]:   File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
15:10:45:038 [daymorn-2d]:   File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
15:10:45:038 [daymorn-2d]:   File "<frozen importlib._bootstrap>", line 1129, in _exec
15:10:45:038 [daymorn-2d]:   File "C:\Users\****\Desktop\Stealth_v8.10.2\py_stealth\py34.py", line 33, in exec_module
15:10:45:040 [daymorn-2d]:     exec(code, module.__dict__)
15:10:45:041 [daymorn-2d]:   File "C:\Users\****\Desktop\Stealth_v8.10.2\Scripts\EggFarmer.py", line 171, in <module>
15:10:45:042 [daymorn-2d]:     WaitTargetObject(_nestsFound[0])
15:10:45:043 [daymorn-2d]: IndexError: list index out of range

10
Stealth scripts / Re: [py] EggFarmer
« on: October 06, 2020, 11:31:45 AM »
What version of python are you running? I can get the script to start, but as soon as it calls:
if FindTypesArrayEx(_types, _colors, _container, _subs):
inside of your NewFind function, then it throws an exception and infinitely loops.

11
Stealth scripts / Re: [py] EggFarmer
« on: October 05, 2020, 11:19:59 AM »
Thank you for rewriting this in python!

12
This is great. I've been hoping for a current, python based script and this has tons of different examples that could be used for different use cases in it. Thank you.

13
Stealth Client / Re: Can't get simple Python UOSay hello to run in game.
« on: September 08, 2020, 10:24:23 AM »
I was able to get it to work, but I had one other issue. I had originally found python details somewhere inside https://stealth.od.ua/Doc:Manual/Scripting/Python and it had recommended using python 3.2. Those /Doc: links are no longer active. After you pointed me to importing the py_stealth dir I saw mention of py34 inside of it. After installing 3.4 on Windows 10 I was able to get my simple script below to work.

Code: [Select]
from py_stealth import *
UOSay('Hello world');
Bow();

Thanks again.

14
Stealth scripts / Re: [C#, ScriptSDK] EggFarmer
« on: September 03, 2020, 03:44:44 PM »
This just made me really stoked to learn this again. Thank you.

15
Stealth Client / Can't get simple Python UOSay hello to run in game.
« on: August 29, 2020, 04:19:39 AM »
Hi all,

Windows 10
Stealth_v8.10.2 (program says 8.10.6)

I can't get any snippets of python code to run through Stealth. Not even one liner hello worlds.
Code: [Select]
UOSay("Hello world")
I am creating files, such as test.py, with the above content. I've tried other Python snippets, such as UseSkill('Anatomy')

I am able to execute scripts with python directly.
C:\Python32\python.exe C:\Users\####\Desktop\Stealth_v8.10.2\Scripts\test.py

In Stealth settings I have Python 3.2 selected.

I figured out a Pascal hello world script and can get that to run without issue, causing my character to speak in game.

I'm sure it's a stupid issue, but can someone please help? If I can get a simple script to run I should be able to play with it from there.

Pages: [1] 2