PDA

View Full Version : Srl-osr



Flight
05-23-2021, 08:47 PM
Howdy everyone, long time no visit! I have a bit of free time on my hands so I've a desire to write some (OSRS) scripts for the community. I see SRL-OSR has been maintained and the progress Olly and the others have made: wow! It's amazing work from what I've seen so far, but it's really a shame there's no more members utilizing it, publicly at least. So to those still maintaining the include: is the development branch (https://github.com/ollydev/SRL-Development) stable for use? Would it be an issue to start writing & releasing work based off of this? Before it's suggested, I am aware of SRL's Discord, however I plan to communicate exclusively here on the forums.

With that being said I'm looking forward to getting back into scripting for the community and learning as I go. Bear with me as I'm rusty and certainly no programmer.

footballjds
05-23-2021, 11:18 PM
Would it be an issue to start writing & releasing work based off of this? Before it's suggested, I am aware of SRL's Discord, however I plan to communicate exclusively here on the forums.

I LOVE this! It makes it much easier to track things over time. I do not live on discord...

I've successfully been using SRL-OSR and simba 1400. However, i've had to make custom 1-2 line changes every several months to deal with small UI changes implemented by Jagex in-game.

I'll be closely following the progress. If you'd like help with anything at all please let me know. I have a lot of time on my hands over the next week.

Nice to see you around!

saml1991
05-24-2021, 06:03 PM
Nice plan :)

All the things in the development branch work well. Post on here if there's anything I can contribute to.

Flight
05-24-2021, 10:16 PM
I appreciate the offers for guidance. I'm certain I'll be picking your brains here soon. I've begun working with the include and writing some simple things here and there; what a difference from AeroLib. Once I get to a sufficient level of comfortability I'll make some threads to see what kind of scripts / features are in high demand these days. Perhaps do some surfing on neighboring bot communities to see where the demand is highest.

footballjds
05-25-2021, 02:25 AM
I think to get the forums active we need to update OSR-SRL so it works with the latest updates to the game. Then we can update the sticky that guides users on how to setup and install SIMBA/SRL

Ashaman88
05-25-2021, 01:11 PM
I haven't been scripting in awhile, but for a bit I was using runelite to help with my personal scripts. They have (or at least had) some very nice tools that help with color. For instance instead of doing the work detecting if you were woodcutting, they put a nice box in green text if you are currently woodcutting and it switches to red when you stop. Simple color detection there!

footballjds
05-25-2021, 02:23 PM
I haven't been scripting in awhile, but for a bit I was using runelite to help with my personal scripts

RuneLite is a blessing! You can mark NPC's "hull", you can mark specific drops/value, You can customize the in-game chat alerts, etc. etc.

When can we update OSR-SRL and the instructions for botting? I'm always down to write scripts.

EDIT:
is this setup guide "current"
https://villavu.com/forum/showthread.php?t=118223

saml1991
05-25-2021, 06:18 PM
I've been using below to safespot range semi-afk using the green 'in combat' box thing. Just change uptext to whatever I'm targeting with a low camera angle. This uses SRL-development

program new;
{$i SRL/osr.simba}
var
FSlots: TBoxArray;
fbounds: tbox;
i, j, k,l,m,x,y,timer: integer;
BMP: TMufasaBitmap;
mouseloc, mouseloc2, mouseloc3: tpoint;
failsafe: tstopwatch;
begin
repeat
if not findcolortolerance(x, y, 3377414, 4,20,100, 125,20) and mainscreen.IsUpText('ran') then
begin
waitex(300,80);
if not findcolortolerance(x, y, 3377414, 4,20,100, 125,20) and mainscreen.IsUpText('ran') then
begin
mouse.click(1);
waituntil(findcolortolerance(x, y, 3377414, 4,20,100, 125,20),50,300000);
writeln('foundcolor timer');
waituntil(not findcolortolerance(x, y, 3377414, 4,20,100, 125,20),50,300000);
writeln('notfoundcolortimer');
wait(5000,5900,wdleft);
end;
end;
until (false)
end.

Flight
05-26-2021, 10:10 PM
I think to get the forums active we need to update OSR-SRL so it works with the latest updates to the game. Then we can update the sticky that guides users on how to setup and install SIMBA/SRL

Which part of SRL-OSR is not currently functioning? Aside from the recent Clans update that is.

Dan the man
05-27-2021, 10:34 PM
The SRL-OSR plugin is amazing. Have yet to use it though; I actually ended up writing my own janky include, the base of which was inspired by Aerolib. Managed to finally bot an account to max with it :)

