-
Notifications
You must be signed in to change notification settings - Fork 9
/
Prayer.simba
80 lines (72 loc) · 1.37 KB
/
Prayer.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
{$include_once Internal/Reflection.simba}
{$include_once Constants.simba}
{$include_once Mouse.simba}
{$include_once Menu.simba}
{$include_once GameTab.simba}
type
//Prayer
TStandardPrayer = (
THICK_SKIN = 5,
BURST_OF_STRENGTH,
CLARITY_OF_THOUGHT,
ROCK_SKIN,
SUPERHUMAN_STRENGTH,
IMPROVED_REFLEXES,
RAPID_RESTORE,
RAPID_HEAL,
PROTECT_ITEM,
STEEL_SKIN,
ULTIMATE_STRENGTH,
INCREDIBLE_REFLEXES,
PROTECT_FROM_MAGIC,
PROTECT_FORM_MISSILES,
PROTECT_FROM_MELEE,
RETRIBUTION,
REDEMPTION,
SMITE,
SHARP_EYE,
MYSTIC_WILL,
HAWK_EYE,
MYSTIC_LORE,
EAGLE_EYE,
MYSTIC_MIGHT,
CHIVALRY,
PIETY,
RIGOUR,
AUGURY,
PRESERVE
);
{*
R_ActivatePrayer
~~~~~~~~~~~~~~~~~~~~~~
Returns true if the Prayer was selected.
Example:
if R_ActivatePrayer(REDEMPTION) then
...
*}
Function R_ActivatePrayer(Prayer: TStandardPrayer): Boolean;
var
Widget: RSWidget;
begin
Widget := RSWidget.Get(R_PRAYER_CONTAINER.Group, Ord(Prayer));
if Widget.ref = nil then
Exit;
if not Widget.IsHidden then
begin
Mouse.Click(Widget.Bounds, MOUSE_LEFT);
Exit(True);
end;
Widget.Free;
end;
{*
R_IsPrayerSelected
~~~~~~~~~~~~~~~~~~~~~~
Returns true if a prayer is selected.
Example:
if R_IsPrayerSelected then
...
*}
{Function R_IsPrayerSelected(): Boolean;
begin
//Need the hook..
end;}