Author Topic: [C#, ScriptSDK] EggFarmer  (Read 46933 times)

0 Members and 1 Guest are viewing this topic.

Offline Crome969

  • Moderator
  • *
  • *****
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: [V6,ScriptSDK] Egg Farmer - v2.0.0.3 (stable)
« Reply #60 on: March 21, 2016, 05:04:38 AM »
+1
What Error do you get? I know unisharp is taking an uo break but i can try to help out a bit :)

Offline lisaandmike

  • Newbie
  • *
  • Posts: 8
  • Activity:
    0%
  • Reputation Power: 1
  • lisaandmike has no influence.
  • Respect: +4
  • Referrals: 0
    • View Profile
Re: [V6,ScriptSDK] Egg Farmer - v2.0.0.3 (stable)
« Reply #61 on: March 21, 2016, 11:37:15 AM »
+1
When I download the installer from the main page, the website simple states Pageok (http://downloads.uostealth.com/eggfarmer)

When I download the source, there is no .exe build included in the zipped package.  (https://gitlab.com/unisharp/EggFarmer).  When I open this in VS (EggFarmer.csproj) and then click build eggfarmer, I get 20 errors. 

The first two is the namespace API does not exist in the namespace ScriptSDK

The third error is namespace name Buff_DebuffSystemEventArgs

The other 17 are all "the name stealth does not exist in the current context

The one warning is that the certificate is not in the certificate store but this one I can fix by unchecking the option to sign.

Offline Tidus

  • Lazy
  • Administrator
  • *
  • *
  • Posts: 1291
  • Activity:
    0%
  • Reputation Power: 15
  • Tidus is working their way up.Tidus is working their way up.Tidus is working their way up.
  • Gender: Male
  • Mind Blown
  • Respect: +151
  • Referrals: 2
    • View Profile
    • Ultimate Apparel
Re: [V6,ScriptSDK] Egg Farmer - v2.0.0.3 (stable)
« Reply #62 on: March 21, 2016, 12:04:59 PM »
+1
You need to make sure you are referencing the DLL file with the VS project in order to be able to see the named references of Stealth and ScriptSDK.
For those who have fought for it, freedom has a taste the protected will never know ~ Anonymous, Vietnam, 1968

Offline lisaandmike

  • Newbie
  • *
  • Posts: 8
  • Activity:
    0%
  • Reputation Power: 1
  • lisaandmike has no influence.
  • Respect: +4
  • Referrals: 0
    • View Profile
Re: [V6,ScriptSDK] Egg Farmer - v2.0.0.3 (stable)
« Reply #63 on: March 21, 2016, 01:51:44 PM »
+1
I think that I have them correctly in the Reference section and I double checked to ensure the DLL was in the correct folder.  As an example, I have:

C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\.NETFramework\v4.5\Libraries\ScriptSDK.dll

If I compile it and run the exe, I get an error at opening it.  I debug it and try common fixes for the items but new errors pop up each time.  I am not familiar with VS enough to fix this apparently.  I guess in the past year too many things have changed.  It would be nice if his install package was able to be downloaded but it looks like he took it down perhaps.

Maybe we will be lucky and when someone has free time, they can update and post for the community   ;)

Offline Crome969

  • Moderator
  • *
  • *****
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: [V6,ScriptSDK] Egg Farmer - v2.0.0.3 (stable)
« Reply #64 on: March 22, 2016, 01:13:50 AM »
+1
I think that I have them correctly in the Reference section and I double checked to ensure the DLL was in the correct folder.  As an example, I have:

C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\.NETFramework\v4.5\Libraries\ScriptSDK.dll

If I compile it and run the exe, I get an error at opening it.  I debug it and try common fixes for the items but new errors pop up each time.  I am not familiar with VS enough to fix this apparently.  I guess in the past year too many things have changed.  It would be nice if his install package was able to be downloaded but it looks like he took it down perhaps.

Maybe we will be lucky and when someone has free time, they can update and post for the community   ;)

ScriptSDK is a standalone non Microsoft library written by me. If you add reference to ScriptSDK.dll you should also make sure that the executing exe has a ScriptSDK.dll in the folder.

Try to drop the dll where your exe has been compiled, and perform the exe as admin. Then it should work.

Offline lisaandmike

  • Newbie
  • *
  • Posts: 8
  • Activity:
    0%
  • Reputation Power: 1
  • lisaandmike has no influence.
  • Respect: +4
  • Referrals: 0
    • View Profile
Re: [V6,ScriptSDK] Egg Farmer - v2.0.0.3 (stable)
« Reply #65 on: March 23, 2016, 03:21:35 AM »
+1
Chrome, thank you for the quick response.  I have the .dll file in place and run as admin.  I get the below error as soon as I open the file:

Problem Event Name:   CLR20r3
  Problem Signature 01:   EggFarmer.exe
  Problem Signature 02:   1.0.0.0
  Problem Signature 03:   56f06b04
  Problem Signature 04:   System
  Problem Signature 05:   4.6.1055.0
  Problem Signature 06:   563c0ff8
  Problem Signature 07:   204b
  Problem Signature 08:   74
  Problem Signature 09:   System.Net.Sockets.Socket
  OS Version:   6.1.7601.2.1.0.256.48

Offline Crome969

  • Moderator
  • *
  • *****
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: [V6,ScriptSDK] Egg Farmer - v2.0.0.3 (stable)
« Reply #66 on: March 23, 2016, 04:38:31 AM »
+1
Do you use the Stealth Client? this sounds like the api connector try to search for a Stealth Client for Communication and fail ...

