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.


Topics - unisharp

Pages: 1 [2]
16
PROJECT IS DEAD

BROADSWORD CHANGING HOW IDOCS HANDLED

IM SORRY


original code: https://github.com/unisharpUO/FAIL


17
Scripting Chat / House sign types
« on: August 20, 2015, 05:50:46 AM »
Built a house, got that sign type.  Then i proceeded to set the house to public and get all the types of signs that were available.  I got a total of 56 with everything, in TMXs scripts I see he has 57.

Anyone have any idea what the odd house sign type is from?

18
Stealth archive / Out of Memory (too many existing corpses)
« on: July 08, 2015, 05:25:45 AM »
n/t

19
Stealth scripts / [C#, ScriptSDK] EggFarmer
« on: May 09, 2015, 12:16:21 PM »
SOURCE: https://github.com/unisharpUO/EggFarmer

What:
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, there are no methods of defense setup - you will die.  Area 5 is notorious for this because of the Horrors around (they reveal you) but I've also died in other areas as well. - added method for smoke bombs.  Make sure you have plenty of snake charmer flutes in your inventory and also make sure they are insured. 

UPDATE 3-5-2020:
I removed the ClickOnce signing.  I'll figure out something eventually for people who don't want to compile from source.  For now, you must compile from source.  That means downloading Visual Studio 2019, cloning the source repo posted above, adding ScriptSDK as a reference and compiling it yourself.

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

Instructions:
Step 1: Fire up Stealth (the application, not the skill)
Step 2: Connect a profile
Step 3: Run EggFarmer
Step 4: Click "Show Areas" to see where you need to start it at, and select it from the Drop Down Box
Step 5: Run to the "Start Here" location for the area you chose
Step 6: Click Start
Step 7: Go make a pizza


Statistics:
I watched it collect as much as 20 eggs in 30 minutes, and as little as 5 eggs in 1 hour.  It's complete RNG.  In about 3 hours I had 20 runs.
EDIT: 100 eggs in 8hrs

EDIT: 3/8/20, 5 runs collected in 2hrs (20 eggs) - area 3
44 eggs in roughly 3-4hrs

UPDATE 3/8/20: Optimizations made, dramatically increased rate of persuading snakes which will lead to increased eggs over time.

20
Combot (RC2) - release candidate v2

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



Status:
This project is 85% complete.  I'm up to coding the response to the server when a client accepts a job, so I have to finish that and then setup methods for the server to queue the job on completion.  I'm throwing this somewhat incomplete project up here for example, but I am still working on it and it will be complete very soon.


Files:
NEW LINKS COMING SOON

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

Server\Routine\Combat.cs
You'll see there's a GroupList - this is a list containing all the player IDs whom 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 machines local network IP.

Start up 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.

Updates:
4/21/15 - Job system complete overhaul.
4/22/15 - Job system tweaked.
4/29/15 - Job rejection added, major updates.  RC1 released
10/28/15 - RC2 - ScriptSDK

21
Stealth archive / Journal Functions (Performance)
« on: April 02, 2015, 06:43:26 AM »
So I'm analyzing reports on my application and I'm using an average process time of 3.6% which really ain't bad at all, but I'm going to be running multiple applications so I want to optimize as much as possible.

What does my bandage function do?  It's started in a new thread, once it's called it'll bandage the person then wait for completion.  When it completes it sets a boolean to false and the thread exits.  Next time a bandage check is made it checks the boolean before running the bandage function.

Here's the function I'm analyzing...

Code: [Select]
static void bandage(Creature HealTarget)
{
if (HealTarget.Distance < 2 && bandages != null)
{
bandaging = true;
bandages.Use();
Stealth.Default.WaitTargetObject(HealTarget.ID);
response("using bandage on " + HealTarget.Name + ".");
Stealth.Default.WaitJournalLine(DateTime.Now, "You finish applying the bandages|You apply the bandages, but they barely help|You heal what little damage your patient had|You did not stay close enough to heal your patient|That is too far away", 15000);
}
bandaging = false;
}



Digging into -> Combot.Routine.Main

Over half the processing time used in the main routine is checking for health, which is understandable.

Digging into ->Combat.Heal.checkHealth

There's only one called function in this path and it's Bandage.  We can see that WaitJournalLine is using up the most processing time in this function which is also understandable.  Digging into WaitJournalLine, I can see that it's using InJournalBetweenTimes.

Just looking for some suggestions from you guys, I don't have much experience with ScriptDotNet2.dll and documentation is outdated.  Wasn't sure if anyone knew of a better way to do this :)  Basically 30% of the application processing time is spent checking the Journal and I'd like to reduce that.

Thanks!

22
Stealth archive / Auto-Follow Target?
« on: March 30, 2015, 08:01:14 AM »
Is there a way to set a target to Auto-Follow (like if you Alt+Left Click someone)

23
Stealth archive / Corpse Looting Help
« on: March 28, 2015, 08:11:08 AM »
I'm really close to getting this program done but I've been stuck on getting the loot routine for a couple days now...

Does GetTooltip work correctly?  It either hangs the program or I get back a very odd-looking string of different names of items with odd characters.

Example: ""ded gorget7?\0\0\0studded sleeves8?\0\0\0studded leggings9?\0\0\r\0studded tunic:?\0\0\0studded leggings;?\0\0\r\0studded tunic<?\0\0\0studded sleeves=?\0\0\0studded gloves>?\0\0\0studded sleeves??\0\0\0studded le""



I looked at Crome696's SpeedLooter for example, GetCliloc no longer exists in ScriptDotNet2, so I'm assuming it was replaced by GetClilocByID.

GetCliocByID(item.ID) returns ""

Maybe I'm not doing something right?

Code: [Select]
Container lootContainer = new Container(corpse.ID);
lootContainer.Open();

List<Item> foundList = lootContainer.Inventory();

foreach (Item item in foundList)
{
if (lootTypes.Contains(item.Type))
{
response("Item found in list: " + item.Type);

string toolTip = Stealth.Default.GetTooltip(item.ID);

response("tooltip: " + toolTip);


//string itemProperties = Stealth.Default.GetClilocByID(item.ID);
//string toolTip = item.Tooltip;

//response("tooltip: " + item.Tooltip);
/*response("tooltip: " + item.Tooltip);
response("Properties: " + itemProperties);*/
}
}

24
Stealth archive / c# help - handling multiple stealth profiles?
« on: March 24, 2015, 04:59:25 AM »
I'm writing an application that deals with multiple concurrent stealth profiles.  Wanted to check on this before I continued....

Stealth.Default <-  what's default?

Is this what ChangeProfile changes?

I'm guessing it's referring to a profile but I'm unsure

Basically I need to know if there is a way to call methods from a profile without having to actually ChangeProfile

25
Stealth archive / Stealth Client for Linux?
« on: March 23, 2015, 06:51:34 AM »
Are there any Stealth Client builds for Linux, or plans for it?  It would be awesome to run Stealth UO from a VPS.  Maybe no GUI needed, just upload bin and config files then interface with it via web interface.

EDIT: I'm planning on making a web interface using PHP & Zend Framework and there's multiple ways I could do this.  Running the Stealth client directly on the server would be a huge benefit of course :)

26
Stealth archive / C# ScriptAPI.cs - updated for ScriptDotNet2
« on: March 22, 2015, 07:38:52 AM »
Not sure whose code this was, there was no information at the top of this.  This is not my code, I just made some changes to it to use the new ScriptDotNet2.

http://pastebin.com/CRQrU09F


----------------------------------
Updated: 3/22/2015
 *Changes and Fixes to work with ScriptDotNet2

Pages: 1 [2]