phantombmx
2006-04-28 00:04:35
ExistsPrayer will determine if a prayer is activated..
PrayerOff will turn a certain prayer off..
AllPrayersOff will turn off any prayers that may be on.
PrayerOff will turn a certain prayer off..
AllPrayersOff will turn off any prayers that may be on.
function ExistsPrayer(Slot:Integer):Boolean;
var color :integer;
begin
color:=7451338
case Slot of
1 : if(GetColor(590, 211)=color)then Result:=True;
2 : if(GetColor(631, 211)=color)then Result:=True;
3 : if(GetColor(671, 211)=color)then Result:=True;
4 : if(GetColor(713, 211)=color)then Result:=True;
5 : if(GetColor(590, 248)=color)then Result:=True;
6 : if(GetColor(631, 248)=color)then Result:=True;
7 : if(GetColor(671, 248)=color)then Result:=True;
8 : if(GetColor(713, 248)=color)then Result:=True;
9 : if(GetColor(590, 282)=color)then Result:=True;
10 : if(GetColor(631, 282)=color)then Result:=True;
11 : if(GetColor(671, 282)=color)then Result:=True;
12 : if(GetColor(713, 282)=color)then Result:=True;
13 : if(GetColor(590, 321)=color)then Result:=True;
14 : if(GetColor(631, 321)=color)then Result:=True;
15 : if(GetColor(671, 321)=color)then Result:=True;
16 : if(GetColor(713, 321)=color)then Result:=True;
17 : if(GetColor(590, 358)=color)then Result:=True;
18 : if(GetColor(631, 358)=color)then Result:=True;
end;
end;
procedure PrayerOff(Slot:Integer);
begin
if(ExistsPrayer(Slot))then
repeat
ClickPrayer(Slot);
until(not(ExistsPrayer(Slot)))
end;
procedure AllPrayersOff;
var i :integer;
begin
for i:=1 to 18 do
begin
PrayerOff(i)
end;
end;