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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now



  • Posts

    • Chapter III is now LIVE!   -Max level is increased to 85 -Max level on subclass increased to 85 -Maximum attribute allowed in weapons is increased to 150 -Maximum attribute allowed in armors is increased to 60 -Ant Queen, Core, Orfen increased to level 83, same chance on Epic Jewel, addition of Eas/Ews/Beas/Bews drop. -Addition of Base Tower, Advance Pedestal & Tower of Naia Elpy teleport into Deltuva.   https://remastered.playinera.com/ https://discord.com/invite/WD8fWf5
    • Auto macro is already in the files. It's more important to focus on fixing the critical issues, like melee range critical skills on hero weapons.. These are the most important things for the server at the moment. You'll need more than 3 months and 2300 server restarts to address them all. ps I can sell you the fixes for a good price 🙂 Remember like before?   
    • Hello, could anyone correct the problem?
    • DISCORD : utchiha_market telegram  https://t.me/utchiha_market SELLIX STORE : https://utchiha-market.mysellix.io/ Join our server for more products : https://discord.gg/hoodservices
    • Grand Opening May 17th   Rates EXP/SP x50 Adena x50 Spoil x5 Seal Stones x5 Quest x5   Augmentation Skill and Glow chance are retail. Active and passive skills has the same status. Active skills increased time to 20 minutes.   Buffs Time 120 minutes. 24 slots, +4 divine inspiration. (need learn) Pets does not lose buffs with noblesse.   Clan & Alliance Clan penalties disabled. Alliance only 1 clan - for large crest. Max. 18 members in Raidboss and Siege zones.   Castle Sieges Sieges every 2 weeks. Siege duration 60 minutes. Only 1 castle available for sieges.   Enchant Weapons from +0 to +3: 100% from +3 to +16: 70% (decreasing 4% each level) Armors from +0 to +3: 100% from +3 to +10: 50% (decreasing 4% each level) Blessed enchant on failure returns the item +3.   Events Capture the Flag - Every day at 12:30 and 18:30. Crazy Rates - On weekends, full time. Death Match - Every day at 14:30 and 20:30. Kill the Boss - Every day at 21:30. Party Farm - On weekends at 16:00. Team vs Team - Every day at 16:30 and 22:30. Treasure Hunt - On Sundays, from 14:00 to 14:30.   Olympiads Ends on Mondays. Battle period: 20:00-00:00. Start battles: 5 registered players. No class-based battles. Tie does not lose points. Hero skills are retail.   Special NPCS Buffer: All buffs, including schemes. Class Master: 1st, 2nd and 3rd class free. Exchange Manager: Exclusive exchange system. General Manager: Shop, donation, services, functions, server infos... Global Gatekeeper: Teleport to all kingdoms and areas, free. Siege Manager: Contains info for all castles. Wedding Manager: Formal wear and adena required to get married.   Soul Crystals Stages from 7 to 12 selling at luxury shop by cristals. (retail) Stage 13 Anakazel and Ember: chance 15%. Antharas, Frintezza and Valakas: chance 100%.     Subclass & Noblesse Subclass free. (no quest) Add subclass at all Village Master. Max. 5 subclasses. Noblesse quest. (retail)   Voice Commands .menu - main features including auto farm & potion. .help - contains all available commands.     Additional Features Auto loot. Auto learn skills. Inventory slots 150. Seven Signs open 24/7. Shout/Trade chat delay 10s. Hero chat delay 30s. Chat filter - for illegal words. Offline shop. Shift + click on monsters to see the droplist. Spawn protection by 30 seconds. Max. 3 sessions per pc. Automatic restart at 07:00.   Raid Bosses Common Raids: 18h + 6h random. Barakiel: 6h. (no random) Tyrannosaurus: 5 minutes. Raids listed on the site/npc have improved stats and drops.   Sailren: Monday at 21:00. (individual teleport and locked after boss spawn) Queen Ant: Monday at 22:00.   Core: Tuesday at 21:00. Orfen: Tuesday at 22:00.   Dr. Chaos: Wednesday at 21:00. Zaken: Wednesday at 22:00. (door opens 00:00 game time and when boss is spawned)   Andreas van Halter: Thursday at 21:00. Frintezza: Thursday at 21:00. (random +/- 15 minutes. Need CC, min.2/max.5 parties)   Anais: Friday at 21:00. Baium: Friday at 22:00. (random +/- 15 minutes)   Antharas: Saturday at 21:00.   Valakas: Sunday at 21:00. All Epics are in PvP area and will be dead at server launch.   Changes Bishop level 40 has Noblesse Blessing skill. All debuffs with time greater than 30s have been reduced to 30s. All cancel skills remove buffs for 10 seconds. Cancellation increased reuse time x5 and chance to 100. Deflect Arrow increased power from 40 to 60. Mirage reduced time from 60s to 30s. Dodge increased the time from 5s to 15s, reuse time x2. Counterattack increased the time from 5s to 15s, reuse time x2. Touch of Death increased chance from 80 to 100. Arrest range increased from 150 to 600. (like shackle) Stun/Shock effect time reduced to 5 seconds. FOI works like in GF. (removed on any action except movement) Major Arcana Set 15% cast speed, 2% m.atk. instead of 17% m.atk. Imperial Staff adds Acumen instead of Empower. Removed fear skills from Antharas and Valakas. Removed teleport skills from Zaken.
  • Topics

×
×
  • Create New...