SRL Archive - Help and Support

Holdmouse/releasemouse commands?


z92

2011-10-31 11:24:17

Hello,

Recently got back to RS after getting my main banned in the 2007 RWT holocaust. Great to see that you guys are still up and running strong! :fiery:

So! I want my 99 magic back. For that reason I am looking to recreate my simple alching script. It looked something like this like this:

wait(x+random(x))
holdmouse(x,y,)
wait(25+random(100))
releasemouse(x,y)

x,y being the coordinates of the high alch spell. I had also implemented a "how many to alch"-integer.

I am looking to get back into colour bot scripting, as I really enjoy it. Should holdmouse/releasemouse have been replaced by new and better commands, I am very eager to hear.

My real question is though; hold/releasemouse still work? I find it is the best way to make 100 % undetectable clicks. I got 99 magic with the script back then without a problem.

I do not care about adding antirandoms at this time as I will be 'babysitting' the script while running.

I did see other auto-alchers on the site, however I find that these are overcomplicated and hence a lot more ban-able. I like to keep it simple for undetectability. Fewer command lines = fewer commands to risk make you look like a macro imo.

Thank you very much in advance. :spot:

z92

2011-10-31 11:38:46

Just ran through old threads and found this picture lol


(Notice Sleepwalker and Scar in my process list! :D )

(Account was banned long ago, dont worry.)

weequ

2011-10-31 11:48:42

Welcome back.

Yes holdmouse and release mouse works and they are used in SRL's click commands. Your script looks fine if you don't want to randomize the clicking location at all. You probably shouldn't use x or y in your wait command though ;)
I warn you that alching long times without moving the mouse might get you banned. Maybe generate new x and y ever Random(50) clicks or something ;)

Edit: I think you got to move the mouse to the spot you want to use holdmouse at. Scar does this automatically but simba doesn't. Use movemouse(x, y) for instant movement or SRL command MMouse(x, y, randomx, randomy) for human-like movement.

BraK

2011-10-31 11:56:52

Better to use Mouse and MMoiuse in the SRL library to do your mouse commands. If your just looking for a quick alcher Check MSI they have one built in iirc.

Pretty sure all the mouse commands are in SRL/Core/Mouse.scar

z92

2011-11-03 10:27:58

Thanks for the fast replies guys! :)

I wrote the script, but something seems to be wrong. I decided to "chop" the parts of SRL I needed, since I could not make SCAR include it. (Not using Simba for this script, SCAR was easyer for me.)

The mouse functions seem to work - the only problem being that the mouse does not stay in the exact same spot. It seems to move a few pixels when clicking. This is very un-human. If I were to alch legit, I would place my mouse on the spot, lift the mouse and begin clicking. Hence the mouse would not move as it would be in mid air (If that makes any sence.)

I havent been able to figure out why the functions want to move the mouse - they seem so simple! I hope you guys could help me out.

BTW, I am recreating the script that got me 99 on my main, so I trust it will probably not get me banned although it may look almost too simple.

Thank you in advance :)



program Alch;
var
x, y, antal: Integer;

function MouseAction(left: boolean): {$ifdef simba} integer; {$else} boolean; {$endif}
begin
{$ifdef Simba}
if left then
result := mouse_left
else
result := mouse_right;
{$else}
result := left;
{$endif}
end;

procedure ClickMouse2(left : boolean);
var
a,b,c : integer;
begin
GetMousePos(b, c);
HoldMouse(b, c, mouseaction(left));
repeat
Wait(20 + Random(30));
a := a + 1;
until (a > 4);
GetMousePos(b, c);
ReleaseMouse(b, c, mouseaction(left));
Wait(50+Random(50));
end;

begin
wait(10000) //10 sec delay to allow the mouse to be moved to alch icon.
repeat
begin
Wait(1+random(10))
Wait(500 + Random(1000));
Wait(1+random(10))
ClickMouse2(true);
wait(1+random(10))
Wait(500 + Random(1000));

end;
until(antal > 10) //Number of alchs to do
end.

Home

