Показать сообщение отдельно
Старый 23.07.2008, 08:58   #453
Рыцарь
 
Аватар для QaK
 
Регистрация: 28.09.2007
Сообщений: 1,558
Сказал Спасибо: 71
Имеет 351 спасибок в 244 сообщенях
QaK пока неопределено
По умолчанию

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.
QaK вне форума   Ответить с цитированием