Runelite/OpenOSRS are amazing when it comes to colour finding/information etc, but with some of the functions in SRL I find they certainly arent needed.

Glad to see you back in action and I look foward to seeing some of your content :D

Flight
05-28-2021, 11:24 AM
The SRL-OSR plugin is amazing. Have yet to use it though; I actually ended up writing my own janky include, the base of which was inspired by Aerolib. Managed to finally bot an account to max with it :)

Runelite/OpenOSRS are amazing when it comes to colour finding/information etc, but with some of the functions in SRL I find they certainly arent needed.

Glad to see you back in action and I look foward to seeing some of your content :D

Yes indeed. At least for the time being I'll stick to utilizing Runelite due to it's useful functions that can happily coexist with a color-based include. Also the fact that it's widely used amongst players may make it safer to use, depending on one's views towards client detection.


As far as SRL-OSR goes, works great for me so far. Reflection-style item-finding, fast and accurate positioning (not to mention an amazing web-walker), accurate MS object-finding routines, all tools to make scripter's job much easier. ASyncMouse + assigning finder procedures to RSWalker's walking event makes for a potent object-tracking system. Combining these two I've made a nifty master farmer picker, and it lays a path forward to creating an efficient combat script. Coupled with SRL-OSR's web-walker (would need to be multiple stage) and obstacle handling, a universal Slayer script (one of my ultimate goals) is certainly within reach.

One downside I've noticed at this point is the incompatibility of ASyncMouse & a (remote I guess?) input like KInput or PInput. Anywho, so far I've made basic versions of: a master farmer picker, a handful of mining scripts (Mining guild/TzHaar), minnow fisher (for the time being requires Runelite), fishing guild fisher, Rogues' Den cooker, Edgeville jewelry crafter, blast furnace smelter (currently requires Runelite), and a simple splasher/alcher/super-heater. All quite primitive at this point and need much polishing before release, such as multiple safeguards and fail safes for integrity, easy user interface such as start-up forms, attractive reporting (on-screen, ect...), and perhaps user config files.

A script manager and community script repo would be fantastic. But with so few users (that I know of) at this point in time it's a moot point. First thing's first, to revitalize the community we'll need to start putting out some public scripts, up-to-date user guides and scripting tutorials alike. I'd really love to see the place get back to its glory days.

footballjds
05-28-2021, 06:26 PM
Which part of SRL-OSR is not currently functioning? Aside from the recent Clans update that is.

What github url are you using? The one i have hasn't seen an update in a few years.

There's lots of minor things, I do not remember them all.
spec attack orb color change
prayer orb color change
etc.

and as you mentioned, the clan update moved the 'ALL' chat option a few pixels, which breaks our isLoggedIn function.

Flight
05-28-2021, 10:22 PM
What github url are you using? The one i have hasn't seen an update in a few years.

There's lots of minor things, I do not remember them all.
spec attack orb color change
prayer orb color change
etc.

and as you mentioned, the clan update moved the 'ALL' chat option a few pixels, which breaks our isLoggedIn function.

Olly's development branch (https://github.com/ollydev/SRL-Development) of SRL-OSR.

Hoodz
05-31-2021, 12:05 PM
Flight; do you have discord? if so message me

Dan the man
05-31-2021, 01:19 PM
Hitting the ground running mate, nice work.

I will probably join you when group Ironman becomes a thing and jump back on the RS bandwagon haha.

footballjds
05-31-2021, 02:37 PM
Hitting the ground running mate, nice work.

I will probably join you when group Ironman becomes a thing and jump back on the RS bandwagon haha.

just leaving a contribution-less comment here to say:

I'm excited thinking about the future

Flight
05-31-2021, 05:47 PM
Flight; do you have discord? if so message me

I'm afraid I don't mate. But you're more than welcome to shoot me a PM here if you'd prefer. I try to hop on daily at least.


Hitting the ground running mate, nice work.

I will probably join you when group Ironman becomes a thing and jump back on the RS bandwagon haha.

Good choice. I vaguely remember what it's like to play non-metallic account; not rewarding personally. However writing scripts with metallic players in mind presents its own inherited hurdles, such as handling ground items / drops from specific NPC. It's do-able obviously, but challenging. My advice would be begin that journey now, so when group ironman mode is released, your scripts are fully functioning, giving you a generous head start.


just leaving a contribution-less comment here to say:

