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

Pages: [1] 2 3 4
1
Stealth Client / [Release] ScriptSDK in Java
« on: November 03, 2022, 06:26:01 AM »

Summary
ScriptSDK is an implementation of an external API for Stealth Client.

The first introduction of an external API written in C# happened here about 2015.
Since then there have been a few implementations of external API in many languages but for a very small audience.

ScriptSDK was a vision of me (Crome696) of building an advanced library for scripting by offering an object orientated library with a set of predefined functions and features.

The first library was written in C# around 2016 and can be found as  here as legacy reference.

The second implementation has been written in Java around 2022. One of its targets is an API where user can simply write scripts or utilize the power of spring to have a new standard for API implementations.

Project Overview
The project is based on 3 different layers of implementation:

  • Core - Raw Socket Communication
  • API - Standalone Implementation for Java EE or Spring Developers
  • Web - Spring Boot implementation for multi scripting and\or multilingual implementation of external API

Core

The Core Package is a collection of classes to connect to a stealth client. It only offers a very basic socket- and packet client to establish a connection through client and stealth client. Its recommend for developers with a certain degree about TCP/IP packets and stealth external API protocol. The package also provides a very basic Delphi date time converter for your own purposes.

API

The API Package is a very simple implementation of stealth external API. As we speak, it implements 389 of 404 API methods and ~ 30 custom methods. In order to test the communication with stealth, the project includes 418 java unit tests. in order to run the unit tests, it's recommend to use a separated stealth client with access to a local servo server. The tests are unable to catch your local settings and just test communication by sending and exchanging packets. This might result in loss of items or mobiles ingame.

Web

The Web Package is a spring boot based implementation of a web service with full functionality of API Package. Together with the Open API initiative, it allows developer to implement their own custom clients using the service as man in the middle to communicate through a REST API.

In order to start communication, a developer either must generate themselves a client in a language of their choice or write their own implementation.

Its recommend to wrap the service to a Windows service by utilizing WinSW and run a compiled web service in background.

Once the service runs, a user must create a new client through client-controller, this is the core of every communication. With the ID of a client, a user can exchange information through rest to stealth at any time. At the end of scripting, either close service fully or remove the client from client manager through rest API.

Testing

Each project contains multiple automated unit tests. They are testing the general implementation and communication between ScriptSDK and Stealth Client.
They are not suited for productive servers and should never be executed there.

Sources

Overview
Wiki

2
Stealth Client / [Release] ScriptSDK 0.9.3 [UPDATED 28.05.2016]
« on: December 29, 2015, 03:02:56 PM »

3
Stealth Client / [Release] Stealth 10.0.5
« on: December 29, 2015, 02:19:20 PM »
Stealth Version 10.0.5

Here is a brief overview of the feature set:

