Jump to content

Recommended Posts

Posted (edited)

First of all, you need programming skills to Object Pascal (or Delphi, which is approximately the same) and to manipulate packets naturally need to know what they are present

In this topic, leash, I will describe the internal functions and variables of the program

Description FastScript: (a scripting dvizhek used in the program)

Available variables:

pck (string) - current processable package (without first two bytes in size

FromClient (boolean) - package (pck) has come from the client (vseravno that not FromServer)
FromServer (boolean) - package (pck) has come from the server (that vseravno not FromClient)
buf (string) - a buffer used by some functions
ConnectName (string) - name of chara or to which is a package (v. 3.1.3 +)
ConnectID (integer) - number of connections for which the script


Available functions:

ShowTab and HideTab - to display / hide the toolbar (UserTab), which can operate from a script
To draw on it UserTab controls must be specified as a parent
SendToClient - sends the client the contents of the variable buf
SendToServer - the server sends the contents of the variable buf
SendToClientEx (CharName: string) - sends the client with the name CharName contents of a variable buf (v. 3.1.3 +)
SendToServerEx (CharName: string) - sends a server named CharName content variable buf (v. 3.1.3 +)
(the package buf automatically added to 2 bytes length)


NoFreeOnClientDisconnect - prohibits the closure of the connection when the client disconnect (v. 3.1.9 +)
NoFreeOnServerDisconnect - prohibits the closure of the connection with disconnect server (v. 3.1.9 +)
YesFreeOnClientDisconnect - allow closing the connection when the client disconnect (v. 3.1.9 +)
YesFreeOnServerDisconnect - allow closing the connection with disconnect server (v. 3.1.9 +)
(default closure allowed)
DisconnectServer - closes the connection to the server (v. 3.2.0 +)
DisconnectClient - closes the connection to the client (v. 3.2.0 +)


ConnectNameByID (id: integer): string - returns the connection name on his ID (v. 3.2.0 +)
ConnectIDByName (name: string): integer - returns the connection ID on his behalf (v. 3.2.0 +)
SetName (Name: string) - sets the connection name (v. 3.2.0 +)

ReadC (var index: integer): byte - reads from a variable (pck) byte
ReadH (var index: integer): word - reading from a variable (pck) number (2 bytes) (v. 3.1.8 +)
ReadD (var index: integer): integer - reads from a variable (pck) number (4 bytes)
ReadF (var index: integer): double - reads from a variable (pck) c floating-point number (8 bytes) (v. 3.1.8 +)
ReadS (var index: integer): string - reads from a variable (pck) line (in the package nulterminirovannaya unicode string, and the resulting string is the usual Pascal)
Index - start position of reading, which is modified by function (shifted by the number of bytes read)

HStr (h: string): string - converts a string to HEX-sequence
For example, HStr ( 'AA 00 BB 00 CC 00') will return byte string # $ AA # $ 00 # $ BB # $ 00 # $ CC # $ 00. You can pass a string with spaces as well as without them the case of letters does not matter.

WriteC (v: byte; ind: integer = 0) - writes in the variable buf one byte
WriteH (v: word; ind: integer = 0) - writes in the variable buf number (2 bytes) (v. 3.1.8 +)
WriteD (v: integer; ind: integer = 0) - writes in the variable buf number (4 bytes)
WriteF (v: double; ind: integer = 0) - writes in the variable buf number c floating point (8 bytes) (v. 3.1.8 +)
WriteS (v: string) - writes in the variable buf a line (machine translation in unicode)
In the first four procedures, there is an optional parameter ind. If this parameter is not specified, the variable buf is supplemented by a byte / number, otherwise part of the buffer is modified

LoadLibrary (LibName: String): Integer - loads the program library LibName and returns a pointer to it
(v. 3.1.8 +)
FreeLibrary (LibHandle: Integer): Boolean - unloads from memory the program library (v. 3.1.8 +)
CallFunction (LibHandle: integer; FunctionName: String; Count: Integ er; Params: array of variant): variant - is a function FunctionName of our pre-loaded library with a pointer LibHandle and the parameters listed in Params (v. 3.1.8 +)

Example:
buf = HStr ( 'AA BB CC DD EE');
If you call WriteD (10,1), we obtain buf = [0A 00 00 00 EE].
And if you simply WriteD (10), [AA BB CC DD EE 0A 00 00 00].

Example script:
 

begin

 if FromClient and (ConnectName='bubulina')

 and (pck=HStr('1b 04 00 00 00')) then begin

   buf:=HStr('45 00 00 00 00 00 00 00 00 00');

   SendToServerEx('bubulina');

   pck:='';

 end;

end.

Upon receipt of the client plays a chara with the nickname SokolA package 1b 04 00 00 00 (social action "Victory") nepropustit the package and send the package 45 00 00 00 00 00 00 00 00 00 (the command to sit) on behalf of a client for playing with Chara nickname bubulina, ie you are playing in two windows, one bubulina1, in another bubulina2, click in the first Victory, andbubulina1 sits.

Example functions from libraries:
 

var

 lib,Lib1:Integer;

 Res:variant;

 ar:array of variant;

begin

 lib := loadLibrary('User32.dll');

 lib1 := loadLibrary('GDI32.dll');

 Res := CallFunction(lib,'MessageBoxW',4,[nil,'Text1','text2',0]);

 Res := CallFunction(lib,'GetDC',1,[0]);

 CallFunction(lib1,'LineTo',3,[Res,100,100]);

 CallFunction(lib,'ReleaseDC',2,[0,Res]);

 FreeLibrary(lib);

 FreeLibrary(lib1);

end.

Under Scripts:
Procedure OnConnect (WithClient: Boolean) is called when a connection is established, the flag WithClient points with the client whether there was a connection (v. 3.1.9 +)
Procedure OnDisconnect (WithClient: Boolean) is caused a loss of connection (v. 3.1.9 +)
Procedure Init is called when you set the checkbox next to the script.
Procedure Free is called when you take away a checkmark next to the script.
The main body of the script (between begin and end) is called every time you receive a package from the server or the client if the script is checked.

On the Advanced tab:
The main body of the script (between begin and end) is invoked by pressing the Run button, and terminated either by pressing Stop, or at the end of the script.

Enjoy!!!



ps: i made this guide for newbie to learn make alone some script!!

 

Edited by Universe
Posted

do you know what means a script??

 

that is a guide how to make one for phx

 

do you know what means a bot??

 

to exploit is to abuse a flaw or bug in the game's code, a script just refers to a set of instructions that is carried out by a program.

 

A bot on the other hand refers to "robot" something that performs tasks automatically. Which is what this guide is for, when X happens do Z and Y, a bot right?

 

Therefore this topic needs to be moved to the bots section.

Posted

do you know what means a bot??

 

to exploit is to abuse a flaw or bug in the game's code, a script just refers to a set of instructions that is carried out by a program.

 

A bot on the other hand refers to "robot" something that performs tasks automatically. Which is what this guide is for, when X happens do Z and Y, a bot right?

 

Therefore this topic needs to be moved to the bots section.

omg omg.. i am here from 2007 and i know what where need to put.. so go away and leave my topic clean...

 

Thx!

Posted

omg omg.. i am here from 2007 and i know what where need to put.. so go away and leave my topic clean...

 

Thx!

 

Lineage II Bots [English] »  [Guide]How to write script!

 

Are you sure about that? :)

  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • 🔥 L2-LORENA.COM — INTERLUDE x5000 CUSTOM PvP 🔥 ⚔️ GRAND OPENING — 02 OCTOBER 2026 🕗 20:00 UTC+2 / Berlin Time Website: L2-LORENA Interlude x5000 PvP Discord: Discord < Join Us! A new season is coming. L2-LORENA x5000 is a Custom Interlude PvP server built around fast progression, active PvP, custom equipment, farming zones, Epic Boss competition, weekly clan objectives and rebalanced classes. ━━━━━━━━━━━━━━━━━━━━━━ 🔥 SERVER INFORMATION ━━━━━━━━━━━━━━━━━━━━━━ ⚔️ Chronicle: Interlude 🔥 Type: Custom PvP ⭐ EXP: x5000 💰 Adena: x500 👤 Starting Level: 76 🏰 Starting Town: Giran 🤖 Auto Farm: Enabled 👥 Maximum Boxes: 2 ✨ Buff Slots: 50 🏯 Castle Siege: Weekly Giran Siege ━━━━━━━━━━━━━━━━━━━━━━ ⚒️ ENCHANT SYSTEM ━━━━━━━━━━━━━━━━━━━━━━ 🔹 Safe Enchant: +4 🔹 Normal Scroll: 50% 🔹 Blessed Scroll: 70% 🔹 Crystal Scroll: 100% Normal / Blessed Maximum: +15 Crystal Maximum: +20 💎 Crystal Scrolls are obtained from Epic Bosses. ━━━━━━━━━━━━━━━━━━━━━━ 🛡️ CUSTOM PROGRESSION ━━━━━━━━━━━━━━━━━━━━━━ ✨ Custom Armor & Weapons 💍 Epic, Rare & Custom Jewelry 🪽 Custom Wings with special stats 🐉 Agathion Upgrade System — Lv.1 → Lv.2 → Lv.3 ⚔️ Fighter & Mage Tattoos 🎭 Accessories with different bonuses 👗 DressMe Character Skins 💎 Custom Augmentation System 🔥 PvP Coins & PvP Rewards ━━━━━━━━━━━━━━━━━━━━━━ 🌍 FARMING ZONES ━━━━━━━━━━━━━━━━━━━━━━ 🟢 Easy Zone — designed for new players 🟡 Medium Zone — stronger monsters and improved rewards 🔴 Premium Zone — large farming area with excellent drops ⚠️ Harder farming zones have NO PK Guards. Premium Account provides: 💰 x2 Drop 🌍 Access to the Premium Farm Zone ━━━━━━━━━━━━━━━━━━━━━━ ⚔️ PvP & EVENTS ━━━━━━━━━━━━━━━━━━━━━━ 🔥 Dedicated Despair PvP Zone 🚩 Automatic PvP Flag 🪙 PvP Coins from PvP ⚔️ Automatic Team vs Team events 🏆 Dungeon Event 👑 Weekly Giran Castle Siege Dungeon Event Rewards 🌟 Top Farmer: 30x Lucky Box 💀 Top Killer: 30x Lucky Box ━━━━━━━━━━━━━━━━━━━━━━ 👑 EPIC BOSSES ━━━━━━━━━━━━━━━━━━━━━━ 🐜 Ant Queen ⚙️ Core 🕷️ Orfen ⚓ Zaken 👑 Baium 🐉 Antharas 🔥 Valakas ☠️ Frintezza ⏱️ Normal Raid Boss Respawn: 2 Hours ⏱️ Epic Boss Respawn: 8–12 Hours Epic Bosses can reward Crystal Enchant Scrolls. Our in-game Raid Boss Drop Informer allows you to check boss items, quantities and drop chances directly from Giran before teleporting. ━━━━━━━━━━━━━━━━━━━━━━ 🧙 CLASS REBALANCE ━━━━━━━━━━━━━━━━━━━━━━ L2-LORENA includes extensive Interlude class adjustments designed for the custom PvP environment. ✔️ Dreadnought ✔️ Duelist ✔️ Phoenix Knight ✔️ Adventurer ✔️ Sagittarius ✔️ Archmage ✔️ Soultaker ✔️ More balancing and adjustments Changes include PvP attack/defense adjustments, skill range and reuse modifications, improved class-specific mechanics, monster damage bonuses and reworked skills. ━━━━━━━━━━━━━━━━━━━━━━ 💎 AUGMENTATION ━━━━━━━━━━━━━━━━━━━━━━ 🔹 Mid Life Stone — 3% 🔹 High Life Stone — 5% 🔹 Top Life Stone — 8% Maximum: 2 Augmentation Skills ⚡ 1 Active + 1 Passive A custom Augment Seller allows players to browse organized augmentation skill categories directly in-game. ━━━━━━━━━━━━━━━━━━━━━━ 🏙️ GIRAN — MAIN TOWN ━━━━━━━━━━━━━━━━━━━━━━ Everything you need is available directly from the main town: 🛒 GM Shop ✨ Custom Shop 🧙 NPC Buffer + Schemes 🌍 Farming Gatekeeper 👑 Raid Boss Drop Informer 💎 Augment Seller 📖 Complete Server Information Useful Commands: 🌍 .gk — Global Teleport ❤️ .ap — Auto CP / HP / MP ━━━━━━━━━━━━━━━━━━━━━━ 🔥 NEW ITEMS • NEW RULES • NEW SEASON 🔥 ⚔️ Tier 1 / Tier 2 Weapons & Armors 🪽 Wings 🐉 Agathions 🤖 Auto Farm 👥 Free 1+1 Boxes 🏆 Custom Events 👑 Epic Boss Competition 🏯 Weekly Giran Siege ⚔️ Rebalanced PvP 📅 GRAND OPENING 🔥 02 OCTOBER 2026 🕗 20:00 UTC+2 — Berlin Time 🌐 L2-LORENA.COM 💬 DISCORD.GG/TYZ88TGX4B ⚔️ INTERLUDE x5000 CUSTOM PvP 🔥 L2-LORENA — NEW SEASON
    • L2-Gold Custom PvP – is LIVE! Hey guys! We are opening a brand new Custom PvP server. What we offer: High Rates & Custom PvP Gameplay Custom NPC Buffer, GM Shop & Global GK Balanced classes and epic custom items Interlude with c4 skills Rewards: Every active player who reports bugs or gives feedback will receive Exclusive Custom Rewards.   All files, patch, and support are inside our Discord. Join Here: [https://discord.gg/9qkSxQtTq] Join Here:https://www.facebook.com/profile.php?id=61594313618908
    • 🎨 Full Design Suite: Canva Pro, CapCut Pro, and Adobe suites in stock. Upgrade today with zero downtime!
    • the concept integrated also in public acis  https://youtu.be/KEBvdTSTzl8
    • Highly recommend Litch is super passionate about his work and always puts in the effort to deliver great quality 10/10 give it a try big vouch good luck @Litch
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..