Jump to content

Recommended Posts

Posted

Hello guys...I'm trying to use an augument script for Interlude server...Once it worked and after that it just doesnt work any more...Can any1 help me and tell me what i do wrong or how i must start the whole thing so it can work 100% every time?Thnks

 

This is the script and i am running it with L2 PacketHack by xkor 3.1.8

const
  Name='Trainer'; // character
  ItemID=7577; // item id
  LifeID=8752; // lifestone id
  GemsID=2131; // gemstone id
  GemsAmount=25; //gemstone amount
  max=8000;  // max amount of gemstones
var
 LifeBase:array[1..max] of integer;    
 ColvoLife,ColvoGems,Life,Item,Gems,SocialID,augid:integer;
procedure Init;
var i:integer;
begin
 buf:=hstr('0F');
 SendToServerEx(Name);
end;
procedure Free;
var i:integer;
begin
 for i:=1 to max do
  LifeBase:=0;
end;
function StrToHex(packet: string):string;
var
  i:integer;
  tmp:byte;
  function ByteToHex(b: byte): Char;
  begin
    if b<10 then result:=chr(b+$30)
      else result:=chr(b+$37);
  end;
begin
  result:='';
  for i:=1 to length(packet) do begin
    tmp:=ord(packet) div 16;
    result:=result+ByteToHex(tmp);
    tmp:=ord(packet) - tmp*16;
    result:=result+ByteToHex(tmp)+' ';
  end;
end;
function inttohex(n:integer):string;
var i:integer;
    t:string;
    a:array[0..15] of char;
begin
 a[0]:='0';
 a[1]:='1';
 a[2]:='2';
 a[3]:='3';
 a[4]:='4';
 a[5]:='5';
 a[6]:='6';
 a[7]:='7';
 a[8]:='8';
 a[9]:='9';
 a[10]:='A';
 a[11]:='B';
 a[12]:='C';
 a[13]:='D';
 a[14]:='E';
 a[15]:='F';
 result:='';
 t:='';
 i:=0;
 while n<>0 do begin
  if (i mod 2=0)and(i>0) then begin
   result:=result+t+' ';
   t:='';
  end;
  t:=a[n mod 16]+t;
  n:=n div 16;
  inc(i);
 end;
 result:=result+t;
end;
procedure Say;
var i:integer;
    s:string;
begin
  s:='<tr><td>LS='+inttostr(ColvoLife)+' (*'+inttostr(GemsAmount)+'='+inttostr(ColvoLife*GemsAmount)+')</td></tr>';
  s:=s+'<tr><td>Gems='+inttostr(ColvoGems)+' (/'+inttostr(GemsAmount)+'='+inttostr(ColvoGems div GemsAmount)+')</td></tr>';
  s:=s+'<tr><td>---</td></tr>';
  if Item=0 then
   s:=s+'<tr><td>No Weapon</td></tr>'
  else if augid>0 then
   s:=s+'<tr><td>Augmented ('+inttohex(augid)+')</td></tr>'
  else
   s:=s+'<tr><td>Not augmented</td></tr>';
  buf:=hstr('0F 01 00 00 00');
  WriteS('<html><body><br><table width=100%>'+s+'</table><br><br><br><br><br><br>'+
   '"Social Yes" - Cancel Augment(if augmented) and Augment(if you have enough gems and LSs)<br>'+
   '"Social No" - Show this help<br><br>'+
   'Sometimes client dont get packet InventoryUpdate and you see "Not augment" when weapon is augmented.'+
   ' Simply press [Tab] twice or wear weapon.<br><br>'+
   '</body></html>');
//   '<br>'+strtohex(pck)+'</body></html>');
  WriteD(0);
  SendToClientEx(Name);
