Jump to content

Recommended Posts

Posted

//  авто-gracia_final +1.

//  хроники  Грация ФИНАЛ

//  Соцдействие ДА открыть управление скриптом

//  в пати чат пишем уровень заточки

//  можно менять в процесе работы скрипта

//  заточить один предмет чтоб запомнить чем и что точить

//  дальше скрипт сам точит до указаного уровня заточки

//  все предметы ОДИНАКОВЫЕ  с  ПЕРВЫМ  заточеным

//  предметы точатся добавляя по +1 на предмет

//  т.е если у вас предметы с  одинаковым уровнем заточки например 0

//  будет точится первый предмет до +1, потом второй до +1 и т.д

//  если предмет при заточки блесс скрол слетел на 0 или на уровень как у вас на сервере

//  то будет точиться он пока несравняется с остальными

//  и т.д

//  пока недостигнете заданого уровня заточки

//  если предметов более 1 то один остается

//  АВТОР ==>>>> TAMBIK

program Enchant_gracia;

  const

//===========================================

 

  myname='TAMBIK'; //<<== пишем свой НИК

 

  max=80;//<<== колличество ячеек в рюкзаке

 

   

//===========================================

    HTML='<html><body><center>'+

'<img src="L2UI_CH3.herotower_deco width=256 height=32>'+

'<img src="L2UI.SquareWhite" width=260 height=1>'+

'<font color="04fbfb">Cкрипт автозаточка для gracia_final</font><br>'+

'<img src="L2UI.SquareWhite" width=260 height=1>'+

'<img src="L2UI.Squarewidth" width=260 height=1>'+

'<font color="04fbfb">системные сообщения</font><br>'+

'<button value="в к л" action="bypass -3"      width=80 height=15  back="sek.cbui94"  fore="sek.cbui92">'+

'<img src="L2UI.SquareWhite" width=60 height=1>'+

'<img src="L2UI.Squarewidth" width=60 height=4>'+

'<font color="04fbfb">            </font><br>'+

'<button value=" в ы к л " action="bypass -4" width=80 height=15  back="sek.cbui94"  fore="sek.cbui92">'+

'<img src="L2UI.SquareWhite" width=60 height=1>'+

'<img src="L2UI.Squarewidth" width=60 height=4>'+

'<font color="04fbfb">            </font><br>'+

'<img src="L2UI.SquareWhite" width=260 height=1>'+

'<img src="L2UI.Squarewidth" width=260 height=4>'+

'<font color="04fbfb">АВТОЗАТОЧКА</font><br>'+

'<font color="04fbfb">            </font><br>'+

'<button value="П У С К" action="bypass  -pusk"    width=100 height=15 back="sek.cbui94"  fore="sek.cbui92">'+

'<img src="L2UI.SquareWhite" width=60 height=1>'+

'<img src="L2UI.Squarewidth" width=60 height=4>'+

'<font color="04fbfb">          </font><br>'+

'<button value="С Т О П" action="bypass  -stop"    width=100 height=20 back="sek.cbui94"  fore="sek.cbui92">'+

'<img src="L2UI.SquareWhite" width=60 height=1>'+

'<img src="L2UI.Squarewidth" width=60 height=4>'+

'<font color="04fbfb">          </font><br>'+

'<img src="L2UI.SquareWhite" width=260 height=1>'+

'<img src="L2UI.Squarewidth" width=260 height=4>'+

'<img src="L2UI.SquareWhite" width=60 height=1>'+

'<img src="L2UI.Squarewidth" width=60 height=4>'+

'<font color="LEVEL">Автор TAMBIK</font><br>'+

'</center></body></html>';

//==========================================

  var

    BaseItems:array[1..max,1..11] of integer;

    Baselvl:array[0..max] of integer;

    Timer01: TTimer;

    Timer02: TTimer;

    Timer03: TTimer;

 

    mytext:string;

    Bypass:string;

    autostart,start,autoMsg:Boolean;

    flag : Boolean;

    t,l,d,x,y,ii,i:integer;

 

    ListSize,ItemEnch:word;

    textID,itemID:integer;

    enchantObjectID:integer;

    enchantID,skrolObjectID:integer;

    ItemOID,objectOID:integer; 

    sumskrol,sumitemID,sumitem:integer;

    maxlvl,minlvl,enchlvl,selectlvl:integer;

    skrolID,skrolObj:integer;

    minEnchitem:integer;

    object,index : integer;

