SRL Archive - Reflection

qAlcher


tofurocks

2011-03-30 15:11:31

Competent alcher with semi-tested static alching option.

program qAlcher;
{$i srl/srl/misc/smart.scar}
{$i srl/srl.scar}

var i, ptx, pty: integer;

const
Alchs = 1749;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Nick := ''; // 3-4 lowercase letters from username; used for random event detection
Players[0].Active := True; // Set to true if you want to use Player 0
Players[0].Pin := ''; // Leave blank if the player doesn't have a bank pin

Smart_Server := 152;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
end;

procedure BoxAlch;
begin
for i := 0 to Alchs do
begin
FindNonInventoryRandoms;
MouseBox(563, 380, 582, 364, 1);
Wait(RandomRange(600, 1500));
end;
end;

procedure StaticAlch;
begin
ptx := Random(20)+560;
pty := Random(20)+360;
for i := 0 to Alchs do
begin
FindNonInventoryRandoms;
Mouse(ptx, pty, 0, 0, True);
Wait(RandomRange(600, 1500));
end;
end;

begin

ClearDebug;
SetupSRL;
DeclarePlayers;
LoginPlayer;

Wait(RandomRange(1000,2000));
SetAngle(true);
FindNormalRandoms;
Wait(RandomRange(100,500));
GameTab(28);
BoxAlch;

end.


Magic book setup:

HarryJames

2011-03-30 15:59:39

Just out of curiosity, why do you have Random checking, but calling it has a 1 in 50 chance?

tofurocks

2011-03-30 16:15:00

From: HarryJames
Just out of curiosity, why do you have Random checking, but calling it has a 1 in 50 chance?

FindNormalRandoms sets the current tab to inventory so if I wanted to call it every alch I would have to reset the tab every time.

HarryJames

2011-03-30 16:16:53

Ohh right, that's fair enough then. You could do with some anti ban too, I can give you mine if you'd like :)

tofurocks

2011-03-30 16:19:08

From: HarryJames
Ohh right, that's fair enough then. You could do with some anti ban too, I can give you mine if you'd like :)

Most people who alch by hand don't mouse their mouse off of the spell, I have always supported minimal anti-ban but thanks for the offer :)

HarryJames

2011-03-30 16:20:38

Would it still not to be a good thing to check Mage exp, rotate the camera a bit etc?

tofurocks

2011-03-30 19:25:34

From: HarryJames
Would it still not to be a good thing to check Mage exp, rotate the camera a bit etc?

Add it if you want, I intentionally excluded standard antiban because it does not mimic how I play.

Flight

2011-03-31 00:44:54

Well, I have quite a few suggestions, but let me throw this one your way: As a failsafe, why not use a MMouse first to the item you're alching (which alchemy spell ready to use) and make sure the UpText is, for example, "Cast" or whatever it is for hovering a alchemy spell over an item.

tofurocks

2011-03-31 00:49:02

From: Flight
Well, I have quite a few suggestions, but let me throw this one your way: As a failsafe, why not use a MMouse first to the item you're alching (which alchemy spell ready to use) and make sure the UpText is, for example, "Cast" or whatever it is for hovering a alchemy spell over an item.

But on the other hand, there is no feasible situation in which that would be necessary in SMART.

i luffs yeww

2011-03-31 00:51:53

From: tofurocks
But on the other hand, there is no feasible situation in which that would be necessary in SMART.


WHAT DOES THIS MEAN!? a

tofurocks

2011-03-31 00:56:47

From: i luffs yeww
WHAT DOES THIS MEAN!? a

UpText checks aren't necessary in an environment where the mouse never moves out of a certain range :sasmokin:

i luffs yeww

2011-03-31 00:59:03

I'd have to disagree.

tofurocks

2011-03-31 01:04:27

From: i luffs yeww
I'd have to disagree.

Make your case and if it's valid I'll add UpText failsafes :D

TomTuff

2011-03-31 02:32:41

FindNonInventoryRandoms :thumbsup:

tofurocks

2011-03-31 14:18:31

From: TomTuff
FindNonInventoryRandoms :thumbsup:

Thanks, added and made some other minor changes.

**BANNED The Man

2011-03-31 14:24:06

From: tofurocks
Make your case and if it's valid I'll add UpText failsafes :D


If your script doesn't click for some reason then tries to cast on the item but doesn't.
Iunno.

tofurocks

2011-03-31 15:59:23

From: Dynamite
If your script doesn't click for some reason then tries to cast on the item but doesn't.
Iunno.


Because of the simple nature of alching very little can go wrong, did about 4k alchs with this on my main with no problems.

Flight

2011-03-31 21:08:18

From: tofurocks
Make your case and if it's valid I'll add UpText failsafes :D


What happens if you loose connection and/or log out?

Also,
Wait(RandomRange(600, 1500));

^ What happens if you lag? That pretty much killed your Waiting, and because you don't have failsafes the script will think it already clicked on your alch spell, when actually it's still in the inventory tab.

tofurocks

2011-04-01 16:19:29

Go alch, it tab switches for you.
I would add login check but that should be a client feature.