1
Stealth Client / [Release] ScriptSDK in Java
« on: November 03, 2022, 06:26:01 AM »![](https://github.com/stealth-scriptsdk/.github/raw/master/196972069-a8439c17-dfc9-4958-99c2-0adc01d008bb.png?raw=true)
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