Jump to content

Recommended Posts

Posted (edited)

Hello,

Need help with script, need capture info about olympiad in interlude (/olympiadstat)

How can read the system messages?

 

var
	p1, p2: pointer;
    matches, wins, loss, points : integer;
    OlyStat : integer;    
begin
	//1673	1	Your current record for this Grand Olympiad is $s1 match(es), $s2 win(s) and $s3 defeat(s). You have earned $s4 Olympiad Point(s).	0	79	9B	B0	FF			0	0	0	0	0		none
	OlyStat:=1673;
	while (true) do 
    begin
    	//laSysMsg - system message appeared. P1 - message identificator (cardinal), P2 - message data (TMemoryStream).
		Engine.WaitAction([laSysMsg], p1, p2);
        if(p1=OlyStat)then
        begin
        	//need read olympiad stat from p2 
            matches:=???
            wins:=???
			loss:=???
            points:=???
        end;
    end;
end;

 

Edited by Demonho
Posted
uses
  SysUtils;

var
  p1, p2: Pointer;
  Match, Win, Loss, Points: Cardinal;
begin
  while true do
  begin
    if Engine.WaitAction([laSysMsg], p1, p2) = laSysMsg then
    begin
      if Cardinal(p1) = 1673 then
      begin
        Match := PCardinal(Cardinal(p2) + 12)^;
        Win := PCardinal(Cardinal(p2) + 20)^;
        Loss := PCardinal(Cardinal(p2) + 28)^;
        Points := PCardinal(Cardinal(p2) + 36)^;
        print(format('Match: %d; Win: %d; Loss: %d; Points: %d', [Match, Win, Loss, Points]));
      end;
    end;
  end;
end.

 

Posted

Thanks adr.bot

 

On 4/11/2021 at 7:53 PM, adr.bot said:

Match := PCardinal(Cardinal(p2) + 12)^;

Win := PCardinal(Cardinal(p2) + 20)^;

Loss := PCardinal(Cardinal(p2) + 28)^;

Points := PCardinal(Cardinal(p2) + 36)^;

changed to find the correct values:
 

        Match := PCardinal(Cardinal(p2))^;
        Win := PCardinal(Cardinal(p2) + 8)^;
        Loss := PCardinal(Cardinal(p2) + 16)^;
        Points := PCardinal(Cardinal(p2) + 24)^;
Posted (edited)
25 minutes ago, Demonho said:

Thanks adr.bot

 

changed to find the correct values:
 





        Match := PCardinal(Cardinal(p2))^;
        Win := PCardinal(Cardinal(p2) + 8)^;
        Loss := PCardinal(Cardinal(p2) + 16)^;
        Points := PCardinal(Cardinal(p2) + 24)^;

np, but it is really correct values? for example when tested (interlude)
 

PCardinal(Cardinal(p2))^

gave me system message ID.

https://prnt.sc/11c67l2

Edited by adr.bot
  • Like 1
Posted
On 4/13/2021 at 11:24 AM, adr.bot said:

np, but it is really correct values? for example when tested (interlude)

I belive so
In all tests the correct value was returned
 

olystats.png

Posted
1 hour ago, Demonho said:

I belive so
In all tests the correct value was returned
 

olystats.png

thats interesting, anyways as long as it works then good, gl!

Posted

^^ yeah!!!

In another case, for relogin purposes i need check if char is online, my idea is send a invalid command to server. If receive the Command not found, char is online.

i made a test with:
 

uses
  SysUtils;

var
  p1, p2: Pointer;
  Match, Win, Loss, Points: Cardinal;
  i: integer;
  ret: string;
begin
  while true do
  begin
    if Engine.WaitAction([laSysMsg], p1, p2) = laSysMsg then
    begin
      if Cardinal(p1) = 1987 then
      begin
        for i:= 0 to 44 do
        begin
          if i mod 2 <> 0 then Continue;
          ret:=ret+PChar(Cardinal(p2)+i)^;
        end;
      end;
      Print(ret);
    end;
  end;
end.

its correct? give me result i am expecting: SYS: Command not found.

There is a better way to read p2 on this case?

Posted (edited)
28 minutes ago, Demonho said:

^^ yeah!!!

In another case, for relogin purposes i need check if char is online, my idea is send a invalid command to server. If receive the Command not found, char is online.

i made a test with:
 



uses
  SysUtils;

var
  p1, p2: Pointer;
  Match, Win, Loss, Points: Cardinal;
  i: integer;
  ret: string;
