ClientTargetResponse

Returns Target info from client (target request sent by ClientRequestObjectTarget or ClientRequestTileTarget)

Pascal

function ClientTargetResponse : TTargetInfo;

where Ttargetinfo = record ID : Cardinal; Tile : Word; X, Y : Word; Z : ShortInt; end;

Python

def ClientTargetResponse() -> Dictionary

Returns a dictionary containing keys [‘Tile’, ‘X’, ‘Z’, ‘Y’, ‘ID’].

Example Pascal

procedure Fishing;
begin
    ClientPrint('Укажите точку ловли');
    ClientRequestTileTarget;
    WaitForClientTargetResponse(60000);
    if ClientTargetResponsePresent then
    begin
      tx:=ClientTargetResponse.X;
      ty:=ClientTargetResponse.Y;
      tz:=ClientTargetResponse.Z;
      if (tz=0) then tz:=GetZ(self);
      ClientPrint('Выбран тайл X:'+IntToStr(tx)+',Y:'+IntToStr(ty)+',Z:'+IntToStr(tz));
    end;
end;