raid, эт он про твою мапу или про чью-то другую?
Цитата:
Сообщение от charly911
for i:= 1 to 100 do
begin
if MobID[i] <> '' then
begin
tempX1:=ord(MobX[i][3])*256*256 + ord(MobX[i][2]) * 256 + ord(MobX[i][1]);
tempY1:=ord(MobY[i][3])*256*256 + ord(MobY[i][2]) * 256 + ord(MobY[i][1]);
if (MobX[i][4] = #$FF) then tempX1:=16777215-tempX1;
if (MobY[i][4] = #$FF) then tempY1:=16777215-tempY1;
tempLenght:= sqrt((MyCoordXex-tempx1)*(MyCoordXex-tempx1) + (MyCoordYex-tempy1)*(MyCoordYex-tempy1));
if (tempLenght<MinPutLenght) then
begin
MinPutLenght:=tempLenght;
MinPutID:=i;
end;
end;
end;
|
This part of the script show, how to calculate relative distance from objects to your char.
Цитата:
Сообщение от charly911
Why is MobID,MobX, etc string and not integer??? o.O
|
because the autor of this script this want =)
Цитата:
Сообщение от charly911
what is "ord" for?
|
function ord is for conversion between string-type and integer-type variables. Read the synthax of Pascal and Delphi.
P.S. Sorry for my poor English.