/
Globals.simba
1256 lines (1049 loc) · 31.3 KB
/
Globals.simba
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
(*
Globals
=======
The Globals file is where all MSI's global variables, constants, and types are
declared. There are some exceptions, however, which are used in the different
skill files. Keep in mind that any of MSI's global arrays are only accessable
after MSI_Setup has been called.
The source for can be found
`here <https://github.com/SRL/MSI/raw/master/MSI/Core/Globals.simba>`_.
*)
(*
Abbreviations
~~~~~~~~~~~~~
These are all the abbreviations we use in MSI constants and variables.
.. note::
| GE: Grand Exchange
| VE: Varrock East
| VW: Varrock West
| FW: Falador West
| FE: Falador East
| MG: Mining Guild
| CG: Crafting Guild
| AK: Al Kharid
| LB: Lumbridge
| EV: EdgeVille
| BBV: Barbarian Village
| DB: Draynor Bank
| RM: Rimmington
| PS: Port Sarim
| SV: Seers Village
| LSW: Lumbridge Swamp West
| LSE: Lumbridge Swamp East
| KJ: Karamja
| CB: Catherby
| RC: Runecrafting
| FG: Fishing Guild
| Y: Yanille
| FC: Fishing Colony(Piscatoris)
*)
{==============================================================================\
| Constants |
\==============================================================================}
(*
Miscellaneous Constants
~~~~~~~~~~~~~~~~~~~~~~~
The miscellaneous constants are used throughout MSI multiple times. Having them
as constants makes it much easier for them to be updated. They are also
advanced settings the user can alter to their liking. These constants include
anything from randomness percentage to bank symbol accuracy.
*)
const
ANTI_BAN_CHANCE = 10; // The chance (in %) of performing antiban
RANDOM_TIME_PERCENT = 0.30; // The percent of BreakLoads/TotalLoads/BreakTime/TotalTime to use for randomness.
DTM_TOLERANCE = 10; // Tolerance on the DTMs
// PLB = Player Box (a tight box around the player); used in animations
PLBX1 = MSCX - 10;
PLBY1 = MSCY - 25;
PLBX2 = MSCX + 15;
PLBY2 = MSCY + 15;
MM_BLACK = 263168; // Black color on the minimap; used for some obstacle's mirror
(*
Script Constants
~~~~~~~~~~~~~~~~
The Script constants represent the index of the MSI_Scripts array that stores
all the script information for that particular script. To access all the script
information for Varrock East Miner, for example, you would do something like:
Example:
.. code-block:: pascal
function GetVEMiner(): TScript;
begin
Result := MSI_Scripts[SCRIPT_VE_MINER];
end;
*)
const
// Woodcutting
SCRIPT_POWER_CHOP = 10;
SCRIPT_VE_OAKS = 11;
SCRIPT_GE_YEWS = 12;
SCRIPT_GE_OAKS = 13;
SCRIPT_DB_WILLOWS = 14;
SCRIPT_DB_TREES = 15;
SCRIPT_DB_OAKS = 16;
SCRIPT_DB_YEWS = 17;
SCRIPT_RM_YEWS = 18;
SCRIPT_RM_WILLOWS = 19;
SCRIPT_PS_WILLOWS = 20;
SCRIPT_PS_YEWS = 21;
SCRIPT_SV_MAGICS = 22;
SCRIPT_SV_MAPLES = 23;
SCRIPT_SV_YEWS = 24;
SCRIPT_SV_OAKS = 25;
SCRIPT_SV_TREES = 26;
SCRIPT_EV_YEWS = 27;
// Mining
SCRIPT_POWER_MINER = 30;
SCRIPT_VE_MINER = 31;
SCRIPT_VW_MINER = 32;
SCRIPT_LSW_MINER = 33;
SCRIPT_LSE_MINER = 34;
SCRIPT_BBV_MINER = 35;
SCRIPT_RM_MINER = 36;
SCRIPT_GUILD_MINER = 37;
SCRIPT_DB_CLAY = 38;
SCRIPT_FW_MINER = 39;
SCRIPT_AK_MINER = 40;
SCRIPT_CG_MINER = 41;
SCRIPT_Y_MINER = 126;
// Fishing
SCRIPT_POWER_FISHER = 50;
SCRIPT_DB_FISHER = 51;
SCRIPT_BBV_FISHER = 52;
SCRIPT_KJ_NOTER = 53;
SCRIPT_CB_FISHER = 54;
SCRIPT_FG_FISHER = 55;
SCRIPT_FC_FISHER = 127;
// Cooking
SCRIPT_AK_COOKER = 70;
SCRIPT_CB_COOKER = 71;
// Magic
SCRIPT_ALCHER = 80;
SCRIPT_TELEPORTER = 81;
// Money Making
SCRIPT_VE_SOFTENER = 100;
SCRIPT_GE_SOFTENER = 101;
SCRIPT_EV_SOFTENER = 102;
SCRIPT_FW_SOFTENER = 103;
SCRIPT_VE_FILLER = 104;
SCRIPT_FW_FILLER = 105;
SCRIPT_GE_FILLER = 106;
// Runecrafting
SCRIPT_RC_AIR = 120;
SCRIPT_RC_WATER = 121;
SCRIPT_RC_EARTH = 122;
SCRIPT_RC_FIRE = 123;
SCRIPT_RC_BODY = 124;
SCRIPT_RC_MIND = 125;
SCRIPT_ARRAY_LENGTH = 127; // Change to the highest script constant
(*
Extras Constants
~~~~~~~~~~~~~~~~
Constants used in MSI Extras. These do not represent an index of a global
array, but specify certain settings when a scripter is declaring and extra for
MSI.
*)
const
EXTRA_BETA = 'BETA';
EXTRA_ALPHA = 'ALPHA';
EXTRA_PRERELEASE = 'PRE-RELEASE';
EXTRA_CONTINUE = 1;
EXTRA_EXIT = -1;
(*
Pointer Constants
~~~~~~~~~~~~~~~~~
The Pointer constants are used primarily with Extras where the scripter can set
which procedures to call the extra in place of or in addition to. These are
also used for declaring an extra.
Example:
.. code-block:: pascal
MSI_Pointers[MSI_OnDebugCall] := @Coh3n_Debug; // Where Coh3n_Debug would be in an extra I wrote
*)
const
MSI_OnResetRemoteCall = 0;
MSI_OnGetSkillLevels = 1;
POINTER_ARRAY_LENGTH = 2;
(*
Path Constants
~~~~~~~~~~~~~~
These constants represent the different paths to files accessed by MSI, such as
the saved player's information, the debug/report files, and the settings file.
*)
const
PATH_PLAYER = IncludePath + 'MSI\Player.txt'; // Path for all the player information
PATH_REPORT = IncludePath + 'MSI\Progress Reports\'; // Path for progress report
PATH_DEBUG = IncludePath + 'MSI\Debug Logs\'; // Path for debug
PATH_SETTINGS = IncludePath + 'MSI\Settings.txt'; // Path for script settings
PATH_FORM_BITMAPS = IncludePath + 'MSI\MSI\Form\Bitmaps\'; // Path to all the form images
PATH_EXTRAS = IncludePath + 'MSI\MSI\Extras\'; // Path to all the extras
(*
Location Constants
~~~~~~~~~~~~~~~~~~
The Location constants represent the index of the MSI_Locations array that
stores all the location information for that particular location. To access all
the location information for Varrock East Bank, for example, you would do
something like:
Example:
.. code-block:: pascal
function GetVEBankInfo(): TScript;
begin
Result := MSI_Locations[LOC_VE_BANK];
end;
*)
const
// Undefined
LOC_POWER_SKILL = 0;
LOC_LOST = 1;
// Varrock
// East
LOC_VE_OAKS = 11;
LOC_VE_BANK = 12;
LOC_VE_MINE = 13;
LOC_VE_FOUNTAIN = 14;
// West
LOC_VW_BANK = 16;
LOC_VW_MINE = 17;
// Grand Exchange
LOC_GE_BANK = 20;
LOC_GE_YEWS = 21;
LOC_GE_OAKS = 22;
LOC_GE_FOUNTAIN = 23;
// Draynor
LOC_DB_BANK = 30;
LOC_DB_WILLOWS = 31;
LOC_DB_TREES = 32;
LOC_DB_OAKS = 33;
LOC_DB_FISH = 34;
LOC_DB_CLAY = 35;
LOC_DB_YEWS = 36;
// Rimmington
LOC_RM_YEWS = 40;
LOC_RM_MINE = 41;
LOC_RM_WILLOWS = 42;
// Falador
LOC_FE_BANK = 50;
LOC_FW_BANK = 51;
LOC_FW_MINE = 52;
LOC_FW_PUMP = 53;
// Port Sarim
LOC_PS_WILLOWS = 60;
LOC_PS_YEWS = 61;
LOC_PS_DBOX = 62;
// Lumbridge
LOC_LSW_MINE = 70;
LOC_LSE_MINE = 71;
LOC_LB_SPAWN = 72;
// Edgeville
LOC_EV_BANK = 80;
LOC_EV_YEWS = 81;
LOC_EV_WELL = 82;
// Barbarian Village
LOC_BBV_MINE = 90;
LOC_BBV_FISH = 91;
// Seers Village
LOC_SV_MAGICS = 100;
LOC_SV_BANK = 101;
LOC_SV_MAPLES = 102;
LOC_SV_YEWS = 103;
LOC_SV_OAKS = 104;
LOC_SV_TREES = 105;
// Guilds
LOC_GUILD_MINE = 110;
LOC_CG_MINE = 111;
LOC_FG_BANK = 112;
LOC_FG_FISH = 113;
// Al-Kharid
LOC_AK_BANK = 120;
LOC_AK_RANGE = 121;
LOC_AK_MINE = 122;
// Karamja
LOC_KJ_STILES = 130;
LOC_KJ_FISH = 131;
// Catherby
LOC_CB_BANK = 140;
LOC_CB_FISH = 141;
LOC_CB_RANGE = 142;
// Alters
LOC_ALTAR_AIR = 150;
LOC_ALTAR_EARTH = 151;
LOC_ALTAR_WATER = 152;
LOC_ALTAR_FIRE = 153;
LOC_ALTAR_MIND = 154;
LOC_ALTAR_BODY = 155;
// Yanille
Loc_Y_Mine = 156;
Loc_Y_Bank = 157;
// Fishing Colony(Piscatoris)
LOC_FC_BANK = 158;
LOC_FC_FISH = 159;
LOC_ARRAY_LENGTH = 159; // Change to the highest location constant
(*
Requirement Constants
~~~~~~~~~~~~~~~~~~~~~
These constants represent the skill level required to use a particular tool.
For example, to use a Steel Hatchet or Pickaxe, the player needs a level of 6 in
Mining or Woodcutting.
*)
const
// Hatchets and pickaxes
REQ_TOOL_BRONZE = 1;
REQ_TOOL_IRON = 1;
REQ_TOOL_STEEL = 6;
REQ_TOOL_MITHRIL = 21;
REQ_TOOL_ADAMANT = 31;
REQ_TOOL_RUNE = 41;
REQ_TOOL_DRAGON = 61;
REQ_MAX_LEVEL = 99;
(*
Item Constants
~~~~~~~~~~~~~~
The Item constants represent the index of the MSI_Items array that stores all
the item information for that particular item. To access all the item
information for Willow Logs, for example, you would do something like:
Example:
.. code-block:: pascal
function GetWillowLogsInfo(): TItem;
begin
Result := MSI_Items[LOGS_WILLOW];
end;
*)
const
PICKAXE_BRONZE = 10;
PICKAXE_IRON = 11;
PICKAXE_STEEL = 12;
PICKAXE_MITHRIL = 13;
PICKAXE_ADAMANT = 14;
PICKAXE_RUNE = 15;
PICKAXE_DRAGON = 16;
HATCHET_BRONZE = 20;
HATCHET_IRON = 21;
HATCHET_STEEL = 22;
HATCHET_MITHRIL = 23;
HATCHET_ADAMANT = 24;
HATCHET_RUNE = 25;
HATCHET_DRAGON = 26;
LOGS_NORMAL = 30;
LOGS_OAK = 31;
LOGS_WILLOW = 32;
LOGS_MAPLE = 33;
LOGS_YEW = 34;
LOGS_MAGIC = 35;
ORE_CLAY = 40;
ORE_COPPER = 41;
ORE_TIN = 42;
ORE_IRON = 43;
ORE_SILVER = 44;
ORE_COAL = 45;
ORE_GOLD = 46;
ORE_MITHRIL = 47;
ORE_ADAMANTITE = 48;
ORE_RUNITE = 49;
FISH_SMALLNET = 60;
FISH_CAGE_CRAYFISH = 61;
FISH_ROD_BAIT = 62;
FISH_BAIT = 63;
FISH_ROD_FLY = 64;
FISH_HARPOON = 65;
FISH_HARPOON_BARB = 66;
FISH_POT_LOBSTER = 67;
FISH_RAW_SHRIMP = 70;
FISH_RAW_CRAYFISH = 71;
FISH_RAW_SARDINE = 72;
FISH_RAW_ANCHOVIE = 73;
FISH_RAW_HERRING = 74;
FISH_RAW_TROUT = 75;
FISH_RAW_PIKE = 76;
FISH_RAW_SALMON = 77;
FISH_RAW_TUNA = 78;
FISH_RAW_LOBSTER = 79;
FISH_RAW_SWORDFISH = 80;
FISH_RAW_MONKFISH = 81;
FISH_RAW_SHARK = 82;
FISH_COOKED_SHRIMP = 100;
FISH_COOKED_CRAYFISH = 101;
FISH_COOKED_SARDINE = 102;
FISH_COOKED_ANCHOVIE = 103;
FISH_COOKED_HERRING = 104;
FISH_COOKED_TROUT = 105;
FISH_COOKED_PIKE = 106;
FISH_COOKED_SALMON = 107;
FISH_COOKED_TUNA = 108;
FISH_COOKED_LOBSTER = 109;
FISH_COOKED_SWORDFISH = 110;
FISH_COOKED_MONKFISH = 111;
FISH_COOKED_SHARK = 112;
GEM_UNCUT_SAPPHIRE = 120;
GEM_UNCUT_EMERALD = 121;
GEM_UNCUT_RUBY = 122;
GEM_UNCUT_DIAMOND = 123;
MISC_BIRD_NEST = 130;
MISC_FEATHER = 131;
STAFF_AIR = 150;
STAFF_WATER = 151;
STAFF_EARTH = 152;
STAFF_FIRE = 153;
// These constants have to match the rune constants in SRL's magic.simba
MSI_RUNE_AIR = 160; // Has 'MSI_' because there are other rune constants in SRL
MSI_RUNE_BODY = 161;
MSI_RUNE_MIND = 162;
MSI_RUNE_EARTH = 163;
MSI_RUNE_FIRE = 164;
MSI_RUNE_WATER = 165;
MSI_RUNE_CHAOS = 166;
MSI_RUNE_LAW = 167;
MSI_RUNE_COSMIC = 168;
MSI_RUNE_DEATH = 169;
MSI_RUNE_NATURE = 170;
MSI_RUNE_BLOOD = 171;
MSI_RUNE_SOUL = 172;
MSI_RUNE_ASTRAL = 173;
MSI_RUNE_ESSENCE = 174;
MSI_PURE_ESSENCE = 175;
CLAY_SOFT = 180;
VIAL_EMPTY = 181;
VIAL_WATER = 182;
JUG_EMPTY = 183;
JUG_WATER = 184;
BOWL_EMPTY = 185;
BOWL_WATER = 186;
BUCKET_EMPTY = 187;
BUCKET_WATER = 188;
TIARA_AIR = 210;
TIARA_BODY = 211;
TIARA_MIND = 212;
TIARA_EARTH = 213;
TIARA_FIRE = 214;
TIARA_WATER = 215;
DWARVEN_ARMY_AXE = 216;
COAL_BAG = 217;
ITEM_ARRAY_LENGTH = 217; // Change to the highest item constant
(*
Object Constants
~~~~~~~~~~~~~~~~
The Object constants represent the index of the MSI_Objects array that stores
all the object information for that particular object. Objects refer to
anything that is to be found on the main screen of the Runescape window. To
access all the item information for a Willow Tree, for example, you would do
something like:
Example:
.. code-block:: pascal
function GetWillowTreeInfo(): TMSObject;
begin
Result := MSI_Objects[TREE_WILLOW];
end;
*)
const
// Trees
TREE_DEAD = 8;
TREE_NORMAL = 9;
TREE_NORMAL_NEW = 10;
TREE_OAK = 11;
TREE_OAK_NEW = 12;
TREE_WILLOW = 13;
TREE_WILLOW_NEW = 14;
TREE_MAPLE = 15;
TREE_MAPLE_NEW = 16;
TREE_YEW = 17;
TREE_YEW_NEW = 18;
TREE_MAGIC = 19;
// Rocks
ROCK_CLAY = 20;
ROCK_TIN = 21;
ROCK_COPPER = 22;
ROCK_IRON = 23;
ROCK_SILVER = 24;
ROCK_COAL = 25;
ROCK_GOLD = 26;
ROCK_MITHRIL = 27;
ROCK_ADAMANTITE = 28;
ROCK_RUNITE = 29;
// Banks; includes the 'MSI_' because there are bank constants in SRL's Bank.scar
MSI_BANK_VE = 30;
MSI_BANK_VW = 31;
MSI_BANK_DB = 32;
MSI_BANK_GE = 33;
MSI_BANK_FE = 34;
MSI_BANK_EV = 35;
MSI_BANK_SV = 36;
MSI_BANK_AK = 37;
MSI_BANK_CB = 38;
MSI_BANK_FW = 39;
MSI_BANK_FG = 40;
MSI_BANK_Y = 41;
DBOX_PS = 45;
// Fishing spots
FISHSPOT_NET = 50;
FISHSPOT_BAIT = 51;
FISHSPOT_LURE = 52;
FISHSPOT_CAGE = 53;
FISHSPOT_HARPOON = 54;
FISHSPOT_HARPOON_SHARK = 55;
FISHSPOT_NET_MONKFISH = 56;
// Cooking spots
COOKSPOT_AK_RANGE = 60;
COOKSPOT_CB_RANGE = 61;
// Obstacles
LADDER_MG_DOWN = 70;
LADDER_MG_UP = 71;
WALL_FW = 72;
DOOR_NORMAL = 73;
// NPCs
NPC_STILES = 93;
NPC_ARNOLD = 94;
// Misc Objects
OBJ_BIRD_NEST = 100;
BIRD_NEST_CBMESSAGE = 'nest falls out of';
// Water Sources
FOUNTAIN_VE = 110;
FOUNTAIN_GE = 111;
WELL_EV = 112;
PUMP_FW = 113;
// Furnaces
FURNACE_AK = 120;
// Mysterious Ruins
RUINS_AIR = 130;
RUINS_EARTH = 131;
RUINS_WATER = 132;
RUINS_MIND = 133;
RUINS_FIRE = 134;
RUINS_BODY = 135;
ALTAR_RUNECRAFTING = 137;
// Portals
PORTAL_AIR = 150;
PORTAL_EARTH = 151;
PORTAL_WATER = 152;
PORTAL_MIND = 153;
PORTAL_FIRE = 154;
PORTAL_BODY = 155;
OBJECT_HIGH = 155; // Change to the highest object constant
(*
Obstacle Constants
~~~~~~~~~~~~~~~~~~
The Obstacle constants represent the index of the MSI_Obstacles array that
stores all the object information for that particular obstacle. It stores
information for obstacles like doors and ladders.
Example:
.. code-block:: pascal
function GetGuildLadder(): TObstacle;
begin
Result := MSI_GetObstacle(OBS_MG_LADDER_DOWN);
end;
*)
const
// Represents TPath's "Obstacles" array elements
OBS_LOC_TO = 0;
OBS_LOC_FROM = 1;
OBS_LADDER_MG_DOWN = 10;
OBS_LADDER_MG_UP = 11;
OBS_WALL_FW = 20;
OBS_DOOR_CG_IN = 30;
OBS_DOOR_CG_OUT = 31;
OBS_DOOR_CBRange = 32;
// Runcrafting
OBS_RUINS_AIR = 50;
OBS_RUINS_EARTH = 51;
OBS_RUINS_WATER = 52;
OBS_RUINS_MIND = 53;
OBS_RUINS_FIRE = 54;
OBS_RUINS_BODY = 55;
OBS_PORTAL_AIR = 71;
OBS_PORTAL_EARTH = 72;
OBS_PORTAL_WATER = 73;
OBS_PORTAL_MIND = 74;
OBS_PORTAL_FIRE = 75;
OBS_PORTAL_BODY = 76;
(*
Spells Constants
~~~~~~~~~~~~~~~~
The Spell constants work the same as the items/objects/obstacles/etc - they
represent the index of a global array.
Example:
.. code-block:: pascal
function GetWindStrike(): TSpell;
begin
Result := MSI_Spells[SPELL_WIND_STRIKE];
end;
*)
const
ALCH_COIN_MESSAGE = 'oins are';
SPELL_WIND_STRIKE = 0;
SPELL_WIND_BOLT = 1;
SPELL_WIND_BLAST = 2;
SPELL_WIND_WAVE = 3;
SPELL_WATER_STRIKE = 4;
SPELL_WATER_BOLT = 5;
SPELL_WATER_BLAST = 6;
SPELL_WATER_WAVE = 7;
SPELL_EARTH_STRIKE = 8;
SPELL_EARTH_BOLT = 9;
SPELL_EARTH_BLAST = 10;
SPELL_EARTH_WAVE = 11;
SPELL_FIRE_STRIKE = 12;
SPELL_FIRE_BOLT = 13;
SPELL_FIRE_BLAST = 14;
SPELL_FIRE_WAVE = 15;
SPELL_CONFUSE = 16;
SPELL_WEAKEN = 17;
SPELL_CURSE = 18;
SPELL_BIND = 19;
SPELL_TELE_HOME = 20;
SPELL_TELE_VARROCK = 21;
SPELL_TELE_LUMBRIDGE = 22;
SPELL_TELE_FALADOR = 23;
SPELL_TELE_HOUSE = 24;
SPELL_TELE_CAMELOT = 25;
SPELL_ALCH_LOW = 26;
SPELL_ALCH_HIGH = 27;
SPELL_TELEGRAB = 28;
SPELL_SUPERHEAT = 29;
SPELL_ARRAY_LENGTH = 29;
(*
Animations Constants
~~~~~~~~~~~~~~~~~~~~
The Animation constants work the same as the items/objects/obstacles/etc - they
represent the index of a global array.
Example:
.. code-block:: pascal
function GetHighAlchAnimation(): TAnimation;
begin
Result := MSI_GetAnimation(ANIM_ALCH_HIGH);
end;
*)
const
ANIM_IDLE = 0;
ANIM_ALCH_LOW = 10;
ANIM_ALCH_HIGH = 11;
ANIM_CHOPPING = 12;
ANIM_CHOPPING_NEW = 13;
ANIM_TELE = 14;
(*
Material Constants
~~~~~~~~~~~~~~~~~~
The Material constants work the same as the items/objects/obstacles/etc - they
represent the index of a global array.
Example:
.. code-block:: pascal
function GetShrimpMaterials(): TMaterial;
begin
Result := MSI_Materials[MATERIAL_SHRIMP];
end;
*)
const
// Fish for cooking
MATERIAL_SHRIMP = 0;
MATERIAL_CRAYFISH = 1;
MATERIAL_SARDINE = 2;
MATERIAL_HERRING = 3;
MATERIAL_ANCHOVIE = 4;
MATERIAL_TROUT = 5;
MATERIAL_PIKE = 6;
MATERIAL_SALMON = 7;
MATERIAL_TUNA = 8;
MATERIAL_LOBSTER = 9;
MATERIAL_SWORDFISH = 10;
MATERIAL_MONKFISH = 11;
MATERIAL_SHARK = 12;
// Money making
MATERIAL_CLAY = 20;
MATERIAL_VIAL = 21;
MATERIAL_JUG = 22;
MATERIAL_BOWL = 23;
MATERIAL_BUCKET = 24;
//Runecrafting
MATERIAL_ESSENCE_RUNE = 40;
MATERIAL_ESSENCE_PURE = 41;
MATERIAL_LENGTH = 41;
(*
Proggy Constants
~~~~~~~~~~~~~~~~
Used in MSI_AddToProggy in Debug.simba to determine what to add to the
progress report.
*)
const
PROG_ADD_EXP = 0;
PROG_ADD_ITEMS = 1;
PROG_ADD_LOADS = 2;
PROG_ADD_CASTS = 3;
(*
Setup Constants
~~~~~~~~~~~~~~~
Represents the indexes of MSI_Settings which are set by the user. Used just
like the other MSI global arrays.
*)
const
// Booleans
SETUP_DEBUG_SMART = 10;
SETUP_SAVE_DEBUG = 11;
SETUP_SAVE_REPORT = 12;
SETUP_HUMAN_BREAK = 13;
SETUP_SWITCH_WORLDS = 14;
SETUP_PRINT_REPORT = 15;
SETUP_QC_LEVELUP = 16;
SETUP_RANDOM_NP = 17;
SETUP_DEATH_WALK = 18;
SETUP_REPORT_GUI = 19;
SETUP_RANDOM_TOOL = 20;
// Integers
SETUP_BREAK_TIME = 30;
SETUP_DEBUG_LEVEL = 31;
SETUP_ANTIBAN_WAIT = 32;
SETUP_RANDOMS_WAIT = 33;
SETUP_MAX_PLAYERS = 34;
// Strings
SETUP_STATS_ID = 40;
SETUP_STATS_PASS = 41;
SETUP_ARRAY_LENGTH = 41;
{==============================================================================\
| Types |
\==============================================================================}
(*
TMSObject
~~~~~~~~~
The type that holds all the attributes of any main screen objects used
throughout MSI scripts.
*)
type
TMSObject = record
X, Y : Integer;
Name : string; // The object's name (doesn''t have to be the same as in-game)
Constant : Integer;
Uptexts : TStringArray;
Options : TStringArray;
Exp : Extended; // Experienced gained from object
Level : Integer; // The skill level required
Colors : TIntegerArray;
FindAllColors : Boolean; // Set to true if all the colors need to be found
Tol : TIntegerArray;
Hue : array of Extended; //Should be one for every color.
Sat : array of Extended;
W, H : Integer; // Width and Height of the object
Accuracy : Integer; // Min pixels to be found in each TPA
SearchArea : TBox; // Box to search for object. Carries the Values of MSBox by default.
ExcludeSelf : Boolean; // Exclude pixels in a box around the player
RightClickOnly : Boolean;
WaitToMove : Boolean; // When clicked, wait till we have stopped moving? Calls Flag;
MultiClick : Boolean; // Milti-click the object like a human would
Track : Boolean; // When clicked, track the object while the player moves? Calls MSI_TrackObject;
MaxTime : Integer; // Max time (in ms) to wait for the object to disappear
AssociatedItems : TIntegerArray; // The items that can be gained from interacting with object
end;
TMSObjectArray = array of TMSObject;
(*
TItem
~~~~~
The type that holds all the attributes of any item used in the inventory
or bank throughout MSI scripts.
*)
type
TItem = record
Name : string;
StatsName : string;
UpText : TStringArray;
InvSlot : Integer;
Stackable : Boolean;
EquipLevel: Integer;
DTM : Integer;
end;
TItemArray = array of TItem;
(*
TMaterial
~~~~~~~~~
The type that holds all the attributes of any materials used for a skill.
*)
type
TMaterial = record
Name : string;
Supplies : T2DIntegerArray;
Produces : TIntegerArray;
MemberOnly : Boolean;
Level : Integer;
end;
TMaterialArray = array of TMaterial;
(*
TBank
~~~~~
Used in the banking functions to determine the type of bank. Also used when
declaring a TScript record.
*)
type
TBank = (Bank, DBox, NoBank, Drop, NPC);
(*
TMouseOption
~~~~~~~~~~~~
Used to tell the object routines which type of mouse action to perform.
*)
type
TMouseOption = (moRight, moLeft, moMove, moNothing);
(*
TStaffType
~~~~~~~~~~
Used when setting up magic scripts to determine which staff to use.
*)
type
TStaffType = (LeastCasts, MostCasts, Cheapest);
(*
TPath
~~~~~
Stores all the different path information. Used when declaring a TScript record.
*)
type
TPath = record
Name : String;
StartLoc : Integer;
EndLoc : Integer;
MaxDist : Integer; // the maximum distance from any point in the path to blind walk to the path
SPSPath : T2DPointArray;
SPSSurfaces: TIntegerArray; // has to be the length of TPath.SPSPath
SPSAreas : array of TStringArray; // 1st is length of TPath.SPSSurfaces, 2nd are the areas for each surface
Obstacles : array[0..2] of TIntegerArray;
end;
(*
TScriptSetup
~~~~~~~~~~~~
Used to make it easier for users to setup and for scripters to follow the code
around the include.
*)
type
TScriptSetup = record
Name : Integer;
Loads : Integer; // Total loads to do for a specific script
Time : Integer; // Total time for a specific script
MaxLevel : Integer; // The maximum skill level for that script
// Woodcutting, Mining, and Fishing
Rocks : TIntegerArray;
Trees : TIntegerArray;
FishSpots : TIntegerArray;
Priority : TIntegerArray;
Materials : TIntegerArray;
DontDrop : TIntegerArray; // The items the user doesn't want dropped/banked
Exceptions : TIntegerArray; // The inventory slots the user doesn't want dropped/banked
CoalBag : Boolean; // Property for using the Coal bag when mining
// Magic
Spells : TIntegerArray;
Staffs : TIntegerArray;
StaffType : TStaffType;
AlchSlots : TIntegerArray;
// Cooking
CookingSpot : TIntegerArray;
// Miscellaneous
Objects : TIntegerArray;
// Runecrafting
Tiara : Integer;