Jump to content

Recommended Posts

Posted

 

 

A simple script which randomizes your target from shortest -> furthest so you can farm with Rush Impact on your doombringer

 

Edit your skill id (Default 45179):

SkillList.ByID(45159, sweep)

 

Edit your search range (Default 900):

 Script.NewThread(@SweepThread, Pointer(900));
 

 

var
  bSweepFurthest: boolean; // Global state variable to track which mob to get next

// This procedure now alternates between finding the furthest and nearest mob.
procedure SweepThread(dist: integer);
var
  sweep: TL2Skill;
  mob: TL2Npc;
begin
  while Delay(100) do begin
    if (Engine.Status = lsOnline)
    and SkillList.ByID(45159, sweep) then begin

      // Decide which mob to find based on the bSweepFurthest state
      if (bSweepFurthest) then begin
        mob:= GetFurthestSweepableMob(dist); // Looking for the furthest mob
       end else begin
        mob:= GetNearestSweepableMob(dist); // Looking for the nearest mob
       end;

      if (mob <> nil) then begin
        if Engine.SetTarget(mob) then Delay(1);
         Engine.UseSkill(sweep) ;
        // Flip the state for the next loop iteration
        bSweepFurthest := not bSweepFurthest;
      end;
    end;
  end;
end;

// Corrected to check for dead mobs
function GetNearestSweepableMob(dist: integer): TL2Npc;
var i: integer;
begin
  Result:= nil;
  for i:= 0 to NpcList.Count-1 do begin
    if (NpcList(i).Valid)
    and (User.DistTo(NpcList(i)) < dist)
    and not (NpcList(i).Dead) then begin // <<< Corrected: Sweepable mobs are dead
      Result:= NpcList(i);
      dist:= User.DistTo(NpcList(i));
    end;
  end;
end;

// Modified to accept a distance parameter and corrected to check for dead mobs
function GetFurthestSweepableMob(dist: integer): TL2Npc;
var
  i: integer;
  max_dist: integer;
begin
  Result:= nil;
  max_dist:= 0;
  for i:= 0 to NpcList.Count-1 do begin
    if (NpcList(i).Valid)
    and (User.DistTo(NpcList(i)) < dist) // <<< Changed from 400 to the 'dist' parameter
    and not (NpcList(i).Dead)                // <<< Corrected: Sweepable mobs are dead
    and (User.DistTo(NpcList(i)) > max_dist) then begin
      Result:= NpcList(i);
      max_dist:= User.DistTo(NpcList(i));
    end;
  end;
end;

// Main execution block
begin
  // Initialize the state to start by finding the furthest mob first
  bSweepFurthest := true;

  // Start the thread, passing 300 as the max distance for both nearest and furthest searches
  Script.NewThread(@SweepThread, Pointer(900));

  Delay(-1);
end.

 

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

    • try this one instead. The one he shared affects every single NPC/player character in the game, the one I posted only affects player characters  https://drive.google.com/file/d/1UtccbD9e50x3WEnQBab2PTZnBHwpcGYM/view?usp=sharing or perhaps i misunderstood; if you could please post a full explanation of the problem you're having with the files, unfortunately i think whatever you're using to translate to english is a bit bad nevermind, i got what you mean, here's the fix   https://drive.google.com/file/d/1av7OHaGSdnVQtcBgb9MhtiIkxVXy3P2y/view?usp=sharing   CanIngnoreCollision=True CanBeIngnoredCollision=True  
    • <dailyReward days="28" autoOpen="true" minimumOnlineTimeSeconds="30" oneRewardPerIP="true" resetIfMissDay="true">   For now, I have these settings in the XML—this is the V1 version I created, though I plan to make further improvements over time. Of course, I’ll also add more protections—MAC, HWID, and perhaps others like account-based restrictions—to make it more secure. We can also implement non-tradable items to further enhance the system's security. I’ll keep posting updates and refining both the system and the interface. I might make a video tomorrow; if you look at the top, you'll see the "auto-open" feature can be toggled on or off, allowing users to rely solely on the `.daily` command. Cheers! Note: If I sell it in this state, I’ll provide support and roll out updates to users. I’m not forcing anyone to buy anything; I’d even provide the patch files so that anyone with the necessary skills can add features, modify it, or improve it further.
    • If the problem is that the target is lost, the action of aiming at another character, upon losing collision, does not allow aiming.   This one works as it should, allowing you to target characters
    • MICROTEXT AND WATERMARKS BREAK MOST RENDERINGS Microtext and watermarks aren’t just small decorative details. They are one of the most common reasons a document fails verification, even when it looks decent at first glance. The issue is that these elements are almost impossible to reproduce “by eye.” Microtext requires precise geometry and legibility at a very small size, while a watermark needs the correct density, transparency, and accurate placement relative to other security features. Any deviation becomes obvious during detailed inspection. ▪ What’s most often done wrong: - microtext is drawn too thick or blurry - the watermark is made either too visible or almost invisible - the positioning between microtext and watermark is ignored - the original printing technology isn’t taken into account when choosing density and shape - The stronger the document’s security features, the less room there is for approximation. What matters here isn’t visual similarity, but accurate reproduction of the original technical characteristics. If your document contains microtext and watermarks, this is always an area that requires extra attention. Write to us in DMs. We’ll review your case and point out exactly which details need the highest precision during rendering. › TG: @mustang_service_ms ( https:// t.me/ mustang_service_ms ) › Channel: Mustang Service ( https:// t.me/ +JPpJCETg-xM1NjNl ) #drawing #microtext #photoshop #editing #watermarks
  • 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..