BryceTheCoder Posted April 10, 2012 Share Posted April 10, 2012 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: 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.. Quote Link to comment Share on other sites More sharing options...
FHannes Posted April 10, 2012 Share Posted April 10, 2012 I don't entirely understand what you're asking... You just want to search in the minimap? Have you tried [wiki=FindColorCircleTolerance]FindColorCircleTolerance[/wiki]? Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted April 10, 2012 Share Posted April 10, 2012 (edited) 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 April 10, 2012 by Bixby Sayz Quote Link to comment Share on other sites More sharing options...
Wanted Posted April 10, 2012 Share Posted April 10, 2012 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. Quote Link to comment Share on other sites More sharing options...
BryceTheCoder Posted April 11, 2012 Author Share Posted April 11, 2012 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:/ Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted April 11, 2012 Share Posted April 11, 2012 I was thinking more along the lines of creating a dtm with the yellow dot as the center point and few points on the wall as the others, then using the functions to search for a rotated dtm. But again mapwalking not my expertise so maybe not the best way. Quote Link to comment Share on other sites More sharing options...
BryceTheCoder Posted April 11, 2012 Author Share Posted April 11, 2012 Alright well i've actaully never used dtms and would have no clue on going with dtms Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted April 11, 2012 Share Posted April 11, 2012 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] Quote Link to comment Share on other sites More sharing options...
BryceTheCoder Posted April 11, 2012 Author Share Posted April 11, 2012 umm... how do i say this... I LOVE YOU:D Thank you shadow:D Your the best! Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted April 11, 2012 Share Posted April 11, 2012 umm... how do i say this... I LOVE YOU:D Thank you shadow:D Your the best! Lmao, So im guessing it worked? =p Quote Link to comment Share on other sites More sharing options...
BryceTheCoder Posted April 11, 2012 Author Share Posted April 11, 2012 Lmao, So im guessing it worked? =p Hell yesh! Thank you:) Buutt of cource i still hav sum other problems on my script i need to fix:( Quote Link to comment Share on other sites More sharing options...