I'm excited thinking about the future

There's always hope and potential here. We've seen time after time that SRL will continue to overcome updates to the game and bot-detection. We have the advantage, and make no mistake the hard part is already behind us. The tools at our disposal (Simba/SRL-OSR/numerous plugins) present a clear path forward, the rest is up to the community, should we have the ambition (and time:p).

footballjds
05-31-2021, 06:28 PM
@Flight,

I have time and ambition. Feel like we need to draw more daily forum traffic before Wizzup? pulls the plug...

That means:
- setup guides
- intro scripting guides
- noob friendly
- leach friendly

Element17
06-07-2021, 02:26 AM
Glad to see some life on the forums.

footballjds; why do you think Wizzup? would pull the plug?

footballjds
06-07-2021, 01:28 PM
Glad to see some life on the forums.

footballjds; why do you think Wizzup? would pull the plug?

if you were paying to host something that got no traffic for 2 years what would you do?

Element17
06-07-2021, 01:52 PM
Fair enough.

Flight
06-07-2021, 10:17 PM
Well I stand corrected. ASyncMouse does indeed work smoothly with RemoteInput, however RemoteInput only seems to work on the official client; not Runelite and I've not yet tried OpenOSRS. I did however notice some issues using WindowOverlay with RemoteInput as well as HPBars (and possibly HitSplashes?) not correctly being detected. A simple adjustment to the colors and this issue is solved.

Yes we certainly need to drive up the traffic around here. Once we have some more stable scripts put out and clearly, easy-to-follow setup guides I could do a bit of advertising elsewhere. To get more people writing scripts we certainly need updated tutorials.

Olly
06-11-2021, 01:59 AM
Cool, people using it :)

Beware though: Your scripts will probably break sometimes. I don't care about backwards compatibility at this current stage. Hense why it isn't "released" and is named "srl-development".

Though nothing major should change, but if it does I will let you know here.

Flight
06-11-2021, 11:05 AM
Cool, people using it :)

Beware though: Your scripts will probably break sometimes. I don't care about backwards compatibility at this current stage. Hense why it isn't "released" and is named "srl-development".

Though nothing major should change, but if it does I will let you know here.

The heads up is much appreciated! It's a fantastic tool and such a shame to see such seldom usage. What all is remaining on the roadmap for SRL-OSR? Anything in particular you'd like some assistance with to help move up that ETA?

slacky
06-14-2021, 09:58 AM
Flight: I hope to see some scripts or projects by my next time I come in here :)

Flight
06-14-2021, 10:33 PM
Flight: I hope to see some scripts or projects by my next time I come in here :)

You're not someone I would want to disappoint; consider it done.

Edit:
Olly: I mentioned before that using RemoteInput prohibits WindowOverlay from working correctly; do you know of a work-around for this? Or might it simply be a choice between the two going forward? It's really too bad because both are extremely useful.

Olly
06-24-2021, 03:16 AM
I mentioned before that using RemoteInput prohibits WindowOverlay from working correctly; do you know of a work-around for this? Or might it simply be a choice between the two going forward? It's really too bad because both are extremely useful.

RemoteInput actually supports drawing. I just never added it to SRL until now.
If you download the latest Simba i've added some template thing that packages can add to.

https://i.imgur.com/jSsbK2k.png

https://i.imgur.com/9UjkR5E.png

Also, to install SRL you can just click the package on the toolbar, add "ollydev/srl-development" and install. You seem to manually download and install the zip on your script posts:

https://i.imgur.com/rX9ZL5p.png

Flight
06-24-2021, 12:09 PM
RemoteInput actually supports drawing. I just never added it to SRL until now.
If you download the latest Simba i've added some template thing that packages can add to.

Also, to install SRL you can just click the package on the toolbar, add "ollydev/srl-development" and install. You seem to manually download and install the zip on your script posts:


That's wonderful, thanks a million Olly. I did notice Simba's package manager and how it should be used instead of manually downloading, unzipping and renaming the include. I'll have to revise that post and reroute people to the appropriate installation method. Good advice.

Blue Fox
07-01-2021, 07:59 AM
Hey guys, since the latest version is 1.4, I'll ask you guys here. I'm having problems with 1.4 but not 1.1 for a long time now. I have no idea why...

