|
Post by xpdite on Aug 18, 2019 13:07:43 GMT
Hi I am not sure if it is possible or not but I have not had any luck trying to get this to work I have been playing with MMM to reduce some of the grinding in a game I am playing. I am looking for a way to have MMM click on a picture (Basically a ship (red ones, not green or blue)) on the screen and select the attack button when it pops. Rinse and repeat 100 times. I have been unable to find a way to do this. Is this even possible? I have created a macro for some of the things I do on the screen that are stationary and it works well. I think the macro I created can be improved a lot as it is not very dynamic. What is the best way to learn this type of programing. I really enjoyed creating the few macro's that I have but would like them to evolve.
|
|
|
Post by Steve on Aug 19, 2019 7:45:31 GMT
An idea would be to have MMM detect the color of the ship using the pixel color condition (https://www.turnssoft.com/conditions.html#pixelcolor). The hard part Im guessing is going to be detecting the ships, i'm assuming they are not in the same place every time and are flying randomaly around the screen. It might be possible, depending on how deep down the rabbit hole you want to go. It would be something like this pseudo code: 1 | FOR | I | = | 1 TO 1000 | NEXT 2 | IF | PIXEL COLOR | Color [R=145, G=228, B=247]::At Location [X:942 Y:536] | IS NOT THE SAME | CONTINUE 3 | 300 | 300 | 10 | LEFT CLICK 4 | FOR | NEXT Best way to learn is to check out the examples in this forum. There is plenty of code here to reference. The search box function with this forum works pretty well. Start here ( minimousemacro.proboards.com/board/3/help?q=.gif) for some live examples. Check out the condition page for examples of conditions www.turnssoft.com/conditions.html. There are some video references here too www.turnssoft.com/mmmyoutube.html
|
|
|
Post by zeak on Aug 19, 2019 20:30:35 GMT
xpdite, would you be able to upload a gif of the ships/planets moving (30 seconds or so). I have an Idea but need to see how you interact with the objects on screen.
|
|
|
Post by xpdite on Aug 19, 2019 23:48:37 GMT
xpdite , would you be able to upload a gif of the ships/planets moving (30 seconds or so). I have an Idea but need to see how you interact with the objects on screen. Not sure if this will work. Made an animated gif of the screen They are random on the screen and fly in a straight line. at some point the will turn and head a different direction
|
|
|
Post by zeak on Aug 20, 2019 0:06:31 GMT
Is this game like VEGA Conflict by any chance?
can you show me what happens when you click on a ship or miss click?
|
|
|
Post by zeak on Aug 20, 2019 2:13:44 GMT
This is the only way I could think of doing this but it is extremely slow. This does a line of pixels at a time, took me about 5 minutes to scan the entire screen. If you can narrow down your Start and end points then it would be a lot quicker.
* | Loop Amount 1 | RUN ACTION | INPUT BOX | Please enter number of times to repeat::Loop Count::INTEGER 2 | IF | INTEGER VARIABLE | %INTEGER% | IS | 0 | GOTO MACRO LINE | Loop Amount * | Screen Width (X) End Point <- Edit to suit your screen 3 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER1%::1365 * | Screen Hight (Y) End Point <- Edit to suit your screen 4 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER2%::760 * | Starting Points * | (X) Start Point <- Edit to suit your screen 5 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER3%::10 * | (Y) Start Point <- Edit to suit your screen 6 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER4%::10 * | Step Amount <- Edit to suit your screen 7 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER5%::10 * | Running Variable 8 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER6%::%INTEGER3% * | Screen search for Red Dot 9 | IF | PIXEL COLOR | Color [R=202, G=102, B=102]::At Location [X:%INTEGER6% Y:%INTEGER4%] | IS THE SAME | GOTO MACRO LINE | Colour Found * | 10 | %INTEGER6% | %INTEGER4% | 1 | Mouse Movement 11 | IF | INTEGER VARIABLE | %INTEGER6% | GREATER THAN EQUAL TO | %INTEGER1% | GOTO MACRO LINE | Next Line 12 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER6%::+%INTEGER5% 13 | RUN ACTION | GOTO MACRO LINE | Screen search for Red Dot * | Next Line 14 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER6%::%INTEGER3% 15 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER4%::+%INTEGER5% 16 | RUN ACTION | GOTO MACRO LINE | Screen search for Red Dot * | Colour Found * | ## Put actions you would like to take below here ## 17 | %INTEGER6% | %INTEGER4% | 1000 | Left Click * | ## Put actions you would like to above here ## 18 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER%::-1 19 | IF | INTEGER VARIABLE | %INTEGER% | IS | 0 | STOP 20 | RUN ACTION | GOTO MACRO LINE | Screen search for Red Dot The only other way this could be done is if Steve can get the pixel color in PIXEL RANGE function working.
|
|
|
Post by xpdite on Aug 20, 2019 22:35:47 GMT
Is this game like VEGA Conflict by any chance? can you show me what happens when you click on a ship or miss click? Actually it is Star Trek Fleet Command (Android Game) on Blue Stacks. Tried to get a screen capture but I cannot get it small enough to post
|
|
|
Post by zeak on Aug 20, 2019 23:25:15 GMT
|
|
|
Post by xpdite on Aug 21, 2019 0:20:59 GMT
imgur.com/a/1tQ30PaLeft click red ship, window pops up, click attack. Windows closes and ship is attacked automatically. Rinse and repeat I am not sure it is something that MMM can do. Someone suggested the Macrorecorder may be able to handle it.
|
|