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

    • Acabei de liberar no TopL2.com o nosso MOD Oficial de VoteSystem, criado para servidores Lineage 2 que querem parar de sofrer com voto “fake” e reward entregue sem controle.   O que ele faz? O mod integra seu GameServer com o site TopL2, valida o voto do jogador e só então libera a recompensa — tudo com mais segurança, rastreio e controle.   Principais vantagens Voto verificado: o servidor confirma o voto registrado no site Reward mais seguro: evita abuso/duplicação e reduz exploit Cooldown configurável por jogador Logs e rastreio para auditoria e suporte   Instalação rápida, com arquivos organizados e prontos para copiar/aplicar   Disponível para download no https://TopL2.com   Se você é admin e quer profissionalizar seu sistema de votos e entregar reward com segurança, esse mod é pra você.  
    • Geia sas paidia eimai new edw mesa kai tha ithela na kanw mia erwtisi an kapoios mporei na me voithisei! Exw highfive (L2JMobius) kai thelw na valw custom weapons alla den exw sql file mporw na ta perasw xwris sql file kai na exw mono ta xml arxeia gia na ta valw stats/items?
    • ## [1.4.0] - 2026-01-28   ### ✨ New Features - **Vote System**: Lineage 2 servers can now use our vote–reward system. Players vote on the website and claim rewards in-game (1 vote = 1 claim) - **Vote Page**: On each server’s page (`/servers/<server>`), a **“Vote for Server”** button opens a dedicated vote page with cooldown info and optional Turnstile verification - **By Votes View**: The **“By Votes”** tab on the main page shows **actual vote counts** per server - **API Documentation**: New **API Docs** page at `/docs` (and footer link) with HMAC auth, endpoints, and examples for game server integration - **Vote API (My Servers)**: Server owners can open **“Vote API”** in My Servers to manage credentials, cooldown, allowed IPs, and open the docs   ### 🔄 Improvements - **Server Pages**: Single-server data is cached and loads faster; server pages can be opened by ID or by name (e.g. `/servers/my-server-name`) - **API Root**: Visiting the API root redirects to the docs URL configured in admin (default: site docs page) - **Admin Panel**: New **“Vote System”** tab for global settings (Turnstile, API security, default cooldown, docs URL)   ### 🔐 Security & Reliability - Turnstile (CAPTCHA) support for vote submissions to reduce abuse - HMAC-protected game server API for secure vote check/claim and stats
  • 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..