For Everyone:

 - Standalone UO Client [Does not require Client.exe to operate]
 - Support for Classic Client & Enhanced Client
 - Support for Orion & ClassicUO

 - Support for Encrypted and Non-Encrypted Clients
 - Support OSI and the vast majority of player shards
 - All-In-One Multi-Client Solution (Connect all of your accounts in one instance of Stealth)
 - Dynamic Client Version Emulation (Don't like upgrading on Patch Day? No problem, Stealth handles that.)
 - Native support for UOP and MULs

 - Ultima Client Helper Application (ClientDLL) for UOAssist / Razor-type functionality

 - Auto-Upgrade Mechanism (Always keep latest version of Stealth installed)
 - Built in mapping system / coordinate tracking

 - Anti-Encryption Mode included for FreeShard Implementations (Abyss, Vetus-Mundus, etc.)

 - Razor Negation Feature

For Scripters:

 - Built-in Pascal Scripting Language
 - External scripting application support via Unmanaged and Managed (.NET) libraries
      * Yes -- this means you can write scripts in whatever language you prefer

 - Supported Delphi, Python and C# wrappers
 - Extensive packet logging / debugging configuration options

Resources

ScriptUO Stealth FAQ Topic
Stealth Home


4
RebirthUO / Halloween 2015 (Offical Teaser)
« on: October 30, 2015, 01:24:39 PM »

5
Stealth Client / [API] ScriptSDK
« on: September 13, 2015, 08:38:12 AM »
What is the ScriptSDK

We may need to go back to 2011 when Vizit0r and me discussed the first time, that we need a way to script with stealth without being limited to pascal and python. Vizit0r then prototyped the first version of api, wich was based on Delphi and required some unmanaging datahandling. This version was sloppy working, almost full bugged and never made any user happy.
Over the Years dozen of Contributors (Such as Orich, Neo, Maxwell and others from Russian Board) contributed support and help, making the api better and better. Since end of 2014, Maxwell is doing the .Net Emulation of Stealth API based on code contributed by Orich, Neo and me. The Emulation is quiet fast and has very less bugs remaining, and whenever a bug were reported almost instantly fixed.

However when i talk about an emulation, this doesnt include custom concept of design, advanced handling and or performance orientated functions. This is just a mirror of functions, stealth provide via their socket based api.

I always wanted some framework, levering on the structure of runuo and offering more and easy handling of certain content. This was the day my ScriptSDK were born. I spend a lot of hours designing the SDK, testing concepts , cleanup code , redesign and rewriting the framework for many times. After learning a few more lessons in .net and handling overall this is the first build i think i could release for a test.
ScriptSDK is not independent, it still require the ScriptDotNet2.dll from maxwell but this may change in a further version.

How to Use It

You include the ScriptSDK and ScriptDotNet2 dll into your favored IDE for .Net and use it. Be aware, that all content from both dlls are requiring their own Thread if you want to add full native UI. If you only want a Console App this is very simple used.

Documentation


I included a code base generated documentation about the project. I know this is only not really a good documentation, but it atleast shows what kind of objects exist and wich functions\properties are included. The more i build up my own "RebirthUO" distro, the more i will test several parts of the SDK and will also optimize the code and documentation in future.

Issues

There are maybe plenty of phrases we could optimize, or need some fix either through scriptdotnet.dll or sdk. If you report them properly, i will fix them immeditly.


Main
https://sourceforge.net/projects/scriptsdk/

Files
https://sourceforge.net/projects/scriptsdk/files/?source=navbar

Wiki
https://sourceforge.net/p/scriptsdk/wiki/Home/

Ticket System (for bugs and issues)
https://sourceforge.net/p/scriptsdk/tickets/?source=navbar

Mini-Forum
https://sourceforge.net/p/scriptsdk/discussion/?source=navbar

6
General UO Chat / [Q] Mechanics of Wildfire Spell (Spellweaving)
« on: June 26, 2015, 12:17:27 PM »

7
Stealth Snippets\Library / [Delphi API] Librarys
« on: November 26, 2014, 12:36:34 PM »
I will use this Thread in order to show some sample Units how to use the API and samples to maybe port to Pascal\Python or C#

The license for usage is simple :
Quote
******************************************************************************
 "THE BEER-WARE LICENSE" (Revision 42):
 Crome969@Scriptuo.com wrote this file. As long as you retain this notice you
 can do whatever you want with this stuff. If we meet some day, and you think
 this stuff is worth it, you can buy me a beer in return.
******************************************************************************

Contents :
  • Context Menu Handler

8
Gold Farming / [Freeshard] Doom Artisan
« on: September 20, 2014, 03:58:00 PM »

9
Stealth archive / [Questions] Pascal in Stealth
« on: June 23, 2014, 11:15:22 PM »
Discussion and Questions about the Pascal tutorial in Stealth.

10
Stealth Client / [Tutorial] Pascal in Stealth [UPDATED 28.06.2014]
« on: June 23, 2014, 11:14:40 PM »
I guess many people may think about learning scripting in pascal but since there are less samples out how to write scripts and what can stealth actual handle.So i want to start a daily small Tutorial.

If you are good in english grammar (since iam not as non native) write me your corrections via PM and i will correct those parts and add you as Editor into the Credits.

I will lock this topic and make a side thread for actual Questions.

Table of Content :

11
Stealth Snippets\Library / [C# Custom Snippet] Handling Gumps
« on: October 12, 2013, 09:02:24 PM »
Introduction

I wroted this small Library back then when we were Testing API and i think it could be quiete Useful for some of you.
What this Library contains :
- Interactions with GumpButtons,Radiobuttons,Checkboxes,Textboxes attached on specific Gump
- Generating of GumpObject attached on specific Gump
- Validation of Gump existence
- Filtering Members for Gumpobject Subobjects

Requirements

Stealth 6.0 RC 4 or Higher & ScriptDotNet DLL : https://bitbucket.org/Stealthadmin/stealth-beta-client/downloads
Gump.cs Version 1.0 or Higher : https://bitbucket.org/jsiems/stealth-custom-librarys/downloads
Visual Studio 2012 & .NET 4.5

Function Reference
Code: [Select]
public static uint GetGumpType(uint Serial) // Returns GumpType of specific Serial
public static uint GetSerial(uint GumpID) // Returns Serial of Specific Gump Type

public static int GetIndexbySerial(uint SerialID) // Returns Index of Gump with given Gump Serial
public static int GetIndexbyGumpID(uint GumpID) // Returns Index of Gump with Given Gump Type

public static bool ButtonClick(uint GumpID, int Value) // Fires Push the Button Action on Gump with specific Gump Type
public static bool RadioButtonClick(uint GumpID, int RadioButtonID, int Value) // Use Radiobutton on Gump with specific Gump Type
public static bool CheckBoxClick(uint GumpID, int CheckBoxID, int Value) // Use Combobox on Gump with specific Gump Type
public static bool ChangeTextField(uint GumpID, int TextFieldID, String Content) // Writes into TextBox with specific Gump Type

public static List<T> FilterbyGroup<T>(int GroupNum, List<T> list) // Filters Generic List of Generic Type T through every Object containing the required Groupnumber
public static List<T> FilterbyPage<T>(int Page,List<T> list) // Filters Generic List of Generic Type T through every Object containing the required Page
public static List<T> FilterbyElementNum<T>(int Elementnum, List<T> list) // Filters Generic List of Generic Type T through every Object containing the required Elementnum
public static List<T> FilterbyID<T>(int ID, List<T> list) // Filters Generic List of Generic Type T through every Object containing the required ID
public static List<T> FilterbyPosition<T>(int X, int Y, List<T> list) // Filters Generic List of Generic Type T through every Object containing the required Pos X & Pos Y
public static List<T> FilterbyReleasedID<T>(int ReleasedID, List<T> list) // Filters Generic List of Generic Type T through every Object containing the required ReleasedID
public static List<T> FilterbyPressedID<T>(int PressedID, List<T> list) // Filters Generic List of Generic Type T through every Object containing the required PressedID
public static List<T> FilterbyQuit<T>(int QuitID, List<T> list) // Filters Generic List of Generic Type T through every Object containing the required QuitID
public static List<T> FilterbyPageID<T>(int PageID, List<T> list) // Filters Generic List of Generic Type T through every Object containing the required PageID
public static List<T> FilterbyReturnValue<T>(int ReturnValue, List<T> list) // Filters Generic List of Generic Type T through every Object containing the required ReturnValue
public static List<T> FilterbyArtID<T>(int ArtID, List<T> list) // Filters Generic List of Generic Type T through every Object containing the required ArtID
public static List<T> FilterbyArtPosition<T>(int X, int Y, List<T> list) // Filters Generic List of Generic Type T through every Object containing the required ArtPos X & ArtPos Y
public static List<T> FilterbyHue<T>(int Hue, List<T> list) // Filters Generic List of Generic Type T through every Object containing the required Hue
public static List<T> FilterbyColor<T>(int Color, List<T> list) // Filters Generic List of Generic Type T through every Object containing the required Color
public static List<T> FilterbyStatus<T>(int Status, List<T> list) // Filters Generic List of Generic Type T through every Object containing the required Status
public static List<T> FilterbySize<T>(int width, int height, List<T> list) // Filters Generic List of Generic Type T through every Object containing the required width & height
public static List<T> FilterbyTextID<T>(int TextID, List<T> list) // Filters Generic List of Generic Type T through every Object containing the required TextID
public static List<T> FilterbyGumpID<T>(int GumpID, List<T> list) // Filters Generic List of Generic Type T through every Object containing the required GumpID
public static List<T> FilterbyDefaultTextID<T>(int DefaultTextID, List<T> list) // Filters Generic List of Generic Type T through every Object containing the required DefaultTextID
public static List<T> FilterbyLimit<T>(int Limit, List<T> list) // Filters Generic List of Generic Type T through every Object containing the required Limit
public static List<T> FilterbyClilocID<T>(int ClilocID, List<T> list) // Filters Generic List of Generic Type T through every Object containing the required ClilocID
public static List<T> FilterbBackGround<T>(int BackGround, List<T> list) // Filters Generic List of Generic Type T through every Object containing the required BackGround
public static List<T> FilterbyScrollbar<T>(int ScrollbarID, List<T> list) // Filters Generic List of Generic Type T through every Object containing the required ScrollbarID
public static List<T> FilterbyArgument<T>(String Argument, List<T> list) // Filters Generic List of Generic Type T through every Object containing the required Argument
public static List<T> FilterbyProperty<T>(int PropertyID, List<T> list) // Filters Generic List of Generic Type T through every Object containing the required PropertyID

public static TGumpInfo GetGumpObjectbySerial(uint Serial) // Returns Gump Object of Gump with given Gump Serial
public static TGumpInfo GetGumpObjectbyGumpID(uint GumpID) // Returns Gump Object of Gump with given Gump Serial

public static bool ValidateSerial(uint Serial) // Validate if Serial exist
public static bool ValidateGumpID(uint GumpID) // Validates if GumpType exist

Samples

Crafting with Sewing Kit :

Code: [Select]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using ScriptDotNet;
using Custom.Gumps;

namespace SampleProgram
{
    static class Program
    {
        [STAThread]
        static void Main()
        {
            // Calls Craft Routine for normal Sewingkit and craft Studded Arms on Runuo
            Library.Craft(0x0F9D, 0x0000, 0x38920ABD, 50, 16,true,true);
        }
    }

    public static class Library
    {
        //*******************************************************
        // Method : Craft
        //*******************************************************
        // Parameters :
        // ushort CraftType - Item Type of your Craft Tool
        // ushort CrafColor - Item Color of your Craft Tool
        // uint GumpType    - Gump Type of your Craft Gump
        // int Category     - Packet Value for your specific Category Button
        // int Selection    - Packet Value for your specific Selection Button
        // bool CloseBefore - Selection if old Craft Gump should be closed before
        // bool CloseAfter  - Selection if new Craft Gump should be closed after
        //
        // Note : if Category = 0, Buttons from front Menu like Make Last can be used
        //******************************************************
        // Output :
        // Boolean : returns if you were able to Use CraftMenu
        //******************************************************
        public static bool Craft(ushort CraftToolType, ushort CraftToolColor, uint GumpType, int Category, int Selection,bool Closebefore=false,bool CloseAfter=false)
        {
            uint CraftToolID = Stealth.Script_FindTypeEx(CraftToolType, CraftToolColor, Stealth.Script_GetBackpackID(), false);
            if (CraftToolID > 0)
            {
                // We want to Clean up old Gumps?
                if(Closebefore)
                    while(GlobalGumpHandler.GetIndexbyGumpID(GumpType) > -1)
                        GlobalGumpHandler.ButtonClick(GumpType, 0);
                // Now we Open Gump
                while (GlobalGumpHandler.GetIndexbyGumpID(GumpType) == -1)
                    Stealth.Script_UseObject(CraftToolID);
                // If Category > 0 means you actualy want to push Category Button
                if (Category > 0)
                    while (!GlobalGumpHandler.ButtonClick(GumpType, Category))
                        while (GlobalGumpHandler.GetIndexbyGumpID(GumpType) == -1) ;
                while (GlobalGumpHandler.GetIndexbyGumpID(GumpType) == -1);
                // We actually push the Button to Craft Something or use any featured Action by Button within Gump
                while (!GlobalGumpHandler.ButtonClick(GumpType, Selection))
                    while (GlobalGumpHandler.GetIndexbyGumpID(GumpType) == -1) ;
                // We wait Until Gump is Back or Tool got destroyed
                while ((GlobalGumpHandler.GetIndexbyGumpID(GumpType) == -1) && (Stealth.Script_IsObjectExists(CraftToolID)));
                // We want to kill the Gump after Craft?
                if(CloseAfter)
                    while (GlobalGumpHandler.GetIndexbyGumpID(GumpType) > -1)
                        GlobalGumpHandler.ButtonClick(GumpType, 0);
                return true;
            }
            return false;
        }

    }
}

12
Television/Movies / Anger Management
« on: June 09, 2013, 02:06:47 AM »

13
Stealth archive / Stealth Verson 6
« on: April 27, 2013, 01:51:15 PM »


For Stealth Version 6, the team is looking for fans who would like to support us at creating Script
Templates for native Languanges ( Like Java , C , C++ and so on ).
The Team will be able to provide .NET and Pascal Templates but would be happy
if there would be more particular interest.

What abilities you should have?
1) Basic Knowlegde about the Languange you want to provide code ( OOP \ PP )
2) Knowlegde about how to Import Delphi-DLL into your specific Languange
3) Ability to delegate Function Pointers for Events