begin
  while true do
  begin
    if Engine.WaitAction([laSysMsg], p1, p2) = laSysMsg then
    begin
      if Cardinal(p1) = 1987 then
      begin
        for i:= 0 to 44 do
        begin
          if i mod 2 <> 0 then Continue;
          ret:=ret+PChar(Cardinal(p2)+i)^;
        end;
      end;
      Print(ret);
    end;
  end;
end.

its correct? give me result i am expecting: SYS: Command not found.

There is a better way to read p2 on this case?

i would recommend read this https://adrenalinebot.com/en/api/example/packetunit-ready-unit-working-packets-adrenaline-bot because how u read seems not right.
p2  should contain (in my case MessageID), Size, Type, and values by Type.

thats why i dont have answer for ur question in this case, because ur system message data seems odd to me xd

ps. u always can use move and check if u moved.

Edited by adr.bot
Posted
On 4/14/2021 at 4:36 PM, adr.bot said:

ps. u always can use move and check if u moved.

see a quite more easy to implement.

Tested the unitpacket, this operations os pointers is strange a lot for me, i cant see any logic here kkkkk
 

uses
  SysUtils, PacketUnit;

var
  p1, p2: Pointer;
  Match, Win, Loss, Points: Cardinal;
  i: integer;
  ret: string;
  p : TNetworkPacket;
begin
  while true do
  begin
   
    if Engine.WaitAction([laSysMsg], p1, p2) = laSysMsg then
    begin
      if Cardinal(p1) = 1987 then
      begin
        p:=TNetworkPacket.Create(p2,46);
        Print(p.ReadS);
        p:=nil;        
      end;

      if Cardinal(p1) = 1673 then
      begin
        p:=TNetworkPacket.Create(p2,24);
        Match := p.ReadD;
        Win := p.ReadD;
        Loss := p.ReadD;
        Points := p.ReadD;
        p:=nil;
        print(format('Match: %d; Win: %d; Loss: %d; Points: %d', [Match, Win, Loss, Points]));
      end;      
    end;
  end;
end.

 

Posted
10 minutes ago, Demonho said:

see a quite more easy to implement.

Tested the unitpacket, this operations os pointers is strange a lot for me, i cant see any logic here kkkkk
 


uses
  SysUtils, PacketUnit;

var
  p1, p2: Pointer;
  Match, Win, Loss, Points: Cardinal;
  i: integer;
  ret: string;
  p : TNetworkPacket;
begin
  while true do
  begin
   
    if Engine.WaitAction([laSysMsg], p1, p2) = laSysMsg then
    begin
      if Cardinal(p1) = 1987 then
      begin
        p:=TNetworkPacket.Create(p2,46);
        Print(p.ReadS);
        p:=nil;        
      end;

      if Cardinal(p1) = 1673 then
      begin
        p:=TNetworkPacket.Create(p2,24);
        Match := p.ReadD;
        Win := p.ReadD;
        Loss := p.ReadD;
        Points := p.ReadD;
        p:=nil;
        print(format('Match: %d; Win: %d; Loss: %d; Points: %d', [Match, Win, Loss, Points]));
      end;      
    end;
  end;
end.

 

well i mean to read to see idea how it getting read, and not actually use it.
anyways to read string (probably, should actually test), i cant tell "Position" number because ur server positions seems odd to me.

String(PChar(Cardinal(p2) + Position))

 

  • Vision locked this topic
