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 - unisharp

Pages: 1 2 [3] 4 5 ... 14
31
Stealth scripts / Re: [py] EggFarmer
« on: October 07, 2020, 06:26:30 AM »
Interesting it's possible that the nest disappeared after checking to see if there were any, and before it went to target it.

EDIT: There's a couple ways to handle this, we could add an if statement that checks to see if _nestsFound[0] is set  before the waittarget, or we could wrap everything in a try/except so that if it happens again the script will still continue working.

32

33
SOURCE:
Located under repo https://github.com/unisharpUO/StealthUO-Scripts
  • DancerDojo.py
  • helpers.py
  • py_stealth

DancerDojo Example:
This script will sit within given coordinates, use Honor virtue and kill Fan Dancers, alert when a player is near, use confidence when needed, use primary ability when plenty of mana is available, loot corpses for +20 splintering non-cursed non-antique weapons.  It also insures the item.

Line 14 DancerDojo.py (commented)
Code: [Select]
# entrance 79, 97, 326, 344 - bloodyroom 104, 115, 640, 660These are 2 different zone examples, the "bloody room" is like 3rd floor. 

There are 2 coordinate checks:

Line 101 DancerDojo.py
Code: [Select]
            if 79 <= GetX(_monsters[0]) <= 97 and\
                    326 <= GetY(_monsters[0]) <= 344:
This part tells the bot to only set targets to monsters within this range.  If an already set target roams without this range, the bot will continue to follow it and kill it.

Line 128 DancerDojo.py
Code: [Select]
                    if 79 <= GetX(_corpse) <= 97 and\
                            326 <= GetY(_corpse) <= 344:
Unfortunatley if something roams out of the box and dies, it's not looted.  I added this because someone was farming in a room near me and the bot would run over to him periodically and try and loot his corpses.  This ensures that only corpses looted are those within the zone.

LOOTING:
This is rather easy to change.
Code: [Select]
def LootCorpse(_corpse):
    UseObject(_corpse)
    Wait(1500)
    _lootList = NewFind([0xFFFF], [0xFFFF], [_corpse], True)
    for _loot in _lootList:
        _tooltipRec = GetTooltipRec(_loot)
        if GetParam(_tooltipRec, 1112857) >= 20 and not\
                ClilocIDExists(_tooltipRec, 1152714) and not\
                ClilocIDExists(_tooltipRec, 1049643):
            AddToSystemJournal(f'Looting Item: {_loot}')
            MoveItem(_loot, 1, LootBag, 0, 0, 0)
            InsureItem(_loot)
    return

Those ClilocID's - 1112857, 11152714, 1049643 represent splintering, antique, cursed - respectively.

You can pull codes from here: https://github.com/unisharpUO/XScript/blob/6e885f0bb4b763d599b10ed0ca71e9b3e3da8aa1/XScript/Core/Attributes/WeaponAttributes.cs and here https://github.com/unisharpUO/XScript/blob/6e885f0bb4b763d599b10ed0ca71e9b3e3da8aa1/XScript/Core/Extensions/Extensions.cs and here https://github.com/unisharpUO/XScript/blob/6e885f0bb4b763d599b10ed0ca71e9b3e3da8aa1/XScript/Core/Attributes/MagicalAttributes.cs

With this information you should be able to easily create your own loot filters.


HEALING:
The only method I added was for confidence:

Line 115 DancerDojo.py
Code: [Select]
        if GetHP(Self()) <= 90 and not Confidence:
            Cast('Confidence')

Line 28 DancerDojo.py
Code: [Select]
def OnClilocSpeech(_param1, _param2, _param3, _message):
    global Confidence
    if 'exude' in _message:
        Confidence = True
    elif 'wanes' in _message:
        Confidence = False
    return

This checks for when confidence is actually up/down and will use confidence if it's not already up (and below 90 hp)

I'll add more areas upon request.

34
Stealth scripts / [py] EggFarmer
« on: October 01, 2020, 07:46:52 AM »
Located under repo: https://github.com/unisharpUO/StealthUO-Scripts
https://github.com/unisharpUO/StealthUO-Scripts/blob/master/EggFarmer.py

About:
EggFarmer is a 100% AFKable script.  I split the nest areas into 5 different regions, each has their own rail.  Your character will walk around, and stop when it finds BOTH a snake and a nest, and then will proceed to use your charmer flute on it.  You must have Stealth (the skill.... and the program, of course.)  If you get revealed it will attempt to use egg/smoke bombs.  If you get poisoned it will attempt to use cures.  Make sure you have plenty of snake charmer flutes in your inventory and also make sure they are insured.

Items Needed:
  • Flutes
  • Cures Potions
  • Smoke/Egg Bombs

Rails:
Color chart to come...

Settings:
Near the top of the script look for:
Code: [Select]
Path = Areas[0]Rails 0 through 4 represent the 5 different rails.

Status:
The status is: working, optimizations needed to improve eggs over time.

35
Stealth scripts / Re: [C#, ScriptSDK] EggFarmer
« on: October 01, 2020, 07:36:57 AM »
It is preferable to use tuples instead lists if the arrays will not be edited.
There is no need to use global operator if your variables will not be reassigned (OnClilocSpeech function).
There is a wrong using SetFindDistance and SetFindVertical functions. They are functions.

I hope you continue to write python scripts, cause this script is a good one. If you will, there is some styling conventions PEP-8.

Thank you!  -Updated 10/01/20

More optimizations to come...

36
Stealth scripts / Re: [C#, ScriptSDK] EggFarmer
« on: September 21, 2020, 06:54:58 AM »
Progress: https://github.com/unisharpUO/StealthUO-Scripts/blob/master/EggFarmer.py

Untested, will create new thread when complete.

37
Stealth Client / Re: Can't get simple Python UOSay hello to run in game.
« on: August 31, 2020, 08:28:39 AM »
in the directory where you installed stealth, there is a sub-directory called "py_stealth" that you need to copy into each of your projects' folders, or, make sure hide.py is located in your stealth program directory including py_stealth

at the top of your hide.py file you should have:
Code: [Select]
from py_stealth import *
without any of this you won't hook into stealth with python

38
Stealth scripts / Re: [C#, ScriptSDK] EggFarmer
« on: August 31, 2020, 08:26:40 AM »
I don't mind re-writing this in python gimme like a week or two I have to find motiviation :P

39
Stealth Client / Re: Stealth UO Client Tutorial
« on: August 27, 2020, 08:03:31 AM »
You are truly a god among men. Thank you.

My only issue now is that, after connecting, when doing 'Start Client' it brings up the EC login screen and the login details are not auto populated like the CC is. I'm not sure where the login creds for the virtual server are defined at so all i have is the username 'StealthClient'.

To be honest I was never sure about this, but what I've come to the conclusion is that it doesn't matter what you put in for login/pass - I don't think it passes back to the server at all, just to stealth.  It gives an error the first time and the second attempt logs you in.

Were you successful in logging in with EC?

Also, I spoke with Vizit0r and he is interested in fixing the profile problem!  Look for future updates ;)

40
Stealth Client / Re: Stealth UO Client Tutorial
« on: August 27, 2020, 04:35:33 AM »
Before continuing I have to warn you of a bug for stealth+EC - it doesn't load/save your character profiles in-game, meaning any hotbars or customization you've done will go away next time you login.

With that being said, there's only 1 thing you need to change from the regular CC configuration:



Create a new Client, name it EC and point the path to your EC location:
ie: E:\Program Files (x86)\Electronic Arts\Ultima Online Enhanced\UOSA.exe

Then make sure you have it selected in your shards setup:


You do not need to change your MUL/OUP Filepath.

Tested, confirmed working 8/27/20

41
Stealth scripts / [py] Discord Vendor Search
« on: August 21, 2020, 10:45:12 AM »
Hi

Pretty simple idea, throw a command in Discord to initiate an in-game Vendor Search and output the results to Discord.  You could easily build a vendor search sniping bot from this code.

https://github.com/unisharpUO/VendorSearcher

Becareful with search results, I haven't added anything to limit this.  If you want to limit search results edit main.py line 42

Code: [Select]
for _result in _results:to
Code: [Select]
for _result in _results[:10]:for first 10 results



SCREENSHOT:




SETUP:
1. https://discordpy.readthedocs.io/en/latest/discord.html
2. take your token, create a .env file in the same location as vendorsearcher, add "DISCORD_TOKEN=" with your token, without the quotes to the .env file



REQUIRED PACKAGES:
1. discord.py - https://pypi.org/project/discord.py/
2. dotenv - https://pypi.org/project/python-dotenv/

42
Stealth scripts / Re: [C#, ScriptSDK, XScript] LootLogger
« on: August 13, 2020, 06:41:04 AM »
Fixed damage increase
Added elemental damage

43
Misc. Scripts / Re: TrailMyx's Chat Monitor (for Alexandria)
« on: July 27, 2020, 06:49:24 AM »
Nice work!

Just a side note, I did some work with OSI chat recently.  I noticed getting sent packets that were chat from other channels.  It would send the ID of the person talking, what chat they're talking in, but not their message.

Normally on OSI you can't see chat in other channels so I thought that was interesting.

Just wanted to throw that in here in case someone came up with blank lines in their chat and wondered what it was from (OSI).

44
Stealth Client / Re: Screenshot or video with Stealth
« on: July 16, 2020, 06:55:39 AM »
I've never tried it but I believe you can launch Razor Enhanced with Stealth.

Razor Enhanced supports python scripts and has functions taking screenshots.

45
Added original working code for example

Pages: 1 2 [3] 4 5 ... 14