SRL Archive - OSR Help

Simple alcher script


scubajesus

2010-06-13 05:02:44

Well alright, thank you for your help everyone, mostly i luffs yeww. After bitmap not working, and findcolor making the mouse crawl at 1 pixel per second, I went lazy and told it coordinates + random small pixel differences. I periodically pause it to quick respond and quick questions, and I check to make take control in case of random. So I don't think anyone will want to mooch this, as I didn't add anti-randoms or much special for anti-ban, here it is though. No spells hidden, Sort by combat first, 800x600 window, alch item one to the right and one up from the lower left inventory square.


program Alch;
{.include SRL/SRL/Misc/SMART.scar}
{.include SRL/SRL.scar}

const
SmartWorld = 24;
SmartMembers = False;
SmartSigned = True;
SmartSuperDetail = False;

var
a, b, x, y: integer;

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

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
end;

procedure Alchemize;
begin
begin
Wait(500 + Random(100));
MMouse(745, 187, 12, 15);
GetMousePos(a, b);
Wait(100 + Random(100));
Mouse(a, b, 0, 0, True);
end;
repeat
begin
MMouse(624, 424, 5, 5);
GetMousePos(a, b);
Wait(100 + Random(100));
Mouse(a, b, 0, 0, True);
Wait(1000 + Random(1000));
MMouse(620, 409, 10, 10);
GetMousePos(a, b);
Wait(100 + Random(100));
Mouse(a, b, 0, 0, True);
Wait(1000 + Random(1000));
end;
until(False);
end;

begin
Smart_Signed := SmartSigned;
Smart_SuperDetail := SmartSuperDetail;
Smart_Server := SmartWorld;
Smart_Members := SmartMembers;
SetupSRL;
DeclarePlayers;
LoginPlayer;
Alchemize;
end.

i luffs yeww

2010-06-13 05:15:41


program Alch;
{.include SRL/SRL/Misc/SMART.scar}
{.include SRL/SRL.scar}

const
SmartWorld = 24; // Which World/Server do you want to use?
SmartMembers = True; // Is it a Members World?
SmartSigned = True; // Signed/UnSigned Client?
SmartSuperDetail = True;

var
AlchD, YewD, x, y: integer;

procedure LoadBMPs;
begin
AlchD := BitmapFromString(19, 18, 'beNpjYKAD4OPlZWZmJl69sIh' +
'g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XHNdxrW8fFYGyzQpCto1gB8H9d+PZvPP' +
'ca9ZuTYvoeYk4A79e0iln1Jt2jRdreWcQk5KUhS/NLKvlbE4Fh8fh' +
'w78+oPAi+NN/bZLG8YhGduCdA3cZ8XWuQvcufjcTeLtTVxWZjaiMV' +
'ipEY8fxtJp6Mv+9OEb3ZZjEMDbbPYZbpQ7jDIruM+KbQuyMA5ZkQa' +
'hm1Q01d7JZufCsTx25Dgex+MWf9qb+Lg78bSpnI7osO9aUjgWZOAO' +
'4YfxDRhnTrJsEC5P9cFLtQnuFnE4KYnROkVMclI6ZP5536CRNoZjX' +
'zfh0ADYXcahGdNUHzktgjADq/1tDVwmM7vnUYKAn2CcEJ2ECLVYEM' +
'bB12VSwMcAxH6Oe1dwagYDa+ifIjB4kS2bprmupOweT9lF62jlfzu' +
'cVWEXeMVdjn9VHU4P8B3X0LZTCwjgKwYRFLDcJkXINyKoKW3gocqS' +
'uJBf3y9uCOOQJCA7Tm3QPvjhta6wgHXzOhvugal9ZlXAqg5Y+6GGE' +
'Y42dVhnvY8a+BoyKLF69BfR/ijOZBjttMxgZgLzU+oNs+r0kBiUN6' +
'J/FdZZXcnloP+uHyBnRzc=');
end;

procedure UseBitmaps;
var
a, b: Integer;
begin
repeat
if(FindBitmap(AlchD, x, y)) then
begin
MMouse(x, y, 2, 2);
GetMousePos(a, b);
Wait(100 + Random(100));
Mouse(a, b, 0, 0, True);
end;
if(FindBitmap(YewD, x, y)) then
begin
MMouse(x, y, 2, 2);
GetMousePos(a, b);
Wait(100 + Random(100));
Mouse(a, b, 0, 0, True);
end;
until(False);
end;

procedure ScriptTerminate;
begin
FreeBitmap(AlchD);
FreeBitmap(YewD);
end;

