Log in

View Full Version : MouseMove and MouseClicking in SMART



Gushers
12-29-2011, 12:09 AM
So please help, I'm trying to use MoveMouse and MouseClicking for a script to walk because SPS won't work since it's not in the map and I don't want to use DTM's ATM. It moves the mouse to the coords but it doesn't click, any help? Here's the code for the part of the script.
Procedure WalkToBankSimple;
Begin
MoveMouse(563, 66);
ClickMouse(563, 66, 1);
Wait(10000);
MoveMouse(604, 79);
ClickMouse(604, 79, 1);
Wait(7000);
End;

RISK
12-29-2011, 12:10 AM
MMouse();
Mouse();

Try those.

Gushers
12-29-2011, 12:19 AM
MMouse();
Mouse();

Try those.

Procedure WalkToBank;
Begin
MMouse(563, 66);
Mouse(563, 66, 1);
Wait(10000);
MMouse(604, 79);
Mouse(604, 79, 1);
Wait(7000);
End;

I get [Error] (75:23): Invalid number of parameters at line 74.. The line with MMouse.

RISK
12-29-2011, 12:21 AM
You forgot to add the other parameters. MMouse(0, 0, 5, 5);
The 5s are the randomness.

Gushers
12-29-2011, 12:24 AM
Okay thanks man, now MMouse does that also click or under it I still need ClickMouse(); or Mouse(); .. If so what does Mouse(); do?

RISK
12-29-2011, 12:25 AM
Mouse() can move to the position and click. :) MMouse just moves the mouse.

Nebula
12-29-2011, 12:27 AM
Mouse(x, y, x#, y#, true/false);

Will move the mouse to the coordinates specified by x and y, with a randomness of whatever you put in for x# y#. Then left click or right click depending on whether or not you choose true or false. True is left click, false is right click.

Example:

Mouse(100, 150, 5, 5,true);

Moves the mouse to (100,150) with a randomness of 5 on both the x and y axis. Then left clicks.

Gushers
12-29-2011, 12:28 AM
Gotta love this built in functions (: Here's what I got.. Tell me what to change for Mouse(); Cause I get the error, I know there's something missing.
MMouse(563, 66, 5, 5);
Mouse(563, 66, 1);

[Nathan]
12-29-2011, 12:31 AM
Gotta love this built in functions (: Here's what I got.. Tell me what to change for Mouse(); Cause I get the error, I know there's something missing.
MMouse(563, 66, 5, 5);
Mouse(563, 66, 1);
The answer has been posted by like 3 seperate people already...

First, you don't need both functions, mmouse moves the mouse, but so does mouse. Using them both together like that will actually cause the mouse to move to a spot, then move a new postion a few pixels away to click because of the randomness. That would be very obvious you are a bot.

What you need:



Mouse(x position, y position, x randomness, y randomness, true)

Fill your numbers in there are you are set.

Gushers
12-29-2011, 12:33 AM
;875163']The answer has been posted by like 3 seperate people already...

First, you don't need both functions, mmouse moves the mouse, but so does mouse. Using them both together like that will actually cause the mouse to move to a spot, then move a new postion a few pixels away to click because of the randomness. That would be very obvious you are a bot.

What you need:



Mouse(x position, y position, x randomness, y randomness, true)

Fill your numbers in there are you are set.

Alright thanks man, trying to create a new walking way since the place where I'm at isn't on the map.

Olly
12-31-2011, 01:55 AM
You could just you find colour in the minimap?

Sin
12-31-2011, 01:57 AM
The coordinates are different for everyone.
It all depends where your SMART window is.

RISK
12-31-2011, 02:01 AM
They aren't different for everyone, S1N. If you are using SMART, it will be the same coordinates no matter where the window is.

[Nathan]
12-31-2011, 02:04 AM
They aren't different for everyone, S1N. If you are using SMART, it will be the same coordinates no matter where the window is.
Your right but I don't think thats what he meant. I think he was trying to say that walking using coords on the minimap will not work very well because if a player is starting one tile off, or if the minimap is at a 1 degree angle difference, you will end up in a much different position.

Until you learn about DTMs (or SPS would work too), you probably don't want to make a script that involves walking on the minimap