wundertüte Posted March 31, 2012 Share Posted March 31, 2012 i couldnt find the good old TPAChain(gelbepunkteMM, 1); in wikipedia. is it removed or renamed or still working ? greetz and thanks Quote Link to comment Share on other sites More sharing options...
FHannes Posted March 31, 2012 Share Posted March 31, 2012 http://wiki.scar-divi.com/index.php?title=TPAChain It's in the list of deprecated functions, was renamed to SplitTPA: http://wiki.scar-divi.com/index.php?title=Category:Deprecated_Functions Quote Link to comment Share on other sites More sharing options...
opiumhautopium1 Posted March 31, 2012 Share Posted March 31, 2012 (edited) if u want to look for yellow points at mm may be that can help u ^^ Function FindMMNpcCordis: boolean ; var sch :Array [0..30] of TPoint; i,dis: Integer; begin result:=false; dis:=100 ; if FindColorsTolerance(MMNpc,npcminimap, mmx1, mmy1, mmx2, mmy2,20) then begin result:=true; FindColorTolerance(grx, gry,meinschiff, mmx1, mmy1, mmx2, mmy2,20); WriteLn('SchiffMMOrange ' + IntToStr(Length(MMNpc)) + ' x gefunden'); //WriteLn('ShipOrange: ' + TPAToStr(MMNpc)); Schiffe := SplitTPA(MMNpc, 1); for i := 0 to High(Schiffe) do begin sch[i] := TPAMiddle(Schiffe[i]); //WriteLn (TPAToStr(Schiffe[i])); WriteLn(IntToStr(i)+'tesSchiff,'+ IntToStr(sch[i].x) + ',' + IntToStr(sch[i].y) + ')'); WriteLn ('Abstand zu meinem Schiff '+IntToStr(Distance(grx, gry, sch[i].x, sch[i].y))); If (Distance(grx, gry, sch[i].x, sch[i].y)< dis) then begin dis:=Distance(grx, gry, sch[i].x, sch[i].y) WriteLn ('kleinster Abstand zu meinem Schiff '+IntToStr(dis)+ ',(' +IntToStr(sch[i].x) + ',' + IntToStr(sch[i].y)+ ')'+IntToStr(i)+'tesSchiff,'); xx:= sch[i].x yy:= sch[i].Y end; end; end; writeln('mausxxyy'+inttostr(xx)+' /'+inttostr(yy)); end; this function gives every cordy and the shortest distance to own ship Edited March 31, 2012 by opiumhautopium1 Quote Link to comment Share on other sites More sharing options...
wundertüte Posted April 1, 2012 Author Share Posted April 1, 2012 i will try to make a dynamic waypoint system - detecting guild islands and drive arround them^^ Quote Link to comment Share on other sites More sharing options...
opiumhautopium1 Posted April 1, 2012 Share Posted April 1, 2012 (edited) like this [scar] insel:=[2840966, 2905728, 3696533, 5341095, 3367825]; function Findisland :integer; begin writeln('KontrollpunktFindisland'); result:=0; for ins:=0 to 4 do begin if (FindColorTolerance(inx, iny, insel[ins], mmx1, mmy1, mmx2, mmy2, insel_tolerance)=true) then begin writeln(' insel Identifiziert und cordy saved: '+inttostr(inx)+' /'+inttostr(iny)); end else begin if (FindColorTolerance(inx, iny, insel[ins], mmx1, mmy1, mmx2, mmy2, insel_tolerance)=false) then writeln('im keine Insel gefunden'); end; end; if(iny<=mmy1+44) then begin writeln('Insel k1 ist oben'); result:= result+1; end; if(iny>mmy1+44) then begin writeln('Insel k2 ist unten'); result:= result+2; end; if(inx>=mmx1+44) then begin writeln('Insel k3 ist rechts '); result:=result+20; end; if(inx<mmx1+44) then begin writeln('Insel k4 ist links '); result:=result+10; end; writeln('Die Insel ist '+inttostr(result)) ; //terminatescript; IdentIsland; end;[/scar] ---------- Post added at 06:17 AM ---------- Previous post was at 12:42 AM ---------- u can use the first funtion to ident npc glitter enemy tentacle ..... with the second funktion u can ident the corner where the island is and of course take other corner for my goldscrips it work very good no problems at all [scar] function IdentIsland: Integer; begin writeln('Kontrollpunkt IdentIsland'); writeln('if (inx>'+inttostr(inx-mmx1-6)+')and(inx<'+inttostr(inx-mmx1+6)+')and(iny>'+inttostr(iny-mmy1-6)+')and(iny<'+inttostr(iny-mmy1+6)+')'); inx:= inx-mmx1; iny:= iny-mmy1; if (inx>7)and(inx<19)and(iny>10)and(iny<22) then writeln('Insel gefunden Map 6/1'); if (inx>40)and(inx<52)and(iny>31)and(iny<43) then writeln('Insel gefunden Map 6/2'); if (inx>18)and(inx<30)and(iny>41)and(iny<53) then writeln('Insel gefunden Map 6/3'); if (inx>62)and(inx<73)and(iny>51)and(iny<63) then writeln('Insel gefunden Map 7/1'); if (inx>27)and(inx<39)and(iny>10)and(iny<22) then writeln('Insel gefunden Map 7/2'); if (inx>26)and(inx<38)and(iny>41)and(iny<53) then writeln('Insel gefunden Map 7/3'); if (inx>26)and(inx<38)and(iny>66)and(iny<78) then writeln('Insel gefunden Map 7/4'); if (inx>73)and(inx<83)and(iny>38)and(iny<48) then writeln('Insel gefunden Map 8/1'); if (inx>22)and(inx<34)and(iny>20)and(iny<32) then writeln('Insel gefunden Map 8/2'); if (inx>7)and(inx<19)and(iny>10)and(iny<22) then writeln('Insel gefunden Map 8/3'); if (inx>43)and(inx<55)and(iny>44)and(iny<56) then writeln('Insel gefunden Map 8/4'); if (inx>55)and(inx<67)and(iny>32)and(iny<44) then writeln('Insel gefunden Map 9/1'); if (inx>7)and(inx<19)and(iny>72)and(iny<84) then writeln('Insel gefunden Map 9/2'); if (inx>69)and(inx<81)and(iny>66)and(iny<78) then writeln('Insel gefunden Map 9/3'); if (inx>63)and(inx<75)and(iny>18)and(iny<30) then writeln('Insel gefunden Map 9/4'); if (inx>72)and(inx<84)and(iny>59)and(iny<71) then writeln('Insel gefunden Map 10/1'); if (inx>56)and(inx<68)and(iny>51)and(iny<63) then writeln('Insel gefunden Map 10/2'); if (inx>40)and(inx<52)and(iny>72)and(iny<84) then writeln('Insel gefunden Map 10/3'); inx:= inx+mmx1; iny:= iny+mmy1; //terminatescript; end; function Findisland :integer; begin writeln('KontrollpunktFindisland'); result:=0; for ins:=0 to High(insel) do begin if (FindColorTolerance(inx, iny, insel[ins], mmx1, mmy1, mmx2, mmy2, insel_tolerance)=true) then begin result:= 1; writeln(' Island coordinate saved: '+inttostr(inx)+' /'+inttostr(iny)); break; end else writeln('IslandColor '+inttostr(ins)+' not found'); end; if result = 0 then writeln('Keine Insel gefunden '); if result > 0 then begin if(iny<=mmy1+44) then begin writeln('Island k1 is up'); result:= result+1; end; if(iny>mmy1+44) then begin writeln('Island k2 is down'); result:= result+2; end; if(inx>=mmx1+44) then begin writeln('Island k3 is right'); result:=result+20; end; if(inx<mmx1+44) then begin writeln('Island k4 is left'); result:=result+10; end; writeln('IslandCornerNR is '+inttostr(result)) ; end; //terminatescript; IdentIsland; end; function ShipToIsland: integer; begin begin if (FindColorCircleTolerance(grx, gry,meinschiff, inx,iny, 355, 5)=true) then begin writeln(' insel auf : '+inttostr(inx)+' /'+inttostr(iny)); writeln(' npcgrün gefunden : '+inttostr(grx)+' /'+inttostr(gry)); end; If inx>grx then writeln('ich bin links: '+inttostr(grx)+'der Insel'+inttostr(inx)) else writeln('ich bin rechts: '+inttostr(grx)+' der Insel<'+inttostr(inx)) ; If iny>gry then writeln('ich bin oben: '+inttostr(gry)+'der Insel'+inttostr(iny)) else writeln('ich bin unten: '+inttostr(gry)+'der Insel'+inttostr(iny)) ; If inx >= grx then result:=10; //links+10 rechts+20 If inx < grx then result:=20; If iny >= gry then result:=result + 1; //oben +1 unten +2 If iny < gry then result:=result + 2; writeln('ich befinde mich zur insel '+inttostr(result)) ; // links oben result 11 // rechts unten result 22 // links unten result 12 // rechts oben result 21 end; if (FindColorCircleTolerance(grx, gry,meinschiff, inx,iny, 17, 5)=true) then begin writeln('ShipToIsland ResultINSELWARNUNG ROT'+inttostr(result)) ; result:=result + 200; writeln(result); end; if (FindColorCircleTolerance(grx, gry,meinschiff, inx,iny, 19, 5)=true) then begin result:=result+100; writeln('ShipToIsland ResultINSELWARNUNG gelb'+inttostr(result)) ; end; end;[/scar] my ship is going from event to event and if the ship to island give me a warning i make a drive funktion to next corner. yellow warnig finish job first....... red warnig go away right now ^^ i make a script for me with this insel id list to drive across the maps from 20 to to the down maps and if i drive from 19 to 5/1( or every other map ) my script find the way without crossing a island...... i start at 20 go for a cup of coffee and when ill be back my ship is on a lower map... i got 3 ident database seperate for blue green or brown water if u like it use it .... if not ..... ;-P Edited April 1, 2012 by opiumhautopium1 Quote Link to comment Share on other sites More sharing options...