SRL Archive - General Botting Help

Help with simple script.


TKUAT

2014-09-24 08:54:46

Hello, I want to make a simple script for a game that will buy things from AH. Ideally I would like to develop a script that does everything automatically. This is to say, if price is below 1g 35s then buy if above then switch item, things like that.

FOR NOW, all I want is as I press key then initiate sequence of moving mouse to x,y then click + move to x,y and click again

PROBLEM: Always gives me some kind of weird errors and I don't know why. MMouse isn't working, nor does everything else. I have also tried to implement random waiting Wait(Random(1000)), it didn't work.

SCRIPT:

program ArcheageAuctionHouse;
{.include SRL/SRL.simba}

begin
if isKeyDown(116)
then ClickMouse(1349, 845, 36, 10, True);
Wait(1000);
Clickmouse(922, 602, 36, 10, True);
end;
end.

ERROR: Exception in Script: Too many parameters found at line 6, column 36 (Line 6 is then ClickMouse(1349, 845, 36, 10, True); )

Please help =(

EDIT: After doing so, it worked but I still don't understand how can I add random positioning and smooth mouse hover over location + click.

program ArcheageAuctionHouse;
{.include SRL/SRL.simba}

begin
if isKeyDown(116)
then ClickMouse(1349, 845, mouse_Left);
Wait(Random(1000));
Clickmouse(922, 602, mouse_Left);
end.

Kyle

2014-09-24 09:34:51

From: TKUAT
…


Well I don't have any idea of what game this is for or even exactly what you want to accomplish. This will constantly be waiting for you to push down F5, will move mouse to the location, wait, then click, then repeat once more to another location.


program ArcheageAuctionHouse;
{.include SRL/SRL.simba}

begin
SetupSrl;
repeat
if isKeyDown(116) then
begin
mMouse(369, 118,2,2);
wait(500);
clickMouse2(MOUSE_LEFT);
mMouse(390, 18,2,2);
wait(500);
clickMouse2(MOUSE_LEFT);
end;
wait(100);
until(false);
end.

Maybe reply back with a better description of what you are planning on doing so we could better help you. Explain it as if we haven't played that game before

TKUAT

2014-09-24 09:39:14

Thanks a lot, but MMouse doesn't seem to work for me. I get this error Exception in Script: Unknown declaration "MMouse" at line 7, column 10.

So, there is an auction house in this game, it is a mmorpg like World of Warcraft. There is auction house where items are listed. What I want to do is make a script that starts when I press F5 and click on button "Buy it now" at location x,y and then click on "Confirm" button that will pop up.

Kyle

2014-09-24 09:59:51

From: TKUAT
Thanks a lot, but MMouse doesn't seem to work for me. I get this error Exception in Script: Unknown declaration "MMouse" at line 7, column 10.

So, there is an auction house in this game, it is a mmorpg like World of Warcraft. There is auction house where items are listed. What I want to do is make a script that starts when I press F5 and click on button "Buy it now" at location x,y and then click on "Confirm" button that will pop up.


Ok if that's the case, then what I wrote will do that. For some reason you have the SRL include but it doesn't have the mouse functions in it, so I would just re download it and then it should work. If not this will work without it:


program ArcheageAuctionHouse;

begin
repeat
if isKeyDown(116) then
begin
moveMouse(369, 118);
Wait(500);
clickMouse(369, 118, MOUSE_LEFT);
wait(500);
moveMouse(343, 16);
wait(500);
clickMouse(369, 118, MOUSE_LEFT);
end;
until(false);
end.

Do note however, if you want realistic mouse movements your going to want to use mmouse from srl. Movemouse is a very fast non realistic function.

TKUAT

2014-09-24 18:42:25

Thanks a lot that's exactly what I want!

Would you mind helping me with SRL, I really want to make all MMouse and other functions to work.

So far this is what I did:
1.Downloaded and Installed Simba.
2.Checked for Updates.
3.Enabled extensions Extension.sex and SRL.sex.


Is it possible that there is a new way to reference to {.include SRL/SRL.simba}? Like in a newer version.

Kyle

2014-09-24 20:49:25

From: TKUAT
Thanks a lot that's exactly what I want!

Would you mind helping me with SRL, I really want to make all MMouse and other functions to work.

So far this is what I did:
1.Downloaded and Installed Simba.
2.Checked for Updates.
3.Enabled extensions Extension.sex and SRL.sex.


Is it possible that there is a new way to reference to {.include SRL/SRL.simba}? Like in a newer version.


No, that should be right.

TKUAT

2014-09-24 22:38:00

I found the problem. So the problem is that it is SRL-6 and Mmouse function does not exist anymore. I would post a link but I need more posts to do so.

TKUAT

2014-09-25 07:59:06

Exception in Script: Runtime error: "Unknown Clicktype (7) passed." at line 310, column 12 in file "C:\Program Files\Simba\Includes\srl-6\lib\core\mouse.simba"
The following bitmaps were not freed: [Minimap Mask]

Everything seems right but now I get this error: Exception in Script: Runtime error: "Unknown Clicktype (7) passed." at line 310, column 12 in file "C:\Program Files\Simba\Includes\srl-6\lib\core\mouse.simba"
The following bitmaps were not freed: [Minimap Mask]

Script:
program ArcheageAH;
{$i srl-6/srl.simba}

Begin

mouseSpeed := 50;

Repeat
if isKeyDown(116) then
begin
mouse(1349, 845, 6, 4, MOUSE_HUMAN);
Clickmouse(1349, 845, MOUSE_LEFT);
wait(Random(1000));
mouse(920, 601, 6, 4, MOUSE_HUMAN);
Clickmouse(920, 601,MOUSE_LEFT);
end;
until(false);
End.

What happens is that script runs and then when I press F5 the mouse moves to a specified location and then script crashes.

Justin

2014-09-25 08:46:40

The SRL-6 include has been developed for RuneScape 3. Most, if not all functions will fail as the SetupSRL function has not been called and therefore not setup.

This is not tested but you're more then welcome to give it a shot.


program ArcheageAH;
var x, y : Integer;
begin
repeat
if isKeyDown(116) then
begin
MoveMouse(1349 + randomRange(-4,4), 845 + randomRange(-4,4));
GetMousePos(x,y);
ClickMouse(x, y, MOUSE_LEFT);
Wait(Random(1000));
MoveMouse(920 + randomRange(-4,4), 601 + randomRange(-4,4));
GetMousePos(x,y);
ClickMouse(x, y, MOUSE_LEFT);
end;
until (false);
end.

If the game has bot-detection you might want to think twice before using this script as the mouse will just 'jump' to the location

TKUAT

2014-09-25 11:53:27

Thank you so much Justin, I have though about bot-detection system this is why my script looks like this:
program ArcheageAH;
{$i srl-6/srl.simba}

Begin

mouseSpeed := 97;

Repeat
if isKeyDown(116) then
begin
mouse(point(1349 + randomRange(-4,4), 845 + randomRange(-4,4)), mouse_left, MOUSE_HUMAN);
mouse(point(920 + randomRange(-5,5), 601 + randomRange(-5,5)), mouse_Left, MOUSE_HUMAN);
end;
until(false);
End.

The randomRange was added thanks to you :D

Incurable

2014-09-25 13:19:03

From: TKUAT
Thank you so much Justin, I have though about bot-detection system this is why my script looks like this:
program ArcheageAH;
{$i srl-6/srl.simba}

Begin

mouseSpeed := 97;

Repeat
if isKeyDown(116) then
begin
mouse(point(1349 + randomRange(-4,4), 845 + randomRange(-4,4)), mouse_left, MOUSE_HUMAN);
mouse(point(920 + randomRange(-5,5), 601 + randomRange(-5,5)), mouse_Left, MOUSE_HUMAN);
end;
until(false);
End.

The randomRange was added thanks to you :D


A mouseSpeed of 97 is insanely high, it will instantly move to any coordinates. The default is 20, and I really wouldn't go above 25 if you want it to look human.