//==========================================

//  ShowHTML(HTML);

Procedure ShowHTML( _html : string );

begin

  buf:=#$19;

  WriteD(5);

  WriteS(_HTML);

  SendToClientEx(myname);

  end;

//========================

procedure ActionUse;

begin

    Bypass:=ReadS(2);

    case Bypass of

  '-3':begin  autoMsg:=true; end;

  '-4':begin  autoMsg:=false; end;

  '-pusk':begin

  if (autostart=false) then SendMsg2( 'предмет незаточен или пакеты неприняты !' );

  if (maxlvl=0) then SendMsg2( '  Неуказан Уровень Заточки  !' );

    SendMsg2( '_______________________________' );

  if autostart and  (maxlvl>0)  then begin

        buf:=hstr('14');

        SendToServerEx(myname);

      SendMsg2( '        ! ! !  П О Е Х А Л И    ! ! !' );

      SendMsg2( '_______________________________' );

      start:=true;

      Timer01.enabled:=true;// вкл таймер выбора свитка

      end;

    end;

  '-stop':begin

    deleteBase;

    start:=false;

    enchantID:=0;

    ItemEnch:=0;

      minlvl:=0;

    sumitem:=0;

    Timer01.enabled:=false;

    Timer02.enabled:=false;

    Timer03.enabled:=false;

    SendMsg2( '        ! ! !  С Т О П  ! ! ! ' );

    stopselectskrol;

    index :=0;

for ii:=1 to max do

  Baselvl[ii]:=-1;

  end;

end;

end;

//===========================================

procedure SendMsg2(msg:string);

begin

  buf:=#$4A;

  WriteD(0);

  WriteD(3);

  WriteS('');

  WriteS(msg);

  SendToClientEx(myname);

end;

//===========================================

procedure Resultmaxlvl;

var

  i:integer;

begin

    i:=2;

    mytext:=ReadS(i);

    textID:=ReadD(i);

if (textID=3)  then begin

    maxlvl:=StrToInt(mytext);

SendMsg2( '  установлен Уровень Заточки: '+IntToStr(maxlvl)+'' );

end;

end;

//..............................................................................

procedure ItemList;

var

  i, j, k: integer;

  count,x:integer;

begin

  count:=0;

  x:=0;

  y:=0;

  j:=4; //пропускаем дo ListSize

  ListSize:=ReadH(j);

  count:=round((Length(pck)-5) / ListSize);// длина блока

  for i:=1 to ListSize do

  if (i<=ListSize) then begin

      BaseItems[i,1]:=ReadH(j);  //ItemType1- 1:одето броня. 0:бижа. 4:в рюкзаке

      BaseItems[i,2]:=ReadD(j);  //ObjectID

      BaseItems[i,3]:=ReadD(j);  //ItemID

      BaseItems[i,4]:=ReadD(j);  //LocationSlot

      BaseItems[i,5]:=ReadD(j);  //  Amount:

      BaseItems[i,6]:=ReadD(j);  //  Amount:

      BaseItems[i,7]:=ReadH(j);//ItemType2

      BaseItems[i,8]:=ReadH(j);// CustomType1

      BaseItems[i,9]:=ReadH(j);//isEquipped:

      BaseItems[i,10]:=ReadD(j);//BodyPart

      BaseItems[i,11]:=ReadH(j);//EnchantLevel

            inc(x); // счетчик

            //y := пропускаем до следущего блока

    y:=count*x-(j-6);// . 6= длина ListSize + 4 байта пропуска в начале пакета

            inc(j,y);

  end else for k:=1 to 11 do BaseItems[i,k]:=0; // забиваем нулями

        addenchantitemID;

 

if (skrolID>0)  then begin

    sumskrol:=Getitem(skrolID,3,5);//считаем SKROL