For more Details please contact Vizit0r and write him a personal Message or get in Contact via ICQ ( prefered ) .

Original Thread : Here

Kind Regards

Crome

14
Stealth archive / MOVED: GM detect
« on: April 24, 2013, 09:51:23 AM »

15
Stealth scripts / [Trainer] Unmoving Necromancy Trainer
« on: January 03, 2013, 08:37:44 AM »
Executable Script Unmoving Necromancy

Header
Spoiler: show

[code]
=================================================================
 Script Name: Crome's Unmoving Necro Trainer
 Author: Crome696 AKA Jan Siems
 Version: 5
 Shard OSI / FS: OSI
 Revision Dates: 01\03\2013
 Public Release: 01\03\2013
 Purpose: Support User to Train Necromancy
 Credits: Endless Night & Trailmyx for Licence

=================================================================
 (c) 2005-2013 Crome696 - All Rights Reserved
  Please respect my property rights.. :)
=================================================================
 Disclaimer:  By downloading, copying, running or otherwise using
 this script, you accept the contents of this limited personal use
 licence agreement.
 This script is only authorized to be distributed on www.Scriptuo.com.
 If you purchase this script, or acquire it from any other source, it
 is not considered an authorized copy and should be deleted immediately.
 Crome969 AKA Jan Siems(Author) provides no warranty for use, function,
 or safe interaction with any software or hardware. User downloads and
 runs this script at his-her own risk. User shall hold Author and the
 distribution site www.scriptuo.com harmless for any loss of items,
 accounts, money, virtual currency or items associated with the use of
 this script. User shall hold the author harmless for any consequences
 that may result from the use of this script as intended.  Furthermore,
 you promise not to distribute or sell this script to anyone without
 the express permission of the author, Crome696 AKA Jan Siems.
 Violation of this agreement will result in one or more of the following:
 litigation, www.scriptuo.com account termination, bad karma for your
 next life, and most definitely causing a black mark placed on your soul.

 This Script will never become by any definition of the words "Abandon ware",
 this script will always remain the property of the author unless
 rights are transfered by auther in writing (not email Writing).

 I worked very hard to bring this script to you, so please use it
 responisibily and respectfully.  If you have any questions, please
 reach me at jsiems87@googlemail.com

 (c) 2005-2013 Crome696 - All Rights Reserved
 Please respect my property rights.. :)
