Jump to content

L2 Adrenaline Scripts.


Recommended Posts

1 minute ago, adr.bot said:

hmm i never see dialog like that, seems there is no bypass strings xd

 

Any idea for a workaround? Ive been hours already thinking of it. Maybe something to identify dialog position and inject click/selection to it?

Link to comment
Share on other sites

3 minutes ago, nhaka said:

 

Any idea for a workaround? Ive been hours already thinking of it. Maybe something to identify dialog position and inject click/selection to it?

i have no ideas for that

Link to comment
Share on other sites

On 1/8/2018 at 7:07 AM, Vinter said:

Yeah np if you have any problems hit me up on PMs. I tested this on protocol 152 so it might not work on your version depending if the packets have changed or not. I also didn't make a buy store script cause I usually find myself doing it manually, but it can be easily modified to add buy store aswell.

Again make sure you have the items in your inventory and that you have the amount or you're gonna send a bad packet to the server which might do nothing or straight up ban you right there and then.  

Also because the packet uses objectId instead of itemId, if you have 2 items that are not stackable (ex a +16 B grade bow and a +0 B grade bow) the script will pick the first one it finds in your inventory, so be careful about that too. I know pretty shoddy code but that's how I roll.

 

Tnks to vinter a little improve for gracia final (protocol 87) all credits to him:

Quote

 


uses SysUtils;
function BetterInt32ToHex(input: Integer): string;
var
  i, j: integer;
  p: string;
  bbI : array[1.. sizeof(integer)] of byte;
begin
  p := '';
  Move(input, bbI[1], SizeOf(Integer));
  for j := Low(bbI) to High(bbI) do
  begin
    p := p + IntToHex(bbI[j],2) + ' ';
  end;
  Result := p;
end;

function StringToHex(S: String): string;
var I: Integer;
begin
  Result:= '';
  for I := 1 to length (S) do
    Result:= Result+IntToHex(ord(S),2) + ' 00 ';
end;
//97=SetPrivateStoreMsgSell:s(StoreMsg)
//D04A00=SetPrivateStoreWholeMsg:h(subID)s(Msg)
//31=SetPrivateStoreListSell:d(IsPackageSale)d(ListSize:Loop.01.0003)d(ObjectID)q(Count)q(Price)
function OpenPrivateStoreSell(itemList: array of Integer; msg: string; packageSale: Boolean): boolean;
var
  packet: string;
  i, j, t: Integer;
  l: Extended;
  item: TL2Item;
begin
  Engine.SendToServer('56 3D 00 00 00 00 00 00 00 00');
  packet := '97 ';    // Message: 97 for (vendor) or D04A00 for (packageSale)
  packet := packet + StringToHex(msg) + '00 00';
  Print(packet);
  Engine.SendToServer(packet);
  packet := '31 '; // Packet ID
  if(packageSale) then packet := packet + BetterInt32ToHex(1) else packet := packet + BetterInt32ToHex(0); // Package Sale
  l := Length(itemList);
  packet := packet + BetterInt32ToHex(Length(itemList) div 3);
  for i := 0 to Length(itemList) - 1 do
  begin
    j := i + 1;
    t := i + 2;
    if(Inventory.User.ByID(itemList, item)) then
    begin
      packet := packet + BetterInt32ToHex(item.OID);
      packet := packet + BetterInt32ToHex(itemList[j]) + '00 00 00 00 '; // Max 2.1b
      packet := packet + BetterInt32ToHex(itemList[t]) + '00 00 00 00 '; // Max 2.1b
    end;
    i := i +2;
  end;
  Print(packet);
  Engine.SendToServer(packet);
end;

begin
OpenPrivateStoreSell([1061, 50, 5000], 'Message', false); //OpenPrivateStoreSell(array of Integers (itemId, amount, price), string message, boolean packagesale);  
end.

 

 

Edited by catamen
Link to comment
Share on other sites

On 7/29/2016 at 3:55 PM, adr.bot said:

well, here is example, i found it on internet, just saying if server got smartguard it will not work


