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 ... 3 4 [5] 6 7 ... 14
61
Stealth scripts / Re: [C#, ScriptSDK] EggFarmer
« on: March 16, 2020, 04:35:12 AM »
Hello,

This is completely unrelated to EasyUO

1.  You'll need to first get familiar with the StealthUO client which can be downloaded here: http://stealth.od.ua/Site/Downloads (currently Stealth 8.10.1)
If you have trouble with this client I can come up with a short tutorial on how to set it up.

2.  Then you'll need to download and install Visual Studio 2019 Community Edition https://visualstudio.microsoft.com/downloads/

3.  After you install VS2019 and run it, the first window will ask if you want to create a new project or clone an existing one.  We'll need to compile the ScriptSDK library first and import it to the EggFarmer project.

4.  Choose to clone a project and put in this URL: https://github.com/Crome696/ScriptSDK.git

5.  After it's cloned, the right side will have 2 panels - Solution Explorer and Team Explorer - make sure you click on Solution Explorer.

6.  Double click ScriptSDK.sln - this is the solution file.

7.  Select "Build" from the top menu and click on Rebuild.  This will compile your solution and build the library file needed to import into EggFarmer.

8.  We're done with the ScriptSDK project, select "File" from the top menu and close solution.

9.  Choose to clone and put in this URL: https://github.com/unisharpUO/EggFarmer.git

10.  Again, once cloned you should have 2 tabs on the right side that say Solution Explorer and Team Explorer - click on Solution Explorer and double click EggFarmer.sln - this is the solution file.

11.  Now that you have the solution open, click the arrow next to references - we'll need to add one.

12.  Right-click on References, select Add Reference, select the Browse button on the bottom and find the ScriptSDK.dll we just built... it'll be in the folder you cloned it to and then drill down to ScriptSDK/bin/debug/ScriptSDK.dll

13.  Once the ScriptSDK reference has been added to EggFarmer, you can then build the EggFarmer application by selecting "Build" from the top menu and then select Rebuild.

14.  At this point, you can either just hit the Start button at the top with the green arrow, or open File Explorer and drill down to where we just created EggFarmer.exe - EggFarmer/bin/debug/EggFarmer.exe


62
Stealth scripts / Re: [C#, ScriptSDK] EggFarmer
« on: March 09, 2020, 04:59:22 AM »
github push 3/9/20:
- The egg finder worker thread is disabled and copied into the flute routine
- Scans for greater cures and smoke bombs are only done once at initialization
- Added 250ms delays after every scan to ensure accuracy - this should be way more than needed because it takes around 2 seconds to search and parse 50 items in a container.

It appears after moving the methods that use the FindType function to one thread has fixed the nil index errors which means that this function most likely cannot be used concurrently in multiple threads.  Stat reports to follow...

EDIT: 13 eggs in about an hour

63
Stealth scripts / Re: [C#, ScriptSDK] EggFarmer
« on: March 08, 2020, 01:47:08 PM »
After testing all day today, I've come to the conclusion that using the Scanner engine in ScriptSDK concurrently in multiple threads may result in failed searches.

I'm going to have to move blocks of code around to test this... had enough for the day.  Will get back to this tomorrow.

64
Hello, welcome back!  I can't begin to imagine what you've been through but I'm glad you made out well!

Basically Discord is the equivalent to a forum with voice chat - a platform for communication which is actually built on Google Chromium (among other frameworks)

Also, I have two scripts you may be interested in, however, if you are unfamiliar with Stealth UO client you may need some help to get up and running.
I do believe there is a decent amount of existing information on posts, but I don't mind helping in addition.

EggFarmer - http://www.scriptuo.com/index.php?topic=13165.0
Actively working on this right now.  Is it perfect?  No.  Rarely some odd occurrences happen like it'll miss an egg or not enough snakes around.  Once it comes back through the rail though it'll pick that egg up fo sho.  I'm talking this project down a bit because it's not fully optimized, but it does actually work pretty nicely at the moment.

LootLogger - http://www.scriptuo.com/index.php?topic=15645.0
I noticed you had interest in finding something that would log every item in your house.  This app does something similar and can be extended upon easily.  At the moment, it will go through every container in your house and log all your Armor, Weapons, Jewelry and Shields - but you can add more item types if you want.  There are functions to extract this data to an XML file.



65
Stealth scripts / Re: [C#, ScriptSDK] EggFarmer
« on: March 08, 2020, 03:50:05 AM »
Temporary change - pushed to github 3/8/20 7:48AM est
Under the Combat worker thread, I added a journal check for poison which will then chug a pot.

This is temporary till the Debuff system in ScriptSDK is working again.

The timers may be off, I still got a lot of testing to do but overall the program is working correctly.

EDIT: Also updating main post with new egg stats.

66
Stealth scripts / Re: [C#, ScriptSDK] EggFarmer
« on: March 08, 2020, 03:38:51 AM »
OK well we're mostly functioning over here...

EggFarmer.cs line 136 - currently commented out.
Code: [Select]
Stealth.Client.Buff_DebuffSystem += onBuff;

This line causes an exception "Error, packet parsed incorrectly!" - Unfortunately this means ScriptSDK needs to be updated, which I'm capable of doing, but not knowledgeable enough to figure out how to fix.

As of right now, there is no method to cure yourself if you're poisoned.

I spoke with Vizit0r, he may be helping me out later this evening!

67
Stealth scripts / Re: [C#, ScriptSDK] EggFarmer
« on: March 07, 2020, 12:19:46 PM »
Updated 3/7/20
- fixed packet error
- added type to bamboo flutes

Known issues:
Looks like the program was working for like 5 minutes and then randomly stopped.  Looking into issue.

EDIT: Been running 20 minutes now with 2 collected already.  I won't be able to fix this issue if I can't reproduce the error.  I believe it may have been due to lack of snakes.  When you get it running, additional snakes will be pop'd so I think that's why it's running now.

EDIT2: After an hour I got the exception again https://github.com/unisharpUO/EggFarmer/blob/master/EggFarmer/EggFarmer.cs line 241 which makes no sense because I only have 1 flute in my backpack and it hasn't been used up yet.  The type of error I got is when you reference an index in an array and it doesn't exist.  Flutes is a list of objects found in your main backpack.  Each time Flutes is referenced, a search is redone via ScriptSDK Scanner Engine to fill that list of flutes in your main backpack.  Why, after an hour, did it not find the same flute it was using in my backpack?  I have no idea yet.

Code: [Select]
private List<SnakeCharmerFlute> Flutes
{
    get { return Scanner.Find<SnakeCharmerFlute>(Self.Backpack.Serial.Value, false); }
}

Basically any time I reference Flutes[0] this should reference the first flute found in my backpack.  Again, this error happened while I only had 1 flute in my backpack and it was the same one I was using for an hour, which is why I'm kinda stuck on this.  I may change the way this is handled.

68
New member introductions / Re: Hey all! UO is back in my life.
« on: March 05, 2020, 10:20:52 AM »
Welcome back!

UO is one of those games you can pick up and put down any time and not feel like you're obligated to login.

I'm back from playing a game that promoted AFK gameplay and rewarded players for logging in after amount of timed play each day.

69
Stealth scripts / Re: [C#, ScriptSDK] Egg Farmer - updated 030520
« on: March 05, 2020, 05:38:41 AM »
Updated

70
Combot

What?
Combot is a system for handling multiple concurrent Stealth profiles capable of communicating with each other.

Why?
If you have a script that checks for information from UO and does something based on that information....  then you take that script and you multiply it by how many profiles you're running it on.  If the profiles could share information with each other, they would not all need to request information from Stealth.  This makes it more efficient by having the scripts share information with between profiles.  Combot is also capable of client cross-communication.

Examples of usage:
You have a group of profiles existing in the same space (shard, screen) and they are fighting some monster together.  If you're running the same script through Stealth for each profile to check one another's health and heal them when they need it, then all your profiles will always try and heal the same person at the same time.  If another profile was damaged, it wouldn't get a heal until all the profiles finished healing someone else.    Combot's job priority system can be used to delegate tasks, such as healing, to each profile that it's connected to.  Instead of all the profiles trying to heal the same person, the Combot hub (server) will assign each profile with a different healing job.

How?
Combot makes it so only one profile is requesting data from Stealth while the other profiles feed off that data over TCP/IP.  This system is broken down into three parts (two of which are only important) - Client, Server, Data.  First, you run the Server on the profile that you want to act as the "hub" for all other bots.  This will collect any data from Stealth that all the other bots need - such as checking player health.  That runs in something called a "Routine" which I'll talk more about later.  The Server Routine collects data and issues Jobs to the JobQueue based on that criteria.  When a new Job is added on the Server, it will notify each client that is connected - this can also be set up to only notify certain Clients based on criteria (like if it's a bandage job, don't notify clients who don't have healing.)  As the server starts notifying Clients, if a Client is not busy with another Job it will accept it and notify the Server that the Job is now assigned so that Clients aren't don't pick up the same Job.  Once the Client is finished with the Job, it notifies the Server that the Job is complete and the Server removes the Job from the JobQueue.  You can run the Client on as many Stealth profiles as you desire.

Structure:
I'm going to have to write up a lot more documentation on this, but I'm going to give you guys all the need-to-knows now.

Routines - Both the Client and the Server have Routines.

The Server Routine contains the checks to Stealth that you want to also share with the Clients.  It also assigns jobs to the JobQueue based on the checks that you have done in the Server Routine.

The Client Routine contains what you want the client to do on its own - like making sure you're staying within range of the Leader (the Server.)  You can add your own routines; right now both the Client and the Server have example routines named "Combat."  The Client also has a routine named Job - this defines how Jobs should be handled on the Client-side.  For example, the Server sends a Client a Job to bandage someone, the Client runs the JobHandler in the Job Routine to check what type of job it is and calls a method in the Routine to handle the Job.



Files:
https://github.com/unisharpUO/Combot

If you want to get this set up and running in its current state, download the entire solution and open it up in Visual Studio 2019 (free community edition can be downloaded.)

Requirements:
https://github.com/Crome696/ScriptSDK
https://github.com/unisharpUO/XScript

Server\Routine\Combat.cs
You'll see there's a GroupList - this is a list containing all the player IDs who are to be checked (for health.)  Add/Remove as many as you like and remember to change the number to whatever ID your character is.

Client\Client.cs
Line 68 - set this to your machine's local network IP.

Startup Stealth and connect with a profile that you want to act as a hub.  Compile and start the Server.  Use Stealth to connect another profile that you want to act as a client.  Compile and start the client.

This post is also a work in progress.

Added job rejection:
Jobs now have a new property - a list of clients who rejected the job. When the server receives a job rejection packet, the client is added to the Rejectors property of the Job object. The server then calls a notify. The Queue notify function has been updated, it now checks if a job has any rejectors and if so, doesn't notify them again. If all clients connected to the server reject the job, the list of rejectors is reset and the job goes back into the queue.

Clients can add jobs now too:
I have a poison check in my server routine, but I couldn't pass on having the clients add themselves when they get a buff/debuff event. So not only does the server check for poisoned characters, but clients will be adding themselves if they are poisoned.

Thread locking and Added Exception Catching for the Job Queue:
There are circumstances when the server will be notifying clients about jobs, and a job will be completed in that process. This will cause an Exception and usually cause the program to crash. We now catch the exceptions so the program can continue doing its job. I added thread locking to all the functions that deal with modifying the jobqueue in hopes that this wouldn't happen again, but it still did. So I ended up removing the locks, for now, may end up putting them back once I find a solution. The locker object still exists under the queue class, it's just not used.

Jobs moved to Server.Data:
I had to move the Job class into the data section because I wanted to serialize a job and send it through a packet and just moving the class was less work.

71
Stealth scripts / Re: [C#, ScriptSDK, XScript] LootLogger
« on: March 04, 2020, 09:11:03 AM »
<reserved for posting methods on how to parse XML data>

I'm currently using a WordPress plugin called wpDataTables to parse my XML files.  It's very easy to use and saved me a lot of time writing something to parse data myself.  You can add your table to a page using shortcode.  The table it adds is sortable and filterable making it the perfect application for what I needed.

72
Stealth scripts / [C#, ScriptSDK, XScript] LootLogger
« on: March 04, 2020, 09:09:06 AM »
*While this project might not be completely useful to everyone, there are examples in here on how to utilize ScriptSDK (with XScript extension) to quickly and easily evaluate and filter loot.

**This is not a compiled project, this is source code.  If you want to compile the project yourself you can download Visual Studio 2019 Community Edition for free and compile it along with the required references posted below.

LootLogger
This project was started in order to assist me in finding specific pieces of gear to build the perfect suit.  You can either log one container or log every container in your entire house with the click of a button.  Saving the log will save your data in an XML file which you can then use something to parse/display/sort/filter.  I'll be adding methods of parsing data in the next post below this one.

If you look at Form1.cs the are two methods called SaveFiles()  one is commented, the other isn't.  The new method that is not commented out is working but not complete as far as message postbacks.  The old commented method works and is complete.  The difference between the two functions is the way the output is formatted.  The commented way formats the XML file in a Parent->Child format, and the new uncommented method formats the XML file with element properties formatting.

What works:
Search Container, Search All Containers, Save Log, Fetch

Not working at the time of this post:
Load log - I haven't written a new loading method now that I've reformatted the XML output.
SQL connectivity - don't hit anything on the "Settings" tab as it will not work at the moment.


Requirements:
ScriptSDK - https://github.com/Crome696/ScriptSDK
XScript - https://github.com/unisharpUO/XScript

Usage:
Compile and launch, a character must be connected, in-game and in your house.  Choose to search through a container or search through all containers in your house.  Your character will path to containers out of reach.  After the worker thread is complete an autosave is called.

Missing Items:
If a container with items that don't match what's in our item bases, then it will be defined as missing.  Missing items tooltips will be posted in the message output box for debugging.



Source:
https://github.com/unisharpUO/LootLogger

73
Stealth Client / Re: [Release] ScriptSDK 0.9.3 [UPDATED 28.05.2016]
« on: March 02, 2020, 08:29:23 AM »
I just checked to see how Stealth is doing, looks like it's still working for OSI both CC and EC.  Stealth EC looks a lot smoother than it used to be.

I'm guessing ScriptSDK is outdated?

If there's interest I'm down to help I got time on my hands again.

Hey Unisharp

I think Crome is looking to pick it back up too, so i am sure some collaboration between you both would go a long way.  He last updated his Git in March and it seems to still work.

If I didn't happen to see this today I would have continued down a path of redoing all my work in python.

I completely forgot to update this other library we were working on which was using old ScriptSDK.

My major project *almost* still fully works, I am so happy right now!  Once it's fully working again I'll post it on GitHub open source.

I did get this from one of my functions, I'm going to have to dig deeper to see what is causing it and see if there is a way around it...




74
Stealth Client / Re: OSI Stealth
« on: March 01, 2020, 03:57:29 AM »


Happy to be back again  ;D

Working on converting some of my old C# projects to python.

75
Stealth Client / Re: OSI Stealth
« on: February 24, 2020, 04:58:55 AM »
Confirmed still working for CC and EC

Pages: 1 ... 3 4 [5] 6 7 ... 14