With 1.4, (when i run the "time.simba file), I get: "Error: Unknown declaration "GetTickCount64" at line".

What I've done:
- Copied the 1.1 entire SRL directory to simba 1.4 directory
- Even Replaced the time.simba file with Olly's latest one.. but still error

But with 1.1, it runs fine. So i'm stuck with 1.1... Seems like upgrading is giving me way more errors and headaches than not.

Any ideas? Am i missing some functions, or are there problems with version 1.1 -1.4?
So close to getting it working :(

Thank you for keeping this alive!

Flight
07-02-2021, 06:44 PM
Hey guys, since the latest version is 1.4, I'll ask you guys here. I'm having problems with 1.4 but not 1.1 for a long time now. I have no idea why...

With 1.4, (when i run the "time.simba file), I get: "Error: Unknown declaration "GetTickCount64" at line".

What I've done:
- Copied the 1.1 entire SRL directory to simba 1.4 directory
- Even Replaced the time.simba file with Olly's latest one.. but still error

But with 1.1, it runs fine. So i'm stuck with 1.1... Seems like upgrading is giving me way more errors and headaches than not.

Any ideas? Am i missing some functions, or are there problems with version 1.1 -1.4?
So close to getting it working :(

Thank you for keeping this alive!

I'm assuming you're referring to Simba when you mention 1.1/1.4. Try using the latest auto-build from this link (https://github.com/ollydev/Simba/releases/tag/autobuild-simba1400) (I personally recommend 32-bit) and placing it in your main Simba folder, run as administrator. Next click on the "Simba Packages" button (yellow box), click the "Add package" button (plus sign) and paste this in the URL box: https://github.com/ollydev/SRL-Development. Press "OK", some info on the repository should appear now on the package manager. Confirm that "Basic" is selected under "Installation" and hit the large "Install" button on the bottom. This should install what you need, where you need, and overwrite older, outdated versions of SRL-OSR. Now to make sure everything installed correctly, do a simple compile of the include as such:

program new;
{$I SRL/OSR.simba}

begin
end.

Keep in mind you're running the script, not any individual file in the include. I noticed you said you tried running "time.simba", and that may have been what was giving you errors.

Blue Fox
07-03-2021, 04:53 AM
Thanks for the help; really appreciate it!

Everything runs successfully when i do the simple compile of the above include with a fresh 1.4 simba, as well as its SRL-Development package. Running both time & math individually works fine too.

However,the newest version of SRL-OSR libraries, like the .time library, are way too different than that of SRL-6 time.simba. Basically, I just want to use Srl-6 time.simba, as it also has the old TTimeMarker functions. When i try to add the SRL-6's TTimeMarker function to the SRL-OSR time file, everything breaks even more when i run my script. It now even gives a tbox array error message..

What I've also tried again:
- Moved the entire SRl-6 include into the 1.4 Simba directory, and ran the time.simba file, but this still gives the "Unknown declaration "GetTickCount64" error message. This entire line gets highlighted:


T := GetTickCount64() + MaxTime;

Full function where the error starts appearing:

function waitTypeFunc(Func: function: Boolean of object; WaitPerLoop, MaxTime: Integer; Value: Boolean = True): Boolean;
var
T: UInt64;
begin
T := GetTickCount64() + MaxTime;
while (GetTickCount64() < T) do
begin
if (Func() = Value) then
begin
exit(True);
end;
wait(WaitPerLoop);
end;
end;



No problems with Simba 1.1 though. Maybe i remove the 64? Or Could it possibly be that the updated version does not support previous, older functions/ syntax?


I know it's not good practice running individual files, but it allows me to confirm there's nothing wrong with these individual files or its functions. Any other ideas?

Flight
07-03-2021, 12:48 PM
I'd recommend as an alternative checking out SRL-OSR's time.simba to see if it accomplishes what you're looking for. You'll find it in SRL/utils/time.simba. If you're looking for the equivalent of waitTypeFun then I suggest using WaitUntil(Condition: Expression; Interval, Timeout: Int32): Boolean;. An example:

if WaitUntil(Minimap.IsPlayerMoving(300), 75, 2300) then
Minimap.WaitFlag(0);

In which case the script will wait for a total of 2300ms for IsPlayerMoving(300) to return true, checking every 75ms.

In SRL-OSR's time.simba there's two new tools to utilize: TCountDown and TStopWatch. The first is as the name suggests; you initially set a time limit and it will count down. You're also able to pause and reset it at any point during it's countdown.

T.Init(Random(900,1300));
while (not T.IsFinished) do // or T.TimeRemaining > 0
begin
if Condition.IsMet then break;
Wait(50);
end;

On the other hand a TStopWatch counts up upon initialization. You may also use it in the same manner such as pausing/resuming/resetting and getting elapsed time.

StopWatch.Start();
Wait(1000);
WriteLn(StopWatch.ElapsedTime());
StopWatch.Pause();
Script.DoSomeStuff();
StopWatch.Resume();


If you have some more info about what exactly you're trying to accomplish then I could probably help you further. But in any case, whichever part of SRL6's time.simba you're requiring, chances are SRL-OSR (or Simba 1.4 with further built-in functions) already has it. It might just be named differently.

Blue Fox
07-05-2021, 06:19 AM
After looking around, looks like simba 1.2+ doesn't support older functions, and it's a nightmare porting them over to 1.2, and others seem to have the same problems as me. So, I'll stick with 1.1 for now, and I'll test some of the stuff out you posted :)

One last thing:
I've been playing around with your "brakeWindMouse" functions and it's epic.

"Mouse movement based on distance to determine speed. Default slowed speed at 20% from destination, if 'double' is set to true then slowed speed also starts at origin and ends 80% to destination."

I don't know If I am calling this function correctly. At the top of the script, I've defined the global variable as so:


var mouseSpeed:= gaussRangeInt(90,100);

Why gauss range you may ask? Thought it's better to randomize it abit, instead of declaring a static speed.. Am i correct?

1) If "Mouse movement based on distance to determine speed" does it mean this function will take into account of the mouse speed var which i specified, between 90 and 100? Or does it automatically determine its own speed based on the distance it calculates, and ignores the fact the speed is 90-100?

2) I'm also not sure If the global variable is called through each loop, so i created additionally local mouse variables for the procedure incase. e.g:



Procedure Click();
begin
mouseSpeed := gaussRangeInt(10,30);
Move();
Click();
end

else if so... then
begin
mouseSpeed := gaussRangeInt(10,30);
Move();
Click();

else if so... then
begin
mouseSpeed := gaussRangeInt(10,30);
Move();
Click();

end

Not sure if by additionally putting "mouseSpeed := gaussRangeInt(10,30);" inside a procedure before i move the mouse every time will break its functionality in which it calculates the distance automatically?

Do you get what i mean lol? Long post, and thanks again, Flight!

nkd2009
08-24-2021, 05:59 PM
Man it is awesome to see so much activity! Excited to get back into OSRS after doing RS3 botting years back. Thanks so much for reviving it guys! Your effort got me back into it.

Her0nz
08-27-2021, 04:22 AM
Yes indeed. At least for the time being I'll stick to utilizing Runelite due to it's useful functions that can happily coexist with a color-based include. Also the fact that it's widely used amongst players may make it safer to use, depending on one's views towards client detection.


As far as SRL-OSR goes, works great for me so far. Reflection-style item-finding, fast and accurate positioning (not to mention an amazing web-walker), accurate MS object-finding routines, all tools to make scripter's job much easier. ASyncMouse + assigning finder procedures to RSWalker's walking event makes for a potent object-tracking system. Combining these two I've made a nifty master farmer picker, and it lays a path forward to creating an efficient combat script. Coupled with SRL-OSR's web-walker (would need to be multiple stage) and obstacle handling, a universal Slayer script (one of my ultimate goals) is certainly within reach.

One downside I've noticed at this point is the incompatibility of ASyncMouse & a (remote I guess?) input like KInput or PInput. Anywho, so far I've made basic versions of: a master farmer picker, a handful of mining scripts (Mining guild/TzHaar), minnow fisher (for the time being requires Runelite), fishing guild fisher, Rogues' Den cooker, Edgeville jewelry crafter, blast furnace smelter (currently requires Runelite), and a simple splasher/alcher/super-heater. All quite primitive at this point and need much polishing before release, such as multiple safeguards and fail safes for integrity, easy user interface such as start-up forms, attractive reporting (on-screen, ect...), and perhaps user config files.

A script manager and community script repo would be fantastic. But with so few users (that I know of) at this point in time it's a moot point. First thing's first, to revitalize the community we'll need to start putting out some public scripts, up-to-date user guides and scripting tutorials alike. I'd really love to see the place get back to its glory days.

Primitive as they may be I'd still be interested in them so I can look them over to get an idea of what to do to start making scripts with this. I've got a pretty basic understanding of Pascal programming itself but looking through the SLR documentation I can't even begin to think of how I'd implement it. I'm no super programmer, just a hobbyist who'd like to help.