uses SysUtils;
 
function ShellExecuteW(hwnd: integer; lpOperation, lpFile, lpParameters, lpDirectory: PChar;  nShowCmd: integer): integer; stdcall;
  external 'Shell32.dll';
 
function keybd_event(bVk, bScan: byte; dwFlags, dwExtraInfo: integer): integer; stdcall;
  external 'user32.dll';
 
procedure disconnectMonitor;
const
  login = 'lgn';
  password = 'pwd';
  gamePath = 'F:\l2gf\system\l2.exe';
begin
  while Delay(3000) do begin  
    if Engine.Status = lsOffline then begin
      print('dc');
      Engine.FaceControl(0, false);
      Delay(1000);
      Engine.GameClose;
      Delay(1000);
      ShellExecuteW(0, 'open', PChar(gamePath), nil, nil, 0);
      Delay(10000);
      enterText(login);
      Engine.UseKey('Tab');
      Delay(300);
      enterText(password);
      Delay(300);
      Engine.UseKey('Enter');
      Delay(2000);
      Engine.UseKey('Enter');
      Delay(2000);
      Engine.UseKey('Enter');
      Delay(2000);
      Engine.UseKey('Enter');
      Delay(10000);
      Engine.FaceControl(0, true);
    end;
  end;
end;
 
procedure enterText(const text: string);
var
  i: cardinal;
  upperCase: boolean;
begin
  for i:= 1 to length(text) do begin
    if isDigit(text[i]) then
      Engine.UseKey(text[i])
    else begin
      upperCase:= text[i] = UpCase(text[i]);
      if upperCase then begin
          keybd_event(20, 0, 1, 0);
          keybd_event(20, 0, 2, 0);
          Engine.UseKey(text[i]);
          delay(10);
          keybd_event(20, 0, 1, 0);
          keybd_event(20, 0, 2, 0);
      end else
        Engine.UseKey(text[i]);
    end;
    Delay(50);
  end;
end;
 
function isDigit(ch: char): boolean;
const
  digits = '013456789';
var
  i: cardinal;
begin
  result:= false;
  for i:= 0 to length(digits) do
    if digits[i] = ch then begin
      result:= true;
      exit;
    end;
end;
                        
begin
  Script.NewThread(@disconnectMonitor);
end. 

 

why this script is not working anymore ? after l2 is opened he doesn't write account and password, only pressing TAB button.

Link to comment
Share on other sites

8 hours ago, kiduu93 said:

 

why this script is not working anymore ? after l2 is opened he doesn't write account and password, only pressing TAB button.

function keybd_event(bVk, bScan: byte; dwFlags, dwExtraInfo: integer): integer; stdcall;
  external 'user32.dll';

this is blocked by smart guard, try use

engine.entertext('text');

 

Link to comment
Share on other sites

Hello,

 

Does anyone know how to detect if char have any skill to learn (by checking the skill list from NPC and comparing to a list of skills ID to be learnt or something like that) and then proceed to learn skills if SP>required for new skill?

 

I know its possible, but I cant figure out how to identify the new skills from the learn skill list, also not if the SP ammount needed is available (so it doesnt keep on loop if not enough SP).

 

Atm I'm using something like this:

 

if user.inrange(143966, 24193, -2120, 150) and (user.classID = 34) and (user.level>=52) then                                
              begin                                
              if (SkillList.ByID(144, skill)) and (skill.level<15) then //Weapon                                
                begin                                
                  Print('Getting skills from 52');                                                          
                  Engine.LearnSkill (223); //Sting        

 

It works, but I need to write every single skill from every single level for every single class. Plus it does not "confirm" if all skills learned (for instance: SP lower than required or some lag that jumped one skill).

 

Thanks in advance.

Edited by nhaka
Link to comment
Share on other sites

                     var item:tl2item;
            begin
