SRL Archive - Jr. Member RS3 Scripts

BasicCombine


Thomas

2015-04-16 06:36:39

Hey,

This script could be used for making potions, combining battlestaffs, making wines,…
Start at at any SRL supported bank, the script banks using preset 1.
Have preset 1 setup so you have 1 of each item in slot 1 and 2 because it combines slot 1 on slot 2.
It will repeat the antiban untill no item in slot 27 (this allows for faster restocking of items), so make sure the last slots will be cleared from items. (Mainly important if combining potions with scroll of cleansing).

Example:
[ATTACH=CONFIG]25718[/ATTACH]

Keeping this in the junior section untill I receive more feedback and bugs.


[B]Patch notes:[/B]

[U]1.31[/U]
-Fixed breaking
-Minor rewrite

[U]1.3[/U]
-Antiban wait times based on inventory count.
-Wont close progress screen.
-Added progress report in SMART.

[U]1.11[/U]
-Removed duplicate and unneeded banking code.

[U]1.1[/U]
-Added all banks
-Various rewrites
-Better failsafes

Thomas

2015-04-20 10:00:29

Version 1.0 should be ready for public, but I would still like some feedback!
Support all SRL banking locations.

StickToTheScript

2015-04-20 21:51:10

Looks good! Gratz on the release!

Thomas

2015-04-28 05:37:12

I have made some changes to the banking and makeItems functions. And cleaned up the code a little bit.
Added all possible banking locations.
Redid the breaking procedures slightly and made my failsafes more random.

Pretty proud of this by now.

Always open for feedback and suggestions!

Next thing to improve would be the mainloop, where it repeats the antiban till slot 27 is empty and then waits a tick so my antiban doesnt postpone the banking.

Thomas

2015-05-07 04:09:12

Does anyone have any suggestions on how to clean up the antiban to repeat itself till invent is done so it doesn't postpone banking? (Starting a 10sec mouseoffclient at item 25 would mean a 8sec postpone for example).

J_R

2015-05-07 06:06:33

instead of:
 wait(10000) 
you could do:

s := 10000 //or random whatever
antibantimer.start()
repeat
wait(random(1000)) //or a smaller number I guess
until ( tabbackpack.isiteminslot(27) or (antibantimer.gettime() > s) )
Don't know how to do threads in simba, so I think this would be your best bet

Thomas

2015-05-07 08:04:01

From: J_R
instead of:
 wait(10000) 
you could do:

s := 10000 //or random whatever
antibantimer.start()
repeat
wait(random(1000)) //or a smaller number I guess
until ( tabbackpack.isiteminslot(27) or (antibantimer.gettime() > s) )
Don't know how to do threads in simba, so I think this would be your best bet


It kinda does that currently. I suggest you have a look at the code first :).
    repeat
if (not isLoggedIn()) or (FailTimer.getTime() > (randomRange(1000, 1200) * 90)) then
exit();
findNormalRandoms();
antiBan();
until not (tabBackpack.IsItemInSlot(27));

The antiban is just the average antiban with random waits, mouse moves etc. The problem currently is it can still start a new antiban procedure with an item in slot 26, and delay the banking.

I could do 2 seperate procedures, one with longer antiban waits till no item in slot 25 or so and then short waits untill 27. But I don't like the duplicate and messy code that would give.

Antonio

2015-05-07 09:38:53

From: lovebotter
snip-


Would you be open to the idea of only doing antiban until slot 26 and no antiban after that? Being realistic once I know I've almost completed a bag I tend not to move the mouse off client or check my levels I prepare to bank so maybe that would solve your issue?

Thomas

2015-05-07 09:58:12

From: Nice Balance Bro
Would you be open to the idea of only doing antiban until slot 26 and no antiban after that? Being realistic once I know I've almost completed a bag I tend not to move the mouse off client or check my levels I prepare to bank so maybe that would solve your issue?


No, that's why it already stops at item 27.
The problem currently is that my antiban requires short waits instead. Even if it stops repeating at item 26, whenever it starts a new antiban at lets say 25 and the antiban is a 3sec off client it still delays the next banking.

I'm just looking for suggestions that solve this without being a ton of duplicate code. One thing I could do is make the antiban max wait times variable depending on backpack count. Higher backpack count = longer max wait. But that would still be rather crap when using scroll of cleansing. And would result in more system resources used due to another inv count check repeated each time.

Like so:
procedure antiban();
var
backPackCount, maxWait: integer;
begin
backPackCount := tabBackpack.count();
maxWait := round(backPackCount * backPackCount * backPackCount /10);
case random(200) of
0..10: mouseMovingObject;
11..60: sleepAndMoveMouse(random(maxWait));
61..120: wait(random(maxWait));
121..180:
begin
mouseOffClient(4);
wait(random(maxWait));
end;
181..199: randomMouseSpeed(2, 20, 30);
end;
end;

This should work somewhat good I suppose.

I've uploaded v1.2. I have not tested this version.
Things that I've changed;
-Removed some duplicate banking. (Same for version 1.1b in first post, also haven't tested 1.1b but I'm sure it should work just fine)
-Made antiban waitTimes addept to inventcount.

Antonio

2015-05-07 12:30:25

Ahh I see what you wanted to do now! Have you tested the difference in memory and cpu usage since updating it to ascertain the full effect on the system? Might find it doesn't really change too much in which case you've came up with the best solution!

