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

Pages: [1] 2
1
Am I able to use stealth 6.7.0 and runuo server in english?

2
Stealth Client / [6.7.0 pascal] how does context menuehook works?
« on: November 10, 2016, 11:51:15 PM »
function GetBod(Shop: String; Debug: String):Integer;
var
list2      : TStringList;
UserList   : TStringList;
i          : integer;
x          : integer;
text       : String;

begin
ClearShopList;
ClearContextMenu;
FindDistance:= 3;
FindVertical:= 3;
list2 := TStringList.Create;
FindType($0190,Ground);
wait(100);
UserList := TStringList.Create;
GetFindedList(UserList);
for i:= 0 to UserList.count -1 do
begin
    text := GetTooltip(StrToInt('$'+UserList));
    if Debug = 'True' then
    begin
        FillNewWindow('Chars around: ' + text+ '  $' + UserList);
    end;
    if  (pos(Shop, text)>0) and (pos('guildmaster', text)=0) then
    begin
        if Debug = 'True' then
        begin
            FillNewWindow('My Shop found at: ' + InttoStr(i));
        end;
        ClearContextMenu;
        RequestContextMenu(StrtoInt('$'+UserList));
        wait(1000);        
        GetContextMenu(list2);
        for x:= 0 to list2.count-1 do
        begin
            if Debug = 'True' then
            begin
                FillNewWindow('Shops ContextMenue: ' + list2
  • );

            end;
            if  (pos('Bulk Order Info', list2
  • )>0) then

            begin
                if Debug = 'True' then
                begin
                    FillNewWindow('Shops ContextMenue entry at: ' + InttoStr(x));
                end;
                SetContextMenuHook(StrToInt('$'+UserList), x);
                wait(1000);                    
            end;
            ClearShopList;
        end;
        ClearContextMenu;        
    end;
end;                                                                
UserList.free;
list2.free;

  Result := 1;
end;


SetContextMenuHook(StrToInt('$'+UserList), x); do not work every time.

can you explain me?


3
Stealth Client / wheere can i download stealth 6.7.1 and 6.7.2 and above?
« on: October 18, 2016, 11:53:34 PM »
thx for a working link

4
Stealth Client / [6.7.0 pascal] how to write text to console?
« on: October 17, 2016, 07:55:04 AM »
I tried the following,

Code: [Select]
//ConsoleEntryUnicodeReply(('10'+'\r'));
ClientPrint('10');

nothing happen. is it a bug or someone has a working way?

btw i noticed the same when using stealth 6.7.0 and easyuo. there "msg 123 $" does not work

5
Stealth Client / [6.7.0 pascal] a simple sell function
« on: October 17, 2016, 07:50:44 AM »
Code: [Select]
function SellItems(Shop: String; Item: Cardinal; Amount: Integer; Debug : Integer): Integer;

var
i          : integer;
x          : integer;
list2      : TStringList;
UserList   : TStringList;
begin
ClearShopList;
SetAutoSellDelay($0001);
AutoSell(Item,$0000,Amount);
FindDistance:= 9;
FindVertical:= 9;
list2 := TStringList.Create;
FindType($0190,Ground);
wait(100);
UserList := TStringList.Create;
GetFindedList(UserList);
for i:= 0 to UserList.count -1 do
begin
    if Debug = 1 then
    begin
        FillNewWindow('Chars around: ' + GetTooltip(StrToInt('$'+UserList[i]))+ '  $' + UserList[i]);
    end;
    if  0 < pos(Shop, GetTooltip(StrtoInt('$'+UserList[i]))) then
    begin
        if Debug = 1 then
        begin
            FillNewWindow('My Shop found at: ' + InttoStr(i));
        end;
        ClearContextMenu;
        RequestContextMenu(StrtoInt('$'+UserList[i]));
        wait(1000);       
        GetContextMenu(list2);
        for x:= 1 to list2.count do
        begin
            if Debug = 1 then
            begin
                FillNewWindow('Shops ContextMenue: ' + list2[x]);
            end;
            if  0 < pos('Sell', list2[x]) then
            begin
                if Debug = 1 then
                begin
                    FillNewWindow('Shops ContextMenue entry at: ' + InttoStr(x));
                end;
                SetContextMenuHook(StrToInt('$'+UserList[i]), x);                   
            end;
            ClearShopList;
        end;
        ClearContextMenu;       
    end;
