Данный пост важен для более-менее опытных скриптописателей.
В данных скриптах на пример бафера кота за адены показана работа Пати, Продажи и процесс ожидания действий другого персоонажа.
Hello ppl, im new in the forum. Sry i dont know Russian... im from Argentina (South America).
First of all i would like to tell u that i love this forum and l2phx best botting tool ever
I know little programming, but i could write some scripts that worked excelent.
I have a problem with one script posted in this thread, i cant understand this:
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;
Hi, thanks QaK for your answer, but when i asked for and explanation i wanted to know in detail what does it do, because once i tried to do something different but it didn't worked... Here is some piece of code:
--------------------------------------------------------
NpcID: array[1..100] of integer; // <-- integer, NOT STRING!!!
NpcX: array[1..100] of integer;
NpcY: array[1..100] of integer;
NpcZ: array[1..100] of integer;
If i tried to do this using string array i got an "incompatibility error".... Only this way worked.
Also i wanted to calculate distance using Pythagoras (sqrt((x*x)+(y*y)), but sometimes i got erros (negative values, theoricaly impossible), thas why i wanted to understand it better.
----
"function ord is for conversion between string-type and integer-type variables. Read the syntax of Pascal and Delphi."
charly911, if you use Script by Voron ("Бот кач локомотив") there is o lot of errrs in this script,because olny Voron (as I known) use and test this script, so if something did'nt work correct - try to fix by yourself.
Цитата:
Сообщение от charly911
Also i wanted to calculate distance using Pythagoras (sqrt((x*x)+(y*y)), but sometimes i got erros (negative values, theoricaly impossible), thas why i wanted to understand it better.
Put there a code of the function to calculate distance, and example, where and how do you use it?