===================================================================
 Additional Licence to Use Agreement: You are free to use this script for not
 for profit personal UO gameplay. You are *NOT* free to repost,
 modify and repost, post on other websites, post as part of a script
 or work you yourself have created, email or transfer to another
 person by any method, or otherwise distribute without written
 permision from the author. This Applies to the script as a whole and
 any given part of the script.
 This license to use can be changed at any time for any reason.
 If in doubt dont do it contact the author.

 Commercial usage of any kind requires written permission from the author.

 (c) 2005-2013 Crome696 - All Rights Reserved
 Please respect my property rights.. :)
===================================================================
===================================================================
 NOTE: My scripts or any derivative of them are *not* for use in other players script!
===================================================================
===================================================================
[/code]

Instruction & Requirements
Spoiler: show


1) You need my Units you can find here :
[url=http://www.scriptuo.com/index.php?topic=10738.0]Unit Casting[/url]
[url=http://www.scriptuo.com/index.php?topic=10739.msg90305#msg90305]Unit Events[/url]
[url=http://www.scriptuo.com/index.php?topic=10740.0]Unit Propertyhandling[/url]
2) Download Attachment [b]UnmovingNecromancyTrainer.sc[/b]  and save into "Stealth Folder\Scripts"
3) Load Script into Stealth and Press Play
4) Enjoy



Notes
Spoiler: show

Script will Train your Character from 0-120 Necromancy ( if your Cap allows ) without Tile Movement...


Update Version 6
- Increased Delay on Morphing Forms + 100ms
- Added Checkup when Reaching Skillcap but nut 120 yet
- Vampire Embrance will now right casted at 99.1 Skill

Update Version 5
- Fixxed up small Issue on Displaying Skill in GUI

Update Version 4
- Added GUI for Clientless overview
- Codecleaning in Script and its Units. Please Update Casting to Version >= 3, Events >= Version 2
- Addied AntiAFK Event
- Added Horrific Beast Checkup to prevent beeing stucked at Casting Wither.

Update Version 3
  • Replaced Switch Case with IFElse -> Seems Pascal having issues reading Float in Switch Cases

Update Version 2
  • Added + 1 Tolerance for Meditation Checkup to prevent 1 Mana difference Stuckings on Meditation checkup

Pages: [1] 2 3 4