end;
UserList.free;
list2.free;
result := 1;

end;

6
I using the following pascal code:

Code: [Select]
gi : TGumpInfo ;GetGumpInfo(1, gi);
FillNewWindow('Gump has ' + IntToStr(Length(gi.GumpButtons)) + ' buttons');
FillNewWindow('Gump has ' + IntToStr(Length(gi.TextEntries)) + ' textfields');
WaitTextEntry('EYM');
NumGumpTextEntry(0, 190, 'EYM ');
NumGumpButton(0, 587);
WaitGump('4007');
UseObject($49F2B7D8);

to edit a text field inside the gump and to press the ok button.

Unfortunaly nothing happens.

Gump text is:
Code: [Select]
* Info * : ID: $488D20D4 Name: NoName Type: $14ED Color: $0000
* Info * : Quantity: 1 X: 76 Y: 114 Z: 0
* Info * : Tooltip: Concession Contract|Blessed|Weight: 1 stone|ranger: Duration: 01:00:00|[Inactive]
Serial: 5CC95D
GumpID: E150888
X: 0032
Y: 0032
Pages: 1
Gump Options:

GumpPicTiled: X Y   Width   Height   Gump_ID   ElemNum
GumpPicTiled: 33  20  413  373  2624  2
GumpPicTiled: 380  343  40  19  3004  181

GumpPics: X  Y  ID  Hue  Page  ElemNum
GumpPic: 20  5  10460  0  0  4
GumpPic: 430  5  10460  0  0  5
GumpPic: 20  377  10460  0  0  6
GumpPic: 430  377  10460  0  0  7

ResizePics: X   Y   ID   Width   Height   Page   ElemNum
0   ResizePic: 25  10  5054  430  392  0  1

XmfHTMLGumpColor: X   Y   Width   Height   ClilocID   Background   scrollbar   Hue   ElemNum   ClilocText
0   XmfHTMLGumpColor: 105  368  120  20  1011012  0  0  32767  184  CANCEL
1   XmfHTMLGumpColor: 235  368  120  20  1006044  0  0  32767  186  OK

CheckerTrans: X   Y   Width   Height   Page   ElemNum
0   CheckerTrans: 33  20  413  373  0  3