Guest
This topic is now closed to further replies.


  • Posts

    • Want more engagement, reach, and traffic on Discord? Automate promotion of your server, members, reactions, and messages in minutes — no bots, no hassle, no overpayments. SocNet’s SMM Panel — fast launch, fair prices, real results. Use our SMM Panel to boost Facebook, Instagram, Telegram, Spotify, SoundCloud, YouTube, Reddit, Threads, Kick, Discord, LinkedIn, Likee, VK, Twitch, Kwai, Reddit, website traffic, TikTok, Trustpilot, Apple Music, TripAdvisor, Snapchat, and more digital services. Followers, likes, views, reposts, plays, viewers, reactions, comments. Get $1 bonus for your first trial order! Just open a ticket with the subject “Get Trial Bonus” on our website (Support) ➡ Go to SMM Panel (clickable) or contact our bot support How to order: ➡ SMM Panel: Click ➡ SMM Panel directly in our Telegram bot: Click (Menu ➡ SMM Panel) Our Digital Goods Store: ➡ Online Store: Click ➡ Telegram Bot: Click Regular customers get extra discounts and promo codes! Support: ➡ Telegram: https://t.me/solomon_bog ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ ✉ Email: solomonbog@socnet.store ➡ Telegram Channel: https://t.me/accsforyou_shop You can also use these contacts to: — Get wholesale consultations — Discuss partnership deals (current partners: https://socnet.bgng.io/partners ) — Become our supplier SocNet — your source for digital goods and premium subscriptions
    • Price and Assortment Update: List of newly added products ➡ WhatsApp Real Account | USA (+1 phone) | High Quality Accounts | Account with age from a few days | QR-Code or Phone-Code | Price from: 3.5$ ➡ Facebook Old Italy account | Created in 2022 | FanPage created in 2022 | Advertising account created in 2022 | Farm 30 days | Friends 100+ | Mail included+active 2FA | Price from: 29$ ➡ OLD Instagram Accounts | Age: 2023-2024 | QUALITY Premium Autoregs (API FRESH) | Registered via SMS | Format: login | password | cookies (for InstAccountsManager) | IAM format | Price from: 0.45$ ➡ ChatGPT Plus Team subscription to your Own Email For 1 Month | Price from: 5$ ➡ Google Voice Accounts (GMAIL US NEW) | Age/Year: Random 2024 | Phone Verified: Yes | Price from: 13$ Prices have been reduced for the following products ➡ Discord Nitro Classic (Basic) GIFT | 1/12 MONTHS | NO NEED YOUR LOGIN AND PASSWORD FROM ACCOUNT | Warranty on full time of subscription | Price from: 3.15$ ➡ Discord Nitro FULL | 1/12 MONTHS | NO NEED YOUR LOGIN AND PASSWORD FROM ACCOUNT | Warranty on full time of subscription | Price from: 6.8$ ➡ Spotify Premium Individual Personal Plan for 1 month ON YOUR ACCOUNT | Available in all countries | Price from: 2.49$ ➡ Spotify Premium Family Account for 1 month ON YOUR ACCOUNT | Working in any countries | Price from: 3.75$ ➡ Youtube Premium Music Personal Account ON YOUR ACCOUNT | 1 month | YouTube without ads | Price from: 3.75$ ➡ Youtube Premium Music Family Account ON YOUR ACCOUNT | 1 month | YouTube without ads | Price from: 4.35$ ➡ Telegram Premium subscription for 1 month to your account | Authorization in your account is required (via TDATA or phone number) | Price from: 6$ ➡ Telegram Premium subscription for 3 months on your account | No authorization required in your account | Guarantee for the entire subscription period | Price from: 17$ ➡ Telegram Premium subscription for 6 months on your account | No authorization required in your account | Guarantee for the entire subscription period | Price from: 22$ ➡ Telegram Premium subscription for 12 months on your account | No authorization required in your account | Guarantee for the entire subscription period | Price from: 37$ ➡ Netflix Premium 1 month on your personal account for any country, renewable after expiration | Price from: 10$ ➡ Old Twitter Accounts 2010-2020 with real followers 1,000–20,000+ (followers on your choice) | Email included, Password and Token access | Refill: 30 days | Price from: 10$ And many other digital products! Full range of our online store: ➡ Accounts: Telegram, Facebook, Reddit, Twitter (X), Instagram, YouTube, TikTok, Discord, VK, LinkedIn, GitHub, Snapchat, Gmail, emails (Outlook, Firstmail, Rambler, Onet, Gazeta, GMX, Yahoo, Proton, Web.de), Google Voice, Google Ads ➡ Premium Subscriptions: Telegram Premium, Twitter Premium X, YouTube Premium, Spotify Premium, Netflix Premium, Discord Nitro, ChatGPT Plus/PRO, XBOX Game Pass ➡ Additional services: Telegram Stars, proxies (IPv4, IPv6, ISP, Mobile), VPN (Outline, WireGuard, others), VDS/RDP servers Promo code: AUGUST2025 (10% Discount) Payment: bank cards · cryptocurrency · other popular methods How to buy: ➡ Online Store: Click ➡ Telegram Bot: Click Other services: ➡ SMM Panel: Click Regular customers — additional discounts and promo codes! Support: ➡ Telegram: https://t.me/solomon_bog ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ ✉ Email: solomonbog@socnet.store ➡ Telegram Channel: https://t.me/accsforyou_shop You can also contact us for: — Wholesale consultation — Partnership agreements (current partners: https://socnet.bgng.io/partners ) — Become our supplier SocNet — digital goods and premium subscriptions store
    • write me https://t.me/lin2web
    • I can create a website and a control panel with automatic donation delivery, pm if interested.
    • Hello, you can contact me. Discord: l2retro
  • 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