if autoMsg  then SendMsg2 ('  SKROL ... c  ID : '+IntToStr(skrolID)+' =  '+IntToStr(sumskrol)+' ШТ ');

if start and (0<sumskrol) then  Timer01.enabled:=true;// вкл таймер выбора свитка

if (sumskrol=0)  then  begin

  SendMsg2 ('........ НЕДОСТАТОЧНО  SKROL........  ');

  SendMsg2 ('___ О С Т А Н О В Л Е Н О ___ ');

  start:=false;

end;

end;

end;

//=============================

procedure EnchantResult;

  begin

  deleteBase;

  index :=0;

for ii:=1 to max do

  Baselvl[ii]:=-1;

  end;

//=============================

procedure deleteBase;

var

  i,j,k:integer; 

begin

    for i:=1 to max do

      BaseItems[i,1]:=0;

      BaseItems[i,2]:=0; //ObjectID 

      BaseItems[i,3]:=0;  //ItemID

      BaseItems[i,4]:=0; 

      BaseItems[i,5]:=0;

      BaseItems[i,6]:=0;

      BaseItems[i,7]:=0;

      BaseItems[i,8]:=0;

      BaseItems[i,9]:=0;

      BaseItems[i,10]:=0;

      BaseItems[i,11]:=0;

      inc(j,y); 

end;       

//===========================

function Getitem(Obj,up,down:integer): integer;

var

  i: integer;

begin

Result:= 0; //В начале у нас 0

  for i:=1 to max do

    if (BaseItems[i,up]=Obj) then begin

      Result:=BaseItems[i,down];

  end;

end;

//===========================

function Getsumitem(Obj,up,down:integer): integer;

var

  i: integer;

begin

Result:= 0; //В начале у нас 0

  for i:=1 to max do

    if (BaseItems[i,up]=Obj)  then begin

      Result:=Result+BaseItems[i,down];

  end;

end;

//=============================

 

// добавляем в базу  ЛВЛ заточки

procedure  addenchantitemID;

begin

        for i:=1 to max do

if (BaseItems[i,3] = ItemOID)  then  begin

        enchlvl:=BaseItems[i,11];

    flag:=false;

          for ii:=1 to max do

  if (Baselvl[ii] = enchlvl) then  begin // текущий  уже есть в массиве,

      flag := true;

        BREAK; { прекращаем цикл }

          end;

if (flag = false) then begin

        for ii:=1 to max do

  if (Baselvl[ii]=-1) then begin // добавим  в массив,

        Baselvl[ii]:=enchlvl; 

          index :=ii;

      BREAK; { прекращаем цикл }

  end;

end;

end;

end;

//==========================

procedure ChooseInventory;

var

OID, lvl:integer;

begin

  if (ItemOID>0) and start then  begin

          sumitemID:=0;

      sumitemID:=Getsumitem(ItemOID,3,5); // считаем предметы для заточки

              minlvl:=Baselvl[1];

      for ii:=2  to  index  do 

  if  Baselvl[ii] < minlvl  then 

        minlvl:=Baselvl[ii];// мин заточка

        objectOID:=0;

if (sumitemID > sumitem) then objectOID:=GetObjectID(ItemOID);//находим по ItemID  предмет с ObjectID

if (objectOID = 0)  then begin

              start:=false;

      SendMsg2('Больше предметов c ID : '+IntToStr(ItemOID)+' для заточки НЕТ ! ! ! ! ');

          lvl:=0;

        for i:=1 to max do

  if (BaseItems[i,3] = ItemOID) then  begin

        OID:=BaseItems[i,2];

        lvl:=BaseItems[i,11];

SendMsg2('Предмет  c ID : '+IntToStr(ItemOID)+'  с ObjectID : '+IntToStr(OID)+'  заточен до : '+IntToStr(lvl)+' ');

  end;

end;

end;

end;

//=========================

//находим enchantID предмета по  ItemID для заточки

function GetObjectID(ItemOID:integer) : integer;

var

  ID,i:integer;

begin

enchantID:= 0;

  ItemEnch:=0; 

  Result:= 0;

if autoMsg  then  SendMsg2( '*******************************************' );

if (ItemOID>0) then begin

