-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathtoolkit.au3
6996 lines (5967 loc) · 236 KB
/
toolkit.au3
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
#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseX64=n
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
;;================================================================================
;;================================================================================
;; Diablo 3 Au3 ToolKit
;; Based on Unkn0wned, voxatu & the RE community works
;;
;; By Opkllhibus, Leo11173, Kickbar
;;================================================================================
;;================================================================================
;;================================================================================
;; PRE FUNCTIONS
;;================================================================================
;;--------------------------------------------------------------------------------
;; Make sure you are running as admin
;;--------------------------------------------------------------------------------
$_debug = 1
#RequireAdmin
$Admin = IsAdmin()
If $Admin <> 1 Then
MsgBox(0x30, "ERROR", "This program require administrative rights you fool!")
Exit
EndIf
Global $hDll = DllOpen("ntdll.dll")
Func _HighPrecisionSleep($iMicroSeconds)
Local $hStruct
$hStruct = DllStructCreate("int64 time;")
DllStructSetData($hStruct, "time", -1 * ($iMicroSeconds * 10))
DllCall($hDll, "dword", "ZwDelayExecution", "int", 0, "ptr", DllStructGetPtr($hStruct))
EndFunc ;==>_HighPrecisionSleep
;;--------------------------------------------------------------------------------
;; Includes
;;--------------------------------------------------------------------------------
#include "lib\NomadMemory.au3" ;THIS IS EXTERNAL, GET IT AT THE AUTOIT WEBSITE
#include <math.au3>
#include <String.au3>
#include <Array.au3>
#include "lib\constants.au3"
#include "lib\FTP.au3"
;;--------------------------------------------------------------------------------
;; Initialize MouseCoords
;;--------------------------------------------------------------------------------
Opt("MouseCoordMode", 2) ;1=absolute, 0=relative, 2=client
Opt("MouseClickDownDelay", Random(10, 20))
Opt("SendKeyDownDelay", Random(10, 20))
;;--------------------------------------------------------------------------------
;; Open the process
;;--------------------------------------------------------------------------------
Opt("WinTitleMatchMode", -1)
SetPrivilege("SeDebugPrivilege", 1)
Global $ProcessID = WinGetProcess("[CLASS:D3 Main Window Class]", "")
Local $d3 = _MemoryOpen($ProcessID)
If @error Then
WinSetOnTop("[CLASS:D3 Main Window Class]", "", 0)
MsgBox(4096, "ERROR", "Failed to open memory for process;" & $ProcessID)
Exit
EndIf
;OffsetList()
;;================================================================================
;; FUNCTIONS
;;================================================================================
Func CheckWindowD3()
If WinExists("[CLASS:D3 Main Window Class]") Then
WinActivate("[CLASS:D3 Main Window Class]")
WinSetOnTop("[CLASS:D3 Main Window Class]", "", 1)
Sleep(300)
Else
MsgBox(0, Default, "Fenêtre Diablo III absente.")
Terminate()
EndIf
Global $sized3 = WinGetClientSize("[CLASS:D3 Main Window Class]")
If $sized3[0] <> 800 Or $sized3[1] <> 600 Then
WinSetOnTop("[CLASS:D3 Main Window Class]", "", 0)
MsgBox(0, Default, "Erreur Dimension : Il faut être en 800 x 600 et non pas en " & $sized3[0] & " x " & $sized3[1] & ".")
Terminate()
Else
_log("Setting Window Diablo III OK")
EndIf
EndFunc ;==>CheckWindowD3
Func CheckWindowD3Size()
Global $sized3 = WinGetClientSize("[CLASS:D3 Main Window Class]")
If $sized3[0] <> 800 Or $sized3[1] <> 600 Then
WinSetOnTop("[CLASS:D3 Main Window Class]", "", 0)
MsgBox(0, Default, "Erreur Dimension : Il faut être en 800 x 600 et non pas en " & $sized3[0] & " x " & $sized3[1] & ".")
Terminate()
EndIf
EndFunc ;==>CheckWindowD3Size
;;--------------------------------------------------------------------------------
; Function: FindActor()
; Description: Check if an actor is present or not
;
; Note(s): Return 1 if found in range or 0 if absent
;;--------------------------------------------------------------------------------
Func FindActor($name, $maxRange = 400)
If _ingame() Then
While Not offsetlist()
Sleep(10)
WEnd
Else
offsetlist()
EndIF
mesurestart()
Local $index, $offset, $count, $item[10], $find = 0
startIterateObjectsList($index, $offset, $count)
_log("FinActor -> number -> " & $count)
While iterateObjectsList($index, $offset, $count, $item)
If StringInStr($item[1], $name) And $item[9] < $maxRange Then
$find = 1
mesureEnd("FindActor trouver")
Return 1
EndIf
WEnd
Return 0
EndFunc ;==>FindActor
;;--------------------------------------------------------------------------------
; Function: checkuiitemvisible()
; Description: search a value in the object manager
;;--------------------------------------------------------------------------------
Func checkuiitemvisible($valuetocheckfor, $visibility)
$ptr1 = _memoryread($ofs_objectmanager, $d3, "ptr")
$ptr2 = _memoryread($ptr1 + 2420, $d3, "ptr")
$ptr3 = _memoryread($ptr2 + 0, $d3, "ptr")
$ofs_uielements = _memoryread($ptr3 + 8, $d3, "ptr")
$uielementcount = _memoryread($ptr3 + 64, $d3, "int")
$counter = 0
While ($counter < $uielementcount)
$counter += 1
$uielemepointer = _memoryread($ofs_uielements + $counter * 4, $d3, "ptr")
While ($uielemepointer <> 0)
$npnt = _memoryread($uielemepointer + 528, $d3, "ptr")
$name = BinaryToString(_memoryread($npnt + 56, $d3, "byte[256]"), 4)
$visible = _memoryread($npnt + 40, $d3, "int")
If ($visible = $visibility) Then
$foundvalue = StringInStr($name, $valuetocheckfor)
If ($foundvalue >= 1) Then
Return True
EndIf
EndIf
$uielemepointer = _memoryread($uielemepointer, $d3, "ptr")
WEnd
WEnd
Return False
EndFunc ;==>checkuiitemvisible
Func listuiitemvisible()
;output kinda buggy but does the job
;use for dev only
$ptr1 = _memoryread($ofs_objectmanager, $d3, "ptr")
$ptr2 = _memoryread($ptr1 + 2420, $d3, "ptr")
$ptr3 = _memoryread($ptr2 + 0, $d3, "ptr")
$ofs_uielements = _memoryread($ptr3 + 8, $d3, "ptr")
$uielementcount = _memoryread($ptr3 + 64, $d3, "int")
$counter = 0
While ($counter < $uielementcount)
$counter += 1
$uielemepointer = _memoryread($ofs_uielements + $counter * 4, $d3, "ptr")
While ($uielemepointer <> 0)
$npnt = _memoryread($uielemepointer + 528, $d3, "ptr")
$name = BinaryToString(_memoryread($npnt + 56, $d3, "byte[256]"), 4)
$uitextptr = _memoryread($npnt + 0xAE0, $d3, "ptr")
$uitext = BinaryToString(_memoryread($uitextptr, $d3, "byte[1024]"), 4)
$visible = _memoryread($npnt + 40, $d3, "int")
If ($visible = 1) Then
ConsoleWrite(@CRLF & "count aka bucket: " & $counter & " " & $uitext)
ConsoleWrite(@CRLF & "count aka bucket: " & $counter & " " & $name)
EndIf
$uielemepointer = _memoryread($uielemepointer, $d3, "ptr")
WEnd
WEnd
EndFunc ;==>listuiitemvisible
Func fastcheckuiitemvisible($valuetocheckfor, $visibility, $bucket)
$ptr1 = _memoryread($ofs_objectmanager, $d3, "ptr")
$ptr2 = _memoryread($ptr1 + 2420, $d3, "ptr")
$ptr3 = _memoryread($ptr2 + 0, $d3, "ptr")
$ofs_uielements = _memoryread($ptr3 + 8, $d3, "ptr")
$uielementpointer = _memoryread($ofs_uielements + 4 * $bucket, $d3, "ptr")
While $uielementpointer <> 0
$npnt = _memoryread($uielementpointer + 528, $d3, "ptr")
$name = BinaryToString(_memoryread($npnt + 56, $d3, "byte[256]"), 4)
If StringInStr($name, $valuetocheckfor) Then
If _memoryread($npnt + 40, $d3, "int") = $visibility Then
Return True
Else
Return False
EndIf
EndIf
$uielementpointer = _memoryread($uielementpointer, $d3, "ptr")
WEnd
Return False
EndFunc ;==>fastcheckuiitemvisible
;;--------------------------------------------------------------------------------
; Function: fastCheckuiValue()
; Description: Get value of an UI element
;
; Note(s): Return checked UI value or return Fasle
;;--------------------------------------------------------------------------------
Func fastCheckuiValue($valuetocheckfor, $visibility, $bucket)
$ptr1 = _memoryread($ofs_objectmanager, $d3, "ptr")
$ptr2 = _memoryread($ptr1 + 2420, $d3, "ptr")
$ptr3 = _memoryread($ptr2 + 0, $d3, "ptr")
$ofs_uielements = _memoryread($ptr3 + 8, $d3, "ptr")
$uielementpointer = _memoryread($ofs_uielements + 4 * $bucket, $d3, "ptr")
While $uielementpointer <> 0
$npnt = _memoryread($uielementpointer + 528, $d3, "ptr")
$name = BinaryToString(_memoryread($npnt + 56, $d3, "byte[1024]"), 4)
If StringInStr($name, $valuetocheckfor) Then
If _memoryread($npnt + 40, $d3, "int") = $visibility Then
$uitextptr = _memoryread($npnt + 0xAE0, $d3, "ptr")
$uitext = BinaryToString(_memoryread($uitextptr, $d3, "byte[1024]"), 4)
; ConsoleWrite(@CRLF & $uitext)
Return $uitext
Else
_log($valuetocheckfor & " is invisible")
Return False
EndIf
EndIf
$uielementpointer = _memoryread($uielementpointer, $d3, "ptr")
WEnd
_log($valuetocheckfor & " not found")
Return False
EndFunc ;==>fastCheckuiValue
Func _playerdead()
$playerdeadlookfor = "NormalLayer.deathmenu_dialog"
$return = fastcheckuiitemvisible($playerdeadlookfor, 1, 969)
If ($return And $DeathCountToggle) Then
$Death += 1
$Die2FastCount += 1
$DeathCountToggle = False
EndIf
Return $return
EndFunc ;==>_playerdead
Func _inmenu()
$lobbylookfor = "Menu.PlayGameButton"
Return fastcheckuiitemvisible($lobbylookfor, 1, 654)
EndFunc ;==>_inmenu
Func _checkdisconnect()
$disclookfor = "Root.TopLayer.BattleNetModalNotifications_main.ModalNotification.Buttons.ButtonList.OkButton"
Return fastcheckuiitemvisible($disclookfor, 1, 1073)
EndFunc ;==>_checkdisconnect
Func _checkRepair()
$replookfor = "Root.NormalLayer.DurabilityIndicator"
Return fastcheckuiitemvisible($replookfor, 1, 239)
EndFunc ;==>_checkRepair
Func _onloginscreen()
$loginlookfor = "Root.NormalLayer.BattleNetLogin_main.LayoutRoot"
Return fastcheckuiitemvisible($loginlookfor, 1, 174)
EndFunc ;==>_onloginscreen
Func _escmenu()
$escmenuelookfor = "Root.TopLayer.gamemenu_dialog.gamemenu_bkgrnd.ButtonStackContainer.button_leaveGame"
Return fastcheckuiitemvisible($escmenuelookfor, 1, 1447)
EndFunc ;==>_escmenu
Func _ingame()
$gamelookfor = "Root.NormalLayer.minimap_dialog_backgroundScreen.minimap_dialog_pve.area_name"
Return fastcheckuiitemvisible($gamelookfor, 1, 1403)
EndFunc ;==>_ingame
Func _checkWPopen()
$checkWPopenlookfor = "Root.NormalLayer.waypoints_dialog_mainPage"
Return fastcheckuiitemvisible($checkWPopenlookfor, 1, 1398)
EndFunc ;==>_checkWPopen
Func _checkVendoropen()
$checkVendorOpenlookfor = "Root.NormalLayer.shop_dialog_mainPage"
Return fastcheckuiitemvisible($checkVendorOpenlookfor, 1, 1814)
EndFunc ;==>_checkVendoropen
Func _checkStashopen()
$_checkStashopenlookfor = "Root.NormalLayer.stash_dialog_mainPage"
Return fastcheckuiitemvisible($_checkStashopenlookfor, 1, 1291)
EndFunc ;==>_checkStashopen
Func _checkInventoryopen()
$_checkInventoryopenlookfor = "Root.NormalLayer.inventory_dialog_mainPage"
Return fastcheckuiitemvisible($_checkInventoryopenlookfor, 1, 1622)
EndFunc ;==>_checkInventoryopen
;;--------------------------------------------------------------------------------
; Function: IsInArea($area)
; Description: Check where we are
;
;;--------------------------------------------------------------------------------
Func IsInArea($area)
$area = GetLevelAreaId()
ConsoleWrite("Area " & $area & @CRLF)
Return $area = GetLevelAreaId()
EndFunc ;==>IsInArea
Func GetLevelAreaId()
Return _MemoryRead(_MemoryRead(0x183E9E4 , $d3, "int") + 0x44, $d3, "int")
EndFunc ;==>GetLevelAreaId
Func LevelAreaConstants()
Global $A1_C6_SpiderCave_01_Entrance = 0xE3A6
Global $A1_C6_SpiderCave_01_Main = 0x132EC
Global $A1_C6_SpiderCave_01_Queen = 0xF506
Global $A1_Dun_Crypt_Dev_Hell = 0x36581
Global $A1_Fields_Cave_SwordOfJustice_Level01 = 0x1D455
Global $A1_Fields_Den = 0x21045
Global $A1_Fields_Den_Level02 = 0x2F6b8
Global $A1_Fields_RandomDRLG_CaveA_Level01 = 0x141C4
Global $A1_Fields_RandomDRLG_CaveA_Level02 = 0x141C5
Global $A1_Fields_RandomDRLG_ScavengerDenA_Level01 = 0x13D0D
Global $A1_Fields_RandomDRLG_ScavengerDenA_Level02 = 0x13D17
Global $A1_Fields_Vendor_Tinker_Exterior = 0x2bC0C
Global $A1_Highlands_RandomDRLG_GoatmanCaveA_Level01 = 0x14286
Global $A1_Highlands_RandomDRLG_GoatmanCaveA_Level02 = 0x14287
Global $A1_Highlands_RandomDRLG_WestTower_Level01 = 0x14196
Global $A1_Highlands_RandomDRLG_WestTower_Level02 = 0x14197
Global $A1_Random_Level01 = 0x33A17
Global $A1_trDun_Blacksmith_Cellar = 0x144A6
Global $A1_trDun_ButchersLair_02 = 0x16301
Global $A1_trDun_Cain_Intro = 0xED2A
Global $A1_trDun_Cave_Highlands_Random01_VendorRescue = 0x21310
Global $A1_trdun_Cave_Nephalem_01 = 0xEBEC
Global $A1_trdun_Cave_Nephalem_02 = 0xEBED
Global $A1_trdun_Cave_Nephalem_03 = 0xEBEE
Global $A1_trDun_Cave_Old_Ruins_Random01 = 0x278AC
Global $A1_trDun_CrownRoom = 0x18FDA
Global $A1_trDun_Crypt_Event_Tower_Of_Power = 0x138F4
Global $A1_trDun_Crypt_Flooded_Memories_Level01 = 0x18F9c
Global $A1_trDun_Crypt_Flooded_Memories_Level02 = 0x287A6
Global $A1_trdun_Crypt_Special_00 = 0x25BDC
Global $A1_trdun_Crypt_Special_01 = 0xECB9
Global $A1_trDun_Event_JarOfSouls = 0x2371E
Global $A1_trDun_FalseSecretPassage_01 = 0x14540
Global $A1_trDun_FalseSecretPassage_02 = 0x14541
Global $A1_trDun_FalseSecretPassage_03 = 0x14542
Global $A1_trDun_Jail_Level01 = 0x171d0
Global $A1_trDun_Jail_Level01_Cells = 0x1783D
Global $A1_trDun_Leoric01 = 0x4D3E
Global $A1_trDun_Leoric02 = 0x4D3F
Global $A1_trDun_Leoric03 = 0x4D40
Global $A1_trDun_Level01 = 0x4D44
Global $A1_trDun_Level04 = 0x4D47
Global $A1_trDun_Level05_Templar = 0x15763
Global $A1_trDun_Level06 = 0x4D49
Global $A1_trDun_Level07B = 0x4D4B
Global $A1_trDun_Level07D = 0x4D4D
Global $A1_trDun_Tyrael_Level09 = 0x1CAA3
Global $A1_trDun_TyraelJail = 0x24447
Global $A1_trOut_AdriasCellar = 0xF5F8
Global $A1_trOUT_AdriasHut = 0x4DD9
Global $A1_trOut_BatesFarmCellar = 0x248A5
Global $A1_trOUT_Church = 0x4DDD
Global $A1_trOut_Fields_Vendor_Curios = 0x1A3B7
Global $A1_trOut_Fields_Vendor_Curios_Exterior = 0x2BE7B
Global $A1_trOUT_FishingVillage = 0x4DDF
Global $A1_trOUT_FishingVillageHeights = 0x1FB03
Global $A1_trOut_ForlornFarm = 0x20B72
Global $A1_trOUT_Graveyard = 0x4DE2
Global $A1_trOUT_Highlands = 0x4DE4
Global $A1_trOUT_Highlands_Bridge = 0x16DC0
Global $A1_trOut_Highlands_DunExterior_A = 0x15718
Global $A1_trOUT_Highlands_ServantHouse_Cellar_Vendor = 0x29CD1
Global $A1_trOUT_Highlands_Sub240_GoatmanGraveyard = 0x1F95F
Global $A1_trOUT_Highlands2 = 0x4DE5
Global $A1_trOUT_Highlands3 = 0x4AF
Global $A1_trOut_Leoric_Manor_Int = 0x189F6
Global $A1_trOUT_LeoricsManor = 0x4DE7
Global $A1_trOut_MysticWagon = 0x20F08
Global $A1_trOUT_NewTristram = 0x4DEB
Global $A1_trOUT_NewTristram_AttackArea = 0x316CE
Global $A1_trOUT_NewTristramOverlook = 0x26186
Global $A1_trOut_Old_Tristram = 0x163FD
Global $A1_trOut_Old_Tristram_Road = 0x164BC
Global $A1_trOut_Old_Tristram_Road_Cath = 0x18BE7
Global $A1_trOut_OldTristram_Cellar = 0x1A22B
Global $A1_trOut_OldTristram_Cellar_1 = 0x1A104
Global $A1_trOut_OldTristram_Cellar_2 = 0x1A105
Global $A1_trOut_OldTristram_Cellar_3 = 0x19322
Global $A1_trOut_oldTristram_TreeCave = 0x19C87
Global $A1_trOut_Scoundrel_Event_Old_Mill_2 = 0x35556
Global $A1_trOut_TownAttack_ChapelCellar = 0x1D43E
Global $A1_trOut_Tristram_CainsHouse = 0x1FC73
Global $A1_trOut_Tristram_Inn = 0x1AB91
Global $A1_trOut_Tristram_LeahsRoom = 0x15349
Global $A1_trOut_TristramFields_A = 0x4DF0
Global $A1_trOut_TristramFields_B = 0x4DF1
Global $A1_trOut_TristramFields_ExitA = 0xF085
Global $A1_trOut_TristramFields_Forsaken_Grounds = 0x2BD6F
Global $A1_trOut_TristramFields_Secluded_Grove = 0x2BD6E
Global $A1_trOut_TristramWilderness = 0x4DF2
Global $A1_trOut_TristramWilderness_SubScenes = 0x236AA
Global $A1_trOut_Vendor_Tinker_Room = 0x19821
Global $A1_trOut_Wilderness_BurialGrounds = 0x11C08
Global $A1_trOut_Wilderness_CorpseHouse = 0x30ADF
Global $A1_trOut_Wilderness_Sub80_FamilyTree = 0x236A1
Global $A2_Belial_Room_01 = 0xED55
Global $A2_Belial_Room_Intro = 0x13D1A
Global $A2_c1Dun_Swr_Caldeum_01 = 0x4D4F
Global $A2_c2dun_Zolt_TreasureHunter = 0x4D53
Global $A2_c3Dun_Aqd_Oasis_Level01 = 0xE069
Global $A2_cadun_Zolt_Timed01_Level01 = 0x4D52
Global $A2_cadun_Zolt_Timed01_Level02 = 0x29108
Global $A2_Caldeum = 0x19234
Global $A2_Caldeum_Uprising = 0x33613
Global $A2_caOut_Alcarnus_RandomCellar_1 = 0x245A7
Global $A2_caOut_Alcarnus_RandomCellar_2 = 0x245A8
Global $A2_caOut_Alcarnus_RandomCellar_3 = 0x245A9
Global $A2_caOUT_Boneyard_01 = 0xD24A
Global $A2_caOUT_Borderlands_Khamsin_Mine = 0xEE8A
Global $A2_caOUT_BorderlandsKhamsin = 0xF8B2
Global $A2_caOut_Cellar_Alcarnus_Main = 0x2FAC4
Global $A2_caOut_CT_RefugeeCamp = 0xD811
Global $A2_caOut_CT_RefugeeCamp_Gates = 0x318FD
Global $A2_caOut_CT_RefugeeCamp_Hub = 0x2917A
Global $A2_caOut_Hub_Inn = 0x2AA00
Global $A2_caOut_Interior_C_DogBite = 0x2D7BB
Global $A2_caOut_Interior_H_RockWorm = 0x232F5
Global $A2_caOut_Mine_Abandoned_Cellar = 0x4D81
Global $A2_caOut_Oasis = 0xE051
Global $A2_caOut_Oasis_Exit = 0x2ACE2
Global $A2_caOut_Oasis_Exit_A = 0x2AD07
Global $A2_caOut_Oasis_Rakanishu = 0x33BDD
Global $A2_caOut_Oasis_RandomCellar_1 = 0x27099
Global $A2_caOut_Oasis_RandomCellar_2 = 0x2709A
Global $A2_caOut_Oasis_RandomCellar_3 = 0x2709B
Global $A2_caOut_Oasis_RandomCellar_4 = 0x27bE7
Global $A2_caOut_Oasis1_Water = 0xE664
Global $A2_caOut_Oasis2 = 0xE058
Global $A2_caOut_OasisCellars = 0x1B100
Global $A2_caOUT_StingingWinds = 0x4D7F
Global $A2_caOUT_StingingWinds_Alcarnus_Tier1 = 0x4D71
Global $A2_caOUT_StingingWinds_Alcarnus_Tier2 = 0x4D72
Global $A2_caOUT_StingingWinds_Bridge = 0x29886
Global $A2_caOUT_StingingWinds_Canyon = 0x4D7C
Global $A2_caOUT_StingingWinds_FallenCamp01 = 0x288EF
Global $A2_caOUT_StingingWinds_PostBridge = 0x4D7E
Global $A2_caOUT_StingingWinds_PreAlcarnus = 0x4D7B
Global $A2_caOUT_StingingWinds_PreBridge = 0x4D7D
Global $A2_caOut_Stranded2 = 0x1DA4A
Global $A2_caOut_ZakarwaMerchantCellar = 0x1BEBB
Global $A2_Cave_Random01 = 0x26F64
Global $A2_Cave_Random01_Level02 = 0x35E85
Global $A2_CultistCellarEast = 0x19218
Global $A2_CultistCellarWest = 0x19214
Global $A2_dun_Aqd_Control_A = 0xF9F3
Global $A2_dun_Aqd_Control_B = 0xF9F4
Global $A2_dun_Aqd_Oasis_RandomFacePuzzle_Large = 0x26B82
Global $A2_dun_Aqd_Oasis_RandomFacePuzzle_Small = 0x26AB0
Global $A2_dun_Aqd_Special_01 = 0xF520
Global $A2_dun_Aqd_Special_A = 0xF53A
Global $A2_dun_Aqd_Special_B = 0xF53C
Global $A2_Dun_Aqd_Swr_to_Oasis_Level01 = 0x23D96
Global $A2_dun_Cave_BloodVial_01 = 0x31F55
Global $A2_dun_Cave_BloodVial_02 = 0x31F83
Global $A2_dun_Oasis_Cave_MapDungeon = 0x29616
Global $A2_dun_Oasis_Cave_MapDungeon_Level02 = 0x2F6bF
Global $A2_dun_PortalRoulette_A = 0x1B37F
Global $A2_Dun_Swr_Adria_Level01 = 0xE47E
Global $A2_Dun_Swr_Caldeum_Sewers_01 = 0x1B205
Global $A2_dun_Zolt_Blood02_Level01_Part1 = 0x1E12E
Global $A2_dun_Zolt_Blood02_Level01_Part2 = 0x25872
Global $A2_Dun_Zolt_BossFight_Level04 = 0xEB22
Global $A2_dun_Zolt_Head_Random01 = 0xF0C0
Global $A2_Dun_Zolt_Level01 = 0x4D55
Global $A2_Dun_Zolt_Level02 = 0x4D56
Global $A2_Dun_Zolt_Level03 = 0x4D57
Global $A2_Dun_Zolt_Lobby = 0x4D58
Global $A2_Dun_Zolt_LobbyCenter = 0x2AFBA
Global $A2_Dun_Zolt_Random_Level01 = 0x4D59
Global $A2_Dun_Zolt_Random_Level02 = 0x36571
Global $A2_dun_Zolt_Random_PortalRoulette_02 = 0x2FDCF
Global $A2_Dun_Zolt_ShadowRealm_Level01 = 0x13AD0
Global $A2_Event_DyingManMine = 0x2270B
Global $A2_Event_PriceOfMercy_Cellar = 0x2FD9E
Global $A2_Rockworm_Cellar_Cave = 0x2FE81
Global $A2_trDun_Boneyard_Spider_Cave_01 = 0x1B437
Global $A2_trDun_Boneyard_Spider_Cave_02 = 0x35758
Global $A2_trDun_Boneyard_Worm_Cave_01 = 0x1B433
Global $A2_trDun_Boneyard_Worm_Cave_02 = 0x35759
Global $A2_trDun_Cave_Oasis_Random01 = 0xF46F
Global $A2_trDun_Cave_Oasis_Random01_Level02 = 0x2F6C2
Global $A2_trDun_Cave_Oasis_Random02 = 0xF46E
Global $A2_trDun_Cave_Oasis_Random02_Level02 = 0x27551
Global $A2_dun_Aqd_Oasis_Level00 = 0x2F0B6
Global $A2_dun_Aqd_Oasis_Level01 = 0x2F0B1
Global $A3_AzmodanFight = 0x1B39C
Global $A3_Battlefield_A = 0x1B7A4
Global $A3_Battlefield_B = 0x1B7B5
Global $A3_Battlefield_C = 0x1B7C4
Global $A3_Bridge_01 = 0x10F80
Global $A3_Bridge_Choke_A = 0x25DA8
Global $A3_Dun_Battlefield_Gate = 0x25C14
Global $A3_dun_Bridge_Interior_Random01 = 0x224ad
Global $A3_dun_Bridge_Interior_Random02 = 0x32270
Global $A3_Dun_Crater_Level_01 = 0x15040
Global $A3_Dun_Crater_Level_02 = 0x1d209
Global $A3_Dun_Crater_Level_03 = 0x1d20a
Global $A3_dun_Crater_ST_Level01 = 0x13b97
Global $A3_dun_Crater_ST_Level01B = 0x1d365
Global $A3_dun_Crater_ST_Level02 = 0x13b98
Global $A3_dun_Crater_ST_Level02B = 0x2200a
Global $A3_dun_Crater_ST_Level04 = 0x14cd2
Global $A3_dun_Crater_ST_Level04B = 0x1d368
Global $A3_dun_IceCaves_Random_01 = 0x2e3a1
Global $A3_dun_IceCaves_Random_01_Level_02 = 0x36206
Global $A3_dun_IceCaves_Timed_01 = 0x2ea66
Global $A3_dun_IceCaves_Timed_01_Level_02 = 0x36207
Global $A3_Dun_Keep_Hub = 0x16b11
Global $A3_Dun_Keep_Hub_Inn = 0x2d38c
Global $A3_Dun_Keep_Level03 = 0x126ac
Global $A3_Dun_Keep_Level04 = 0x16baf
Global $A3_Dun_Keep_Level05 = 0x21500
Global $A3_Dun_Keep_Random_01 = 0x2aa4a
Global $A3_Dun_Keep_Random_01_Level_02 = 0x36238
Global $A3_Dun_Keep_Random_02 = 0x2c7f2
Global $A3_Dun_Keep_Random_02_Level_02 = 0x36239
Global $A3_Dun_Keep_Random_03 = 0x2c802
Global $A3_Dun_Keep_Random_03_Level_02 = 0x3623a
Global $A3_Dun_Keep_Random_04 = 0x2c8e6
Global $A3_Dun_Keep_Random_04_Level_02 = 0x36241
Global $A3_Dun_Keep_Random_Cellar_01 = 0x35ee9
Global $A3_Dun_Keep_Random_Cellar_02 = 0x35ee8
Global $A3_Dun_Keep_Random_Cellar_03 = 0x303f7
Global $A3_Dun_Keep_TheBreach_Level04 = 0x3558f
Global $A3_dun_rmpt_Level01 = 0x16b20
Global $A3_dun_rmpt_Level02 = 0x16bf5
Global $A3_Gluttony_Boss = 0x1b280
Global $A3_dun_Hub_Adria_Tower = 0x31222
Global $A3_dun_hub_AdriaTower_Intro_01 = 0x3253e
Global $A4_dun_Diablo_Arena = 0x1abfb
Global $A4_dun_Diablo_Arena_Phase3 = 0x348c3
Global $A4_dun_Garden_of_Hope_01 = 0x1abca
Global $A4_dun_Garden_of_Hope_02 = 0x1abcc
Global $A4_dun_Garden3_SpireEntrance = 0x1d44a
Global $A4_dun_Heaven_1000_Monsters_Fight = 0x1aa5d
Global $A4_dun_Heaven_1000_Monsters_Fight_Entrance = 0x2f169
Global $A4_dun_Hell_Portal_01 = 0x1abd6
Global $A4_dun_Hell_Portal_02 = 0x1abdb
Global $A4_Dun_Keep_Hub = 0x301ed
Global $A4_dun_LibraryOfFate = 0x23120
Global $A4_dun_Spire_00 = 0x307a4
Global $A4_dun_Spire_01 = 0x1abe2
Global $A4_dun_Spire_02 = 0x1abe4
Global $A4_dun_Spire_03 = 0x1abe6
Global $A4_dun_Spire_04 = 0x33728
Global $A4_dun_Spire_SigilRoom_A = 0x313c4
Global $A4_dun_Spire_SigilRoom_B = 0x2ae7a
Global $A4_dun_Spire_SigilRoom_C = 0x313c6
Global $A4_dun_Spire_SigilRoom_D = 0x313c7
Global $A4_dun_Diablo_ShadowRealm_01 = 0x25845
Global $A4_dun_spire_DiabloEntrance = 0x3227a
Global $A4_dun_spire_exterior = 0x34964
Global $Axe_Bad_Data = 0x4d60
Global $PvP_Maze_01 = 0x4da2
Global $PvP_Octogon_01 = 0x4da3
Global $PvP_Pillar_01 = 0x4da4
Global $PvP_Stairs_01 = 0x4da5
Global $PvP_Test_BlueTeam = 0x4da6
Global $PvP_Test_Neutral = 0x4da7
Global $PvP_Test_RedTeam = 0x4da8
Global $PvPArena = 0x4d9c
EndFunc ;==>LevelAreaConstants
;;--------------------------------------------------------------------------------
;; Find which Act we are in
;;--------------------------------------------------------------------------------
Func GetAct()
If $Act = 0 Then
$arealist = FileRead("lib\area.txt")
$area = GetLevelAreaId()
_log(" We are in map : " & $area)
Local $pattern = "([\w'-]{5,80})\t\W\t" & $area
$asResult = StringRegExp($arealist, $pattern, 1)
If @error == 0 Then
Global $MyArea = $asResult[0]
If StringInStr($MyArea, "a1") Then
$Act = 1
ElseIf StringInStr($MyArea, "a2") Then
$Act = 2
ElseIf StringInStr($MyArea, "a3") Then
$Act = 3
ElseIf StringInStr($MyArea, "a4") Then
$Act = 4
EndIf
; _log("We are in map : " & $area &" " & $asResult[0])
;set our vendor aaccording to the act we are in as we know it.
Switch $Act
Case 1
Global $RepairVendor = "UniqueVendor_miner_InTown"
Case 2
Global $RepairVendor = "UniqueVendor_Peddler_InTown" ; act 2 fillette
Case 3
Global $RepairVendor = "UniqueVendor_Collector_InTown" ; act 3
Case 4
Global $RepairVendor = "UniqueVendor_Collector_InTown" ; act 3
EndSwitch
_log("Our Current Act is : " & $Act & " ---> So our vendor is : " & $RepairVendor)
EndIf
EndIf
EndFunc ;==>GetAct
;;--------------------------------------------------------------------------------
;; Adapt repair tab aaccording to MP act and diff
;;--------------------------------------------------------------------------------
Func GetRepairTab()
GetMonsterPow2()
GetDifficulty()
GetAct()
If $MP > 0 And $GameDifficulty = 4 Then
Switch $Act
Case 1
Global $RepairTab = 2
Case 2 To 4
Global $RepairTab = 3
EndSwitch
Else
Switch $Act
Case 1
Global $RepairTab = 2
Case 2 To 4
Global $RepairTab = 3
EndSwitch
EndIf
_log("RepairTab : " & $RepairTab & " ---> MP : " & $MP & " GameDiff : " & $GameDifficulty)
EndFunc ;==>GetRepairTab
;;--------------------------------------------------------------------------------
;; Find MP MF handicap
;; Get MF handicap and deduce game MP from it
;;
;;--------------------------------------------------------------------------------
Func GetMonsterPow()
$MfCap = (IterateActorAtribs($_MyGuid, $Atrib_Magic_Find_Handicap) * 10)
$MP = Round($MfCap, 0)
_log("Power monster : " & $MP)
EndFunc ;==>GetMonsterPow
;;--------------------------------------------------------------------------------
;; Find MonsterPower
;; Get it Via UI element
;;
;;--------------------------------------------------------------------------------
Func GetMonsterPow2()
$GetMonsterPow2 = fastCheckuiValue('Root.NormalLayer.minimap_dialog_backgroundScreen.minimap_dialog_pve.clock', 1, 28)
$asMpResult = StringRegExp($GetMonsterPow2, '(\()([0-9]{1,2})(\))', 1)
If @error == 0 Then
$MP = Number($asMpResult[1])
Else
$MP = 0
EndIf
_log("Power monster : " & $MP)
;_log("Power monster : " & $GetMonsterPow2)
EndFunc ;==>GetMonsterPow2
;;--------------------------------------------------------------------------------
;; Find Difficulty from vendor
;; Get vendor Level and deduce game difficulty from it
;; $GameDifficulty = not yet determined, 1 = Norm, 2 = Nm, 3 = Hell, 4 = Inferno
;;--------------------------------------------------------------------------------
Func GetDifficulty()
If $GameDifficulty = 0 Then
Local $index, $offset, $count, $item[4]
startIterateLocalActor($index, $offset, $count)
While iterateLocalActorList($index, $offset, $count, $item)
If StringInStr($item[1], $RepairVendor) Then
Global $npclevel = IterateActorAtribs($item[0], $Atrib_Level)
Switch $npclevel
Case 1 To 59
Global $GameDifficulty = 1
Case 60 To 70
Global $GameDifficulty = 4
EndSwitch
ExitLoop
EndIf
WEnd
_log("Game Difficulty is : " & $GameDifficulty)
EndIf
EndFunc ;==>GetDifficulty
;;--------------------------------------------------------------------------------
; Function: TownStateCheck()
; Description: Check if we are in town or not by comparing distance from stash
;
;;--------------------------------------------------------------------------------
Func _intown()
If $_debug Then _log("-----Checking if In Town------")
$town = findActor('Player_Shared_Stash', 448)
If $town = 1 Then
_log("We are in town ")
Return True
Else
_log("We are NOT in town ")
Return False
EndIf
EndFunc ;==>_intown
;==>TownStateCheck
;;--------------------------------------------------------------------------------
;; Getting Backpack Item Info
;;--------------------------------------------------------------------------------
Func IterateBackpack($bag = 0, $rlvl = 0)
;$bag = 0 for backpack and 15 for stash
;$rlvl = 1 for actual level requirement of item and 0 for base required level
$ptr1 = _memoryread($ofs_objectmanager, $d3, "ptr")
$ptr2 = _memoryread($ptr1 + 0x8a0, $d3, "ptr")
$ptr3 = _memoryread($ptr2 + 0x0, $d3, "ptr")
$_Count = _memoryread($ptr3 + 0x108, $d3, "int")
$CurrentOffset = _memoryread(_memoryread($ptr3 + 0x148, $d3, "ptr") + 0x0, $d3, "ptr");$_LocalActor_3
Local $__ACDACTOR[$_Count + 1][9]
;_log(" IterateBackpack 1 ")
For $i = 0 To $_Count
Local $iterateItemListStruct = DllStructCreate("ptr;char[64];byte[112];int;byte[92];int;int;int;ptr")
DllCall($d3[0], 'int', 'ReadProcessMemory', 'int', $d3[1], 'int', $CurrentOffset, 'ptr', DllStructGetPtr($iterateItemListStruct), 'int', DllStructGetSize($iterateItemListStruct), 'int', '')
$__ACDACTOR[$i][0] = DllStructGetData($iterateItemListStruct, 1)
$__ACDACTOR[$i][1] = DllStructGetData($iterateItemListStruct, 2)
$__ACDACTOR[$i][8] = DllStructGetData($iterateItemListStruct, 4)
$__ACDACTOR[$i][2] = DllStructGetData($iterateItemListStruct, 6)
$__ACDACTOR[$i][3] = DllStructGetData($iterateItemListStruct, 7)
$__ACDACTOR[$i][4] = DllStructGetData($iterateItemListStruct, 8)
$__ACDACTOR[$i][5] = 0
$__ACDACTOR[$i][6] = DllStructGetData($iterateItemListStruct, 9)
$__ACDACTOR[$i][7] = $CurrentOffset
$CurrentOffset = $CurrentOffset + $ofs_LocalActor_StrucSize
$iterateItemListStruct = ""
Next
For $i = $_Count To 0 Step -1
If $__ACDACTOR[$i][2] <> $bag Then
_ArrayDelete($__ACDACTOR, $i)
EndIf
Next
;_Arraydisplay($__ACDACTOR)
Return $__ACDACTOR
EndFunc ;==>IterateBackpack
Func Iteratestuff()
$ptr1 = _memoryread($ofs_objectmanager, $d3, "ptr")
$ptr2 = _memoryread($ptr1 + 0x8a0, $d3, "ptr")
$ptr3 = _memoryread($ptr2 + 0x0, $d3, "ptr")
$_Count = _memoryread($ptr3 + 0x108, $d3, "int")
$count = 0
$CurrentOffset = _memoryread(_memoryread($ptr3 + 0x148, $d3, "ptr") + 0x0, $d3, "ptr");$_LocalActor_3
Local $__ACDACTOR[1][9]
;_log(" IterateBackpack 1 ")
For $i = 0 To $_Count
Local $iterateItemListStruct = DllStructCreate("ptr;char[64];byte[112];int;byte[92];int;int;int;ptr")
DllCall($d3[0], 'int', 'ReadProcessMemory', 'int', $d3[1], 'int', $CurrentOffset, 'ptr', DllStructGetPtr($iterateItemListStruct), 'int', DllStructGetSize($iterateItemListStruct), 'int', '')
if DllStructGetData($iterateItemListStruct, 6) >= 1 AND DllStructGetData($iterateItemListStruct, 6) <= 13 Then
Redim $__ACDACTOR[$count+1][9]
$__ACDACTOR[$count][0] = DllStructGetData($iterateItemListStruct, 1)
$__ACDACTOR[$count][1] = DllStructGetData($iterateItemListStruct, 2)
$__ACDACTOR[$count][8] = DllStructGetData($iterateItemListStruct, 4)
$__ACDACTOR[$count][2] = DllStructGetData($iterateItemListStruct, 6)
$__ACDACTOR[$count][3] = DllStructGetData($iterateItemListStruct, 7)
$__ACDACTOR[$count][4] = DllStructGetData($iterateItemListStruct, 8)
$__ACDACTOR[$count][5] = 0
$__ACDACTOR[$count][6] = DllStructGetData($iterateItemListStruct, 9)
$__ACDACTOR[$count][7] = $CurrentOffset
$count += 1
EndIf
$CurrentOffset = $CurrentOffset + $ofs_LocalActor_StrucSize
$iterateItemListStruct = ""
Next
Return $__ACDACTOR
EndFunc
Func Load_Attrib_GlobalStuff()
Global $Check_HandLeft_Seed = 0
Global $Check_HandRight_Seed = 0
Global $Check_RingLeft_Seed = 0
Global $Check_RingRight_Seed = 0
Global $Check_Amulet_Seed = 0
Global $Check_ArmorTotal = 0
$table = Iteratestuff()
for $i=0 to ubound($table) - 1
if ($table[$i][2] >= 3 AND $table[$i][2] <= 4) OR $table[$i][2] >= 11 Then
If $table[$i][2] = 3 Then ;Weapon1
$Check_HandLeft_Seed = GetAttribute(_memoryread(GetACDOffsetByACDGUID($table[$i][0]) + 0x120, $d3, "ptr"), $Atrib_Seed)
ElseIf $table[$i][2] = 4 Then ;Weapon2
$Check_HandRight_Seed = GetAttribute(_memoryread(GetACDOffsetByACDGUID($table[$i][0]) + 0x120, $d3, "ptr"), $Atrib_Seed)
ElseIf $table[$i][2] = 11 Then ;Ring1
$Check_RingLeft_Seed = GetAttribute(_memoryread(GetACDOffsetByACDGUID($table[$i][0]) + 0x120, $d3, "ptr"), $Atrib_Seed)
ElseIf $table[$i][2] = 12 Then ;Ring
$Check_RingRight_Seed = GetAttribute(_memoryread(GetACDOffsetByACDGUID($table[$i][0]) + 0x120, $d3, "ptr"), $Atrib_Seed)
ElseIf $table[$i][2] = 13 Then ;Amulette
$Check_Amulet_Seed = GetAttribute(_memoryread(GetACDOffsetByACDGUID($table[$i][0]) + 0x120, $d3, "ptr"), $Atrib_Seed)
EndIf
EndIf
Next
$Check_ArmorTotal = GetAttribute($_myguid, $Atrib_Armor_Item_Total)
_log("Load_Attrib_GlobalStuff() Result :")
_log("$Check_HandLeft_Seed -> " & $Check_HandLeft_Seed)
_log("$Check_HandRight_Seed -> " & $Check_HandRight_Seed)
_log("$Check_RingLeft_Seed -> " & $Check_RingLeft_Seed)
_log("$Check_RingRight_Seed -> " & $Check_RingRight_Seed)
_log("$Check_Amulet_Seed -> " & $Check_Amulet_Seed)
_log("$Check_ArmorTotal -> " & $Check_ArmorTotal)
EndFunc
Func Verif_Attrib_GlobalStuff()
If Trim(StringLower($InventoryCheck)) = "true" Then
Local $HandLeft_Seed = 0
Local $HandRight_Seed = 0
Local $RingLeft_Seed = 0
Local $RingRight_Seed = 0
Local $Amulet_Seed = 0
Local $ArmorTotal = 0
$table = Iteratestuff()
for $i=0 to ubound($table) - 1
if ($table[$i][2] >= 3 AND $table[$i][2] <= 4) OR $table[$i][2] >= 11 Then
If $table[$i][2] = 3 Then ;Weapon1
$HandLeft_Seed = GetAttribute(_memoryread(GetACDOffsetByACDGUID($table[$i][0]) + 0x120, $d3, "ptr"), $Atrib_Seed)
ElseIf $table[$i][2] = 4 Then ;Weapon2
$HandRight_Seed = GetAttribute(_memoryread(GetACDOffsetByACDGUID($table[$i][0]) + 0x120, $d3, "ptr"), $Atrib_Seed)
ElseIf $table[$i][2] = 11 Then ;Ring1
$RingLeft_Seed = GetAttribute(_memoryread(GetACDOffsetByACDGUID($table[$i][0]) + 0x120, $d3, "ptr"), $Atrib_Seed)
ElseIf $table[$i][2] = 12 Then ;Ring
$RingRight_Seed = GetAttribute(_memoryread(GetACDOffsetByACDGUID($table[$i][0]) + 0x120, $d3, "ptr"), $Atrib_Seed)
ElseIf $table[$i][2] = 13 Then ;Amulette
$Amulet_Seed = GetAttribute(_memoryread(GetACDOffsetByACDGUID($table[$i][0]) + 0x120, $d3, "ptr"), $Atrib_Seed)
EndIf
EndIf
Next
$ArmorTotal = GetAttribute($_myguid, $Atrib_Armor_Item_Total)
if $HandLeft_Seed <> $Check_HandLeft_Seed Then
If $HandLeft_Seed = 0 AND $Check_HandLeft_Seed <> 0 Then
_log("-> Weapon Left Dropped")
Else
_log("-> Weapon Left switched")
EndIf
return False
ElseIf $HandRight_Seed <> $Check_HandRight_Seed Then
If $HandRight_Seed = 0 AND $Check_HandRight_Seed <> 0 Then
_log("-> Weapon Right Dropped")
Else
_log("-> Weapon Right switched")
EndIf
return False
ElseIf $RingLeft_Seed <> $Check_RingLeft_Seed Then
If $RingLeft_Seed = 0 AND $Check_RingLeft_Seed <> 0 Then
_log("-> Ring Left Dropped")
Else
_log("-> Ring Left switched")
EndIf
return False
ElseIf $RingRight_Seed <> $Check_RingRight_Seed Then
If $RingRight_Seed = 0 AND $Check_RingRight_Seed <> 0 Then
_log("-> Ring Right Dropped")
Else
_log("-> Ring Right switched")
EndIf
return False
ElseIF $ArmorTotal <> $Check_ArmorTotal Then
_log("-> Armor Total changed")
return False
EndIf
_log("Checking stuff successful")
return true
Else
_log("Checking stuff Disable")
return true
EndIF
EndFunc
Func antiidle()
global $shrinebanlist = 0
$warnloc = GetCurrentPos()
$warnarea = GetLevelAreaId()
_log("Lost detected at : " & $warnloc[0] & ", " & $warnloc[1] & ", " & $warnloc[2],1);
_log("Lost area : " & $warnarea,1);
If _checkInventoryopen() = False Then
Send("i")
Sleep(150)
Endif
Send("{PRINTSCREEN}")
sleep(150)
Send("{SPACE}")
ToolTip("Detection de stuff modifié !" & @CRLF & "Zone : " & $warnarea & @CRLF & "Position : " & $warnloc[0] & ", " & $warnloc[1] & ", " & $warnloc[2] & @CRLF & "Un screenshot a été pris, il se situe dans document/diablo 3" , 15, 15)
While Not _intown()
_TownPortalnew()
sleep(100)
WEnd
;idleing
While 1
MouseClick("middle", Random(100, 200), Random(100, 200), 1, 6)
Sleep(Random(40000, 180000))
MouseClick("middle", Random(600, 700), Random(100, 200), 1, 6)
Sleep(Random(40000, 180000))
MouseClick("middle", Random(600, 700), Random(400, 500), 1, 6)
Sleep(Random(40000, 180000))
MouseClick("middle", Random(100, 200), Random(400, 500), 1, 6)
Sleep(Random(40000, 180000))
Wend
Endfunc
;;--------------------------------------------------------------------------------
; Function: GetPackItemLevel($ACD, $_REQ)
;;--------------------------------------------------------------------------------
Func GetPackItemLevel($ACD, $_REQ)
;IterateLocalActor()
;$ACDIndex = _ArraySearch($__ACTOR, "0x" & Hex($_guid), 0, 0, 0, 1, 1, 1) ;this bitch is slow as hell
If $ACD = -1 Then Return False
$_Count = _MemoryRead($_ActorAtrib_Count, $d3, 'int')
If $_Count > 500 Then
_log("Attention la valeur de Count était de " & $_Count)
$_Count = 500
EndIf
$CurrentOffset = $_ActorAtrib_4
Dim $ACTORatrib
For $i = 0 To $_Count
$ACTORatrib = _MemoryRead($CurrentOffset, $d3, 'ptr')
If $ACTORatrib = $ACD Then
$test = _MemoryRead($CurrentOffset + 0x10, $d3, 'ptr')
$CurretOffset = $test
For $i = 0 To 825
$data = _MemoryRead($CurretOffset, $d3, 'ptr')
$CurretOffset = $CurretOffset + 0x4
If $data <> 0x0 Then
$AtribData = _MemoryRead($data + 0x4, $d3, 'ptr')
If StringLeft($AtribData, 7) = "0x0003B" Then
;ConsoleWrite("Debug :" &$data+0x4 & " : " & _MemoryRead($data+0x4, $d3, 'int') &@crlf) ;FOR DEBUGGING
If "0x" & StringRight($AtribData, 3) = $_REQ[0] Then
Return _MemoryRead($data + 0x8, $d3, $_REQ[1])
EndIf
EndIf
If StringLeft($AtribData, 7) = "0xFFFFF" Then
;ConsoleWrite("Debug :" &$data+0x4 & " : " & _MemoryRead($data+0x4, $d3, 'int') &@crlf) ;FOR DEBUGGING
If "0x" & StringRight($AtribData, 3) = $_REQ[0] Then