Program New Const Host 0001056B var TPathArray Integer Integer MeditTi

 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
Program New;
Const Host = $0001056B;
var p : TPathArray;
c : Integer;
i : Integer;
MeditTime : Cardinal;
Friend: array of Cardinal;
res : Boolean;
procedure Medit;
begin
if WarMode = true then SetWarMode(false);
if Mana < MaxMana then
begin
if ((Timer > (MeditTime + (11 * 1000))) or (MeditTime = 0)) then
begin
UseSkill('Meditation');
MeditTime :=Timer;
end;
end;
end;
procedure PrecastGH;
begin
if not TargetPresent then
begin
if (Count($0F85) > 0) and (Count($0F84) > 0) and (Count($0F86) > 0) and (Count($0F8D) > 0) and (Mana > 10) then
begin
Cast('Greater heal');
WaitForTarget(2000);
end;
end;
end;
procedure Cure;
begin
if TargetPresent then CancelTarget;
if (Count($0F84) > 0) and (Count($0F85) > 0) and (Mana > 5) then
begin
Cast('Cure');
WaitForTarget(2000);
res := CheckLoS(getX(self), getY(self), getZ(self) + 15, getX(Friend[i]), getY(Friend[i]), getZ(Friend[i]) + 15, WorldNum);
if TargetPresent and (getDistance(Friend[i]) < 11) and (Mana > 5) and res then TargetToObject(Friend[i]);
end;
end;
procedure Checktarget;
begin
Friend := [$000DC8C1, $000DCFE0, $000F7F27];
for i := 0 to Length(Friend) -1 do
begin
res := CheckLoS(getX(self), getY(self), getZ(self) + 15, getX(Friend[i]), getY(Friend[i]), getZ(Friend[i]) + 15, WorldNum);
if IsPoisoned(Friend[i]) and res then cure;
if (GetHP(Friend[i]) < (GetMaxHP(Friend[i]) - 3)) and (GetHP(Friend[i]) > 0) and TargetPresent and (getDistance(Friend[i]) < 11) and (Mana > 10) and res then TargetToObject(Friend[i]);
end;
end;
begin
losOptions := losTypeRunUO;
while not dead do
begin
wait(50);
if getDistance(Host) > 4 then
begin
c := GetPathArrayFrom(PredictedX, PredictedY, PredictedZ, GetX(Host), GetY(Host), 1, True, p);
if c > 0 then StepQ(CalcDir(PredictedX, PredictedY, p[0].X, p[0].Y), True);
end;
PrecastGH;
Checktarget;
Medit;
end;
end.
begin
//Body of Script
end.