while true do begin
delay(1000);
if not inventory.user.byid(49684, item) or (item.count<10000) then begin
Engine.SetTarget(35453);
Engine.DlgOpen;
Engine.DlgSel (3);
Delay(1000);
Engine.DlgSel(4);
Delay(1000);
Engine.NPCExchange(49684,1);
Print('OK');
Delay(36000000);
end;
end;
 end.

 

 

not work  ...... NPCExchange    Why? What wrong? Help mp please

 

Link to comment
Share on other sites

2 hours ago, gorntana said:

                     var item:tl2item;
            begin
while true do begin
delay(1000);
if not inventory.user.byid(49684, item) or (item.count<10000) then begin
Engine.SetTarget(35453);
Engine.DlgOpen;
Engine.DlgSel (3);
Delay(1000);
Engine.DlgSel(4);
Delay(1000);
Engine.NPCExchange(49684,1);
Print('OK');
Delay(36000000);
end;
end;
 end.

 

 

not work  ...... NPCExchange    Why? What wrong? Help mp please

 

Hi,

 

1) Added some delay between actions so it will be sure to open and select each option. If they are too much, you can lower them later on to make it faster. Code below;

 


var
item:tl2item;

begin
while true do begin
delay(1000);
if not inventory.user.byid(49684, item) or (item.count<10000) then begin
Engine.SetTarget(35453);
delay(1000);
Engine.DlgOpen;
delay(1000);
Engine.DlgSel (3);
Delay(1000);
Engine.DlgSel(4);
Delay(1000);
Engine.NPCExchange(49684,1);
Print('OK');
Delay(36000000);
end;
end;
end.

 

2) As I see, this command (Engine.NPCExchange) is for exchange windows like the ones for newbie guide for adventurer weapons (does not work for grocer sell/buy windows). If you are buying from buy windows like grocer NPC, change the command line for this: Engine.NPCTrade(false,[49684, 1]);

 

3) Double check if this ID (49684) is correct;

 

4) Last but not least, this script wont work for interlude chronicles (buy/sell from NPC does not work). I've played on GF servers that those commands dont work too.

Edited by nhaka
Link to comment
Share on other sites

  • 2 weeks later...

 

 

c'mon guys   help me the poor guy to improve his game...i think is not hard for all you the developers to share some info with us...60% of the script is visible on 0:30 in this video...Thanx for your help

Edited by takoulas
Link to comment
Share on other sites

5 hours ago, takoulas said:

 

 

c'mon guys   help me the poor guy to improve his game...i think is not hard for all you the developers to share some info with us...60% of the script is visible on 0:30 in this video...Thanx for your help