if autoMsg  then  SendMsg2 ('    ищем ObjectID предмета с ID  :  ' +IntToStr(ItemOID)+' ');

if autoMsg  then  SendMsg2('------------------------------' );

 

    for i:=1 to max do

if (BaseItems[i,3] = ItemOID) and (BaseItems[i,11] = minlvl) and (BaseItems[i,11] < maxlvl) then begin

    enchantID:=BaseItems[i,2];

      Result:=BaseItems[i,2];

    ItemEnch:=BaseItems[i,11];

if autoMsg  then  SendMsg2('  ..... найден предмет для заточки  ..... ');

if autoMsg  then  SendMsg2(' ID  : '+IntToStr(ItemOID)+' и ObjectID : '+IntToStr(enchantID)+'  заточен до : '+IntToStr(ItemEnch)+'');

if autoMsg  then  SendMsg2('------------------------------' );

    if (enchantID>0) then  Timer02.enabled:=true;

      Break;  // прерываем дальнейший перебор массива.

end;

end;

end;

//==========================

procedure stopselectskrol;

begin

  buf:=hstr('D04E00');

SendToServerEx(myname);

end;

//===================================

procedure OnTimer01(Sender: TObject);

begin

  buf:=#$19;

  WriteD(skrolObjectID);

  WriteD(0);

  SendToServerEx(myname);

Timer01.enabled:=false;

  end;

//--------------------------

procedure OnTimer02(Sender: TObject);

begin

  buf:=hstr('D04C00');

  WriteD(enchantID);

  SendToServerEx(myname);

  Timer02.enabled:=false;

  Timer03.enabled:=true;

  end;

procedure OnTimer03(Sender: TObject);

begin

  buf:=#$5F;

  WriteD(enchantID);

  WriteD(0);

  SendToServerEx(myname);

  Timer03.enabled:=false;

if autoMsg  then SendMsg2('      .....    Точим Предмет    ..... ');

if autoMsg  then SendMsg2( ' ID :  '+IntToStr(ItemOID)+' и ObjectID : '+IntToStr(enchantID)+'  -  до  :  '+IntToStr(maxlvl)+'' );

if autoMsg  then SendMsg2( '_______________________________' );

end;

//-----------------------------------------

procedure Init;

begin

  minlvl:=0;    maxlvl:=0;  enchlvl:=0; ItemEnch:=0;

  sumskrol:=0;  sumitem:=0; sumitemID:=0;

  objectOID:=0; object:=0;  enchantObjectID:=0;

  enchantID:=0; skrolObjectID:=0;

  skrolID:=0;  itemID:=0; ItemOID:=0;

  t:=0;l:=0;d:=0;index :=0;

 

  flag:=false;

  autostart:=false;

  start:=false;

  autoMsg:=true;

 

  Timer01:=TTimer.Create(nil);

  Timer01.OnTimer:=@OnTimer01;

  Timer01.enabled:=false;

  Timer01.interval:=400; //<<== время  выбора свитка

 

  Timer02:=TTimer.Create(nil);

  Timer02.OnTimer:=@OnTimer02;

  Timer02.enabled:=false;

  Timer02.interval:=400; //<<== время  выбора предмета

 

  Timer03:=TTimer.Create(nil);

  Timer03.OnTimer:=@OnTimer03;

  Timer03.enabled:=false;

  Timer03.interval:=4500; //<<== время между заточкой 

 

SendMsg2( '  в пати чат пишем уровень заточки' );

SendMsg2( '    заточить предмет  !  !' );

SendMsg2( '  Соцдействие  ДА - откр окно управления ' );

SendMsg2( '------------------------------------- ' );

  buf:=hstr('14');

  SendToServerEx(myname);

  for ii:=1 to max do

      Baselvl[ii]:=-1;

end;

procedure Free;

begin

  Timer01.free;

  Timer02.free;

  Timer03.free;

end;

//=========================

begin

//не обрабатываем пустые пакеты

  if pck='' then exit;

