Jump to content
BryceTheCoder

Is there a way to make a circle and find the middle of it & then search the circle?

Recommended Posts

Hello there!

 

I have a wondering way.. Honestly, i believe someone like Wanted Freddy or Bixby Sayz would know. But if any one knows please help me..

 

This is what i have:

 

mapppp.png

 

 

And as you can see from the picture, that i will ALWAYS have the little white circle thing with the yellow dot in my map. It will be on my mini-map for sure but not in exactly the same spot everytime unfortunately:/ Soo i was wondering, if i can make it search the whole circle of my minimap and see the white circle from whever it is and if the yellow dot is inside that white circle, then it will go ahead and click that yellow dot.

 

But the problem is, is that i do not know how to make it find that white "circle" and connect it to form a circle to search in and search for that yellow color to click it:/ Soo i was wondering if someone could help please :( Im stuck..

Link to comment
Share on other sites

EpiX, modified your image to clarify what you are asking. He is trying to find the npc represented by the yellow dot in the center of the map relative to the player's position (represented by white dot in center of minimap) and presumably walk there. Having a go at an abyss runecrafter?

[ATTACH=CONFIG]426[/ATTACH]

Ugh, tiny pictures!

 

Anyway OSI has a lot of what you need. Globals.scar has the constants MMCX and MMCY which define the center point of the minimap. Your player is always the white dot in the center of the minimap. Map.scar has some functions that might interest you such as FindMMDots and bunch of others.

 

The only tricky part is figuring out where you are in relation to pouch repair guy. Looking for the outline of the walls around him and figuring out from the angle of where it's found where you are? Map walking is not my specialty.

 

Edit: He is sitting stationary. Is his yellow dot always in the exact same position relative to the surrounding walls? That would simplify looking for him a lot.

Edited by Bixby Sayz
Link to comment
Share on other sites

I have a method for navigating the abyss, but it's pretty complicated and involves a lot of trigonometry combined with TPA sorting/looping and coding.

 

Lets what i thought i was going to hear and thats probably extreeemmeellyy complicated stuff that i personally probably wouldnt understand at all to make. But to answer Bixby Says' question (He is sitting stationary. Is his yellow dot always in the exact same position relative to the surrounding walls? That would simplify looking for him a lot.):

And yes i believe he is stationary there, so i was wondering maybe i can use the FINDMMDots to find it but i do not want to search the whole minimap of cource becuase the other billions of yellow dots inside the minimap, so what do you think is a good way i can approach this? I would understand if i made it "find" a white lined circle on the minimap and then map that a circle radius to search in and theeenn search the for yellow dot, that i believe would work, but i would not to how to code that:/

Link to comment
Share on other sites

Heres my take on this problem. You are looking for a NPC which is a mile away fro many other NPC so i wrote this peace of code which is simple and effective. I ran around the abby and tried it at all points around the center with accurate results. This could give you a head start at-least. It works 100% of the time for me but i only ran it 20 times maybe?

 

[scar]

program FindNPC;

{$DEFINE RS2}

{$DEFINE SMART}

{$I OSI\OSI.Scar}

 

Function GetAllNPC: TPointArray;

Begin

Result := FindMMDots(cldYellowDot);

end;

 

Function SingleOutNPC(Dots: TPointArray): TPoint;

Var

ATPA: T2DPointArray;

Begin

ATPA := SplitTPAEx(Dots, 25,25);

SortATPABySize(ATPA);

Result := ATPA[0][0];

end;

 

Var

TP: TPoint;

begin

SetupOSI;

TP := SingleOutNPC(GetAllNPC);

Writeln(TP.X);

Writeln(TP.Y);

end.

[/scar]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...