faq/stealth/lockpicking.txt · Last modified: 2020/12/14 08:05 (external edit)
 

Lockpicking

program Lockpiking;
{$Include 'all.inc'}

const
boxt = $0E80;
keyt = $100E;
lockpick = $14FB;

procedure alock;
begin
  waitconnection(10000);
  UseObject(FindType(keyt,backpack));
  WaitForTarget(1000);
  TargetToObject(FindType(boxt,backpack));
  if (not(Connected)) then
  Exit;
  ClearJournal;
  WaitConnection(10000);
end;

procedure unlock;
begin
  waitconnection(10000);
  repeat
    UseObject(FindType(lockpick,backpack));
    WaitForTarget(1000);
    TargetToObject(boxt);
    wait(2000)
  until ( (InJournal('*Unloked!*|That') > -1) or (not(Connected)) );
  if (not(Connected)) then
  Exit;
end;

Begin
  SetARStatus(true);
  clearjournal;
  while (not Dead) do
  begin
    waitconnection(10000);
    alock;
    unlock;
  end;
End.
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki