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

    • GX-Ext Which file of the svn files should i edit to make blow skills to have 100% chance so i can add the settings in the IlExt.ini? because when im changing it from the skilldata.txt it just helps
    • L2REBORN x10  l2reborn x1   LU4 MASTERWORRK BOHPTS - TOP PRICE discord - adver745645
    • 我们感谢您的 反馈 并希望让服务变得更加 优秀! 如果您使用过我们的服务并愿意分享您的体验(任何体验——积极或建设性),请在Trustpilot上留下评价,并获得$1作为感谢。 链接: https://www.trustpilot.com/review/socnet.pro 如何获得奖励: 1. 前往Trustpilot并留下您的评价 2. 向我们发送发布确认截图,以及带有与评价用户名一致的授权账户截图。 3. 指定哪个商店应收到这 $1 奖励。根据商店不同,可能需要您的用户名/电子邮箱。 您的反馈帮助我们成长,并让项目对社区中的每一位成员变得更好。感谢您与我们同行! 条款: 此活动仅适用于一个唯一用户。不允许多账号行为。 项目有效链接: 数字商品商店(网站): 前往 商店 Telegram 机器人: 前往 – 通过 Telegram 方便访问商店。 虚拟号码服务: 前往 用于购买 Telegram Stars 的 Telegram 机器人: 前往 – 在 Telegram 中快捷且优惠地购买 Stars。 SMM 面板: 前往 – 推广您的社交媒体账户。 我们想向您展示当前的 促销和特别优惠列表 用于购买我们提供的产品与服务: 1. 您可在首次购买时使用优惠码:SOCNET(15% 折扣) 2. 获得 $1 商店余额或 10–20% 折扣——只需在我们网站注册后,按照模板填写您的用户名:“SEND ME BONUS, MY USERNAME IS...”并在我们的论坛主题中发布! 3. 首次启动 SMM 面板可获得 $1:只需在我们的网站(Support)提交主题为 “Get Trial Bonus” 的工单。 4. 我们的 Telegram 频道以及 Stars 购买机器人中每周都有 Telegram Stars 抽奖! 新闻: ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp 频道: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器: https://discord.gg/y9AStFFsrh 联系方式与支持: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • 我们感谢您的 反馈 并希望让服务变得更加 优秀! 如果您使用过我们的服务并愿意分享您的体验(任何体验——积极或建设性),请在Trustpilot上留下评价,并获得$1作为感谢。 链接: https://www.trustpilot.com/review/socnet.pro 如何获得奖励: 1. 前往Trustpilot并留下您的评价 2. 向我们发送发布确认截图,以及带有与评价用户名一致的授权账户截图。 3. 指定哪个商店应收到这 $1 奖励。根据商店不同,可能需要您的用户名/电子邮箱。 您的反馈帮助我们成长,并让项目对社区中的每一位成员变得更好。感谢您与我们同行! 条款: 此活动仅适用于一个唯一用户。不允许多账号行为。 项目有效链接: 数字商品商店(网站): 前往 商店 Telegram 机器人: 前往 – 通过 Telegram 方便访问商店。 虚拟号码服务: 前往 用于购买 Telegram Stars 的 Telegram 机器人: 前往 – 在 Telegram 中快捷且优惠地购买 Stars。 SMM 面板: 前往 – 推广您的社交媒体账户。 我们想向您展示当前的 促销和特别优惠列表 用于购买我们提供的产品与服务: 1. 您可在首次购买时使用优惠码:SOCNET(15% 折扣) 2. 获得 $1 商店余额或 10–20% 折扣——只需在我们网站注册后,按照模板填写您的用户名:“SEND ME BONUS, MY USERNAME IS...”并在我们的论坛主题中发布! 3. 首次启动 SMM 面板可获得 $1:只需在我们的网站(Support)提交主题为 “Get Trial Bonus” 的工单。 4. 我们的 Telegram 频道以及 Stars 购买机器人中每周都有 Telegram Stars 抽奖! 新闻: ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp 频道: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器: https://discord.gg/y9AStFFsrh 联系方式与支持: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • 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