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

GetUrlScript.txt 1.2 KiB

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