begin
Smart_Signed := SmartSigned;
Smart_SuperDetail := SmartSuperDetail;
Smart_Server := SmartWorld;
Smart_Members := SmartMembers;
SetupSRL;
LoadBMPs;
UseBitmaps;
end.

YoHoJo

2010-06-13 05:44:31

Using clickmouse/movemousesmooth etc (any mouse functions that aren't in SRL) will get you banned. I hope you didn't use the script too much, those functions are VERY 'robotic' and Jagex can easily detect them, posted above is your script edited using the SRL mouse functions, use those instead, otherwise your scripts will be very unsafe.

i luffs yeww

2010-06-13 05:47:26

^ :p I guess you didn't look too closely. It wouldn't even compile due to how he had it set up, so he hasn't ran it at all, as far as I know.

Also, "Line 1: [Error] (1:1): Semicolon (';') expected in script." He said he was having an error running it, which I fixed.

YoHoJo

2010-06-13 05:52:37

Just saw that it didn't have SRL mouse functions, and that you fixed without an explanation so I explained, yeah I didn't read first post at all.

scubajesus

2010-06-13 05:56:11

I don't know what the SRL mouse functions are, and can't find it around here on the forums or on the various wiki's. Any chance you can point me in the right direction?

Also, I haven't been able to get any SMART scripts to actually log in, it just loads up and waits at the screen.

i luffs yeww

2010-06-13 05:59:50

^ Check in Mouse.scar in the include! :D

YoHoJo

2010-06-13 06:00:09

Just go and read a bunch of basic beginner SRL tutorials on the forum.
The basic SRL mouse functions are MMoue and Mouse.

As for SMART.
Open runescape in browser and set it to safe mode (I think its called that now) on runescape settings. Then try running a SMART script again.

scubajesus

2010-06-13 06:13:34

Still having difficulties with the log in after changing to safe mode (yep, safe mode), tried with someone else's script here too. It waits at the select free/members screen. Yes, I replaced my name pass and nick correctly in the actual scripts.

program Alch;
{.include SRL/SRL/Misc/SMART.scar}
{.include SRL/SRL.scar}

const
SmartWorld = 24;
SmartMembers = True;
SmartSigned = True;
SmartSuperDetail = False;

var
AlchD, YewD, x, y: integer;

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

Players[0].Name := 'name';
Players[0].Pass := 'pass';
Players[0].Nick := 'nick';
Players[0].Active := True;
end;

procedure LoadBMPs;
begin
AlchD := BitmapFromString(19, 18, 'beNpjYKAD4OPlZWZmJl69sIh' +
'gXXPR0ZOnSssqSbXL1z1w3qI5ZDjS18P/zPmrZGj0cPY8euIMGRrL' +
'8qsuXL7u6mBHtA5GI22rExevvP309eaLD3Pv/F+3dA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78+oPAi+NN/bZLG8YhGduCdA3cZ8XWuQvcufjcTeLtTVxWZjaiMV' +
'ipEY8fxtJp6Mv+9OEb3ZZjEMDbbPYZbpQ7jDIruM+KbQuyMA5ZkQa' +
'hm1Q01d7JZufCsTx25Dgex+MWf9qb+Lg78bSpnI7osO9aUjgWZOAO' +
'4YfxDRhnTrJsEC5P9cFLtQnuFnE4KYnROkVMclI6ZP5536CRNoZjX' +
'zfh0ADYXcahGdNUHzktgjADq/1tDVwmM7vnUYKAn2CcEJ2ECLVYEM' +
'bB12VSwMcAxH6Oe1dwagYDa+ifIjB4kS2bprmupOweT9lF62jlfzu' +
'cVWEXeMVdjn9VHU4P8B3X0LZTCwjgKwYRFLDcJkXINyKoKW3gocqS' +
'uJBf3y9uCOOQJCA7Tm3QPvjhta6wgHXzOhvugal9ZlXAqg5Y+6GGE' +
'Y42dVhnvY8a+BoyKLF69BfR/ijOZBjttMxgZgLzU+oNs+r0kBiUN6' +
'J/FdZZXcnloP+uHyBnRzc=');
end;

procedure UseBitmaps;
var
a, b: Integer;
begin
repeat
if(FindBitmap(AlchD, x, y)) then
begin
MMouse(x, y, 2, 2);
GetMousePos(a, b);
Wait(100 + Random(100));
Mouse(a, b, 0, 0, True);
end;
if(FindBitmap(YewD, x, y)) then
begin
MMouse(x, y, 2, 2);
GetMousePos(a, b);
Wait(100 + Random(100));
Mouse(a, b, 0, 0, True);
end;
until(False);
end;

procedure ScriptTerminate;
begin
FreeBitmap(AlchD);
FreeBitmap(YewD);
end;

begin
Smart_Signed := SmartSigned;
Smart_SuperDetail := SmartSuperDetail;
Smart_Server := SmartWorld;
Smart_Members := SmartMembers;
SetupSRL;
LoadBMPs;
UseBitmaps;
DeclarePlayers;
LoginPlayer;
end.

i luffs yeww

2010-06-13 06:19:16

You have the order wrong. Try this..


{.include SRL/SRL/misc/SMART.scar}
{.include SRL/SRL.scar}

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

Players[0].Name := 'name';
Players[0].Pass := 'pass';
Players[0].Nick := 'nick';
Players[0].Active := True;
end;

begin
SMART_Server := 61;
SMART_Members := False;
SMART_SuperDetail := False;
SMART_Signed := True;
SetupSRL;
DeclarePlayers;
LoginPlayer;
end.

Also, you live about three hours away from me 'o.O

scubajesus

2010-06-13 06:25:31

Tried that in my script, didn't work. So I tried it in a new script by itself, still sits there.

Also tried using POMS Essence miner, it sits there at the choose game mode, free or members screen, register/login. Graphics is set to safe mode.

Wish this worked on the spot lol. Going to sleep, will check forum tomorrow.

Bad Boy JH

2010-06-13 08:48:34

Check if you are using the Dev repository and that its up to date.
Then check you have the most recent Scar, 3.23, which is the Pre-release (I think its still pre-release).

edit: if you haevn't posted the whole script, can you please do so. The problem may lie in other areas, and the line 1 error means it has absolutely no idea, for example one I found while searching on the forums was because he used x+10 as a VARIABLE in a function, which is incorrect.

i luffs yeww

2010-06-13 09:14:19

^ I fixed the line one error, I think.

scubajesus

2010-06-13 14:28:50

Scar is at 3.23, and technically 3.25 is latest, but unstable alpha.
SRL updated with SVN to http://www.villavu.com/repositories/srl-opendev
i luffs yeww fixed the line one error
Entirety of script is in post #9 (post 717141)

i luffs yeww

2010-06-13 15:05:33

The main loop of the ninth post is out of order. Change it to..


begin
Smart_Signed := SmartSigned;
Smart_SuperDetail := SmartSuperDetail;
Smart_Server := SmartWorld;
Smart_Members := SmartMembers;
SetupSRL;
DeclarePlayers;
LoginPlayer;
LoadBMPs;
UseBitmaps;
end.

scubajesus

2010-06-13 15:26:20

Changed script as i luffs yeww said, here is the entirety of the script as of now. The script continues to sit there at login screen, as it does in Simba and SCAR using POMS and other scripts. SVN updated programs, SVN updated SRL, copied plugins.


program Alch;
{.include SRL/SRL/Misc/SMART.scar}
{.include SRL/SRL.scar}

const
SmartWorld = 24;
SmartMembers = True;
SmartSigned = True;
SmartSuperDetail = False;

var
AlchD, YewD, x, y: integer;

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

Players[0].Name := 'name';
Players[0].Pass := 'pass';
Players[0].Nick := 'nick';
Players[0].Active := True;
end;

procedure LoadBMPs;
begin
AlchD := BitmapFromString(19, 18, 'beNpjYKAD4OPlZWZmJl69sIh' +
'gXXPR0ZOnSssqSbXL1z1w3qI5ZDjS18P/zPmrZGj0cPY8euIMGRrL' +
'8qsuXL7u6mBHtA5GI22rExevvP309eaLD3Pv/F+3dAOaimAvXyDJz' +
'sDABNHAwMACRIwMOoaa5UmFbYV1i9omH/1/r//BfWkzhK6U+LS3P9' +
'/cPOCwuV/QVoxh2Zrd9466Hlks56/B0NA86+Jut20zJIo9GbTSGAK' +
'vnjOMERbhFQHq0lLVePPpydfzSk/3c2S5M1TkFP1/F/1sJ/P0WkZv' +
'E9f/f5te7GDcMot/YhlLoChD5PL7KtrCMpLSQI0KchqvbzXc2c29v' +
'Jc72pqhIVHr0xUFILs4jDHMWPLvI721k3jaU9g681k85RjknK0sTE' +
'2YmEAeUlbU2bXce14rw4RCtnRPRn8LxrVT2foLWRoTWfXEGTbP5eg' +
'tYJ5exj6ngcVGjiGvOF1bUxviQS4ubn9H595quwQvhvQAtmhv355q' +
'z2gXhswghlg///YyvyhXhsp4hsY8p+KsRFtLS7RQzUtK9XD3DAsKc' +
'ra2jgkM8fTw9vH2jvT393J09fPx9/b0DgkOZWVlYxiKAACx4pWi');

YewD := BitmapFromString(21, 17, 'beNrFkulTUlEYxg/omKiT6+CG' +
'uFaSTTNOJrkQuY3hlmOWWwqXLS6giOMSWDridUPxCldkExAocVwmw' +
'0y/1Ew1OvVf9SpWztSnvvTM+fDOmfM7z/s+5yDEzmRuWgfsC7Ledt' +
'6tomIt3izg03JYsS+HunFRk3NJbiZEdqPMvYyvmxSeFeVb78jx1vj' +
'peyIvJx0hlM1iBm0aC4G5TbjwCS8nJ7+qLFXZE/OAS2+pQi31FY5F' +
'ud0oDeM+i+qdb+Qo+BsHd8+yYnVOYiHEcEDaXZuVlRvDYERHocn+q' +
'4nxSR4S/+Xut6hDvtHLOCgzLXlpspeakZBTwj33sPxZdUFBAT0i9k' +
'Zu5CsVo+Y+d3d9aNuh9a4oA5T6IDAG+MlPfBhv2bIPWOel1IzYPC3' +
'yksp97zDWUZWaloHQlTF5XHNdxrW8fFYGyzQpCto1gB8H9d+PZvPP' +
'ca9ZuTYvoeYk4A79e0iln1Jt2jRdreWcQk5KUhS/NLKvlbE4Fh8fh' +
'w78+oPAi+NN/bZLG8YhGduCdA3cZ8XWuQvcufjcTeLtTVxWZjaiMV' +
'ipEY8fxtJp6Mv+9OEb3ZZjEMDbbPYZbpQ7jDIruM+KbQuyMA5ZkQa' +
'hm1Q01d7JZufCsTx25Dgex+MWf9qb+Lg78bSpnI7osO9aUjgWZOAO' +
'4YfxDRhnTrJsEC5P9cFLtQnuFnE4KYnROkVMclI6ZP5536CRNoZjX' +
'zfh0ADYXcahGdNUHzktgjADq/1tDVwmM7vnUYKAn2CcEJ2ECLVYEM' +
'bB12VSwMcAxH6Oe1dwagYDa+ifIjB4kS2bprmupOweT9lF62jlfzu' +
'cVWEXeMVdjn9VHU4P8B3X0LZTCwjgKwYRFLDcJkXINyKoKW3gocqS' +
'uJBf3y9uCOOQJCA7Tm3QPvjhta6wgHXzOhvugal9ZlXAqg5Y+6GGE' +
'Y42dVhnvY8a+BoyKLF69BfR/ijOZBjttMxgZgLzU+oNs+r0kBiUN6' +
'J/FdZZXcnloP+uHyBnRzc=');
end;

procedure UseBitmaps;
var
a, b: Integer;
begin
repeat
if(FindBitmap(AlchD, x, y)) then
begin
MMouse(x, y, 2, 2);
GetMousePos(a, b);
Wait(100 + Random(100));
Mouse(a, b, 0, 0, True);
end;
if(FindBitmap(YewD, x, y)) then
begin
MMouse(x, y, 2, 2);
GetMousePos(a, b);
Wait(100 + Random(100));
Mouse(a, b, 0, 0, True);
end;
until(False);
end;

procedure ScriptTerminate;
begin
FreeBitmap(AlchD);
FreeBitmap(YewD);
end;

begin
Smart_Signed := SmartSigned;
Smart_SuperDetail := SmartSuperDetail;
Smart_Server := SmartWorld;
Smart_Members := SmartMembers;
SetupSRL;
DeclarePlayers;
LoginPlayer;
LoadBMPs;
UseBitmaps;
end.

i luffs yeww

2010-06-13 15:38:21

Open up a browser, go to options. Does it look something like below?


Bad Boy JH

2010-06-14 05:45:00

Didn't we have a fix graphics at some point in the login function? what happened to that?
Try adding…

Login_SetGraphics(4);
before LoginPlayer,

When you ran your script before, did it say "welcome to runescape"?