HTMLGump: X   Y   Width   Height   TextID   Background   scrollbar   Page   ElemNum
0   HTMLGump: 25  25  430  20  0  0  0  0  8
1   HTMLGump: 40  72  415  20  1  0  0  0  9
2   HTMLGump: 55  120  400  20  2  0  0  0  10
3   HTMLGump: 40  216  10  16  3  0  0  0  11
4   HTMLGump: 50  216  10  16  3  0  0  0  12
5   HTMLGump: 60  216  10  16  4  0  0  0  13
6   HTMLGump: 70  216  10  16  4  0  0  0  14
7   HTMLGump: 80  216  10  16  4  0  0  0  15
8   HTMLGump: 90  216  10  16  3  0  0  0  16
9   HTMLGump: 100  216  10  16  3  0  0  0  17
10   HTMLGump: 110  216  10  16  4  0  0  0  18
11   HTMLGump: 120  216  10  16  3  0  0  0  19
12   HTMLGump: 130  216  10  16  4  0  0  0  20
13   HTMLGump: 140  216  10  16  4  0  0  0  21
14   HTMLGump: 150  216  10  16  4  0  0  0  22
15   HTMLGump: 160  216  10  16  4  0  0  0  23
16   HTMLGump: 170  216  10  16  4  0  0  0  24
17   HTMLGump: 180  216  10  16  3  0  0  0  25
18   HTMLGump: 190  216  10  16  3  0  0  0  26
19   HTMLGump: 200  216  10  16  3  0  0  0  27
20   HTMLGump: 210  216  10  16  3  0  0  0  28
21   HTMLGump: 220  216  10  16  3  0  0  0  29
22   HTMLGump: 230  216  10  16  3  0  0  0  30
23   HTMLGump: 240  216  10  16  4  0  0  0  31
24   HTMLGump: 40  232  10  16  5  0  0  0  32
25   HTMLGump: 50  232  10  16  4  0  0  0  33
26   HTMLGump: 60  232  10  16  5  0  0  0  34
27   HTMLGump: 70  232  10  16  4  0  0  0  35
28   HTMLGump: 80  232  10  16  6  0  0  0  36
29   HTMLGump: 90  232  10  16  4  0  0  0  37
30   HTMLGump: 100  232  10  16  6  0  0  0  38
31   HTMLGump: 110  232  10  16  7  0  0  0  39
32   HTMLGump: 120  232  10  16  4  0  0  0  40
33   HTMLGump: 130  232  10  16  7  0  0  0  41
34   HTMLGump: 140  232  10  16  4  0  0  0  42
35   HTMLGump: 150  232  10  16  4  0  0  0  43
36   HTMLGump: 160  232  10  16  4  0  0  0  44
37   HTMLGump: 170  232  10  16  4  0  0  0  45
38   HTMLGump: 180  232  10  16  7  0  0  0  46
39   HTMLGump: 190  232  10  16  4  0  0  0  47
40   HTMLGump: 200  232  10  16  4  0  0  0  48
41   HTMLGump: 210  232  10  16  3  0  0  0  49
42   HTMLGump: 220  232  10  16  4  0  0  0  50
43   HTMLGump: 230  232  10  16  4  0  0  0  51
44   HTMLGump: 240  232  10  16  5  0  0  0  52
45   HTMLGump: 40  248  10  16  4  0  0  0  53
46   HTMLGump: 50  248  10  16  5  0  0  0  54
47   HTMLGump: 60  248  10  16  4  0  0  0  55
48   HTMLGump: 70  248  10  16  8  0  0  0  56
49   HTMLGump: 80  248  10  16  4  0  0  0  57
50   HTMLGump: 90  248  10  16  6  0  0  0  58
51   HTMLGump: 100  248  10  16  4  0  0  0  59
52   HTMLGump: 110  248  10  16  7  0  0  0  60
53   HTMLGump: 120  248  10  16  4  0  0  0  61
54   HTMLGump: 130  248  10  16  7  0  0  0  62
55   HTMLGump: 140  248  10  16  4  0  0  0  63
56   HTMLGump: 150  248  10  16  4  0  0  0  64
57   HTMLGump: 160  248  10  16  4  0  0  0  65
58   HTMLGump: 170  248  10  16  4  0  0  0  66
59   HTMLGump: 180  248  10  16  7  0  0  0  67
60   HTMLGump: 190  248  10  16  4  0  0  0  68
61   HTMLGump: 200  248  10  16  7  0  0  0  69
62   HTMLGump: 210  248  10  16  4  0  0  0  70
63   HTMLGump: 220  248  10  16  7  0  0  0  71
64   HTMLGump: 230  248  10  16  4  0  0  0  72
65   HTMLGump: 240  248  10  16  7  0  0  0  73
66   HTMLGump: 40  264  10  16  4  0  0  0  74
67   HTMLGump: 50  264  10  16  6  0  0  0  75
68   HTMLGump: 60  264  10  16  4  0  0  0  76
69   HTMLGump: 70  264  10  16  4  0  0  0  77
70   HTMLGump: 80  264  10  16  4  0  0  0  78
71   HTMLGump: 90  264  10  16  5  0  0  0  79
72   HTMLGump: 100  264  10  16  4  0  0  0  80
73   HTMLGump: 110  264  10  16  7  0  0  0  81
74   HTMLGump: 120  264  10  16  4  0  0  0  82
75   HTMLGump: 130  264  10  16  7  0  0  0  83
76   HTMLGump: 140  264  10  16  4  0  0  0  84
77   HTMLGump: 150  264  10  16  4  0  0  0  85
78   HTMLGump: 160  264  10  16  4  0  0  0  86
79   HTMLGump: 170  264  10  16  4  0  0  0  87
80   HTMLGump: 180  264  10  16  7  0  0  0  88
81   HTMLGump: 190  264  10  16  4  0  0  0  89
82   HTMLGump: 200  264  10  16  7  0  0  0  90
83   HTMLGump: 210  264  10  16  4  0  0  0  91
84   HTMLGump: 220  264  10  16  7  0  0  0  92
85   HTMLGump: 230  264  10  16  4  0  0  0  93
86   HTMLGump: 240  264  10  16  7  0  0  0  94
87   HTMLGump: 40  280  10  16  6  0  0  0  95
88   HTMLGump: 50  280  10  16  4  0  0  0  96
89   HTMLGump: 60  280  10  16  6  0  0  0  97
90   HTMLGump: 70  280  10  16  9  0  0  0  98
91   HTMLGump: 80  280  10  16  5  0  0  0  99
92   HTMLGump: 90  280  10  16  4  0  0  0  100
93   HTMLGump: 100  280  10  16  5  0  0  0  101
94   HTMLGump: 110  280  10  16  7  0  0  0  102
95   HTMLGump: 120  280  10  16  4  0  0  0  103
96   HTMLGump: 130  280  10  16  7  0  0  0  104
97   HTMLGump: 140  280  10  16  3  0  0  0  105
98   HTMLGump: 150  280  10  16  3  0  0  0  106
99   HTMLGump: 160  280  10  16  3  0  0  0  107
100   HTMLGump: 170  280  10  16  3  0  0  0  108
101   HTMLGump: 180  280  10  16  7  0  0  0  109
102   HTMLGump: 190  280  10  16  4  0  0  0  110
103   HTMLGump: 200  280  10  16  7  0  0  0  111
104   HTMLGump: 210  280  10  16  6  0  0  0  112
105   HTMLGump: 220  280  10  16  4  0  0  0  113
106   HTMLGump: 230  280  10  16  6  0  0  0  114
107   HTMLGump: 240  280  10  16  4  0  0  0  115
108   HTMLGump: 40  296  10  16  5  0  0  0  116
109   HTMLGump: 50  296  10  16  6  0  0  0  117
110   HTMLGump: 60  296  10  16  4  0  0  0  118
111   HTMLGump: 70  296  10  16  4  0  0  0  119
112   HTMLGump: 80  296  10  16  4  0  0  0  120
113   HTMLGump: 90  296  10  16  5  0  0  0  121
114   HTMLGump: 100  296  10  16  6  0  0  0  122
115   HTMLGump: 110  296  10  16  5  0  0  0  123
116   HTMLGump: 120  296  10  16  3  0  0  0  124
117   HTMLGump: 130  296  10  16  3  0  0  0  125
118   HTMLGump: 140  296  10  16  3  0  0  0  126
119   HTMLGump: 150  296  10  16  3  0  0  0  127
120   HTMLGump: 160  296  10  16  3  0  0  0  128
121   HTMLGump: 170  296  10  16  6  0  0  0  129
122   HTMLGump: 180  296  10  16  7  0  0  0  130
123   HTMLGump: 190  296  10  16  3  0  0  0  131
124   HTMLGump: 200  296  10  16  3  0  0  0  132
125   HTMLGump: 210  296  10  16  3  0  0  0  133
126   HTMLGump: 220  296  10  16  6  0  0  0  134
127   HTMLGump: 230  296  10  16  4  0  0  0  135
128   HTMLGump: 240  296  10  16  4  0  0  0  136
129   HTMLGump: 40  312  10  16  4  0  0  0  137
130   HTMLGump: 50  312  10  16  4  0  0  0  138
131   HTMLGump: 60  312  10  16  4  0  0  0  139
132   HTMLGump: 70  312  10  16  4  0  0  0  140
133   HTMLGump: 80  312  10  16  4  0  0  0  141
134   HTMLGump: 90  312  10  16  4  0  0  0  142
135   HTMLGump: 100  312  10  16  4  0  0  0  143
136   HTMLGump: 110  312  10  16  4  0  0  0  144
137   HTMLGump: 120  312  10  16  4  0  0  0  145
138   HTMLGump: 130  312  10  16  4  0  0  0  146
139   HTMLGump: 140  312  10  16  4  0  0  0  147
140   HTMLGump: 150  312  10  16  4  0  0  0  148
141   HTMLGump: 160  312  10  16  4  0  0  0  149
142   HTMLGump: 170  312  10  16  4  0  0  0  150
143   HTMLGump: 180  312  10  16  4  0  0  0  151
144   HTMLGump: 190  312  10  16  4  0  0  0  152
145   HTMLGump: 200  312  10  16  4  0  0  0  153
146   HTMLGump: 210  312  10  16  4  0  0  0  154
147   HTMLGump: 220  312  10  16  4  0  0  0  155
148   HTMLGump: 230  312  10  16  4  0  0  0  156
149   HTMLGump: 240  312  10  16  4  0  0  0  157
150   HTMLGump: 40  328  10  16  4  0  0  0  158
151   HTMLGump: 50  328  10  16  4  0  0  0  159
152   HTMLGump: 60  328  10  16  4  0  0  0  160
153   HTMLGump: 70  328  10  16  4  0  0  0  161
154   HTMLGump: 80  328  10  16  4  0  0  0  162
155   HTMLGump: 90  328  10  16  4  0  0  0  163
156   HTMLGump: 100  328  10  16  4  0  0  0  164
157   HTMLGump: 110  328  10  16  4  0  0  0  165
158   HTMLGump: 120  328  10  16  4  0  0  0  166
159   HTMLGump: 130  328  10  16  4  0  0  0  167
160   HTMLGump: 140  328  10  16  4  0  0  0  168
161   HTMLGump: 150  328  10  16  4  0  0  0  169
162   HTMLGump: 160  328  10  16  4  0  0  0  170
163   HTMLGump: 170  328  10  16  4  0  0  0  171
164   HTMLGump: 180  328  10  16  4  0  0  0  172
165   HTMLGump: 190  328  10  16  4  0  0  0  173
166   HTMLGump: 200  328  10  16  4  0  0  0  174
167   HTMLGump: 210  328  10  16  4  0  0  0  175
168   HTMLGump: 220  328  10  16  4  0  0  0  176
169   HTMLGump: 230  328  10  16  4  0  0  0  177
170   HTMLGump: 240  328  10  16  4  0  0  0  178
171   HTMLGump: 40  344  415  20  10  0  0  0  179

