25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

GetUrlScript.txt 1.0 KiB

4 년 전
4 년 전
123456789101112131415161718192021222324252627282930313233343536373839
  1. var res:string;
  2. i:byte;
  3. osX,osY,prX,prY:integer;
  4. begin
  5. res:='';
  6. osX:=round(intpower(2,GetZ-1)) div 2;
  7. osY:=round(intpower(2,GetZ-1)) div 2;
  8. prX:=osX; prY:=osY;
  9. for i:=2 to GetZ do
  10. begin
  11. prX:=prX div 2;
  12. prY:=prY div 2;
  13. if GetX<osX
  14. then begin
  15. osX:=osX-prX;
  16. if GetY<osY then begin
  17. osY:=osY-prY;
  18. res:=res+'0';
  19. end
  20. else begin
  21. osY:=osY+prY;
  22. res:=res+'2';
  23. end;
  24. end
  25. else begin
  26. osX:=osX+prX;
  27. if Gety<osy then begin
  28. osY:=osY-prY;
  29. res:=res+'1';
  30. end
  31. else begin
  32. osY:=osY+prY;
  33. res:=res+'3';
  34. end;
  35. end;
  36. end;
  37. ResultURL:=GetURLBase+res+'?mkt=ru-ru&it=Z,L';
  38. end.