end;
procedure CreateItemBase;
var i,ss,j,ObjID,ItmID,ListCount,count,aug:integer;
begin
  Item:=0;
  ss:=1;
  j:=4;
  ListCount:=ReadH(j);
  if ListCount>max then ListCount:=max;
  j:=8;
  for i:=1 to ListCount do begin
     ObjID:=ReadD(j);    
     ItmID:=ReadD(j);    
     Count:=ReadD(j);
     j:=j+14;
     aug:=ReadD(j);
     case ItmID of
        LifeID: begin
            LifeBase[ss]:=ObjID;
            inc(ss);
        end;
        ItemID: begin
            Item:=ObjID;
            augid:=aug;
        end;
        GemsID: begin
            Gems:=ObjID;
            ColvoGems:=Count;
        end;
     end;
    j:=j+6;
  end;
  ColvoLife:=ss-1;
  Say;
end;
procedure UpdateItemBase;
var i,ii,j,ObjID,ItmID,ListCount,Count,UpdType,aug: integer;
begin
  ListCount:=ReadH(2);
  j:=4;
  for i:=1 to ListCount do begin
    UpdType:=ReadH(j);
    j:=j+2;
    ObjID:=ReadD(j);
    ItmID:=ReadD(j);
    Count:=ReadD(j);
    j:=j+14;
    aug:=ReadD(j);
    case UpdType of
      1:case ItmID of
          ItemID: begin
            Item:=ObjID;
            augid:=aug;
          end;
          LifeID: begin
            for ii:=1 to max do
             if LifeBase[ii]=0 then begin
              LifeBase[ii]:=ObjID;
              ColvoLife:=ColvoLife+1;
              break;
             end;
          end;
        GemsID: begin
            Gems:=ObjID;
            ColvoGems:=Count;
        end;
      end;
      2:case ItmID of
        ItemID: begin
          Item:=ObjID;
          augid:=aug;
        end;
        GemsID: begin
            Gems:=ObjID;
            ColvoGems:=Count;
        end;
      end;
      3:case ItmID of
        ItemID:
          Item:=0;
        GemsID: begin
            Gems:=ObjID;
            ColvoGems:=Count;
        end;
        LifeID: begin
          for ii:=1 to max do
            if LifeBase[ii]=ObjID then begin
             LifeBase[ii]:=0;
             ColvoLife:=ColvoLife-1;
            end;
        end;
      end;
    end;
    j:=j+6;
  end;
 Say;
end;
function GetNextLife: integer;
var i:integer;
begin
  Result:=-1;
  for i:=1 to max do begin
    if (LifeBase<>0) then begin
      Result:=LifeBase;
      exit;
    end;
  end;
end;
procedure Augment;
begin
 buf:=hstr('D0 29 00');
 WriteD(Item);
 SendToServerEx(Name);
 delay(100);
 buf:=hstr('D0 2A 00');
 WriteD(Item);
 WriteD(Life);
 SendToServerEx(Name);
 delay(100);
 buf:=hstr('D0 2B 00');
 WriteD(Item);
 WriteD(Life);
 WriteD(Gems);
 WriteD(GemsAmount);
 SendToServerEx(Name);
 delay(100);
 buf:=hstr('D0 2C 00');
 WriteD(Item);
 WriteD(Life);
 WriteD(Gems);
 WriteD(GemsAmount);
 SendToServerEx(Name);
end;
procedure DisAugment;
begin
 buf:=hstr('D0 2D 00');
 WriteD(Item);
 SendToServerEx(Name);
 buf:=hstr('D0 2E 00');
 WriteD(Item);
 SendToServerEx(Name);
