Code: Select all
Program New;
procedure Medit;
var ctime: TDateTime;
i:Integer;
begin
ClearJournal;
while mana<>int do
begin
ctime:=Now
i:=0
useskill('Meditation');
repeat
wait(200);
i:=i+1;
until (InJournalBetweenTimes('You lose|You are', ctime, Now)<>-1) or (i=300);
wait(4000);
end;
end;
procedure castskill(Spell, Sms : string; d: Integer);
begin
if d = 1 then
begin
repeat
cast(Spell);
WaitTargetObject($53BFE764);
wait(5000);
until (InJournal(Sms)<>-1);
end
else
begin
repeat
useskill(Spell);
WaitTargetObject($53BFE764);
wait(5000);
until (InJournal(Sms)<>-1);
end;
end;
begin
while hp > 1 do
begin
while mana > 10 do
begin
ClearJournal;
castskill('Magic Trap','*Trapped*',1) ;
castskill('Remove Trap','disarmed',0) ;
end;
Medit;
end;
end.