ScriptUO

Scripting Resources & Utilities => Stealth Client => Stealth archive => Topic started by: Orich on October 09, 2013, 08:38:35 PM

Title: [Release] Stealth .NET DLL [DLL Updated 11/27/13]
Post by: Orich on October 09, 2013, 08:38:35 PM
Stealth v6.0 + (http://www.a3logics.com/blog/wp-content/uploads/2012/04/NET-framework-600x25011.png)


Following the release of Stealth v6.0 -- I am also proud to officially release the Stealth .NET DLL library.

Features

 - Built on .NET 4.5 (Requires 4.5)

 - ~99% Compliant with the Script.DLL API Standard [Some subtle differences]

 - External application support
      * You can bypass the "Open" -> "Play" mechanism in the Stealth GUI and run any Script externally.  The DLL handles the rest.

 - Supports most (if not all) .NET CLI Languages (VB, C#, etc.)

 - Included SafeInvoke() extension for thread-safe calls between the UI thread and Script thread.
      * For WinForms Users

Code: [Select]
using System;
using ScriptDotNet; // Use the ScriptDotNet Namespace

namespace MyFirstConsoleScript
{
    class Program
    {
        static void Main(String[] args)
        {
            // Wait until Stealth is connected to an Ultima Shard
            while (Stealth.Script_GetConnectedStatus() == false) ;

            // Print a string to the Stealth System Journal
            Stealth.Script_AddToSystemJournal("Hello World to Stealth GUI!");

            // Print a string to the Ultima Online Game Client Window!
            Stealth.Script_ClientPrint("Hello World to Game Client");
        }
    }
}

How To Use

 - In your project under "Solution Explorer", right click "References"
 - Select "Add Reference"
 - On the left hand side, click "Browse" tab
 - On the bottom right click "Browse" button
 - Locate the ScriptDotNet.DLL
 - Done!

Once you see "ScriptDotNet" under References (in Solution Explorer), double click it and explore the DLL.  You'll find all member functions and properties that you require.


Lazy ChangeLog
10/27/2013
  - Script_GetStaticTileData() fixed
  - Script_GetAboutData() fixed
  - Many other fixes I didn't keep track of
11/27/2013
  - Support for Script_GetContextMenuRec , Script_GetMultis (requires Stealth 6.1.4 or greater)
  - Various bug fixes

Resources

Stealth Client Topic   Stealth SUO Topic     (http://www.scriptuo.com/index.php?topic=11628.0)Main Stealth Release Thread
DLL DownloadBitBucket DLL Binaries (https://bitbucket.org/Stealthadmin/stealth-beta-client/downloads)Latest Public DLL binaries
Bug TrackerBitBucket Issue Tracker    (https://bitbucket.org/Stealthadmin/stealth-beta-client/issues?status=new&status=open)Report Issues / Bugs Here!
Stealth HomeStealth 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


Note:  Not 100% of the functions in this DLL have been tested.  This doesn't mean anything dangerous -- It just means sometimes something may not work right.  I will be very diligent to fix bugs, I just need to know about them :-)   Please don't hesitate to let me know what to fix.
Title: Re: [Release] Stealth .NET DLL
Post by: Orich on October 09, 2013, 08:42:39 PM
Reserved
Title: Re: [Release] Stealth .NET DLL [DLL Updated 11/27/13]
Post by: Ycon on December 21, 2013, 10:22:20 AM
i cant execut that, the program dont work and the icon goes to system tray and if o put the mouse over its disapears.
Title: Re: [Release] Stealth .NET DLL [DLL Updated 11/27/13]
Post by: Orich on December 23, 2013, 01:49:36 PM
i cant execut that, the program dont work and the icon goes to system tray and if o put the mouse over its disapears.

No C# scripts work with 6.1.5 right now.

Only 6.1.4 supported.
Title: Re: [Release] Stealth .NET DLL [DLL Updated 11/27/13]
Post by: Node on March 24, 2014, 01:08:05 AM
Tried this code

Code: [Select]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using ScriptDotNet;

namespace Hello
{
    class Program
    {
        static void Main(string[] args)
        {
            Stealth.Script_ClientPrint("test");
        }
    }
}

and got this
Code: [Select]
An exception raised at 09:01:47:382
'$C:\steal' is not a valid integer value
(00021A06){Stealth.exe } [00422A06] System.SysUtils.ConvertErrorFmt (Line 5388, "System.SysUtils.pas")
Call stack:
  (00021A01){Stealth.exe } [00422A01] System.SysUtils.ConvertErrorFmt (Line 5387, "System.SysUtils.pas")
  (0020FAC9){Stealth.exe } [00610AC9] Vcl.Controls.TControl.WndProc (Line 7224, "Vcl.Controls.pas")
  (002144B5){Stealth.exe } [006154B5] Vcl.Controls.TWinControl.WndProc (Line 10039, "Vcl.Controls.pas")
  (001DE805){Stealth.exe } [005DF805] Vcl.Forms.TCustomForm.WndProc (Line 4388, "Vcl.Forms.pas")
  (00213AF8){Stealth.exe } [00614AF8] Vcl.Controls.TWinControl.MainWndProc (Line 9751, "Vcl.Controls.pas")
  (000B5BE8){Stealth.exe } [004B6BE8] System.Classes.StdWndProc (Line 17013, "System.Classes.pas")
  (00559248){Stealth.exe } [0095A248] CoolTrayIcon.TCoolTrayIcon.HookFormProc (Line 1013, "CoolTrayIcon.pas")
  (000B5BE8){Stealth.exe } [004B6BE8] System.Classes.StdWndProc (Line 17013, "System.Classes.pas")
  (001E7858){Stealth.exe } [005E8858] Vcl.Forms.TApplication.ProcessMessage (Line 10267, "Vcl.Forms.pas")
  (006985BE){Stealth.exe } [00A995BE] Stealth.Stealth (Line 251, "")

can someone tell me what has gone wrong ?
Title: Re: [Release] Stealth .NET DLL [DLL Updated 11/27/13]
Post by: dxrom on March 24, 2014, 01:32:25 AM
Tried this code

Code: [Select]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using ScriptDotNet;

namespace Hello
{
    class Program
    {
        static void Main(string[] args)
        {
            Stealth.Script_ClientPrint("test");
        }
    }
}

and got this
Code: [Select]
An exception raised at 09:01:47:382
'$C:\steal' is not a valid integer value
(00021A06){Stealth.exe } [00422A06] System.SysUtils.ConvertErrorFmt (Line 5388, "System.SysUtils.pas")
Call stack:
  (00021A01){Stealth.exe } [00422A01] System.SysUtils.ConvertErrorFmt (Line 5387, "System.SysUtils.pas")
  (0020FAC9){Stealth.exe } [00610AC9] Vcl.Controls.TControl.WndProc (Line 7224, "Vcl.Controls.pas")
  (002144B5){Stealth.exe } [006154B5] Vcl.Controls.TWinControl.WndProc (Line 10039, "Vcl.Controls.pas")
  (001DE805){Stealth.exe } [005DF805] Vcl.Forms.TCustomForm.WndProc (Line 4388, "Vcl.Forms.pas")
  (00213AF8){Stealth.exe } [00614AF8] Vcl.Controls.TWinControl.MainWndProc (Line 9751, "Vcl.Controls.pas")
  (000B5BE8){Stealth.exe } [004B6BE8] System.Classes.StdWndProc (Line 17013, "System.Classes.pas")
  (00559248){Stealth.exe } [0095A248] CoolTrayIcon.TCoolTrayIcon.HookFormProc (Line 1013, "CoolTrayIcon.pas")
  (000B5BE8){Stealth.exe } [004B6BE8] System.Classes.StdWndProc (Line 17013, "System.Classes.pas")
  (001E7858){Stealth.exe } [005E8858] Vcl.Forms.TApplication.ProcessMessage (Line 10267, "Vcl.Forms.pas")
  (006985BE){Stealth.exe } [00A995BE] Stealth.Stealth (Line 251, "")

can someone tell me what has gone wrong ?

Looks like an error, with your clearance level that's all I am permitted to tell you.
Title: Re: [Release] Stealth .NET DLL [DLL Updated 11/27/13]
Post by: Node on March 24, 2014, 01:36:59 AM
Looks like an error, with your clearance level that's all I am permitted to tell you.

That's totally does not make any sense what you have said to be honest
Title: Re: [Release] Stealth .NET DLL [DLL Updated 11/27/13]
Post by: Crome969 on March 24, 2014, 02:21:35 AM
Looks like an error, with your clearance level that's all I am permitted to tell you.

That's totally does not make any sense what you have said to be honest

He want to tell you, you should introduce yourself before asking questions.
We also need more informations how this occured.

Stealth Client Version
Client Version

The Exception wich raised up is from internal Delphi Code.
It maybe possible you use the wrong Stealth version. Until orich update his dll, you are limited to use Stealth 6.2.1 in case if C#
Title: Re: [Release] Stealth .NET DLL [DLL Updated 11/27/13]
Post by: Node on March 24, 2014, 04:10:34 AM
He want to tell you, you should introduce yourself before asking questions.
We also need more informations how this occured.

Stealth Client Version
Client Version

The Exception wich raised up is from internal Delphi Code.
It maybe possible you use the wrong Stealth version. Until orich update his dll, you are limited to use Stealth 6.2.1 in case if C#

I come from the internet, I picked up UO again so I have something to do and maybe even learn more scripting, I'm using the latest Stealth client (6.4) (UO Client 7.0.15.1), seems like also it does not work without Python installed, it will just never launch, and well the error occurred when I tried to follow the YT video tutorial