end;
begin
  if pck='' then exit;
  if FromClient and (ConnectName=Name) and (pck[1]=#$1B) then begin
    SocialID:=ReadD(2);
   pck:='';
    case SocialID of
      7: begin
 buf:=hstr('A7 2A A0 00 00 80 84 1E 00 0A 00 00 00 00 00 00 00 00 00 00 00');
 SendToServerEx(Name);
 buf:=hstr('A7 29 A0 00 00 40 0D 03 00 FA 00 00 00 00 00 00 00 00 00 00');
 SendToServerEx(Name);

        exit;
       end;
      6: begin
       if augid>0 then begin
        DisAugment;
        delay(300);
       end;
       Life:=GetNextLife;
       if (Life=-1)or(ColvoGems<GemsAmount)or(ColvoLife<1) then
        exit;
       Augment;
       exit;
      end;
      5: begin
       Say;
       exit;
      end;
    end;
  end;
  if FromServer then
  case pck[1] of
    #$1B: CreateItemBase;
    #$27: UpdateItemBase;
  end;
end.
 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • L2Vitality Winter Season start December 1st! @followers, @everyone, @highlight, @όλοι 📌 Interlude Custom PvP Server Zariche Style 📌 🚨 219 Custom Additional Skills 🚨 🚨 Custom Weapons, Armor, Jewels, Wings, Tattoos and Agathions ⚔️ 9999x Exp/Sp | Player Start 99 Level ⚔️  ⬆️ Safe +15 | Max +30 | Blessed 85% ⬆️ 🏆 VIP Packages System (Lv 1-5) 🏆 ⚡ Free VIP 1+2 Start with 192 Skills and 89 Items +15 Enchanted (Click and Go) ⚡ 💥 Unique Content 💥 🔰 Easy Farm 💰 PLAY TO EARN SYSTEM WIN 50€ cash 💶 for 10k PvPs and 1k gameplay hours. 🔁 Grand Opening 1st December 2024 @ 20:00 GMT +2 🌐 Website: https://l2vitality.gr/  
    • Massive Black Friday Sale This Month!      View all offers     View our Services MASSIVE BLACK FRIDAY SALE THIS MONTH! FIND OUT MORE IN OUR WEBSITE 80% OFF NEW UPDATED PACKS FIND OUT MORE IN OUR WEBSITE HERE Complete Interlude PvP Server Complete HighFive Low/Mid/PvP Server   Complete Custom Interlude PvP Server Complete Classic Antharas 2.7 Low-Mid Rate Server   Complete Interlude Low-Mid Rate Server Complete Essence Low-Mid-PvP Rate Server Complete HighFive PvP Server for starters   Complete Interlude PvP Server Custom/No Custom for Starters   Complete Interlude PvP Server 2nd Build Project Vitality - Interlude Custom PvP Server with Custom Skills / items Project Opium - Interlude Low Rate No Custom Server   Project Duria - Interlude Custom PvP with Custom Learn Skills Project Flexara - HighFive no Custom PvP   Project Nasty - Interlude Custom PvP with Custom Items, Pride style Project Figma - HighFive no Custom Low Rate 50% OFF FOR NEW SERVER BUILDS FROM ZERO (L2BUILDER) USE PROMO #BLACKFRIDAY in NOTES L2Builder Build your Lineage2 Server from Zero with your selected options using our L2Builder! Web Design Are you looking to update your existing l2 website or get a new website? Server Marketing Promote your server with us and we guarantee that your advertisement will be shown everywhere across the l2 community!   Client Mods Get any client modification that you want for your Lineage 2 Server (any chronicle) Server Host The best web or dedicated server host out there with the best DDoS Protection Server Sources We have the best lineage 2 sources out there since 2006 built carefully without bugs!   Buy Votes Increase your server's visibility in all famous l2vote sites! Our Vote tool is a website where we help you to gain more traction to your private server by bringing more votes to your listing! We do all the heavy lifting like proxies, captcha’s, headless browsers and more so you don’t have to! Try free 20 votes today!   View all supported websites   Buy Guard Athena Guard – Layer 7 DDoS Protection Protect your server against DDos Attacks (Layer 7) IP bans and store in iptable. View more   Donate Panel Automatic Donate Panel v4 for L2JServer Automatic Paypal / Stripe Donate Panel for any L2J Server View more   L2Top Co for SALE L2TOP.CO Is a ranking website released in 2010 with 10,000+ Registered L2 Server owners accounts!   The website is for sale at a special price! Contact Us OTHER LINKS FREE SHARES VIP SHARES APPLY FOR JOB ATHENA PROJECT LIMITED     
    • Hey there, topic type is wrong since there's no LF on this section, but I need client side help so I felt like posting here. I'm looking for some help on client side to change the WASD movement. I'll share a video, part 1 is what I have right now and part 2 what I'd like to add on my project. (Moving with WASD I want the camera to be static even if the character moves around, like on Essence client, I have classic Zaken project). https://streamable.com/3c135q
    • I found this video, I guess you folks should take care before buying adena from "black market".    
  • Topics

×
×
  • Create New...