GumpTexts: X   Y   Color   Text_ID   Page   ElemNum
0   GumpText: 288  343  137  11  0  180

TextEntries: X   Y   Width   Height   Color   Return_value   Default_text_id   Page   ElemNum
0   TextEntry: 380  343  40  19  137  392  12  0  182

Text Lines:
<basefont color=WHITE><CENTER>A Ranger Concession Contract</center></basefont>
<basefont color=WHITE><CENTER>Thank you for purchasing! We wish a profitable business!</center></basefont>
<basefont color=WHITE>Duration: 01:00:00</basefont>
<basefont color=#FFFFFF><center>_</center>
<basefont color=#FFFFFF><center> </center>
<basefont color=#FFFFFF><center>\</center>
<basefont color=#FFFFFF><center>/</center>
<basefont color=#FFFFFF><center>|</center>
<basefont color=#FFFFFF><center>V</center>
<basefont color=#FFFFFF><center>^</center>
<basefont color=WHITE>Do you want to accept this contract?</basefont>
Countersign it:


GumpButtons: X   Y   Released_ID  Pressed_ID   Quit   Page_ID   Return_value   Page   ElemNum
0   GumpButton: 70  368  4005  4007  1  0  0  0  183
1   GumpButton: 200  368  4005  4007  1  0  392  0  185