Offline lisaandmike

  • Newbie
  • *
  • Posts: 8
  • Activity:
    0%
  • Reputation Power: 1
  • lisaandmike has no influence.
  • Respect: +4
  • Referrals: 0
    • View Profile
Re: [V6,ScriptSDK] Egg Farmer - v2.0.0.3 (stable)
« Reply #67 on: March 29, 2016, 04:16:05 PM »
+1
that fixed it, It was as simple as I didn't have the Stealth client running at the time.  I keep getting random errors but overall, it works.

Post Merge: March 30, 2016, 11:59:11 AM
So I keep getting two errors, that may be related.  The problem seems to be that the script looks for a flute and doesn't find it after the last one breaks.  I have about 10 of them in my bag.  The error below is the most common one I get.
Index was out of range. Must be non-negative and less than the size of the collection parameter name:index
system.throwhelper.throwargumentoutofrangeexception (line 246 in eggfarmer.cs)

The other error is that the program says I am out of flutes and just pops up the three ok boxes like it does when you exit. 

The error would imply that the below first line isn't correct? The error of line 246 is the last sentence below (Flutes[0].DoubleClick();)

 for (int _i = 0; _i < Snakes.Count; _i++)
                    {
                        lock (WorkLocker)
                        {
                            if (Nests[0].Distance > 9)
                            {
                                MoveNextSpot();
                                break;
                            }

                            if (_i == 3)
                                break;

                            workerFluteRoutine.ReportProgress(0, "Trying to persuede snakes...");
                            Stealth.Client.CancelWaitTarget();
                            Stealth.Client.CancelTarget();

                            while (true)
                            {
                                StopWatch = DateTime.Now;
                               
                                Flutes[0].DoubleClick();
                               
« Last Edit: March 30, 2016, 11:59:11 AM by lisaandmike »

Offline Papang-

  • Jr. Member
  • **
  • Posts: 10
  • Activity:
    0%
  • Reputation Power: 1
  • Papang- has no influence.
  • Respect: +1
  • Referrals: 0
    • View Profile
Re: [V6,ScriptSDK] Egg Farmer - v2.0.0.3 (stable)
« Reply #68 on: December 22, 2017, 03:43:55 PM »
+1
The project that unisharp offered us is gold, It shows us how to work with Paths.

With a little more time (for me) next week, I really want to create a "Champ Checker "(Move character to all champions spawn and give the state).
I think there is already enough information to build this. it just remains the part for "Recall" and "Write on an interface" to gather the information.

Offline bendel

  • Full Member
  • ***
  • Posts: 215
  • Activity:
    0%
  • Reputation Power: 4
  • bendel has no influence.
  • Respect: +34
  • Referrals: 0
    • View Profile
Re: [V6,ScriptSDK] Egg Farmer - v2.0.0.3 (stable)
« Reply #69 on: March 25, 2018, 02:10:39 PM »
+1
Still not able to get it work.

have an error after looting the first egg



Anyone can help ?
Thanks :)

There are 1 attachment(s) in this post. You must register and post an acceptable introduction to download
error.png

Offline unisharpTopic starter

  • Elite
  • ***
  • *
  • Posts: 196
  • Activity:
    0%
  • Reputation Power: 4
  • unisharp has no influence.
  • Gender: Male
  • Respect: +40
  • Referrals: 0
    • View Profile
Re: [C#, ScriptSDK] Egg Farmer - updated 030520
« Reply #70 on: March 05, 2020, 05:38:41 AM »
0
Updated

Offline unisharpTopic starter

  • Elite
  • ***
  • *
  • Posts: 196
  • Activity:
    0%
  • Reputation Power: 4
  • unisharp has no influence.
  • Gender: Male
  • Respect: +40
  • Referrals: 0
    • View Profile
Re: [C#, ScriptSDK] EggFarmer
« Reply #71 on: March 07, 2020, 12:19:46 PM »
0
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.
« Last Edit: March 07, 2020, 01:41:12 PM by unisharp »

Offline unisharpTopic starter

  • Elite
  • ***
  • *
  • Posts: 196
  • Activity:
    0%
  • Reputation Power: 4
  • unisharp has no influence.
  • Gender: Male
  • Respect: +40
  • Referrals: 0
    • View Profile
Re: [C#, ScriptSDK] EggFarmer
« Reply #72 on: March 08, 2020, 03:38:51 AM »
0
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!
« Last Edit: March 08, 2020, 03:40:48 AM by unisharp »

Offline unisharpTopic starter

  • Elite
  • ***
  • *
  • Posts: 196
  • Activity:
    0%
  • Reputation Power: 4
  • unisharp has no influence.
  • Gender: Male
  • Respect: +40
  • Referrals: 0
    • View Profile
Re: [C#, ScriptSDK] EggFarmer
« Reply #73 on: March 08, 2020, 03:50:05 AM »
0
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.
« Last Edit: March 08, 2020, 07:19:33 AM by unisharp »

Offline unisharpTopic starter

  • Elite
  • ***
  • *
  • Posts: 196
  • Activity:
    0%
  • Reputation Power: 4
  • unisharp has no influence.
  • Gender: Male
  • Respect: +40
  • Referrals: 0
    • View Profile
Re: [C#, ScriptSDK] EggFarmer
« Reply #74 on: March 08, 2020, 01:47:08 PM »
0
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.

Tags: