SRL Archive - OSR Beginner Scripting Tutorials

Noob guide to using MMToMS


rj

2013-03-20 20:26:31

Hello, this is a tutorial on how to use MMToMS. You may be wondering what was MMToMS? MMToMS Stands for:

Mini map to main screen. It is a Function built into the SRL include to help you click objects on the main screen that are hard to find. I found a great example on the "Soulsplit" private server:


In order to exit this cave, you need to click the area inside of the red box, and you can appear in different places each time you show up in this cave, so using a mousebox would be impractical! No worries, the Function I am about to teach you will help you solve your problem and is VERY easy to use(Until it gets to be more advanced such as searching multiple points, I will write a tutorial on that later). First, you will want to find a good color to use on the minimap, I found the little red exit:

Next, you want to find the color and store it into variables:(Use the minimap constants depends on which include you are using, such as P07, or P06 or RS)

If  FindColorTolerance(X, Y, 228, SS_MMX1, SS_MMY1, SS_MMX2, SS_MMY2, 15) Then

Next, simply use the same variables you just stored them in, using the MMToMS Function

P07_MMToMSPoint(X, Y);
mmouse(x,y,1,1)
ClickMouse2(Mouse_Left);


Congratulations! It should have click the spot were you were supposed to exit:


Now this method.. is not that very accurate in most circumstances because there are usually a lot more colors on the minimap to confuse use, which leads me to the next part: Expanding the area it searches. This is actually very simple, just do the same thing as above storing were the point is in 2 variables, and then we can draw a box from that point, example:


The blue dots represent were you defined the boxed area to look for the color by subtracting from the Point's X and adding to the Y for the Upper right (hopefully you know basic graphing to know left = negitive X Up = Positive Y, Right = Positive X, Down = negive Y.
To give you a visual the code would look something like this:

FindColorTolerance(X, Y, COLOR, X-25, Y+25, X+25, Y-25, 15)



And your are finished!

Edin

2013-03-22 00:12:38

This looks cool, but have you released any soulsplit scripts yet?

rj

2013-03-22 05:33:19

From: Edin
This looks cool, but have you released any soulsplit scripts yet?


No because the include isn't finished

Edin

2013-03-22 09:57:12

From: RJJ95
No because the include isn't finished


Let me know when you release anything for Soulsplit.

BigRedJapan

2013-03-23 20:50:46

Damm I am waiting for this Awesome Guide!

Zorgatone

2013-03-25 19:44:44

Cool, I can't wait to see this guide finished :)

sahibjs

2013-03-28 23:32:44

I also am awaiting the completion of this guide.

Hurry up RJJ :P

rj

2013-03-29 05:35:40

From: sahibjs
I also am awaiting the completion of this guide.

Hurry up RJJ :P


Gah I'm not sure if I should add array part because NPC's move a lot, but finished up with a way to make it more accurate.

MrMonotone

2013-03-30 19:52:32

How accurate is this for 07? you said it wasn't accurate but for what generation? everyone of them?

rj

2013-03-30 22:22:46

From: MrMonotone
How accurate is this for 07? you said it wasn't accurate but for what generation? everyone of them?


It isn't accurate to the point, I would advise you use it to get the general area of an object