Thomas

2015-05-07 13:11:49

From: Nice Balance Bro
Ahh I see what you wanted to do now! Have you tested the difference in memory and cpu usage since updating it to ascertain the full effect on the system? Might find it doesn't really change too much in which case you've came up with the best solution!


No I haven't tested the script yet. I doubt it'll do much on 1 client anyway.
If I had tested the script I would have known the progress report is flawed. (itemCount isn't a global var, I don't know why I ever changed that)

J_R

2015-05-07 16:00:22

I looked at it, and meant to put that kind of stuff in the antiban procedure itself, maybe putting what i suggested as an antibanwait procedure or something, so you can call like antibanwait(random(5000)) or something

Thomas

2015-05-08 08:52:46

From: J_R
I looked at it, and meant to put that kind of stuff in the antiban procedure itself, maybe putting what i suggested as an antibanwait procedure or something, so you can call like antibanwait(random(5000)) or something


Oh yes, but I dont like the 'hardcoding' of that either.
It is a good idea though. But just adds more complexity then something like this should ever need.

I suppose I could loop the antiban untill 14 ticks pass by, but that has 2 problems.
1) The make items function only returns true after it notices pixelshift in invent
2) Not all items take 1 tick to make, and some Dg rewards also speed it up

Currently I probably have the best method. Just have to tweak it some.

Does anyone know if srl math includes squares? Instead of writing 'backpackcount * bpc * bpc' just write 'bpc ^ 3'

yourule97

2015-05-08 09:10:19

From: lovebotter
Oh yes, but I dont like the 'hardcoding' of that either.
It is a good idea though. But just adds more complexity then something like this should ever need.

I suppose I could loop the antiban untill 14 ticks pass by, but that has 2 problems.
1) The make items function only returns true after it notices pixelshift in invent
2) Not all items take 1 tick to make, and some Dg rewards also speed it up

Currently I probably have the best method. Just have to tweak it some.

Does anyone know if srl math includes squares? Instead of writing 'backpackcount * bpc * bpc' just write 'bpc ^ 3'


Yeah, since SIMBA is pretty much written in Pascal, you can do power(base, exponent).

More info: http://www.freepascal.org/docs-html/rtl/math/power.html

Thomas

2015-05-08 09:12:28

From: yourule97
Yeah, since SIMBA is pretty much written in Pascal, you can do power(base, exponent).

More info: http://www.freepascal.org/docs-html/rtl/math/power.html

Thanks! Will try this weekend.

Lobster

2015-05-26 21:05:05

Hey, great script, however it keeps thinking the combine popup screen is actually a random event and keeps closing it :confused: works fine after I deleted that section of code though.

Clutch

2015-05-26 21:52:11

From: lovebotter
Thanks! Will try this weekend.


To stay on topic, I'll be sure to take a look at it!

Off topic, grats on member! (I assume that was recent)

Thomas

2015-05-27 03:12:58

From: Lobster
Hey, great script, however it keeps thinking the combine popup screen is actually a random event and keeps closing it :confused: works fine after I deleted that section of code though.


Must have been an update to srl then I suppose. Will have a look at it later.
What are you using the script for btw?

Do you mean the production screen or the progress screen?

Either way it shouldn't close the progress screen anymore next update. Please not that the progress screen doesn't have to be enabled for this script to work.

@Clutch
When you test it, can you see if you are able to get this bug reproduced?
And thanks! Yes, it was recent :)

Clutch

2015-05-27 17:58:44

From: lovebotter
Must have been an update to srl then I suppose. Will have a look at it later.
What are you using the script for btw?

Do you mean the production screen or the progress screen?

Either way it shouldn't close the progress screen anymore next update. Please not that the progress screen doesn't have to be enabled for this script to work.

@Clutch
When you test it, can you see if you are able to get this bug reproduced?
And thanks! Yes, it was recent :)


I'll attempt but to be more specific on this what line did you remove from the code? @Lobster;

Lobster

2015-05-27 23:18:29

I removed:
procedure findNormalrandoms();
begin
claimTicket();
if (not bankScreen.isOpen()) then
closepopup();
exitTreasure();
tabBackpack.Open();
end;

and any reference to "findNormalrandoms();".

I was making pie shells, it was closing the progress screen.

Thomas

2015-05-28 02:14:03

From: Lobster
I removed:
procedure findNormalrandoms();
begin
claimTicket();
if (not bankScreen.isOpen()) then
closepopup();
exitTreasure();
tabBackpack.Open();
end;

and any reference to "findNormalrandoms();".

I was making pie shells, it was closing the progress screen.


You dont need the progress screen though. I have it fixed, will upload later.
Update has been uploaded, didn't test it though.

Thomas

2015-05-30 09:59:14

Can someone test the breaking system? I'm pretty sure it doesn't work currently because I forgot to start the timer?

Should be fixed now, haven't tested the script in a while though..

Lobster

2015-06-09 23:02:19

Made about 40mil combining raw summer pies, awesome script!

Thomas

2015-06-11 05:05:40

From: Lobster
Made about 40mil combining raw summer pies, awesome script!



Have you found any bugs at all?

Lobster

2015-06-11 22:21:01

Other then the code I removed none so far. I haven't tried the breaking however, as I tend to babysit all my botting anyway.