Цитата:
Сообщение от PsyR
Ребят, надеюсь тут появились хорошие люди со вреени моего последнего визита. Есть 2 прозьбы. Вылоджите пожалуйста скрипт на рыбалку желательно что бы сам в ВХ клал адаптированый под шоки и так же скрипт на ТТ рец, тоже с диалогами адаптированными под шок. В своё время я тоже как то выложил абсолютно бескорыстно скрипт на ТТ рец. Щас времени нет заниматься этим :\
Благодарю за внимание.
|
улыбатор.. рука не поднимается щас удалять.. пускай другие почитают-)
потом вместе с етим постом в корзину-))
Добавлено через 26 минут
Цитата:
Сообщение от charly911
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:
delphi Код:
---------------------------------------------------------------------
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;
------------------------------------------------------------------
Can someone tell me what does it do???? what is "ord" for??? Why is MobID,MobX, etc string and not integer??? o.O
Thnx, Charly.
|
i`m author of this script.. i tell all that it is thery simple, but it work corectly.. it is calculate the mob , the distance to mob with the minimum distance.. that is apply when we are select the target to attack. we are know ID of MOB from here.. MobID,MobX in string becorse we must apply it in future code.. and all variables we must convert to string to send server in a packet.. so i do it.. we are read from incoming packet in string format and send in string format.. so all calculations we do with this format, it isnot so hard, you see..
but, of course, the programmer can apply the REAd and WRITE procedure to work this integer format.. but the ERROR is take place when we work with the coordination system.. becourse the sign "-" is present.. to make different calculations with sign "-" we must remember values in "EXTENDED" format.. so it can`t apply in "WRITE" procedure (only integer) so i do the string and work with it..
Цитата:
Сообщение от QaK
Ой блиин, ппц парниша попал =)
НЛО спасибо =)
|
you is ZLODEY!!
Цитата:
Сообщение от charly911
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;
------//-----
NpcID[i]:=ReadD(2);
NpcX[i]:=ReadD(14);
NpcY[i]:=ReadD(18);
NpcZ[i]:=ReadD(22);
----------------------------------------------------
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."
why don't you use StrToInt?????
Thanks, Charly.
|
YOU try to remember values with sign "-" in integer.. so you have error.. coordinates are often take negative values.. so try EXTENDED format.. but you wiln`t can apply it in WRITE procedure.. so after calculations with extended format you must convert it to "string" by self.. you must read values in STRING when sign "-" is take place.. when you must convert to EXTENDED for calculation.. and then convert to STRING to apply in POST PROCEDURES..