Stealth Client Topic | Stealth SUO Topic (http://www.scriptuo.com/index.php?topic=11628.0) | Main Stealth Release Thread |
Orich's Scripts | BitBucket Repository (https://bitbucket.org/Orich/orichs-scripts) | Orich's Scripts Library |
Bug Tracker | BitBucket Issue Tracker (https://bitbucket.org/Stealthadmin/stealth-beta-client/issues?status=new&status=open) | Report Issues / Bugs Here! |
Stealth Home | Stealth Home (http://stealth.od.ua) | Stealth Webpage & Forums (English & Russian) |
Video Tutorial | oRune Tutorial Topic (http://www.scriptuo.com/index.php?topic=11675.0) | Basic C# Scripting Tutorial |
I'm releasing it because, well, dxrom just released a script and I can't let him have the limelight for more than 15 minutes.
Dear lord...you mean we can now script eggies? This has been the holy grail for Abyss champs for years. YEARS.
*sigh* I just don't have the strength to learn stealth...
Hey I tried the script it works great thank you soo much I have gotten 7 eggs to drop with this! Sometimes the script itself crashes but I just click start again and it starts going again.
Just some minor problems with Range like try's using holes on other sides of walls/ really far away ect. But it did make a egg come outta a nest that was not even on my screen! Like I took 3 steps n then saw the egg. But a button or option to research for closer holes/snakes would be nice. Or even a restart script button would work that's what I do when its trying to do something that too far away or threw a wall.
Is there any way to edit the range of the snakes distance to you and the hole distance to you? Like only use snakes n hole that are X amount of tiles away. I tried to Edit the script but I didn't understand anything soo I did nothing lol. It didn't even look like words lol!
Some great add-ons for the script would be if the char would pathfind to the dropped egg n pick it up! It seem to try picking it up you just gotta stand very close to the hole. :)
I was on an OSI shard with the most recent stealth. Thanks again for your awesome script! I love it!
I hit Edit Script inside Stealth near the script area. What came up didn't look like words. I didn't open Eggs.exe and I don't have that program installed. Do you have a link I can click to get Visual Studio? If I install that I can look at the code n change wait times?
Orich , thx for the release.
I did try it out for a 1hrs. and get one egg. It does use the flute, target the hole. It does target the far snake and hole. so it hard to see what happening. I'm sure I had miss a few eggs because their are off screen. Also it doesn't pathfind to the eggs. Sure get in interesting on how Visual Studio work.
Since I am working on learning this Scripting Lanuage I was going to look at your script Orich but can not find it :)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using ScriptAPI;
using ScriptDotNet2;
/*
This script is extremely sloppy, without a plethora of sanity checks, and was written between 3:00am and 3:41am
*/
namespace oEggs
{
class Program
{
public static ushort[] SnakeTypes = new ushort[] { 52, 93, 21 };
public static List<Item> Snakes = new List<Item>();
public static List<Item> Nests = new List<Item>();
public static List<Item> Flutes = new List<Item>();
private static readonly Object locker = new Object();
#region Methods
static void ErrorExit(string ErrorText)
{
Console.WriteLine(ErrorText);
Console.Write("Press any key to suicide.");
Console.ReadKey(false);
Environment.Exit(0);
}
/// <summary>
/// Method for posting messages to the console
/// with a timestamp
/// </summary>
/// <param name="message">string: message to send to the console</param>
/// <param name="args">(optional)object[]: additional arguments</param>
public static void ConsoleMessage(string message, params object[] args)
{
Console.Write("[{0}] ", DateTime.Now.ToString("mm:ss"));
Console.WriteLine(message, args);
}
/// <summary>
/// Method for posting messages to the console
/// with a timestamp and optional color
/// </summary>
/// <param name="message">string: message to send to the console</param>
/// <param name="color">(optional)enum ConsoleColor: the color you want the message to be</param>
/// <param name="args">(optional)object[]: additional arguments</param>
public static void ConsoleMessage(string message, ConsoleColor color = ConsoleColor.White, params object[] args)
{
Console.Write("[{0}] ", DateTime.Now.ToString("mm:ss"));
Console.ForegroundColor = color;
Console.WriteLine(message, args);
Console.ResetColor();
}
#endregion
static void Main(string[] args)
{
/*while (true)
{
Item Result = Target.RequestTarget();
Console.WriteLine(Result.Type);
}*/
#region Events
//Stealth.Default.Buff_DebuffSystem += onBuff;
//Stealth.Default.UnicodeSpeech += onSpeech;
#endregion
Thread EggFinderThread = new Thread(FindEggs);
EggFinderThread.Start();
ConsoleMessage("Waiting for connection...");
while (!Profile.IsConnected) ;
ConsoleMessage("Connection detected. Welcome {0}!", Self.Name);
FindFlutes();
if (Flutes.Count < 0)
ErrorExit("Not enough snake charmer flutes. Bye.");
ConsoleMessage("Starting egg farm...");
while (Profile.IsConnected)
{
MainRoutine();
}
}
private static void MainRoutine()
{
DateTime thisTime = DateTime.Now;
Stealth.Default.ClearJournal();
lock (locker)
{
#region Search
Search:
FindSnakes();
ConsoleMessage("Found {0} snakes",
ConsoleColor.DarkYellow, Snakes.Count);
if (Snakes.Count == 0)
{
Thread.Sleep(5000);
goto Search;
}
FindNests();
ConsoleMessage("Found {0} nests",
ConsoleColor.DarkYellow, Nests.Count);
if (Nests.Count == 0)
{
Thread.Sleep(5000);
goto Search;
}
FindFlutes();
ConsoleMessage("Found {0} flutes",
ConsoleColor.DarkYellow, Flutes.Count);
if (Flutes.Count < 1)
ErrorExit("Ran out of flutes.");
#endregion
Item Flute = Flutes[0];
for (int i = 0; i < Snakes.Count; i++)
{
if (i == 3)
break;
ConsoleMessage("Attempting flute process...",
ConsoleColor.DarkYellow);
Stealth.Default.CancelWaitTarget();
while (true)
{
thisTime = DateTime.Now;
Flute.Use();
if (!Stealth.Default.WaitJournalLine(thisTime, "You must wait a moment for it to recharge.", 750))
break;
ConsoleMessage("Flute waiting to recharge. Trying again in 1.5s.",
ConsoleColor.DarkRed);
Script.Wait(1500);
}
Stealth.Default.WaitTargetObject(Snakes[i].ID);
Script.Wait(1000);
Stealth.Default.WaitTargetObject(Nests[0].ID);
Script.Wait(10000);
}
}
}
static void FindSnakes()
{
Find.FindDistance = 10;
Snakes = Find.FindItems(52);
Snakes.AddRange(Find.FindItems(21));
Snakes.AddRange(Find.FindItems(93));
Snakes.OrderBy(x => x.Distance).ToList();
}
static void FindFlutes()
{
Flutes = Find.FindItems(0x2807, Self.Backpack.ID);
}
static void FindNests()
{
Find.FindDistance = 10;
Nests = Find.FindItems(8755);
Nests.OrderBy(n => n.Distance).ToList();
}
static void FindEggs()
{
while (true)
{
lock (locker)
{
List<Item> Eggs = Find.FindItems(16831);
if (Eggs.Count > 0)
{
for (int i = 0; i < Eggs.Count; i++)
{
while (Self.X != Eggs[i].X && Self.Y != Eggs[i].Y)
{
Script.Wait(1000);
Stealth.Default.MoveXY((ushort)Eggs[i].X, (ushort)Eggs[0].Y, false, 0, false);
if (Self.X != Eggs[i].X && Self.Y != Eggs[i].Y)
break;
}
Console.WriteLine("Taking the egg.");
Stealth.Default.DragItem(Eggs[i].ID, 1);
Script.Wait(1500);
Stealth.Default.DropHere(Self.Backpack.ID);
}
}
}
Script.Wait(10000);
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using ScriptAPI;
using ScriptDotNet2;
/*
This script is extremely sloppy, without a plethora of sanity checks, and was written between 3:00am and 3:41am
*/
namespace oEggs
{
class Program
{
public static ushort[] SnakeTypes = new ushort[] { 52, 93, 21 };
public static List<Item> Snakes = new List<Item>();
public static List<Item> Nests = new List<Item>();
public static List<Item> Flutes = new List<Item>();
private static readonly Object locker = new Object();
#region Methods
static void ErrorExit(string ErrorText)
{
Console.WriteLine(ErrorText);
Console.Write("Press any key to suicide.");
Console.ReadKey(false);
Environment.Exit(0);
}
/// <summary>
/// Method for posting messages to the console
/// with a timestamp
/// </summary>
/// <param name="message">string: message to send to the console</param>
/// <param name="args">(optional)object[]: additional arguments</param>
public static void ConsoleMessage(string message, params object[] args)
{
Console.Write("[{0}] ", DateTime.Now.ToString("mm:ss"));
Console.WriteLine(message, args);
}
/// <summary>
/// Method for posting messages to the console
/// with a timestamp and optional color
/// </summary>
/// <param name="message">string: message to send to the console</param>
/// <param name="color">(optional)enum ConsoleColor: the color you want the message to be</param>
/// <param name="args">(optional)object[]: additional arguments</param>
public static void ConsoleMessage(string message, ConsoleColor color = ConsoleColor.White, params object[] args)
{
Console.Write("[{0}] ", DateTime.Now.ToString("mm:ss"));
Console.ForegroundColor = color;
Console.WriteLine(message, args);
Console.ResetColor();
}
#endregion
static void Main(string[] args)
{
/*while (true)
{
Item Result = Target.RequestTarget();
Console.WriteLine(Result.Type);
}*/
#region Events
//Stealth.Default.Buff_DebuffSystem += onBuff;
//Stealth.Default.UnicodeSpeech += onSpeech;
#endregion
Thread EggFinderThread = new Thread(FindEggs);
EggFinderThread.Start();
ConsoleMessage("Waiting for connection...");
while (!Profile.IsConnected) ;
ConsoleMessage("Connection detected. Welcome {0}!", Self.Name);
FindFlutes();
if (Flutes.Count < 0)
ErrorExit("Not enough snake charmer flutes. Bye.");
ConsoleMessage("Starting egg farm...");
while (Profile.IsConnected)
{
MainRoutine();
}
}
private static void MainRoutine()
{
DateTime thisTime = DateTime.Now;
Stealth.Default.ClearJournal();
#region Search
Search:
FindSnakes();
ConsoleMessage("Found {0} snakes",
ConsoleColor.DarkYellow, Snakes.Count);
if (Snakes.Count == 0)
{
Thread.Sleep(5000);
goto Search;
}
FindNests();
ConsoleMessage("Found {0} nests",
ConsoleColor.DarkYellow, Nests.Count);
if (Nests.Count == 0)
{
Thread.Sleep(5000);
goto Search;
}
FindFlutes();
ConsoleMessage("Found {0} flutes",
ConsoleColor.DarkYellow, Flutes.Count);
if (Flutes.Count < 1)
ErrorExit("Ran out of flutes.");
#endregion
Item Flute = Flutes[0];
for (int i = 0; i < Snakes.Count; i++)
{
if (i == 3)
break;
ConsoleMessage("Attempting flute process...",
ConsoleColor.DarkYellow);
Stealth.Default.CancelWaitTarget();
while (true)
{
thisTime = DateTime.Now;
Flute.Use();
if (!Stealth.Default.WaitJournalLine(thisTime, "You must wait a moment for it to recharge.", 750))
break;
ConsoleMessage("Flute waiting to recharge. Trying again in 1.5s.",
ConsoleColor.DarkRed);
Script.Wait(1500);
}
Stealth.Default.WaitTargetObject(Snakes[i].ID);
Script.Wait(1000);
Stealth.Default.WaitTargetObject(Nests[0].ID);
Script.Wait(10000);
}
}
static void FindSnakes()
{
Find.FindDistance = 10;
Snakes = Find.FindItems(52);
Snakes.AddRange(Find.FindItems(21));
Snakes.AddRange(Find.FindItems(93));
Snakes.OrderBy(x => x.Distance).ToList();
}
static void FindFlutes()
{
Flutes = Find.FindItems(0x2807, Self.Backpack.ID);
}
static void FindNests()
{
Find.FindDistance = 10;
Nests = Find.FindItems(8755);
Nests.OrderBy(n => n.Distance).ToList();
}
static void FindEggs()
{
while (true)
{
Find.FindDistance = 10;
List<Item> Eggs = Find.FindItems(16831);
if (Eggs.Count > 0)
{
for (int i = 0; i < Eggs.Count; i++)
{
while (Self.X != Eggs[i].X && Self.Y != Eggs[i].Y)
{
Script.Wait(1000);
Stealth.Default.MoveXY((ushort)Eggs[i].X, (ushort)Eggs[0].Y, false, 0, false);
if (Self.X != Eggs[i].X && Self.Y != Eggs[i].Y)
break;
}
ConsoleMessage("Trying to take egg...",
ConsoleColor.DarkYellow);
Stealth.Default.MoveItem(Eggs[i].ID, 1, Self.Backpack.ID, 0, 0, 0);
}
}
Script.Wait(10000);
}
}
}
}