Previous gump reply:
  Button id: 0
Text entries:
  440 ,

regards,

7
Stealth Client / Is Stealth 6.7.x more stable than 7.4.x
« on: September 16, 2016, 08:35:10 AM »
i am working with events , gumps and c# sdk 0.9.7
and have in fresh started client a client lost.
so anyone knows about a more stabel plow.

8
Stealth Client / [c# scriptsdk 0.9.7] how do you use edit in gumps?
« on: September 03, 2016, 08:32:47 AM »
Hello,

I use the the follong code to begin parsing a gump.

Code: [Select]
            List<Gump> tmp = ScriptSDK.Gumps.Gump.ActiveGumps;
            //Gump tmp1 = ScriptSDK.Gumps.Gump(); .GetGump((uint)0x005C0198);
            List<GumpButton> button = tmp[0].Buttons;
            List<GumpTextEdit> edit = tmp[0].TextEdits;
            List<GumpHtml> html = tmp[0].HTMLTexts;
            List<GumpHtmlLocalized> htmllocal = tmp[0].HTMLLocalizedTexts;
            //System.String xxx = "123";
            //edit[0].Text = xxx;
            ScriptLogger.WriteLine(String.Format("Serial: {0}", tmp[0].Serial));
            ScriptLogger.WriteLine(String.Format("GumpType: {0}", tmp[0].GumpType));
            ScriptLogger.WriteLine(String.Format("ButtonCount: {0}", button.Count));
            ScriptLogger.WriteLine(String.Format("EditCount: {0}", edit.Count));
            ScriptLogger.WriteLine(String.Format("HtmlCount: {0}", html.Count));
            ScriptLogger.WriteLine(String.Format("HtmlLocalCount: {0}", htmllocal.Count));

            edit[0].Text = "123";

            Console.WriteLine("Finished");
            Console.ReadKey();

but edit[0].Text = "123"; is not able to enter text in my client window.
Do I have to update something and how do i do it ?

another question is how to parse the html enties.
I am not a beginner and need any help parsing the 172 html gump entries into the console.
plz give me an example.

regards,
epsilon2

9
Stealth Client / Which Assebly do you need to compile sdk 0.9.7
« on: August 16, 2016, 12:38:32 PM »
plz tell me

10
Stealth Client / [c# scriptsdk 0.9.3] Do Know how to use types?
« on: August 16, 2016, 07:08:24 AM »
I used this example
https://sourceforge.net/p/scriptsdk/wiki/ItemSearch/

so i generated this class

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ScriptSDK;
using ScriptSDK.Data;
using ScriptSDK.Attributes;
using ScriptSDK.Configuration;
using ScriptSDK.Gumps;
using ScriptSDK.Targets;
using ScriptSDK.Utils;
using ScriptSDK.ContextMenus;
using ScriptSDK.Engines;
using ScriptSDK.Items;
using ScriptSDK.Mobiles;
using StealthAPI;
using ScriptDotNet2;

namespace ConsoleApplication1
{
    [QueryGraphic(0x0190, 0x0191)] //Possible Graphic Types for a Neclace
    public class class NPC : Mobile
    {
        public NPC(Serial serial)
            : base(serial)
        {
        }
    }
}


but QueryGraphic is not valid.

I used it for this  functions:


List<Type> types = new List<Type>();
types.Add(typeof(Cow));
types.Add(typeof(Dog));
//We designed a Class Cow and a Class Dog which inherited from Mobile and had search params
List<Mobile> mobilesearch = Mobile.Find(types,0x0,true);

thx for advancing me

11
Stealth Client / [c#] How to convert to system.type
« on: August 14, 2016, 10:51:58 PM »
Hello,

I have some problem mit int and system.type.  Do You know how to enter Mobile.Find(.....) the right Type ?

regards,

Code: [Select]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
//using ScriptDotNet2;
using ScriptSDK;
using ScriptSDK.Data;
using ScriptSDK.Attributes;
using ScriptSDK.Configuration;
using ScriptSDK.Gumps;
using ScriptSDK.Targets;
using ScriptSDK.Utils;
using ScriptSDK.ContextMenus;
using ScriptSDK.Engines;
using ScriptSDK.Items;
using ScriptSDK.Mobiles;
using StealthAPI;

namespace ConsoleApplication1
{
    internal static class Program
    {
        [STAThread]
        private static void Main(string[] args)
        {
            SDK.Initialize();
            Stealth.Client.SendTextToUO("Hello World!");
            var Player = PlayerMobile.GetPlayer();           
            List<Type> types = new List<Type>();
            types.Add(typeof(Cow));
            types.Add(typeof(Dog));
            List<Type> Mob = Mobile.Find(0x0190, 0x0, true);

            ScriptLogger.Initialize();
            ScriptLogger.LogToStealth = true;
            ScriptSDK.Configuration.ContextOptions.Initialize();
            Player.ContextMenu.Parse();
            //       var results = Scanner.Find(typeof(Necklace), Player.Backpack.Serial.Value, true);//Sends Query based on QueryGraphic
            ScriptLogger.WriteLine(String.Format("{0}", Player.ContextMenu.Entries.ToString()));
            Stealth.Client.Wait(1000);
            Player.ContextMenu.Click("Check your stats");
        }
    }
}

12
Hi,

please explain me that.

Thank You

13
Submit your Script / Towntraveler service for NPC to earn gold
« on: June 24, 2016, 12:48:07 AM »

14
Stealth Client / {c#} Events in 9.2 sdk and scriptdotnet2.ll
« on: March 11, 2016, 09:19:30 AM »
hello,

i have some problems to register some events in c#.
For now i want to use the OnMenue Event and OnGumpIncome Event.
As I understand, the On Menue Event will be fired when the ContextMenue ist shown.
The OnGumpIncome is hopefully able to parse and awenser to an opened gump.

I have the following code and dont know how how to register the function.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ScriptSDK;
using ScriptSDK.API;
using ScriptSDK.Attributes;
using ScriptSDK.Configuration;
using ScriptSDK.ContextMenus;
using ScriptSDK.Data;
using ScriptSDK.Engines;
using ScriptSDK.Gumps;
using ScriptSDK.Items;
using ScriptSDK.Mobiles;
using ScriptSDK.Targets;
using ScriptSDK.Utils;
using ScriptDotNet2;
using System.Threading;

namespace Event
{
    class Program
    {
        static void OnMenuHandler(uint DialogID, ushort MenuID)
        {
            
            Console.WriteLine("Menue Opened");
        }

        private static void TimerCallback(Object o)
        {
            Console.WriteLine("In TimerCallback: " + DateTime.Now);
            GC.Collect();
        }


        static void Main(string[] args)
        {
            Console.WriteLine("Program Started");
            ScriptSDK.OnMenuEvent += OnMenuHandler;
            ScriptDotNet2.Stealth.Script_EnableEvent(TPacketEvent.evMenu);
            Timer t = new Timer(TimerCallback, null, 0, 1000);
            Console.WriteLine("Waiting for event fire, Press any key to stop");
            Console.ReadKey();
        }
    }
}


regards

15
Stealth Client / {c#} Use a Runebook in Stealth
« on: January 14, 2016, 06:01:37 AM »
Any Direction You want to drive me through?

regards,

Pages: [1] 2