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

    • The holidays are over and we’re back to work (well… we never really stopped 🙂 ). The server has been online without a single restart since December 26, running smoothly and without issues. That’s because we care, and we’ll keep caring. Many of us remember the old days: helping new players, building clans from zero, catching up together, and having fun without rushing. With that spirit in mind, Newbie Bonuses are now live and we strongly encourage everyone to help newcomers catch up and enjoy the journey. L2Elixir was never about short-term hype. It’s about community, stability, and bringing back what made Lineage II special.   🎁 Newbie Bonuses Characters created since December 25 & all new players receive a Newbie Box (Return Hero) (Rune EXP/SP +50% for 5 days, Random 48-hour Costume) 2nd Class Transfer cost reduced from 3kk to 1kk — join Academies! 3rd Class Transfer enabled, available only for classes already in the Hall of Fame. 🛡️ Anti-Bot Implemented BOT-CHECKER v2, more checks, and general improvements. Added extra checks during PvP. New Auto-Check system for suspicious behavior (penalties apply if third-party software is detected). Fixed Bot Report Button not refreshing. ⚙️ General After critical errors or force disconnects, characters will remain No Carrier for a few minutes. Added Cursed Bone to Helvetia (QoL). Enabled on-screen Clan War kill notifications. Fixed buff store issues when entering characters. Fixed party drop owner calculation (please report any issues). 🧙 NPCs Harit Lizardman, Grunt, and Archer now level up SC up to stage 5. 🎉 Events Fixed trigger skills not working during Events. Fixed Health / Shield packs not disappearing in some cases. Fixed summon remaining time not refreshing after Events. Added a second Team vs Team map to reduce routine. Added another Save the King map. Christmas Event cleanup completed. Players in Observe Mode can no longer register for Events. 📜 Quests Fate’s Whisper Fixed and corrected messages. Enchanted B-grade weapons can now be exchanged as per retail. Added missing Social Victory animation on quest completion. 🗺️ Geodata Fixed falling issues in Castle zones.   Website: https://l2elixir.org/ Discord: https://discord.gg/5ydPHvhbxs
    • NEW SEASON START 23.01.2026 Get ready for the ultimate High Five adventure on L2Exoplanet.net!   • The last two previous Seasons are now merged into the Core Server. • The Core Server remains our main long-term world. • All future Seasonal Servers will be merged into Core after they end. • No characters or items will be lost – everything stays safe!     GRAND OPENING:  23.01.2026 at 20:00 GMT+1 BETA TEST:    16.01.2026    Client: High Five Rates: x10   Website: https://l2exoplanet.net Facebook: https://www.facebook.com/L2-Exoplanet-106811564103836 Discord: https://discord.gg/4fzhW7ZSPc         Game Rates    Experience: x10  Skill Points: x10  Adena: x5  Drop: x8  Spoil: x8  Quest: x5  Raid Boss Drop: x5  Fame: x2  Epaulette: x8  Manor: x8      Safe Enchant: +3  Maximum Enchant: +16  Normal Scroll Chance: 60%  Blessed Scroll Chance: 63%  Attribute Stone Chance: 50%  Attribute Crystal Chance: 30%      Game Settings    Multibox - 3 game clients per HWID  Autoloot  Autolearn Skills Auto Farm  NPC Buffer   Buff Slots (24+4/12)  Buff Duration (2h)  Olympiad Period 7days (new heroes appear every monday)  Seven Signs Period  Class Transfer for Adena  Max Sub-Class 3  Sub-Class Max Level 85  Essence Interface  Champions System  Vote Reward System  Dayli Reward System  PC Points Reward (500PC = 1 Donate Coin)      Epic Bosses Respawn Times     Queen Ant:  24 Hours +/- 4 Hours   Beleth: 3 Days +/- 8 Hours   Baium: 3 Days +/- 8 Hours   Antharas: 4 Days +/- 8 Hours   Valakas:  5 Days +/- 8 Hours     Instance Info     Normal Freya = 6 Players   Hard Freya = 12 Players   Frintezza = 6 Players   Zaken 83 Day = 6 Players   Zaken 60 Day = 6 Players   Zaken Nightly = 9 Players   Tiat = 6 Players   Beleth = 12 Players
    • when did i say something about mobius files besides what i've said on this post? or you're "calling me out" for saying this when someone says mobius is a better interlude alternative than acis? lol  
  • 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..

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock