наконецто я могу сказать, что написал свой 1й скрипт для phx )))
жаль только кнопка 'Стоп' не работает
delphi Код:
//////////////////////////////////////////////////////////////////////
// Продавалка v 1.0 от Hworang ///////////////////////////////////////
// на основе скриптов от Qak /////////////////////////////////////////
// CoderX.ru /////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
// Настроена для сервера l2mw.ru /////////////////////////////////////
// создайте чара и почистите рюкзак //////////////////////////////////
// стартовые условия - 100kk и 1 голд бар и болше ничего (2/200) /////
// впишите свой ник в соотв. поле (в скрипте) ////////////////////////
// подойдите к ГМшопу и возьмите его в таргет ////////////////////////
// запускайте скрипт и радуйтесь, видя как адена льётся в рюкзак))) //
// все изменения - на свой страх и риск //////////////////////////////
// за последствия работы скрипта автор ответственности не несет :D ///
//////////////////////////////////////////////////////////////////////
var i,c,g:integer;
s:string;
Main : TForm;
Timer : TTimer;
Button : TButton;
Edit,Edit1: TEdit;
Start : Boolean = False;
Pos_i : Integer;
const nik = 'Char'; // Сюда вписать имя чара
it = 195; // скрипт покупает 195 итемов - можете править этот параметр [1..198]
x = 1680; // введите разрешение вашего монитора
y = 1050; //
procedure Init;
begin
g:=1;
buf:=HStr('0F ');
SendToServerEx(nik);
Pos_i:=1;
//формочка
Main := TForm.Create(nil);
Main.Caption := 'Продавалка v 1.0';
Main.BorderStyle := bsSizeable;
Main.Position := poDesigned;
Main.Left :=x-400;
Main.Top :=y-200;
Main.Width :=300;
Main.Height :=80;
Edit := TEdit.Create(Main);
Edit.Parent := Main;
Edit.Left := 90;
Edit.Top := 10;
Edit.Width := 114;
Edit1 := TEdit.Create(Main);
Edit1.Parent := Main;
Edit1.Left := 214;
Edit1.Top := 10;
Edit1.Width := 62;
//таймер
Timer := TTimer.Create(Main);
Timer.Interval := 400; // задержка // если поставить меньше - адена пойдет быстрее, но будет лагать
Timer.Enabled := False;
Timer.onTimer := @TimerTimer;
Button := TButton.Create(Main);
Button.Parent := Main;
Button.Caption := 'Старт';
Button.Left := 10;
Button.Top := 10;
Button.onClick := @ButtonClick;
Main.Show;
end;
procedure Free;
begin
Edit.Free;
Edit1.Free;
Timer.Free;
Button.Free;
Main.Free;
end;
//обработчик таймера
procedure TimerTimer(Sender : TTimer);
var i,a:integer;
begin
if (pck[1]=#$1B) then
begin
if (ReadD(12)=57) then
begin
Edit.Text:='Adena ( '+IntToStr(ReadD(16))+' )';
Edit1.Text:='Gold ( '+IntToStr(ReadD(52))+' )';
end
else if (ReadD(48)=57) then
begin
Edit.Text:='Adena ( '+IntToStr(ReadD(52))+' )';
Edit1.Text:='Gold ( '+IntToStr(ReadD(16))+' )';
end;
end;
inc(g);
if pck='' then exit;
if (g mod 2 = 0) then // запрос на рюкзак - через раз, иначе спамим сервер
begin
buf:=HStr('0F ');
SendToServerEx(nik);
end;
if FromServer and (ConnectName=nik) and (pck[1]=#$1B) and (ReadH(4)<10) then
begin
buf:=#$A7;
WriteD(90010);
WriteD(900000);
WriteD(it);
WriteH(0);
SendToServerEx(nik);
end;
if FromServer and (ConnectName=nik) and (pck[1]=#$1B) then
begin
c:=ReadH(4)-2;
buf:=#$1E;
WriteD(0);
WriteD(c);
if (ReadD(12)=2414) then
for i:=1 to c do
begin
WriteD(ReadD(i*36-28));
WriteD(2414);
WriteD(1);
end
else if (ReadD(48)=2414) then
for i:=1 to c do
begin
WriteD(ReadD(i*36+8));
WriteD(2414);
WriteD(1);
end
else if (ReadD(84)=2414) then
for i:=1 to c do
begin
WriteD(ReadD(i*36+44));
WriteD(2414);
WriteD(1);
end;
if (c>=1) then
SendToServerEx(nik);
end;
if ((ReadD(16)>700000000) and (ReadD(12)=57)) or ((ReadD(52)>700000000) and (ReadD(48)=57)) and (pck[1]=#$1B) then
begin
buf:=#$38;
WriteS('.deposit');
WriteD(0);
SendToServerEx(nik);
end;
end;
//запуск
procedure ButtonClick(Sender : TButton);
begin
Start := Not (Start);
Timer.Enabled := Start;
If Start
then Button.Caption:='Стоп'
else Button.Caption:='Старт';
end;
begin
end.