Jump to content

Script


Recommended Posts

So i have this script (old)

const
  Name='iFIght'; // character
  ItemID=7577; // item id
  LifeID=8742; // 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[i]:=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[i]) div 16;
    result:=result+ByteToHex(tmp);
    tmp:=ord(packet[i]) - 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[i]<>0) then begin
      Result:=LifeBase[i];
      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.

 

it suppose to augment my weapon when i press "social yes" but it dont do anything...  it connected normanly, show me  how many ls i have in my inventory or  what augment i have in my weapon.

 

how can i make it work?

Link to comment
Share on other sites

Name='Tiara120'; // Your char name

  ItemID=6593; // item id (weapon id you should search it at itemnames well i do like this)

  LifeID=8762; // lifestone id (find this to becouse it have diff id's from top ls mid etc)

  GemsID=2131; // gemstone id

  GemsA-beep-t=25; //gemstone a-beep-t

  max=8000;  // max a-beep-t of gemstones

 

You need edit only this lines and its works in all interlude us i know

Link to comment
Share on other sites

Name='Tiara120'; // Your char name

  ItemID=6593; // item id (weapon id you should search it at itemnames well i do like this)

  LifeID=8762; // lifestone id (find this to becouse it have diff id's from top ls mid etc)

  GemsID=2131; // gemstone id

  GemsA-beep-t=25; //gemstone a-beep-t

  max=8000;  // max a-beep-t of gemstones

 

You need edit only this lines and its works in all interlude us i know

i have already fix them, and as i said it connects with l2... but when i press social yes it dont do anything.

 

any1? can i change  the social yes to something else?

Link to comment
Share on other sites

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

    • Yes, it is, it's not hard to do (if you know what you're doing); just time consuming.   To make some things clear: 1. You can not create .ukx files with animated skeletalmeshes inside, by using any of the freeshared L2Editors (basically, no support for .psa files) 2. You need a patched UT2003/UT2004. You can either get your own ut2004 and download Gildor's patch from his web, or use any of these: When you use these, you should be able to import both .psk and .psa animations > link the skeletalmesh to the psa > save as .ukx > use ut2down to convert the file to l2 format > encrypt the .ukx with standard l2 encryption (you can use mxc encdec, you can find it in the folder of the l2editor i shared). Your best bet is to use pawnviewer (aka dev mode) to test that. If you have troubles with that process then leave a reply here, otherwise, if it works correctly, you can move on to adding missing animnotify classes to you unrealed, then proper animnotifies, sounds, effects or w/e is missing from your .ukx files. Keep in mind that this is overall not difficult but a huge amount of work (unless you're good at scripting/macros) since you'd need to manually re-create every single animnotify, by hand. If you have doubts or i wasn't clear enough let me know here. (in case you don't know what an animnotify is: UDN - Two - AnimNotifies (unrealengine.com) )  
    • Welcome to JewStor Service!!!   ❖Ready-made verified wallets, exchanges, business banks and to order accounts. ❖EU/UK/US/DE Stuff: 100% Verified! Reliable financial tools for your business. ❖Popular items available include: Stripe business + Payoneer, Deutshce Bank, BBVA ES, Xapo Bank, Revolut business / personal, Santander Bank, Wallester business, Bitsa EU, Binance EU, Qonto Business, Blackcatcard EU, Shopify Payments, ICard EU, N26 EU, Naga Pay EU, Paysera EU, Mistertango Business and many others.
    • Custom = everything that is not part of my H5 client, such as Aegis skin, Death Knight skin, Constructor skin, Golden Valakas skin, an example is the pack containing 3 Golden Valakas skins+cloaks, to give you an idea, this pack consumes almost 200MB within the system, another example of custom is the Hunter Head set made by Asuki, almost 100MB within the system, every custom item added to the client, specifically within the system folder will increase the consumption of your client's virtual ram memory, the more custom added there, the faster your client will close due to critical. Around 4 to 5 custom packs that I removed from the system and made my client reach the ram virtual limit only after more than 40 hours online, in other words; It is only worth adding custom items to the system folder if it is very well compressed, maximum up to 10MB per custom pack (This pack below in the photo, only it inside your client - system consumes almost 200MB, when I removed this pack inside the system it increased the game's lifespan by almost 4h during my tests)
    • ready pack for sale with lucera files made from scratch price is 350 euros without the license the server is x30 rate the server is there to see everything test ie.. there have been several changes everything works there will be support for everything for as long as possible please, can you send me a message here, there is complete transparency in everything
    • The author has been using an alternate account under the name @project166 to promote their services, which violates our RULES. Additionally, the author does not adhere to our guidelines regarding the inclusion of pricing information.     Topic Locked.
  • Topics

×
×
  • Create New...