Jump to content

Recommended Posts

Posted
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?

Posted
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

Posted (edited)
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
Posted
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.

Posted
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');

 

Posted (edited)

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
Posted

any way  to  detect  gm near  you  and make an alarm for it  or  auto  DC    ?? like  anti-gm  script 

 

and second question anyone have script  anti catpcha  for l2zaken  

Posted

Hi, how would I go about making a script that counts players by clan and prints it?

I know they exist already but don't see any shared.

I can only do basic things with scripts so far.

Posted

                     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

 

Posted (edited)
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
  • 2 weeks later...
Posted (edited)

 

 

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
Posted
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

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

    • Hello everyone I'm Albert, Starting now with the dream on have a L2 server, I'm having several issues with RS and I need someone help to Create an skill and implement to the correct class ID and make it work. Skill Required from me is  Festival Sweep  Skill or Item with the ability. I really need help guys and then after if possible i would need NPC and skins with .dressme        
    • Changeset 410 (3371)   Makers, NpcAi / Desires, Cursed Weapon rework, Bugfixes, Admincommands, Movement, Organization   Makers Fix ghost corpses. Introduce task manager for MultiSpawn spawn schedule. Introduce task managers for Npc respawn and despawn tasks. Add missing random treasurebox maker. NpcAi / Desires AttackableAttack > NpcAttack, allowing ATTACK_FINISHED event over Npc. Merge all reduceWeight from NpcAI operations. Don't broadcast MoveToPawn packet for cast hold scenarii. CH and CP managers use hold cast. Probably way more to add. Rework DesireQueue#addOrUpdate to avoid to generate a List. Drop _isInHitAnimation, avoid twice runAI calls upon attack end animation, save a ThreadPool. Implement Desire#isInvalid, used over the main loop to clean invalid Desires. All sided getDesires().removeIf are dropped, notably over AggroList/HateList. Cursed Weapon rework Fix potential task scheduling issues, reworking the whole layers. Reduce code by 1/3. Use L2OFF formulas/data for item drop rate, staging process. CW end duration now decreases when killing other Players. Bugfixes Revert schedule part from ThreadPool. Fix Pet inventory IU. Ty Denzel for the report. Fix Pet item timestamp reuse delay. Ty artemis for the fix. Disable automatic beastshots when his owner dies. Ty Root for the report. Player cannot craft while casting a skill, nor trade. Ty Root for the report. Add missing weight checks for player/summon pickup, and player craft. Ty Root for the report. Implement /graduatelist command, which displays a list of clan academy graduates for the past week. Ty RooT for the report. Fix PLAYING_FOR_LONG_TIME concept ; rest message is server related, not Player related. Ty RooT for the report. Player should stop movement when opening store. Fix Q351 occurences of itemId 4310 by 4407 one + slight fix. Fix Q365 missing memoState + poison skillId. Ty Root for the report. Fix Q417 Torai despawn over cond 11. Fix Q216 4 missing npcIds. Ty Karudin for the report. Fix the invalid comment of DeleteCharAfterDays Config. Fix NPC drop penalty level calculation. Ty Bandnentans for the report. Items are now dropped in a 30/45 donut shape around dropper. Ty Bandnentans for the report. PartyMatch fixes Don't show Party members or CW holder as available waiting members. You can't show overall List or join a PartyMatch room as CW holder. CW owner, upon acquisition, leave PartyMatch system. PartyMatch window is now automatically closed upon Player#removeMeFromPartyMatch. Remove Player from PartyMatch if Player and newly joined Party leader PartyMatch rooms differ. You can't join or be invited in a PartyMatch room if already partying/CW holding. Fix ShowLicence config when set to false. Ty artemis for the fix. Fix maximum number of macros. Ty artemis for the fix. Fix invalid IU update over //enchant. Ty artemis for the fix. Fix Castle Mass Gatekeeper HTMs. Ty kingNik0n for the fix. Drop _disabledItems implementation. Won't be used by next refactors. Ty artemis for the report. Fix loading handlers under debug. Ty Keku for the fix. Fix character_macroses table structure (commands = 12x32 chars minimum). Admincommands Merge all old spawn admincommands (//list_spawns, //spawn, //unspawnall, //respawnall, //delete) to //spawn and //unspawn (previously //delete). Generate //help. //unspawn works over all ASpawn. Merge all old fence admincommands (//spawnfence, //deletefence, //listfence) to //fence [add|remove], generate AdminFence. They now use proper Pagination. You can also teleport to it. Implementation of //show manor. Implementation of //set quest <id> [cond]. Related items must be hand-given. Implementation of //set henna [page] [add|remove symbolId]. The hennas are still bound to game logic (slots, canBeUsedBy). Movement - Ty LaRoja, Bandnentans Fix Boats IOOBE. Adapt getHeight logic from L2OFF. Introduce back WASD movement, handle boat board/unboard. Fix WATER/FLY movement logic. Avoid to pathfind diagonal cells with detected obstacle. Organization Addition of QuestVars class, holding all related variables from quests (itemIds, npcIds, questNames, sounds, etc), allowing to reduce length of each script while reusing variables. 100+ cloned variables were deleted. Refactor geometry package and Territory. Territory is now a unique 3D shape, holding any type of 2D geometry.  Remove few useless Location#clone uses. Implementation of ItemContainer#forEachItem. Clean many unused FrequentSkill. The whole enum is questionable. Drop MathUtil#checkIfInRange, implement WorldObject#isInStrictRadius (involve collision of that WorldObject, and potential WorldObject parameter). WorldObject#isIn2DRadius parameter is now a Point2D, not a Location (since a Location inherits Point2D, Location are still usable as parameter). Rework Pagination#generatePages to handle page number > 1000. Use Pagination over Tryskell SchemeBuffer. Ty CUCU23 for the share.
    • It's a custom instance used as Event not retail - like. You can re-create it easily.
    • GRAND OPENING TODAY !!! FROM - 16/05/2025, FRIDAY, 20:00 +3 GMT !
  • Topics

×
×
  • Create New...