Code: Select all
Program Traps;
var t,i : Integer;
{$Include 'all.inc'}
procedure Make;
var b : TDateTime;
Begin
UseObject(FindType($1EB9,backpack));
WaitTargetGround($1BF2);
WaitGump('4402')
repeat
b:=Now;
wait (500);
until WaitJournalLine(b, 'select the container you wish to place a trap on|That chest is already trapped.',5000);
WaitTargetObject($4FAF85C2);
wait(3000);
end;
Begin
SetARStatus(true);
Hungry(1,ground);
while not Dead do
begin
waitconnection(3000);
for t := 0 to 100 do
begin
CheckSave;
CheckTargetError(5, 2);
grab_in_backpack($1BFB);
Make;
end;
CheckSave;
Hungry(1,ground);
end;
End.