2011-11-03 10:39:20

You could just use some alcher off from SRL Scripts section. And it doesn't move mouse for me. Stays in same spot :S

(Tested with paint)

~Home

z92

2011-11-03 11:11:08

From: Home
You could just use some alcher off from SRL Scripts section. And it doesn't move mouse for me. Stays in same spot :S

(Tested with paint)

~Home


Thank you! I am going to try with another labtop.

I have had a look at the MSI Alch-thread, but I havent been able to find a download link anywhere in the thread.

I am however unsure if I would even want to use such an advanced script as the MSI alcher - no effective human switches to inventory every 50 alchs and whatever that script is supposed to do for antiban.


EDIT: Tested in paint on other labtop. It seems to move 1 pixel upwards at a time, slowly drawing a verital line. I am going to try with Simba, since it must be my SCAR messing around.

2nd EDIT: Works perfectly with Simba. Not so great with SCAR 3.12C (outdated scar). Wierd.

Thank you all again. Topic can be closed :)

Wizzup?

2011-11-03 13:15:25

Useful link: http://docs.villavu.com/simba

Everything that is listed in the Script Reference should just work. Also, SRL will drop support for SCAR completely really soon, so I suggest you familiarize yourself with Simba. :) If you run into any issues, let us know.

z92

2011-11-10 08:26:11

Great link Wizzup. Thanks =)

I have been using Simba recently, and I have had great success with the program. Then again, what would you expect from something based on scar. :) <3

I have run into one small problem, though. Since there is no Soulwars banker, I have been attempting to make a simple one based on the idea that the camera angle/view seems to be 'almost' stable nowadays. This is my idea in script:

procedure bank;
begin
repeat
mmouse(371, 228,40,65);
wait(250+random(250))
until(FindColorTolerance(x, y, 14145538, 42, 4, 51, 12))
begin
ClickMouse2(True);
end;

The script is supposed to move the mouse to within the "boundaries" of where I expect the chest to be placed in the screen-view. This seems to be quite consistent when clicking the compass to have it face North.

Now, the mouse should move to the spot (+ randomness) and check for the cyan "bank chest"-colour. If found, it should click the spot that triggered the 'bank' text (the spot the mmouse took us to) this should prevent simba from clicking the "rewards"-NPC accidently, since this guy has yellow text.

This method is much like the "good old" 'find bank by circling mouse'-function that got a lot of people banned. I do however feel confident that simba would hit the chest most of the time, hence removing the need to "relocate" the mouse very often.

I keep getting an error when running my script. This bugs me as although it's very simple, I cant figure out what my mistake is.

Hope my post made sense. Thank you for your time :)

weequ

2011-11-10 09:07:28

Fixed your standards. Maybe you can see the error now?
  procedure bank;
begin
repeat
mmouse(371, 228,40,65);
wait(250+random(250));
until(FindColorTolerance(x, y, 14145538, 42, 4, 51, 12))
begin
ClickMouse2(True);
end;
(There is an end; missing or you could just remove begin after until because it's unnecessary)

Edit oh and you need to add x and y variables and TOLERANCE to FindColorTolerance function.

procedure bank;
var
x, y: Integer;
begin
repeat
mmouse(371, 228,40,65);
wait(250+random(250));
until(FindColorTolerance(x, y, 14145538, 42, 4, 51, 12, TOLERANCE HERE))
ClickMouse2(True);
end;
I hope that compiles.

z92

2011-12-07 09:02:47

Thank you very much. I have recently used "and/or/if" statements and findcolortolerance with great success. I had a few scripts be able to run a full 6 hours using only these simple functions of the program. Cant wait to see what miracles can be made using more features. :)

I have been looking at the link Wizzup posted, however I have been unable to find out about bank commands. I have been trying to make a maple log fletcher, but this is hard and probably very unsafe using findcolor.

The part that I find hard is the withrawing logs part (since the 'right click' interface will move according to the location of the right click, hence being very random). After going through some of the SRL files it seems there are several in-built functions for this, so I will have to play around with those :)