if FromServer and (pck[1]=#$87) then  EnchantResult;

if FromServer and (pck[1]=#$11) then ItemList;

if FromServer and (pck[1]=#$7C) then ChooseInventory;

if FromClient and (pck[1]=#$49) then begin Resultmaxlvl;pck:='';exit;end;    //

if FromClient and (pck[1]=#$56) and (ReadD(2)=24) then begin

          ShowHTML(HTML); pck:='';exit; end;

if FromClient and (pck[1]=#$23)  then begin ActionUse; pck:='';exit;end;    //

begin

if (start=false) and FromClient then 

    case pck[1] of

#$19:begin

        stopselectskrol;

        buf:=hstr('14');

        SendToServerEx(myname);

      t:=1;

    skrolObjectID:=ReadD(2);

    skrolID:= Getitem(skrolObjectID,2,3);//находим по ObjectID скрол с ItemID

    SendMsg2(' .................' );

    SendMsg2('  активирован SKROL  ID : '+IntToStr(skrolID)+' ' );

    SendMsg2(' .................' );

          end;

#$D0:if  ReadH(2)=76 then  begin

      l:=1;

      SendMsg2('    окно выбора предмета ' );

      SendMsg2(' .................' );

    end;

#$5F:begin

      d:=1;

    enchantObjectID:=ReadD(2);

    if  (t=1) and (l=1) and (d=1) then begin

        autostart:=true;

      ItemOID:= Getitem(enchantObjectID,2,3);//находим по ObjectID предмет с ItemID

    SendMsg2 ('  ID предмета :  '+IntToStr(ItemOID)+'  для заточки');

  sumitemID:=0;

  sumitem:=0;

  sumitemID:=Getsumitem(ItemOID,3,5); // считаем предметы для заточки

  SendMsg2 (' Предметов для заточки с  ID :  '+IntToStr(ItemOID)+'  =  '+IntToStr(sumitemID)+' ШТ ');

      if (sumitemID > 1) then sumitem:=1;

      stopselectskrol;

      end;

    end;

  end;

end;

end.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • ***DO NOT BUY WHAT IS POSTED HERE FOR FREE*** https://www.mediafire.com/file/mhjiaoipe6hohjm/Extender_Rev_222_by_Guytis.rar/file   It has everything Devs is offering for $450 USD with a license. Here it is, free and with source code.  Greetings to all.   The unique features you have, which will be two or three, I'll replicate for free in the next revision. I'm just waiting for someone to provide information about those features you mentioned, and I'll create a public SVN …   Best of luck reselling obsolete systems. # ⚠️ IMPORTANT WARNING FOR EVERYONE ⚠️ **Your story ends here.** You couldn't give us a single example of what's wrong with the extender. You're just making things up to try and sell your extender, which **Guytis** actually made... --- ## Sources / credibility Are you selling a **compiled DLL with a license**? What is more credible? ✅ **Open source code** ❌ A closed DLL that could include **backdoors** and pure **copy-paste** --- ## IMPORTANT **IF THESE PEOPLE TRY TO MAKE YOU BELIEVE THESE FILES ARE USELESS:** It's simply because they want to **sell these same files under their own name** — in this case, **L2Devs**. --- Today we have more resources to avoid these lies. Anyone with doubts can upload the full source code to **ChatGPT** and ask it to search for the “critical errors” they claim exist. **Regards.**  
    • Dear your extender has no relation to or the unique functions we offer; however, it is a good contribution to the community. Regards.
    • ***DO NOT BUY WHAT IS POSTED HERE FOR FREE*** https://www.mediafire.com/file/mhjiaoipe6hohjm/Extender_Rev_222_by_Guytis.rar/file   It has everything Devs is offering for $450 USD with a license. Here it is, free and with source code.  Greetings to all.
    • I am writing this to warn people so they don’t waste their money and time. Some people think this extender will give them a good server, but the reality is very different. Sooner or later, people discover the truth and feel disappointed when they realize it is just something shared or another bad update of old things from ZOUMHS and Guytis. What is even worse is that the same person keeps coming back after being banned 3 or 4 times. That should already be a big warning sign for anyone who wants to use this. I am not trying to start drama. I just want people to know what they are getting before they use it or pay for updates. Please think carefully and do your research before trusting things like this. cya
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..