-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfrmFTP.frm
634 lines (624 loc) · 20.8 KB
/
frmFTP.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
VERSION 5.00
Object = "{48E59290-9880-11CF-9754-00AA00C00908}#1.0#0"; "MSINET.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form frmFTP
BackColor = &H00000000&
Caption = "Tibia Multi Stats Uploader"
ClientHeight = 5055
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 337
ScaleMode = 3 'Pixel
ScaleWidth = 312
StartUpPosition = 3 'Windows Default
Begin MSComDlg.CommonDialog cmdlg
Left = 5040
Top = 3120
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.TextBox txtColor
Alignment = 2 'Center
BackColor = &H00004000&
BeginProperty Font
Name = "Lucida Console"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 240
Left = 8880
TabIndex = 24
Text = "FFFFFF"
Top = 2640
Width = 975
End
Begin VB.CommandButton cmdSave
BackColor = &H00FFE0C0&
Caption = "Save"
Height = 255
Left = 7560
Style = 1 'Graphical
TabIndex = 23
Top = 2640
Width = 855
End
Begin VB.CommandButton cmdLoad
BackColor = &H00FFE0C0&
Caption = "Load"
Height = 255
Left = 6240
Style = 1 'Graphical
TabIndex = 22
Top = 2640
Width = 855
End
Begin VB.CommandButton cmdReset
BackColor = &H00FFE0C0&
Caption = "Reset"
Height = 255
Left = 4920
Style = 1 'Graphical
TabIndex = 21
Top = 2640
Width = 855
End
Begin VB.PictureBox sig
AutoRedraw = -1 'True
BeginProperty Font
Name = "Lucida Console"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 1935
Left = 4680
ScaleHeight = 125
ScaleMode = 3 'Pixel
ScaleWidth = 357
TabIndex = 13
Top = 120
Width = 5415
End
Begin InetCtlsObjects.Inet net
Left = 240
Top = 2880
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
Protocol = 2
RemotePort = 21
URL = "ftp://"
End
Begin VB.Timer tmr
Enabled = 0 'False
Interval = 1000
Left = 360
Top = 2280
End
Begin VB.TextBox interval
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H00404000&
BeginProperty Font
Name = "Lucida Console"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFE99A&
Height = 240
Left = 2760
TabIndex = 10
Text = "180"
ToolTipText = "Color of the light - default is 203, torch is 206. Use the up/down keys on your keyboard to change it."
Top = 4680
Width = 495
End
Begin VB.TextBox Contents
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H00404000&
BeginProperty Font
Name = "Lucida Console"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFE99A&
Height = 2880
Left = 1200
MultiLine = -1 'True
TabIndex = 8
Text = "frmFTP.frx":0000
ToolTipText = "Color of the light - default is 203, torch is 206. Use the up/down keys on your keyboard to change it."
Top = 1560
Width = 3375
End
Begin VB.TextBox Filename
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H00404000&
BeginProperty Font
Name = "Lucida Console"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFE99A&
Height = 240
Left = 1200
TabIndex = 6
Text = "index.html"
ToolTipText = "Color of the light - default is 203, torch is 206. Use the up/down keys on your keyboard to change it."
Top = 1200
Width = 3375
End
Begin VB.TextBox Website
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H00404000&
BeginProperty Font
Name = "Lucida Console"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFE99A&
Height = 240
Left = 1200
TabIndex = 4
Text = "ftp."
ToolTipText = "Color of the light - default is 203, torch is 206. Use the up/down keys on your keyboard to change it."
Top = 840
Width = 3375
End
Begin VB.TextBox Password
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H00404000&
BeginProperty Font
Name = "Lucida Console"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFC0C0&
Height = 240
IMEMode = 3 'DISABLE
Left = 1200
PasswordChar = "*"
TabIndex = 2
ToolTipText = "Color of the light - default is 203, torch is 206. Use the up/down keys on your keyboard to change it."
Top = 480
Width = 3375
End
Begin VB.TextBox Username
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H00404000&
BeginProperty Font
Name = "Lucida Console"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFC0C0&
Height = 240
Left = 1200
TabIndex = 0
ToolTipText = "Color of the light - default is 203, torch is 206. Use the up/down keys on your keyboard to change it."
Top = 120
Width = 3375
End
Begin VB.Label setText
Alignment = 2 'Center
BackColor = &H00000080&
BorderStyle = 1 'Fixed Single
Caption = "Maglvl"
ForeColor = &H00FFFFFF&
Height = 255
Index = 6
Left = 9240
TabIndex = 20
Top = 2160
Width = 615
End
Begin VB.Label setText
Alignment = 2 'Center
BackColor = &H00000080&
BorderStyle = 1 'Fixed Single
Caption = "Exp"
ForeColor = &H00FFFFFF&
Height = 255
Index = 5
Left = 8520
TabIndex = 19
Top = 2160
Width = 615
End
Begin VB.Label setText
Alignment = 2 'Center
BackColor = &H00000080&
BorderStyle = 1 'Fixed Single
Caption = "Level"
ForeColor = &H00FFFFFF&
Height = 255
Index = 4
Left = 7800
TabIndex = 18
Top = 2160
Width = 615
End
Begin VB.Label setText
Alignment = 2 'Center
BackColor = &H00000080&
BorderStyle = 1 'Fixed Single
Caption = "Online"
ForeColor = &H00FFFFFF&
Height = 255
Index = 3
Left = 7080
TabIndex = 17
Top = 2160
Width = 615
End
Begin VB.Label setText
Alignment = 2 'Center
BackColor = &H00000080&
BorderStyle = 1 'Fixed Single
Caption = "Position"
ForeColor = &H00FFFFFF&
Height = 255
Index = 2
Left = 6360
TabIndex = 16
Top = 2160
Width = 615
End
Begin VB.Label setText
Alignment = 2 'Center
BackColor = &H00000080&
BorderStyle = 1 'Fixed Single
Caption = "Mana"
ForeColor = &H00FFFFFF&
Height = 255
Index = 1
Left = 5640
TabIndex = 15
Top = 2160
Width = 615
End
Begin VB.Label setText
Alignment = 2 'Center
BackColor = &H00008000&
BorderStyle = 1 'Fixed Single
Caption = "HP"
ForeColor = &H00FFFFFF&
Height = 255
Index = 0
Left = 4920
TabIndex = 14
Top = 2160
Width = 615
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "second(s)"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFE99A&
Height = 255
Left = 3360
TabIndex = 12
Top = 4680
Width = 855
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "Upload every"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFE99A&
Height = 255
Left = 1560
TabIndex = 11
Top = 4695
Width = 1215
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "Contents"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFE99A&
Height = 255
Left = 120
TabIndex = 9
Top = 1575
Width = 855
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "Filename"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFE99A&
Height = 255
Left = 120
TabIndex = 7
Top = 1215
Width = 855
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "Website"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFE99A&
Height = 255
Left = 120
TabIndex = 5
Top = 855
Width = 855
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "Password"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFE99A&
Height = 255
Left = 120
TabIndex = 3
Top = 495
Width = 855
End
Begin VB.Label Label32
BackStyle = 0 'Transparent
Caption = "Username"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFE99A&
Height = 255
Left = 120
TabIndex = 1
Top = 135
Width = 855
End
End
Attribute VB_Name = "frmFTP"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function DrawText Lib "user32" Alias "DrawTextA" (ByVal hdc As Long, ByVal lpStr As String, ByVal nCount As Long, lpRect As RECT, ByVal wFormat As Long) As Long
Private delay As Long
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private setting, ptx(6), pty(6), ImgPath As String
Sub cmdReset_Click()
zForm_Load
sig.ForeColor = &HFFFFFF
End Sub
Sub cmdLoad_Click()
Open "ftp.txt" For Input As #1
Line Input #1, vl: UserName = vl
Line Input #1, vl: Password = vl
Line Input #1, vl: Website = vl
Line Input #1, vl: Filename = vl
Line Input #1, vl: Contents = vl
Line Input #1, vl: Interval = vl
Line Input #1, vl: txtColor = vl
Line Input #1, vl: sig.ForeColor = vl
Line Input #1, vl: ImgPath = vl
For a = 0 To 6
Line Input #1, vl: ptx(a) = vl
Line Input #1, vl: pty(a) = vl
Next
Close #1
DoEvents
setTxts
End Sub
Sub cmdSave_Click()
Open "ftp.txt" For Output As #1
Print #1, UserName
Print #1, Password
Print #1, Website
Print #1, Filename
Print #1, Contents
Print #1, Interval
Print #1, txtColor
Print #1, sig.ForeColor
Print #1, ImgPath
For a = 0 To 6
Print #1, ptx(a)
Print #1, pty(a)
Next
Close #1
End Sub
Sub zForm_Load()
For a = 0 To 6
ptx(a) = 130
Next
For a = 0 To 6
pty(a) = 10 + (a * 15)
Next a
ImgPath = "Graphics\abstract_02m.JPG"
DoEvents
setTxts
End Sub
Sub Form_Unload(Cancel As Integer)
If Compiled = True Then On Error Resume Next
Cancel = 1
Me.Hide
End Sub
Sub setText_Click(Index As Integer)
setting = Index
For a = 0 To 6
If a = setting Then SetText(a).BackColor = &H8000& Else SetText(a).BackColor = &H80&
Next
End Sub
Sub sig_DblClick()
cmdlg.Filter = "Image files (*.bmp;*.jpg;*.gif)|*.bmp;*.jpg;*.gif"
cmdlg.ShowOpen
If cmdlg.CancelError = 1 Then Exit Sub
ImgPath = cmdlg.Filename
setTxts
End Sub
Sub sig_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
ptx(setting) = X
pty(setting) = Y
setTxts
End If
End Sub
Sub setTxts()
DoEvents
sig.Picture = LoadPicture(ImgPath)
For a = 0 To 6
Dim r As RECT
r.Left = ptx(a)
r.Top = pty(a)
r.Right = (ptx(a)) + 1000
r.Bottom = (pty(a)) + 1000
If a = 0 Then txt = "HP: " & mReadLong(CH_HP)
If a = 1 Then txt = "Mana: " & mReadLong(CH_Ma)
If a = 2 Then txt = "Pos: " & mReadLong(CH_X) & "," & mReadLong(CH_Y) & "," & mReadLong(CH_Z)
If mReadLong(CH_Con) > 0 Then con = "Yes" Else con = "No"
If a = 3 Then txt = "Online: " & con
If a = 4 Then txt = "Level: " & mReadLong(CH_Lvl)
If a = 5 Then txt = "Exp: " & mReadLong(CH_Exp)
If a = 6 Then txt = "Maglvl: " & mReadLong(CH_Mlv)
DrawText sig.hdc, txt, Len(txt), r, 0
Next
End Sub
Sub tmr_Timer()
If Compiled = True Then On Error Resume Next
delay = delay + 1
Me.Caption = "Upload in " & Interval - delay & " seconds."
If delay >= Interval Then
delay = 0
Me.Caption = "Uploading..."
Open App.Path & "\" & Filename For Output As #1
tmp = Contents
online = mReadLong(CH_Con)
If online = 8 Then online = "Yes" Else online = "No"
tmp = Replace(tmp, "{name}", mReadString(BL_Player + BL_Name))
tmp = Replace(tmp, "{hp}", mReadLong(CH_HP))
tmp = Replace(tmp, "{mana}", mReadLong(CH_Ma))
tmp = Replace(tmp, "{online}", online)
tmp = Replace(tmp, "{x}", mReadLong(CH_X))
tmp = Replace(tmp, "{y}", mReadLong(CH_Y))
tmp = Replace(tmp, "{z}", mReadLong(CH_Z))
tmp = Replace(tmp, "{lvl}", mReadLong(CH_Lvl))
tmp = Replace(tmp, "{exp}", mReadLong(CH_Exp))
If InStr(1, tmp, "{exp2lvl}") > 0 Then
cLevel = mReadLong(CH_Lvl) + 1
cExp = mReadLong(CH_Exp)
cExpNext = (((50 / 3) * (cLevel ^ 3)) - (100 * (cLevel ^ 2)) + ((850 / 3) * cLevel) - 200) - cExp
tmp = Replace(tmp, "{exp2lvl}", cExpNext)
End If
tmp = Replace(tmp, "{maglvl}", mReadLong(CH_Mlv))
tmp = Replace(tmp, vbCrLf, "<br>" & vbCrLf)
Print #1, tmp
Close #1
net.Protocol = icFTP
net.RemoteHost = Website
net.UserName = UserName
net.Password = Password
net.Execute , "PUT """ & App.Path & "\" & Filename & """ """ & Filename & """"
Me.Caption = "Upload completed."
End If
End Sub
Sub txtColor_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
colr = CByte("&H" & Mid(txtColor, 1, 2))
colg = CByte("&H" & Mid(txtColor, 3, 2))
colb = CByte("&H" & Mid(txtColor, 5, 2))
sig.ForeColor = (colb * 256 * 256) + (colg * 256) + colr
setTxts
End If
End Sub