http://www.delphibasics.co.uk/RTL.asp?Name=copy copy that value from dialog and use how u like

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

    • 2 Factor Authentication Code for 100% secure login. Account provided with full information (email, password, dob, gender, etc).
    • ready server for sale, also available for testing with ready and beautiful npc zone pvp with custom 2 epic core orfen lvl2 with all maps ready all quests work at 100% ready comm  board with buffer teleport gm shop service anyone interested send me a pm many more that I forget  Exp/Sp : x30 (Premium: x40)    Adena : x7 (Premium: x10)   Drop : x7 (Premium: 10)   Spoil : x7 (Premium: 10)   Seal Stones : x7 (Premium: 10)   Raid Boss EXP/SP : x10   Raid Boss Drop : x3 (Premium: x5)   Epic Boss Drop : x1 Enchants   Safe Enchant : +3   Max Enchant : +16   Normal Scroll of Enchant Chance : 55%   Blessed Scroll of Enchant Chance : 60% Game Features   GMShop (Max. B-Grade)   Mana Potions (1000 MP, 10 sec Cooldown)   NPC Buffer (Include all buffs, 2h duration)   Auto-learn skills (Except Divine Inspiration)   Global Gatekeeper   Skill Escape: 15 seconds or /unstuck   1st Class Transfer (Free)   2nd Class Transfer (Free)   3rd Class Transfer (700 halisha mark)   Subclass (Items required from Cabrio / Hallate / Kernon / Golkonda + Top B Weapon + 984 Cry B)   Subclass 5 Subclasses + Main (Previous subclasses to level 75 to add new one)   Noblesse (Full Retail Quest)   Buff Slots: 24 (28 with Divine Inspiration LVL 4)   Skill Sweeper Festival added (Scavenger level 36)   Skill Block Buff added   Maximum delevel to keep Skills: 10 Levels   Shift + Click to see Droplist   Global Shout & Trade Chat   Retail Geodata and Pathnodes   Seven Signs Retail   Merchant and Blacksmith of Mammon at towns   Dimensional Rift (Min. 3 people in party to enter - Instance)   Tyrannosaurus drop Top LS with fixed 50% chance   Fast Augmentation System (Using Life Stones from Inventory)   Chance of getting skills (Normal 1%, Mid 3%, High 5%, Top 10%)   Wedding System with 30 seconds teleport to husband/wife Olympiad & Siege   Olympiad circle 14 days. (Maximum Enchant +6)   Olympiads time 18:00 - 00:00 (GMT +3)   Non-class 5 minimum participants to begin   Class based disabled   Siege every week.   To gain the reward you need to keep the Castle 2 times. Clans, Alliances & Limits   Max Clients/PC: 2   Max Clan Members: 36   Alliances allowed (Max 1 Clans)   24H Clan Penalties   Alliance penalty reset at daily restart (3-5 AM)   To bid for a Clan Hall required Clan Level 6 Quests x3   Alliance with the Ketra Orcs   Alliance with the Varka Silenos   War with Ketra Orcs   War with the Varka Silenos   The Finest Food   A Powerful Primeval Creature   Legacy of Insolence   Exploration of Giants Cave Part 1   Exploration of Giants Cave Part 2   Seekers of the Holy Grail   Guardians of the Holy Grail   Hunt of the Golden Ram Mercenary Force   The Zero Hour   Delicious Top Choice Meat   Heart in Search of Power   Rise and Fall of the Elroki Tribe   Yoke of the Past     Renegade Boss (Monday to Friday 20:00)   All Raid Boss 18+1 hours random respawn   Core (Jewel +1 STR +1 DEX) Monday, Wednesday and Friday 20:00 - 21:00 (Maximum level allowed to enter Cruma Tower: 80)   Orfen (Jewel +1 INT +1 WIT) Monday to Friday, 20:00 - 21:00 (Maximum level allowed to enter Sea of Spores: 80)   Ant Queen Monday and Friday 21:00 - 22:00 (Maximum level allowed to enter Ant Nest: 80)   Zaken Monday,Wednesday,Friday 22:00 - 23:00 (Maximum level allowed to enter Devil's Isle: 80)   Frintezza Tuesday, Thursday and Sunday 22:00 – 23:00 (Need CC of 4 party and 7 people in each party min to join the lair, max is 8 party of 9 people each)   Baium (lvl80) Saturday 22:00 – 23:00   Antharas Every 2 Saturdays 22:00 - 23:00 Every 2 Sundays (alternating with Valakas) 22:00 – 23:00   Valakas Every 2 Saturdays 22:00 - 23:00 Every 2 Sundays (alternating with Antharas) 22:00 – 23:00   Subclass Raids (Cabrio, Kernon, Hallate, Golkonda) 18hours + 1 random   Noblesse Raid (Barakiel) 6 hours + 15min random   Varka’s Hero Shadith 8 hours + 30 mins random (4th lvl of alliance with Ketra)   Ketra’s Hero Hekaton 8 hours + 30 mins random (4th lvl of alliance with Varka)   Varka’s Commander Mos 8 hours + 30 mins random (5th lvl of alliance with Ketra)   Ketra’s Commander Tayr 8 hours + 30 mins random (5th lvl of alliance with Varka)
    • Have a great day! Unfortunately, we can not give you the codes at the moment, but they will be distributed as soon as trial is back online, thanks for understanding! Other users also can reply there for codes, we will send them out some time after.
    • Ok mates i would like to play a pridestyle server (interluide, gracie w/ever) Is there any such server online and worth playing?
  • Topics

×
×
  • Create New...

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