-
Notifications
You must be signed in to change notification settings - Fork 1
/
frmRoD.frm
1505 lines (1233 loc) · 45.6 KB
/
frmRoD.frm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
VERSION 5.00
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Begin VB.Form frmRoD
BorderStyle = 0 'None
Caption = "Rogue of Diablo v2"
ClientHeight = 5325
ClientLeft = 0
ClientTop = 0
ClientWidth = 11670
BeginProperty Font
Name = "Verdana"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "frmRoD.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5325
ScaleWidth = 11670
StartUpPosition = 3 'Windows Default
Begin VB.Timer Timer2
Enabled = 0 'False
Interval = 2000
Left = 2280
Top = 4440
End
Begin VB.PictureBox TrayIcon
AutoRedraw = -1 'True
AutoSize = -1 'True
Height = 300
Left = 1440
Picture = "frmRoD.frx":F172
ScaleHeight = 240
ScaleWidth = 240
TabIndex = 28
Top = 4440
Visible = 0 'False
Width = 300
End
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 1000
Left = 720
Top = 4440
End
Begin MSWinsockLib.Winsock sckBNLS
Left = 3960
Top = 4920
_ExtentX = 741
_ExtentY = 741
_Version = 393216
End
Begin MSWinsockLib.Winsock sckMCP
Index = 0
Left = 3480
Top = 4920
_ExtentX = 741
_ExtentY = 741
_Version = 393216
End
Begin MSWinsockLib.Winsock sckBnet
Index = 0
Left = 3000
Top = 4920
_ExtentX = 741
_ExtentY = 741
_Version = 393216
End
Begin VB.CheckBox chkClassic
BackColor = &H00FFFFFF&
Caption = "Classic"
Height = 495
Left = 6960
TabIndex = 11
Top = 1200
Width = 1095
End
Begin VB.CheckBox chkEx
BackColor = &H00FFFFFF&
Caption = "Expansion"
Height = 495
Left = 6960
TabIndex = 10
Top = 1680
Width = 1455
End
Begin VB.CheckBox chkHard
BackColor = &H00FFFFFF&
Caption = "Hardcore"
Height = 495
Left = 6960
TabIndex = 9
Top = 2160
Width = 1455
End
Begin VB.CheckBox chkLad
BackColor = &H00FFFFFF&
Caption = "Ladder"
Height = 495
Left = 6960
TabIndex = 8
Top = 2640
Width = 1095
End
Begin VB.OptionButton optAma
BackColor = &H00FFFFFF&
Caption = "Amazon"
BeginProperty Font
Name = "Verdana"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 8880
TabIndex = 7
Top = 960
Width = 1335
End
Begin VB.OptionButton optSorc
BackColor = &H00FFFFFF&
Caption = "Sorceress"
BeginProperty Font
Name = "Verdana"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 8880
TabIndex = 6
Top = 1320
Width = 1455
End
Begin VB.OptionButton optAss
BackColor = &H00FFFFFF&
Caption = "Assassin"
BeginProperty Font
Name = "Verdana"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 8880
TabIndex = 5
Top = 3120
Width = 1215
End
Begin VB.OptionButton optDru
BackColor = &H00FFFFFF&
Caption = "Druid"
BeginProperty Font
Name = "Verdana"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 8880
TabIndex = 4
Top = 2760
Width = 1215
End
Begin VB.OptionButton optBarb
BackColor = &H00FFFFFF&
Caption = "Barbarian"
BeginProperty Font
Name = "Verdana"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 8880
TabIndex = 3
Top = 2400
Width = 1695
End
Begin VB.OptionButton optPala
BackColor = &H00FFFFFF&
Caption = "Paladin"
BeginProperty Font
Name = "Verdana"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 8880
TabIndex = 2
Top = 2040
Width = 1215
End
Begin VB.OptionButton optNecro
BackColor = &H00FFFFFF&
Caption = "Necromancer"
BeginProperty Font
Name = "Verdana"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 8880
TabIndex = 1
Top = 1680
Width = 1815
End
Begin RichTextLib.RichTextBox rtb
Height = 2175
Left = 660
TabIndex = 12
Top = 1050
Width = 6015
_ExtentX = 10610
_ExtentY = 3836
_Version = 393217
BackColor = 16777215
BorderStyle = 0
ScrollBars = 2
Appearance = 0
TextRTF = $"frmRoD.frx":1E2E4
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Image Image8
Height = 255
Left = 10440
Picture = "frmRoD.frx":1E360
Stretch = -1 'True
Top = 4920
Width = 255
End
Begin VB.Image Image7
Height = 255
Left = 10080
Picture = "frmRoD.frx":1F63A
Stretch = -1 'True
Top = 4920
Width = 255
End
Begin VB.Image Image6
Height = 255
Left = 10440
Picture = "frmRoD.frx":20914
Stretch = -1 'True
Top = 4920
Visible = 0 'False
Width = 255
End
Begin VB.Image Image5
Height = 255
Left = 10080
Picture = "frmRoD.frx":21BEE
Stretch = -1 'True
Top = 4920
Visible = 0 'False
Width = 255
End
Begin VB.Label Label13
BackColor = &H000000FF&
BackStyle = 0 'Transparent
Height = 615
Left = 9840
TabIndex = 27
Top = 4800
Width = 1005
End
Begin VB.Label Label12
BackColor = &H00FFFFFF&
Height = 210
Left = 7560
TabIndex = 26
Top = 4560
Width = 3495
End
Begin VB.Shape Shape3
BorderColor = &H00000000&
BorderWidth = 3
FillColor = &H00FFFFFF&
FillStyle = 0 'Solid
Height = 615
Left = 7920
Shape = 4 'Rounded Rectangle
Top = 4600
Width = 3015
End
Begin VB.Label Label4
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "Rogue of Diablo v2"
BeginProperty Font
Name = "Courier New"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 960
TabIndex = 25
Top = 165
Width = 2535
End
Begin VB.Label Label11
BackColor = &H00FFFFFF&
Height = 360
Left = 480
TabIndex = 24
Top = 495
Width = 3375
End
Begin VB.Shape Shape2
BorderColor = &H00000000&
BorderWidth = 3
FillColor = &H00FFFFFF&
FillStyle = 0 'Solid
Height = 615
Left = 720
Shape = 4 'Rounded Rectangle
Top = 120
Width = 3015
End
Begin VB.Label Label10
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "Settings"
Height = 255
Left = 9720
TabIndex = 23
Top = 4320
Width = 1215
End
Begin VB.Label Label2
BackColor = &H000000FF&
BackStyle = 0 'Transparent
Height = 495
Left = 9600
TabIndex = 22
Top = 4200
Width = 1455
End
Begin VB.Label Label7
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "Stop"
Height = 255
Left = 8760
TabIndex = 21
Top = 4320
Width = 615
End
Begin VB.Label Label1
BackColor = &H000000FF&
BackStyle = 0 'Transparent
Height = 495
Left = 8640
TabIndex = 20
Top = 4200
Width = 855
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "Start"
Height = 255
Left = 7920
TabIndex = 19
Top = 4320
Width = 615
End
Begin VB.Label Label3
BackColor = &H000000FF&
BackStyle = 0 'Transparent
Height = 495
Left = 7800
TabIndex = 18
Top = 4200
Width = 855
End
Begin VB.Line Line1
Index = 5
X1 = 1680
X2 = 6720
Y1 = 960
Y2 = 960
End
Begin VB.Line Line1
Index = 4
X1 = 600
X2 = 4560
Y1 = 3360
Y2 = 3360
End
Begin VB.Label Label9
Alignment = 2 'Center
BackColor = &H00FFFFFF&
Caption = "Log"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1320
TabIndex = 17
Top = 840
Width = 375
End
Begin VB.Line Line1
Index = 3
X1 = 600
X2 = 1320
Y1 = 960
Y2 = 960
End
Begin VB.Line Line7
X1 = 600
X2 = 600
Y1 = 960
Y2 = 3360
End
Begin VB.Label Label8
Alignment = 2 'Center
BackColor = &H00FFFFFF&
Caption = "Speed: 0 p/s"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 4560
TabIndex = 16
Top = 3240
Width = 1215
End
Begin VB.Line Line6
X1 = 5760
X2 = 6720
Y1 = 3360
Y2 = 3360
End
Begin VB.Line Line5
X1 = 6720
X2 = 6720
Y1 = 960
Y2 = 3360
End
Begin VB.Label lblClass
BackColor = &H00FFFFFF&
Caption = "Class: Amazon"
BeginProperty Font
Name = "Verdana"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 600
TabIndex = 15
Top = 3600
Width = 2415
End
Begin VB.Label lblType
BackColor = &H00FFFFFF&
Caption = "Type: Classic"
BeginProperty Font
Name = "Verdana"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3120
TabIndex = 14
Top = 3600
Width = 3615
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Enabled = 0 'False
Height = 375
Left = 5520
TabIndex = 13
Top = 3720
Width = 615
End
Begin VB.Shape Shape1
BorderColor = &H00000000&
BorderWidth = 3
FillColor = &H00FFFFFF&
FillStyle = 0 'Solid
Height = 4575
Left = 120
Shape = 4 'Rounded Rectangle
Top = 360
Width = 11295
End
Begin VB.Label lblFlags
BackStyle = 0 'Transparent
Enabled = 0 'False
Height = 375
Left = 10920
TabIndex = 0
Top = 4560
Width = 615
End
End
Attribute VB_Name = "frmRoD"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Function GetWindowLong Lib "User32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Dim u As Integer
Private Declare Function SetWindowLong Lib "User32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib "User32" (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
'types
Private Const flgClassic = &H0
Private Const flgHardcore = &H4
Private Const flgExpansion = &H20
Private Const flgLadder = &H40
'classes
Private Const flgAmazon = &H0
Private Const flgSorc = &H1
Private Const flgNecro = &H2
Private Const flgPala = &H3
Private Const flgBarb = &H4
Private Const flgDruid = &H5
Private Const flgAss = &H6
Private Const GWL_STYLE = (-16)
Private Const GWL_EXSTYLE = (-20)
Private Const WS_EX_LAYERED = &H80000
Private Const LWA_COLORKEY = &H1
Const WS_EX_TRANSPARENT = &H20&
' [01:04] <@lord2800> classic, hardcore, ladder, expansion, expansion hardcore, expansion ladder, classic hardcore ladder, expansion hardcore ladder
Private Sub chkClassic_Click()
If chkClassic = 1 Then
chkEx = 0
flags = flags + Hex(flgClassic)
'lblFlags.Caption = Flags
End If
If chkClassic = 0 Then
flags = flags - Hex(flgClassic)
'lblFlags.Caption = Flags
End If
CheckFlags (flags)
End Sub
Private Sub chkEx_Click()
If chkEx = 1 Then
chkClassic = 0
flags = flags + Hex(flgExpansion)
'lblFlags.Caption = Flags
End If
If chkEx = 0 Then
flags = flags - Hex(flgExpansion)
'lblFlags.Caption = Flags
End If
CheckFlags (flags)
End Sub
Private Sub chkHard_Click()
If chkHard = 1 Then
flags = flags + Hex(flgHardcore)
'lblFlags.Caption = Flags
End If
If chkHard = 0 Then
flags = flags - Hex(flgHardcore)
'lblFlags.Caption = Flags
End If
CheckFlags (flags)
End Sub
Private Sub chkLad_Click()
If chkLad = 1 Then
flags = flags + Hex(flgLadder)
'lblFlags.Caption = Flags
End If
If chkLad = 0 Then
flags = flags - Hex(flgLadder)
'lblFlags.Caption = Flags
End If
CheckFlags (flags)
End Sub
Private Sub Command2_Click()
MsgBox CharList(0).Item(Str(CharList(0).HashCode("Char0")))
End Sub
Private Sub Command1_Click()
' MsgBox CharList(5).Item(Str(CharList(5).HashCode("Char0")))
'MsgBox ClassFlag
'MsgBox flags
'MsgBox Uper(0)
'LoadData ("Accounts.txt")
'MsgBox Replace(BNCSList.Item(Str(BNCSList.HashCode("BNCS0"))), Mid$(BNCSList.Item(Str(BNCSList.HashCode("BNCS0"))), 1, InStr(1, BNCSList.Item(Str(BNCSList.HashCode("BNCS0"))), "//") - 1), Mid$(BNCSList.Item(Str(BNCSList.HashCode("BNCS0"))), 1, InStr(1, BNCSList.Item(Str(BNCSList.HashCode("BNCS0"))), "//") - 1) & "RoD")
'MsgBox Mid$(BNCSList.Item(Str(BNCSList.HashCode("BNCS0"))), 1, InStr(1, BNCSList.Item(Str(BNCSList.HashCode("BNCS0"))), "//") - 1) & "RoD"
'CharDuring0x02CreatedCounter(0) = 5
'CharDuring0x02CreatedCounter(1) = 2
'MsgBox CharDuring0x02CreatedCounter(0)
MsgBox D2DVList.Count
'Call SetTimer(Me.hwnd, 1000, 5000, AddressOf TimerProc)
'MsgBox buf2.HexToStr("31 31")
End Sub
Private Sub Command3_Click()
LoadData ("Accounts2.txt")
End Sub
Private Sub Command4_Click()
LoadData ("Realm_Accounts.txt")
End Sub
'[01:04] <@lord2800> basically there's two basic types: classic or expansion, then there's two basic modes: hardcore and softcore, then there's two basic realms: nonladder and ladder
Private Sub Form_Load()
'SetWindowLong rtb.hWnd, GWL_EXSTYLE, WS_EX_TRANSPARENT
Me.BackColor = vbCyan 'Set the backcolor of the tobe transparent form to w/e color
SetWindowLong Me.hwnd, GWL_EXSTYLE, GetWindowLong(Me.hwnd, GWL_EXSTYLE) Or WS_EX_LAYERED
'now everything is transparent so you're gonna have to use this to only make what is a certain color transparent
SetLayeredWindowAttributes Me.hwnd, vbCyan, 0&, LWA_COLORKEY
AddChat "Rogue of Diablo Version 2 [Build 1]", &H408080
AddChat "Created by Myst", &H408080
AddChat "www.DarkBlizz.org", &H408080
AddChat "Op W@R / Op FallenArms [USEast]", &HCD69DD
AddChat "BETA EDITION - Still Under Development!!", &HFF4EE5
BNCS_Stuff.Server = GetSetting(App.ProductName, "Config", "Server")
BNCS_Stuff.Verbyte = GetSetting(App.ProductName, "Config", "Verbyte")
Spawn = GetSetting(App.ProductName, "Config", "Spawn")
'LoadData ("Realm_Accounts.txt")
LoadBNCS ("BNCS_Accounts.txt")
LoadD2Keys ("D2DV_Keys.txt")
LoadD2XPKeys ("D2XP_Keys.txt")
If Spawn = "" Then
Spawn = BNCSList.Count ''Spawn amount of bots per bncs name
End If
AddChat "Spawning: " & Spawn, &H123321
'AddChat "[Server: " & BNCS_Stuff.Server & "]", &H548956
Call SanityCheck
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
ReleaseCapture
SendMessage hwnd, WM_NCLBUTTONDOWN, 2, 0&
End If
End Sub
Private Sub Image5_Click()
NoSysIcon INTRAY
End Sub
Private Sub Image6_Click()
''''''''''''''
''''''''''''''
''''''''''''''
''''''''''''''
If MsgBox("Are you sure you want to quit?", vbOKCancel) = vbOK Then
MsgBox "Thanks for being part of the Rogue of Diablo v2 Beta" & vbCrLf & "Visit www.DarkBlizz.org"
Unload Me
KillProcess.KillProcess ("RogueOfDiablo.exe")
Else
'nothing
End If
End Sub
Private Sub Image7_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image7.Visible = False
Image5.Visible = True
End Sub
Private Sub Image8_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image8.Visible = False
Image6.Visible = True
End Sub
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label7.ForeColor = vbBlack
End Sub
Private Sub Label10_Click()
frmSettings.Show
End Sub
Private Sub Label10_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label10.ForeColor = vbBlue
End Sub
Private Sub Label12_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label6.ForeColor = vbBlack
Label7.ForeColor = vbBlack
Label10.ForeColor = vbBlack
End Sub
Private Sub Label13_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image7.Visible = True
Image5.Visible = False
Image8.Visible = True
Image6.Visible = False
End Sub
Private Sub Label14_Click()
End Sub
Private Sub Label2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label10.ForeColor = vbBlack
End Sub
Private Sub Label3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label6.ForeColor = vbBlack
End Sub
Private Sub Label6_Click()
'start
Dim Norealm As Boolean
Dim i As Integer
For i = 0 To Spawn - 1
If CharList(i).Count = 0 Then
AddChat Mid$(BNCSList.Item(Str(BNCSList.HashCode("BNCS" & i))), 1, InStr(1, BNCSList.Item(Str(BNCSList.HashCode("BNCS" & i))), "//") - 1) & " doesn't have any characters to make.", vbRed
Norealm = True
End If
Next i
If Norealm = False Then
ConnectBNCS sckX
Else
AddChat "Load your character lists through the settings and then click Apply.", vbBlue
End If
End Sub
Private Sub Label6_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label6.ForeColor = vbBlue
End Sub
Private Sub Label7_Click()
On Error Resume Next
AddChat "Disconnected All Connections", vbRed
Dim X As Integer
Do Until X = Spawn
sckBnet(X).Close
sckMCP(X).Close
X = X + 1
DoEvents
Loop
End Sub
Private Sub Label7_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label7.ForeColor = vbBlue
End Sub
Private Sub lblFlags_Change()
'MsgBox lblFlags.Caption
Select Case lblFlags.Caption
Case "0"
lblType.Caption = "Type: Classic"
Case "40"
lblType.Caption = "Type: Classic Ladder"
Case "4"
lblType.Caption = "Type: Classic Hardcore"
Case "44"
lblType.Caption = "Type: Classic Hardcore Ladder"
Case "20"
lblType.Caption = "Type: Expansion"
Case "60"
lblType.Caption = "Type: Expansion Ladder"
Case "24"
lblType.Caption = "Type: Expansion Hardcore"
Case "64"
lblType.Caption = "Type: Expansion Hardcore Ladder"
End Select
End Sub
Private Sub optAma_Click()
lblClass.Caption = "Class: Amazon"
ClassFlag = Hex(flgAmazon)
End Sub
Private Sub optAss_Click()
lblClass.Caption = "Class: Assassin"
ClassFlag = Hex(flgAss)
End Sub
Private Sub optBarb_Click()
lblClass.Caption = "Class: Barbarian"
ClassFlag = Hex(flgBarb)
End Sub
Private Sub optDru_Click()
lblClass.Caption = "Class: Druid"
ClassFlag = Hex(flgDruid)
End Sub
Private Sub optNecro_Click()
lblClass.Caption = "Class: Necromancer"
ClassFlag = Hex(flgNecro)
End Sub
Private Sub optPala_Click()
lblClass.Caption = "Class: Paladin"
ClassFlag = Hex(flgPala)
End Sub
Private Sub optSorc_Click()
lblClass.Caption = "Class: Sorceress"
ClassFlag = Hex(flgSorc)
End Sub
Private Sub sckBnet_Close(Index As Integer)
AddChat "BNCS(" & Index & ") sckbnet Closed", vbRed
End Sub
Private Sub sckBnet_Connect(Index As Integer)
AddChat "BNCS(" & Index & ") Connected", vbRed
buf2.InsertBYTE &H1
buf2.SendPacket sckBnet(Index)
modPkts.Send0x50 (Index)
InProcessOfConnecting = True
End Sub
Private Sub sckBnet_DataArrival(Index As Integer, ByVal bytesTotal As Long)
Static RecvBuffer As String 'we hold the data sent to us from bnet in this string
Dim PacketLengh As Integer
Dim Data As String
Call sckBnet(Index).GetData(Data, vbString)
RecvBuffer = RecvBuffer & Data 'add the recv data to are buffer string from bnet
'now lets split each packet up and parse it baced on the 2 bytes lengh in the header
While Len(RecvBuffer) >= 4
PacketLengh = buf2.GetWORD(Mid(RecvBuffer, 3, 2))
If Len(RecvBuffer) < PacketLengh Then Exit Sub 'we have to wait for the missing data to come before we handle it (packet may have got split up abit)
'cut out the packet from the buffer and put it in are tmp data string
Data = Left(RecvBuffer, PacketLengh)
RecvBuffer = Mid(RecvBuffer, 1 + PacketLengh) 'skip the packet we just cut out
Call ParseBnetData(Index, Data) 'see a few subs below where we hand the packet to the parse sub
Wend
End Sub
Private Sub ParseBnetData(Index As Integer, ByVal Data As String)
Dim PacketID As Byte
'Dim tmpfilename As String
' Dim tmpformula As String
PacketID = Asc(Mid(Data, 2, 1))
Select Case PacketID
Case &H25 'bnet sent us a ping packet!
'FF 25 08 00 D7 EB DC 03
'add the only data in the ping packet into are own so we can ecco it back
buf2.InsertDWORD buf2.GetDWORD(Mid(Data, 5, 4))
buf2.InsertHEADER &H25
buf2.SendPacket sckBnet(Index)
Case &H50 'Bnet sent us a responce from are &H50 packet
Call AddChat("BNCS(" & Index & ") Recieved 0x50", vbRed)
If buf2.GetDWORD(Mid(Data, 5, 4)) = &H0 Then 'passed challenge
' MsgBox "Begining 0x50 Parse"
'now to parse out the important infomation from the packet
Dim tmpFileTime As String * 8
'this is used later on, so we must remember it, thats why the "ServerToken" String is declared publicly in the modStuff
modPkts.ServerToken = buf2.GetDWORD(Mid(Data, 9, 4)) ' 09 9F 06 73